all tests passed. Ready for merge

This commit is contained in:
Dhruv Parthasarathy 2013-08-08 16:23:26 -07:00
parent eed9e1b373
commit 01b35ec819
1 changed files with 2 additions and 11 deletions

View File

@ -21,7 +21,6 @@ package com.metamx.druid.master;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.common.collect.HashMultiset; import com.google.common.collect.HashMultiset;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
@ -99,16 +98,8 @@ public class DruidMasterSegmentMerger implements DruidMasterHelper
SegmentsToMerge segmentsToMerge = new SegmentsToMerge(); SegmentsToMerge segmentsToMerge = new SegmentsToMerge();
for (int i = 0; i < timelineObjects.size(); i++) { for (int i = 0; i < timelineObjects.size(); i++) {
if (!segmentsToMerge.add(timelineObjects.get(i))
try { || segmentsToMerge.getByteCount() > params.getMasterSegmentSettings().getMergeBytesLimit()
segmentsToMerge.add(timelineObjects.get(i));
}
catch (Exception e) {
log.error("Unable to merge segments for %s", entry.getKey());
throw Throwables.propagate(e);
}
if (segmentsToMerge.getByteCount() > params.getMasterSegmentSettings().getMergeBytesLimit()
|| segmentsToMerge.getSegmentCount() >= params.getMasterSegmentSettings().getMergeSegmentsLimit()) { || segmentsToMerge.getSegmentCount() >= params.getMasterSegmentSettings().getMergeSegmentsLimit()) {
i -= segmentsToMerge.backtrack(params.getMasterSegmentSettings().getMergeBytesLimit()); i -= segmentsToMerge.backtrack(params.getMasterSegmentSettings().getMergeBytesLimit());