public RunStats delegateGetBucketForFourthousandYearDates(int buckets) throws Exception {
  long startTime=System.currentTimeMillis();
  PrimaryIndexBucketGeneratorImpl ibg=new PrimaryIndexBucketGeneratorImpl(FieldDataType.DATE_TIME,buckets);
  PrimaryIndexBucketLocatorImpl locator=new PrimaryIndexBucketLocatorImpl(null,ibg.generateBuckets(),null,null,null,null,null,null,null);
  logger.debug("test to getBucket for the bucket distribution on FourthousandYear dates");
  SimpleDateFormat simpleDtFormat=new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
  String startDate="0015-07-14T00:00:00.000-06:00";
  HashMap<Long,List<Object>> hm=new HashMap<>();
  SummaryStatistics stats=new SummaryStatistics();
  Date date=null;
  for (int i=0; i < 1460000; i++) {
    date=simpleDtFormat.parse(startDate);
    final Date TIME=new Date((long)(Math.random() * 86400000l));
    date.setTime(date.getTime() + TIME.getTime());
    Long bucketId=locator.getBucket(startDate,FieldDataType.DATE_TIME);
    calculate(hm,stats,bucketId,startDate);
    date.setTime(date.getTime() + 86400000l - TIME.getTime());
    startDate=simpleDtFormat.format(date.getTime());
  }
  long runTime=System.currentTimeMillis() - startTime;
  RunStats runStats=new RunStats("BucketForFourthousandYearDates",FieldDataType.DATE_TIME,runTime,stats,hm);
  logger.debug(runStats.toString());
  return runStats;
}

public RunStats delegateGetBucketForFourthousandYearDates ( int buckets ) throws Exception { long startTime = System . currentTimeMillis ( ) ; PrimaryIndexBucketGeneratorImpl ibg = new PrimaryIndexBucketGeneratorImpl ( FieldDataType . DATE_TIME , buckets ) ; PrimaryIndexBucketLocatorImpl locator = new PrimaryIndexBucketLocatorImpl ( null , ibg . generateBuckets ( ) , null , null , null , null , null , null , null ) ; logger . debug ( "test to getBucket for the bucket distribution on FourthousandYear dates" ) ; SimpleDateFormat simpleDtFormat = new SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" ) ; String startDate = "0015-07-14T00:00:00.000-06:00" ; HashMap < Long , List < Object > > hm = new HashMap < > ( ) ; SummaryStatistics stats = new SummaryStatistics ( ) ; Date date = null ; for ( int i = 0 ; i < 1460000 ; i ++ ) { date = simpleDtFormat . parse ( startDate ) ; final Date TIME = new Date ( ( long ) ( Math . random ( ) * 86400000l ) ) ; date . setTime ( date . getTime ( ) + TIME . getTime ( ) ) ; Long bucketId = locator . getBucket ( startDate , FieldDataType . DATE_TIME ) ; calculate ( hm , stats , bucketId , startDate ) ; date . setTime ( date . getTime ( ) + 86400000l - TIME . getTime ( ) ) ; startDate = simpleDtFormat . format ( date . getTime ( ) ) ; } long runTime = System . currentTimeMillis ( ) - startTime ; RunStats runStats = new RunStats ( "BucketForFourthousandYearDates" , FieldDataType . DATE_TIME , runTime , stats , hm ) ; logger . debug ( runStats . toString ( ) ) ; return runStats ; }
checks the bucket distribution for four thousand year date values a random date value per day is considered
