Avoid the Hadoop objectMapper in the local IndexTask. Fixes #1545.

This commit is contained in:
Gian Merlino 2015-08-11 10:40:53 -07:00
parent fadd8a4342
commit bc0c7dd65d
1 changed files with 2 additions and 10 deletions

View File

@ -39,7 +39,6 @@ import io.druid.data.input.FirehoseFactory;
import io.druid.data.input.InputRow; import io.druid.data.input.InputRow;
import io.druid.data.input.Rows; import io.druid.data.input.Rows;
import io.druid.granularity.QueryGranularity; import io.druid.granularity.QueryGranularity;
import io.druid.indexer.HadoopDruidIndexerConfig;
import io.druid.indexing.common.TaskLock; import io.druid.indexing.common.TaskLock;
import io.druid.indexing.common.TaskStatus; import io.druid.indexing.common.TaskStatus;
import io.druid.indexing.common.TaskToolbox; import io.druid.indexing.common.TaskToolbox;
@ -267,8 +266,7 @@ public class IndexTask extends AbstractFixedIntervalTask
inputRow inputRow
); );
collector.add( collector.add(
hashFunction.hashBytes(HadoopDruidIndexerConfig.jsonMapper.writeValueAsBytes(groupKey)) hashFunction.hashBytes(jsonMapper.writeValueAsBytes(groupKey)).asBytes()
.asBytes()
); );
} }
} }
@ -290,13 +288,7 @@ public class IndexTask extends AbstractFixedIntervalTask
shardSpecs.add(new NoneShardSpec()); shardSpecs.add(new NoneShardSpec());
} else { } else {
for (int i = 0; i < numberOfShards; ++i) { for (int i = 0; i < numberOfShards; ++i) {
shardSpecs.add( shardSpecs.add(new HashBasedNumberedShardSpec(i, numberOfShards, jsonMapper));
new HashBasedNumberedShardSpec(
i,
numberOfShards,
HadoopDruidIndexerConfig.jsonMapper
)
);
} }
} }