1) Configuration fixes, slowly gonna make the MasterMain actually start up!

This commit is contained in:
cheddar 2013-07-09 16:16:56 -07:00
parent 149c2e3560
commit e892d14f77
3 changed files with 9 additions and 3 deletions

View File

@ -21,11 +21,14 @@ package com.metamx.druid.initialization;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.constraints.NotNull;
/**
*/
public class CuratorDiscoveryConfig
{
@JsonProperty
@NotNull
private String path = null;
public String getPath()

View File

@ -43,7 +43,7 @@ public class HttpClientModule implements Module
public Duration getReadTimeout()
{
return readTimeout.toStandardDuration();
return readTimeout == null ? null : readTimeout.toStandardDuration();
}
}

View File

@ -19,8 +19,10 @@
package com.metamx.druid.http;
import com.google.common.base.Supplier;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.TypeLiteral;
import com.google.inject.servlet.GuiceFilter;
import com.metamx.common.lifecycle.Lifecycle;
import com.metamx.common.logger.Logger;
@ -71,12 +73,13 @@ public class MasterMain
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);
try {
Initialization.announceDefaultService(nodeConfig, serviceAnnouncer, lifecycle);
// TODO: Make the announcement work through the lifecycle
Initialization.announceDefaultService(nodeConfig.get(), serviceAnnouncer, lifecycle);
lifecycle.start();
}
catch (Throwable t) {