mirror of
https://github.com/apache/druid.git
synced 2025-02-17 07:25:02 +00:00
fix according to code review
This commit is contained in:
parent
778fd0f10e
commit
d11d0a8284
@ -29,6 +29,7 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.io.Closeables;
|
||||
import com.google.common.primitives.Longs;
|
||||
import com.metamx.common.IAE;
|
||||
import com.metamx.common.ISE;
|
||||
import com.metamx.common.logger.Logger;
|
||||
import com.metamx.druid.aggregation.AggregatorFactory;
|
||||
@ -321,7 +322,11 @@ public class IndexGeneratorJob implements Jobby
|
||||
List<QueryableIndex> indexes = Lists.newArrayListWithCapacity(indexCount);
|
||||
final File mergedBase;
|
||||
|
||||
if (toMerge.size() == 0 && !index.isEmpty()) {
|
||||
if (toMerge.size() == 0) {
|
||||
if (index.isEmpty()) {
|
||||
throw new IAE("If you try to persist empty indexes you are going to have a bad time");
|
||||
}
|
||||
|
||||
mergedBase = new File(baseFlushFile, "merged");
|
||||
IndexMerger.persist(
|
||||
index, interval, mergedBase, new IndexMerger.ProgressIndicator()
|
||||
|
Loading…
x
Reference in New Issue
Block a user