private static int numInitialSplits(long numRecords){
  final int maxSplits=100;
  final long recordsPerSplit=10000;
  return (int)Math.min(maxSplits,numRecords / recordsPerSplit + 1);
}

private static int numInitialSplits ( long numRecords ) { final int maxSplits = 100 ; final long recordsPerSplit = 10000 ; return ( int ) Math . min ( maxSplits , numRecords / recordsPerSplit + 1 ) ; }
pick a number of initial splits based on the number of records expected to be processed .
