minor rename of things in hadoop ingestion config to match 0.6.x

This commit is contained in:
fjy 2015-01-15 14:04:55 -08:00
parent 6f1537d153
commit ccddbf8747
3 changed files with 10 additions and 10 deletions

View File

@ -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<String, Object> 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<DateTime, List<HadoopyShardSpec>> entry : schema.getTuningConfig().getShardSpecs().entrySet()) {
this.schema = spec;
this.pathSpec = jsonMapper.convertValue(spec.getIOConfig().getPathSpec(), PathSpec.class);
for (Map.Entry<DateTime, List<HadoopyShardSpec>> 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")

View File

@ -187,7 +187,7 @@ public class HadoopDruidIndexerConfigTest
null
)
);
HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromSchema(spec);
HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromSpec(spec);
final List<String> dims = Arrays.asList("diM1", "dIM2");
final ImmutableMap<String, Object> values = ImmutableMap.<String, Object>of(
"Dim1",

View File

@ -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))