Merge pull request #1397 from druid-io/fix-index-task-slow

Make the index task use indexmerger and not indexmaker
This commit is contained in:
Xavier Léauté 2015-05-28 17:14:48 -07:00
commit 2fb2b6ce6b
1 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ import io.druid.data.input.InputRow;
import io.druid.query.Query; import io.druid.query.Query;
import io.druid.query.QueryRunner; import io.druid.query.QueryRunner;
import io.druid.segment.IndexIO; import io.druid.segment.IndexIO;
import io.druid.segment.IndexMaker; import io.druid.segment.IndexMerger;
import io.druid.segment.QueryableIndex; import io.druid.segment.QueryableIndex;
import io.druid.segment.SegmentUtils; import io.druid.segment.SegmentUtils;
import io.druid.segment.incremental.IndexSizeExceededException; import io.druid.segment.incremental.IndexSizeExceededException;
@ -158,7 +158,7 @@ public class YeOldePlumberSchool implements PlumberSchool
} }
fileToUpload = new File(tmpSegmentDir, "merged"); fileToUpload = new File(tmpSegmentDir, "merged");
IndexMaker.mergeQueryableIndex(indexes, schema.getAggregators(), fileToUpload, config.getIndexSpec()); IndexMerger.mergeQueryableIndex(indexes, schema.getAggregators(), fileToUpload, config.getIndexSpec());
} }
// Map merged segment so we can extract dimensions // Map merged segment so we can extract dimensions
@ -203,7 +203,7 @@ public class YeOldePlumberSchool implements PlumberSchool
log.info("Spilling index[%d] with rows[%d] to: %s", indexToPersist.getCount(), rowsToPersist, dirToPersist); log.info("Spilling index[%d] with rows[%d] to: %s", indexToPersist.getCount(), rowsToPersist, dirToPersist);
try { try {
IndexMaker.persist( IndexMerger.persist(
indexToPersist.getIndex(), indexToPersist.getIndex(),
dirToPersist, dirToPersist,
config.getIndexSpec() config.getIndexSpec()