From 50a191425cfc4bea1faffab575fe7ffbbe7e56b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Fri, 7 Nov 2014 11:11:12 -0800 Subject: [PATCH] fix injection on MetadataStorageUpdaterJob --- .../java/io/druid/indexer/HadoopDruidIndexerJob.java | 8 ++++++-- .../io/druid/indexer/MetadataStorageUpdaterJob.java | 11 +++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerJob.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerJob.java index bcab46bcd98..32cd0f4d3f1 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerJob.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerJob.java @@ -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; } diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/MetadataStorageUpdaterJob.java b/indexing-hadoop/src/main/java/io/druid/indexer/MetadataStorageUpdaterJob.java index 67823462849..21e42f7c145 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/MetadataStorageUpdaterJob.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/MetadataStorageUpdaterJob.java @@ -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; } -} \ No newline at end of file +}