public static RunStats delegateGetBucketForIntegers(int buckets) throws Exception {
  Long startTime=System.currentTimeMillis();
  PrimaryIndexBucketGeneratorImpl ibg=new PrimaryIndexBucketGeneratorImpl(FieldDataType.INTEGER,buckets);
  PrimaryIndexBucketLocatorImpl locator=new PrimaryIndexBucketLocatorImpl(null,null,null,ibg.generateBuckets(),null,null,null,null,null);
  logger.debug("test to getBucket for the bucket distribution");
  HashMap<Long,List<Object>> hm=new HashMap<>();
  SummaryStatistics stats=new SummaryStatistics();
  for (int inputInt=-2000000; inputInt < 2000000; inputInt++) {
    Long bucketId=locator.getBucket(inputInt,FieldDataType.INTEGER);
    calculate(hm,stats,bucketId,inputInt);
  }
  Long runTime=System.currentTimeMillis() - startTime;
  RunStats runStats=new RunStats("BucketForIntegers",FieldDataType.INTEGER,runTime,stats,hm);
  logger.debug(runStats.toString());
  return runStats;
}

public static RunStats delegateGetBucketForIntegers ( int buckets ) throws Exception { Long startTime = System . currentTimeMillis ( ) ; PrimaryIndexBucketGeneratorImpl ibg = new PrimaryIndexBucketGeneratorImpl ( FieldDataType . INTEGER , buckets ) ; PrimaryIndexBucketLocatorImpl locator = new PrimaryIndexBucketLocatorImpl ( null , null , null , ibg . generateBuckets ( ) , null , null , null , null , null ) ; logger . debug ( "test to getBucket for the bucket distribution" ) ; HashMap < Long , List < Object > > hm = new HashMap < > ( ) ; SummaryStatistics stats = new SummaryStatistics ( ) ; for ( int inputInt = - 2000000 ; inputInt < 2000000 ; inputInt ++ ) { Long bucketId = locator . getBucket ( inputInt , FieldDataType . INTEGER ) ; calculate ( hm , stats , bucketId , inputInt ) ; } Long runTime = System . currentTimeMillis ( ) - startTime ; RunStats runStats = new RunStats ( "BucketForIntegers" , FieldDataType . INTEGER , runTime , stats , hm ) ; logger . debug ( runStats . toString ( ) ) ; return runStats ; }
test to check the bucket distribution for the common integer values
