change numRecords from Int to Long

in case we config num-records larger than Int.MaxValue (about 2 billion)