mirror of https://github.com/apache/druid.git
fix up some bugs
This commit is contained in:
parent
a0782d4c54
commit
c3bea245a7
|
@ -37,13 +37,13 @@ public class IndexingServiceTaskLogsModule implements Module
|
||||||
public void configure(Binder binder)
|
public void configure(Binder binder)
|
||||||
{
|
{
|
||||||
PolyBind.createChoice(binder, "druid.indexer.logs.type", Key.get(TaskLogs.class), Key.get(FileTaskLogs.class));
|
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<String, TaskLogs> taskLogBinder = Binders.taskLogsBinder(binder);
|
final MapBinder<String, TaskLogs> taskLogBinder = Binders.taskLogsBinder(binder);
|
||||||
taskLogBinder.addBinding("noop").to(NoopTaskLogs.class).in(LazySingleton.class);
|
taskLogBinder.addBinding("noop").to(NoopTaskLogs.class).in(LazySingleton.class);
|
||||||
taskLogBinder.addBinding("file").to(FileTaskLogs.class).in(LazySingleton.class);
|
taskLogBinder.addBinding("file").to(FileTaskLogs.class).in(LazySingleton.class);
|
||||||
binder.bind(NoopTaskLogs.class).in(LazySingleton.class);
|
binder.bind(NoopTaskLogs.class).in(LazySingleton.class);
|
||||||
binder.bind(FileTaskLogs.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);
|
binder.bind(TaskLogPusher.class).to(TaskLogs.class);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
package io.druid.indexing.common.config;
|
package io.druid.indexing.common.config;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
@ -31,7 +30,10 @@ public class FileTaskLogsConfig
|
||||||
@NotNull
|
@NotNull
|
||||||
private File directory = new File("log");
|
private File directory = new File("log");
|
||||||
|
|
||||||
@JsonCreator
|
public FileTaskLogsConfig()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public FileTaskLogsConfig(File directory)
|
public FileTaskLogsConfig(File directory)
|
||||||
{
|
{
|
||||||
this.directory = directory;
|
this.directory = directory;
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class LocalFirehoseFactory implements FirehoseFactory<StringInputRowParse
|
||||||
public Firehose connect(StringInputRowParser firehoseParser) throws IOException
|
public Firehose connect(StringInputRowParser firehoseParser) throws IOException
|
||||||
{
|
{
|
||||||
Collection<File> foundFiles = FileUtils.listFiles(
|
Collection<File> foundFiles = FileUtils.listFiles(
|
||||||
baseDir,
|
baseDir.getAbsoluteFile(),
|
||||||
new WildcardFileFilter(filter),
|
new WildcardFileFilter(filter),
|
||||||
TrueFileFilter.INSTANCE
|
TrueFileFilter.INSTANCE
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue