fix injection on MetadataStorageUpdaterJob

This commit is contained in:
Xavier Léauté 2014-11-07 11:11:12 -08:00
parent 2336e6c167
commit 50a191425c
2 changed files with 11 additions and 8 deletions

View File

@ -38,14 +38,18 @@ public class HadoopDruidIndexerJob implements Jobby
@Inject
public HadoopDruidIndexerJob(
HadoopDruidIndexerConfig config
HadoopDruidIndexerConfig config,
MetadataStorageUpdaterJobHandler handler
)
{
config.verify();
this.config = config;
if (config.isUpdaterJobSpecSet()) {
metadataStorageUpdaterJob = new MetadataStorageUpdaterJob(config);
metadataStorageUpdaterJob = new MetadataStorageUpdaterJob(
config,
handler
);
} else {
metadataStorageUpdaterJob = null;
}

View File

@ -19,7 +19,6 @@
package io.druid.indexer;
import com.google.inject.Inject;
import io.druid.timeline.DataSegment;
import java.util.List;
@ -29,15 +28,15 @@ import java.util.List;
public class MetadataStorageUpdaterJob implements Jobby
{
private final HadoopDruidIndexerConfig config;
@Inject
private MetadataStorageUpdaterJobHandler handler;
private final MetadataStorageUpdaterJobHandler handler;
public MetadataStorageUpdaterJob(
HadoopDruidIndexerConfig config
HadoopDruidIndexerConfig config,
MetadataStorageUpdaterJobHandler handler
)
{
this.config = config;
this.handler = handler;
}
@Override
@ -49,4 +48,4 @@ public class MetadataStorageUpdaterJob implements Jobby
return true;
}
}
}