mirror of https://github.com/apache/druid.git
fix injection on MetadataStorageUpdaterJob
This commit is contained in:
parent
2336e6c167
commit
50a191425c
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue