From 123db3da4d8c347109b0c1f17ef5bde5bb6695b7 Mon Sep 17 00:00:00 2001 From: fjy Date: Tue, 9 Dec 2014 15:47:28 -0800 Subject: [PATCH] fix another broken ut --- .../io/druid/indexing/common/task/HadoopIndexTask.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java index f195872dc55..086aef984b4 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java @@ -66,13 +66,14 @@ public class HadoopIndexTask extends AbstractTask private static final ExtensionsConfig extensionsConfig; final static Injector injector = GuiceInjectors.makeStartupInjector(); + static { extensionsConfig = injector.getInstance(ExtensionsConfig.class); } private static String getTheDataSource(HadoopIngestionSpec spec) { - return spec.getDataSchema().getDataSource(); + return spec.getDataSchema().getDataSource(); } @JsonIgnore @@ -85,7 +86,7 @@ public class HadoopIndexTask extends AbstractTask /** * @param spec is used by the HadoopDruidIndexerJob to set up the appropriate parameters * for creating Druid index segments. It may be modified. - * + *

* Here, we will ensure that the DbConnectorConfig field of the spec is set to null, such that the * job does not push a list of published segments the database. Instead, we will use the method * IndexGeneratorJob.getPublishedSegments() to simply return a list of the published @@ -110,11 +111,13 @@ public class HadoopIndexTask extends AbstractTask this.spec = spec; // Some HadoopIngestionSpec stuff doesn't make sense in the context of the indexing service + if (this.spec.getTuningConfig().getWorkingPath() != null) { + log.error("workingPath should be absent in your spec! Ignoring"); + } Preconditions.checkArgument( this.spec.getIOConfig().getSegmentOutputPath() == null, "segmentOutputPath must be absent" ); - Preconditions.checkArgument(this.spec.getTuningConfig().getWorkingPath() == null, "workingPath must be absent"); Preconditions.checkArgument( this.spec.getIOConfig().getMetadataUpdateSpec() == null, "metadataUpdateSpec must be absent"