Search in sources :

Example 46 with Lifecycle

use of org.apache.druid.java.util.common.lifecycle.Lifecycle in project druid by druid-io.

the class ServerRunnable method run.

@Override
public void run() {
    final Injector injector = makeInjector(getNodeRoles(getProperties()));
    final Lifecycle lifecycle = initLifecycle(injector);
    try {
        lifecycle.join();
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
Also used : Injector(com.google.inject.Injector) Lifecycle(org.apache.druid.java.util.common.lifecycle.Lifecycle)

Aggregations

Lifecycle (org.apache.druid.java.util.common.lifecycle.Lifecycle)46 Test (org.junit.Test)21 Injector (com.google.inject.Injector)12 URL (java.net.URL)12 ExecutionException (java.util.concurrent.ExecutionException)12 StatusResponseHolder (org.apache.druid.java.util.http.client.response.StatusResponseHolder)10 Before (org.junit.Before)10 ExecutorService (java.util.concurrent.ExecutorService)6 Binder (com.google.inject.Binder)5 Module (com.google.inject.Module)5 OutputStream (java.io.OutputStream)5 Properties (java.util.Properties)5 ManageLifecycle (org.apache.druid.guice.ManageLifecycle)5 NoopServiceEmitter (org.apache.druid.server.metrics.NoopServiceEmitter)5 ChannelException (org.jboss.netty.channel.ChannelException)5 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)4 IOException (java.io.IOException)4 SSLHandshakeException (javax.net.ssl.SSLHandshakeException)4 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3 Provides (com.google.inject.Provides)3