From ccddbf8747928f7da108bd6b64444754f31b9f37 Mon Sep 17 00:00:00 2001 From: fjy Date: Thu, 15 Jan 2015 14:04:55 -0800 Subject: [PATCH] minor rename of things in hadoop ingestion config to match 0.6.x --- .../io/druid/indexer/HadoopDruidIndexerConfig.java | 14 +++++++------- .../indexer/HadoopDruidIndexerConfigTest.java | 2 +- .../indexing/common/task/HadoopIndexTask.java | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerConfig.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerConfig.java index d86ba7b7115..99fb855f9f8 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerConfig.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerConfig.java @@ -114,9 +114,9 @@ public class HadoopDruidIndexerConfig INVALID_ROW_COUNTER } - public static HadoopDruidIndexerConfig fromSchema(HadoopIngestionSpec schema) + public static HadoopDruidIndexerConfig fromSpec(HadoopIngestionSpec spec) { - return new HadoopDruidIndexerConfig(schema); + return new HadoopDruidIndexerConfig(spec); } public static HadoopDruidIndexerConfig fromMap(Map argSpec) @@ -188,12 +188,12 @@ public class HadoopDruidIndexerConfig @JsonCreator public HadoopDruidIndexerConfig( - final @JsonProperty("spec") HadoopIngestionSpec schema + final @JsonProperty("spec") HadoopIngestionSpec spec ) { - this.schema = schema; - this.pathSpec = jsonMapper.convertValue(schema.getIOConfig().getPathSpec(), PathSpec.class); - for (Map.Entry> entry : schema.getTuningConfig().getShardSpecs().entrySet()) { + this.schema = spec; + this.pathSpec = jsonMapper.convertValue(spec.getIOConfig().getPathSpec(), PathSpec.class); + for (Map.Entry> entry : spec.getTuningConfig().getShardSpecs().entrySet()) { if (entry.getValue() == null || entry.getValue().isEmpty()) { continue; } @@ -216,7 +216,7 @@ public class HadoopDruidIndexerConfig hadoopShardSpecLookup.put(hadoopyShardSpec.getActualSpec(), hadoopyShardSpec); } } - this.rollupGran = schema.getDataSchema().getGranularitySpec().getQueryGranularity(); + this.rollupGran = spec.getDataSchema().getGranularitySpec().getQueryGranularity(); } @JsonProperty(value = "spec") diff --git a/indexing-hadoop/src/test/java/io/druid/indexer/HadoopDruidIndexerConfigTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/HadoopDruidIndexerConfigTest.java index 5d891257e0e..26bdf2e1fbc 100644 --- a/indexing-hadoop/src/test/java/io/druid/indexer/HadoopDruidIndexerConfigTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/HadoopDruidIndexerConfigTest.java @@ -187,7 +187,7 @@ public class HadoopDruidIndexerConfigTest null ) ); - HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromSchema(spec); + HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromSpec(spec); final List dims = Arrays.asList("diM1", "dIM2"); final ImmutableMap values = ImmutableMap.of( "Dim1", 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 e27d70648b1..0fa15bb9604 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 @@ -286,7 +286,7 @@ public class HadoopIndexTask extends AbstractTask schema, HadoopIngestionSpec.class ); - final HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromSchema( + final HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromSpec( theSchema .withTuningConfig(theSchema.getTuningConfig().withVersion(version)) ); @@ -324,7 +324,7 @@ public class HadoopIndexTask extends AbstractTask schema, HadoopIngestionSpec.class ); - final HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromSchema( + final HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromSpec( theSchema .withIOConfig(theSchema.getIOConfig().withSegmentOutputPath(segmentOutputPath)) .withTuningConfig(theSchema.getTuningConfig().withWorkingPath(workingPath))