public int calculatePartition(int splitno,int numPartitions){
  final int partitionSize=(int)(Math.ceil((double)numSplits / (double)numPartitions));
  return splitno / partitionSize;
}

public int calculatePartition ( int splitno , int numPartitions ) { final int partitionSize = ( int ) ( Math . ceil ( ( double ) numSplits / ( double ) numPartitions ) ) ; return splitno / partitionSize ; }
calculates the partitions for a given split number .
