From c3bea245a7a0962c644b1605ecdea1205ce92982 Mon Sep 17 00:00:00 2001 From: fjy Date: Tue, 30 Sep 2014 17:20:52 -0700 Subject: [PATCH] fix up some bugs --- .../java/io/druid/guice/IndexingServiceTaskLogsModule.java | 2 +- .../io/druid/indexing/common/config/FileTaskLogsConfig.java | 6 ++++-- .../segment/realtime/firehose/LocalFirehoseFactory.java | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/indexing-service/src/main/java/io/druid/guice/IndexingServiceTaskLogsModule.java b/indexing-service/src/main/java/io/druid/guice/IndexingServiceTaskLogsModule.java index 33452d0dfd9..69c5f4b99ba 100644 --- a/indexing-service/src/main/java/io/druid/guice/IndexingServiceTaskLogsModule.java +++ b/indexing-service/src/main/java/io/druid/guice/IndexingServiceTaskLogsModule.java @@ -37,13 +37,13 @@ public class IndexingServiceTaskLogsModule implements Module public void configure(Binder binder) { PolyBind.createChoice(binder, "druid.indexer.logs.type", Key.get(TaskLogs.class), Key.get(FileTaskLogs.class)); + JsonConfigProvider.bind(binder, "druid.indexer.logs", FileTaskLogsConfig.class); final MapBinder taskLogBinder = Binders.taskLogsBinder(binder); taskLogBinder.addBinding("noop").to(NoopTaskLogs.class).in(LazySingleton.class); taskLogBinder.addBinding("file").to(FileTaskLogs.class).in(LazySingleton.class); binder.bind(NoopTaskLogs.class).in(LazySingleton.class); binder.bind(FileTaskLogs.class).in(LazySingleton.class); - JsonConfigProvider.bind(binder, "druid.indexer.logs", FileTaskLogsConfig.class); binder.bind(TaskLogPusher.class).to(TaskLogs.class); } diff --git a/indexing-service/src/main/java/io/druid/indexing/common/config/FileTaskLogsConfig.java b/indexing-service/src/main/java/io/druid/indexing/common/config/FileTaskLogsConfig.java index 8228bda465a..cc96ad9ae23 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/config/FileTaskLogsConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/config/FileTaskLogsConfig.java @@ -19,7 +19,6 @@ package io.druid.indexing.common.config; -import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import javax.validation.constraints.NotNull; @@ -31,7 +30,10 @@ public class FileTaskLogsConfig @NotNull private File directory = new File("log"); - @JsonCreator + public FileTaskLogsConfig() + { + } + public FileTaskLogsConfig(File directory) { this.directory = directory; diff --git a/server/src/main/java/io/druid/segment/realtime/firehose/LocalFirehoseFactory.java b/server/src/main/java/io/druid/segment/realtime/firehose/LocalFirehoseFactory.java index 22848b4cb2d..4246e145fde 100644 --- a/server/src/main/java/io/druid/segment/realtime/firehose/LocalFirehoseFactory.java +++ b/server/src/main/java/io/druid/segment/realtime/firehose/LocalFirehoseFactory.java @@ -81,7 +81,7 @@ public class LocalFirehoseFactory implements FirehoseFactory foundFiles = FileUtils.listFiles( - baseDir, + baseDir.getAbsoluteFile(), new WildcardFileFilter(filter), TrueFileFilter.INSTANCE );