if (value > bucketSize) { if (logger.isErrorEnabled()) { logger.error("bucket "+bucket+", Bucket start "+TimeUtils.dateString(bucket_start)+ ", end "+TimeUtils.dateString(bucket_end)); logger.error("Task start "+TimeUtils.dateString(start)+", end "+TimeUtils.dateString(end)); logger.error("Interval start "+TimeUtils.dateString(interval_start)+", end "+ TimeUtils.dateString(interval_end)); } int b_end = convertTimeToBucket(end); if (logger.isErrorEnabled()) { logger.error("Calculated bucket end "+b_end+", task end "+TimeUtils.dateString(end)); }
if (value > bucketSize) { if (logger.isErrorEnabled()) { logger.error("bucket " + bucket + ", Bucket start " + TimeUtils.dateString(bucket_start) + ", end " + TimeUtils.dateString(bucket_end)); logger.error("Task start " + TimeUtils.dateString(start) + ", end " + TimeUtils.dateString(end)); logger.error("Interval start " + TimeUtils.dateString(interval_start) + ", end " + TimeUtils.dateString(interval_end)); } int b_end = convertTimeToBucket(end); if (logger.isErrorEnabled()) { logger.error("Calculated bucket end " + b_end + ", task end " + TimeUtils.dateString(end)); } } return value;
  private int getDaysSpanned(int bucket, long start, long end) {    long bucket_start = convertBucketToTime(bucket);    long bucket_end = bucket_start + MSEC_PER_BUCKET;    long interval_start = Math.max(start, bucket_start);    long interval_end = Math.min(end, bucket_end);    int value = (int)((interval_end - interval_start)/TimeUtils.MSEC_PER_DAY);//     if (value < 0) {//       logger.error("Bucket start: "+bucket_start+", Bucket end: "+bucket_end+// 		   ", Task start: "+TimeUtils.dateString(start)+// 		   ", Task end: "+TimeUtils.dateString(end)+// 		   "interval start: "+TimeUtils.dateString(interval_start)+// 		   "interval end: "+TimeUtils.dateString(interval_end));//     }    if (value > bucketSize) {      if (logger.isErrorEnabled()) {        logger.error("bucket "+bucket+", Bucket start "+TimeUtils.dateString(bucket_start)+                     ", end "+TimeUtils.dateString(bucket_end));        logger.error("Task start "+TimeUtils.dateString(start)+", end "+TimeUtils.dateString(end));        logger.error("Interval start "+TimeUtils.dateString(interval_start)+", end "+                     TimeUtils.dateString(interval_end));      }      int b_end = convertTimeToBucket(end);      if (logger.isErrorEnabled()) {        logger.error("Calculated bucket end "+b_end+", task end "+TimeUtils.dateString(end));      }    }    return value;  }