mirror of https://github.com/apache/druid.git
1) Configuration fixes, slowly gonna make the MasterMain actually start up!
This commit is contained in:
parent
149c2e3560
commit
e892d14f77
|
@ -21,11 +21,14 @@ package com.metamx.druid.initialization;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public class CuratorDiscoveryConfig
|
public class CuratorDiscoveryConfig
|
||||||
{
|
{
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
@NotNull
|
||||||
private String path = null;
|
private String path = null;
|
||||||
|
|
||||||
public String getPath()
|
public String getPath()
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class HttpClientModule implements Module
|
||||||
|
|
||||||
public Duration getReadTimeout()
|
public Duration getReadTimeout()
|
||||||
{
|
{
|
||||||
return readTimeout.toStandardDuration();
|
return readTimeout == null ? null : readTimeout.toStandardDuration();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,10 @@
|
||||||
|
|
||||||
package com.metamx.druid.http;
|
package com.metamx.druid.http;
|
||||||
|
|
||||||
|
import com.google.common.base.Supplier;
|
||||||
import com.google.inject.Injector;
|
import com.google.inject.Injector;
|
||||||
import com.google.inject.Key;
|
import com.google.inject.Key;
|
||||||
|
import com.google.inject.TypeLiteral;
|
||||||
import com.google.inject.servlet.GuiceFilter;
|
import com.google.inject.servlet.GuiceFilter;
|
||||||
import com.metamx.common.lifecycle.Lifecycle;
|
import com.metamx.common.lifecycle.Lifecycle;
|
||||||
import com.metamx.common.logger.Logger;
|
import com.metamx.common.logger.Logger;
|
||||||
|
@ -71,12 +73,13 @@ public class MasterMain
|
||||||
|
|
||||||
final Lifecycle lifecycle = injector.getInstance(Lifecycle.class);
|
final Lifecycle lifecycle = injector.getInstance(Lifecycle.class);
|
||||||
|
|
||||||
final DruidNodeConfig nodeConfig = injector.getInstance(DruidNodeConfig.class);
|
final Supplier<DruidNodeConfig> nodeConfig = injector.getInstance(Key.get(new TypeLiteral<Supplier<DruidNodeConfig>>(){}));
|
||||||
|
|
||||||
final ServiceAnnouncer serviceAnnouncer = injector.getInstance(ServiceAnnouncer.class);
|
final ServiceAnnouncer serviceAnnouncer = injector.getInstance(ServiceAnnouncer.class);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Initialization.announceDefaultService(nodeConfig, serviceAnnouncer, lifecycle);
|
// TODO: Make the announcement work through the lifecycle
|
||||||
|
Initialization.announceDefaultService(nodeConfig.get(), serviceAnnouncer, lifecycle);
|
||||||
lifecycle.start();
|
lifecycle.start();
|
||||||
}
|
}
|
||||||
catch (Throwable t) {
|
catch (Throwable t) {
|
||||||
|
|
Loading…
Reference in New Issue