mirror of https://github.com/apache/druid.git
Screwed up the conflicts on rebasing. Fixorz orz orz
This commit is contained in:
parent
99305b29c8
commit
52ba60963e
|
@ -28,9 +28,11 @@ import com.metamx.common.config.Config;
|
|||
import com.metamx.common.lifecycle.Lifecycle;
|
||||
import com.metamx.common.logger.Logger;
|
||||
import com.metamx.druid.curator.PotentiallyGzippedCompressionProvider;
|
||||
import com.metamx.druid.http.EmittingRequestLogger;
|
||||
import com.metamx.druid.http.FileRequestLogger;
|
||||
import com.metamx.druid.http.RequestLogger;
|
||||
import com.metamx.druid.utils.PropUtils;
|
||||
import com.metamx.emitter.core.Emitter;
|
||||
import org.apache.curator.framework.CuratorFramework;
|
||||
import org.apache.curator.framework.CuratorFrameworkFactory;
|
||||
import org.apache.curator.retry.BoundedExponentialBackoffRetry;
|
||||
|
@ -297,4 +299,24 @@ public class Initialization
|
|||
new File(PropUtils.getProperty(props, "druid.request.logging.dir"))
|
||||
);
|
||||
}
|
||||
|
||||
public static RequestLogger makeEmittingRequestLogger(Properties props, Emitter emitter)
|
||||
{
|
||||
return new EmittingRequestLogger(
|
||||
PropUtils.getProperty(props, "druid.service"),
|
||||
PropUtils.getProperty(props, "druid.host"),
|
||||
emitter,
|
||||
PropUtils.getProperty(props, "druid.request.logging.feed")
|
||||
);
|
||||
}
|
||||
|
||||
public static String addressFromHost(final String host)
|
||||
{
|
||||
final int colon = host.indexOf(':');
|
||||
if (colon < 0) {
|
||||
return host;
|
||||
} else {
|
||||
return host.substring(0, colon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -569,7 +569,7 @@ public class IndexerCoordinatorNode extends QueryableNode<IndexerCoordinatorNode
|
|||
if (config.getStorageImpl().equals("local")) {
|
||||
taskStorage = new HeapMemoryTaskStorage();
|
||||
} else if (config.getStorageImpl().equals("db")) {
|
||||
final IndexerDbConnectorConfig dbConnectorConfig = configFactory.build(IndexerDbConnectorConfig.class);
|
||||
final IndexerDbConnectorConfig dbConnectorConfig = getConfigFactory().build(IndexerDbConnectorConfig.class);
|
||||
DbConnector.createTaskTable(dbi, dbConnectorConfig.getTaskTable());
|
||||
DbConnector.createTaskLogTable(dbi, dbConnectorConfig.getTaskLogTable());
|
||||
DbConnector.createTaskLockTable(dbi, dbConnectorConfig.getTaskLockTable());
|
||||
|
|
Loading…
Reference in New Issue