mirror of https://github.com/apache/druid.git
construct registering nodes with lists
This commit is contained in:
parent
0ef40171a8
commit
cd1a812fff
|
@ -55,6 +55,7 @@ import org.skife.config.ConfigurationObjectFactory;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
@ -90,7 +91,7 @@ public abstract class QueryableNode<T extends QueryableNode> extends Registering
|
|||
ConfigurationObjectFactory configFactory
|
||||
)
|
||||
{
|
||||
super(jsonMapper, smileMapper);
|
||||
super(Arrays.asList(jsonMapper, smileMapper));
|
||||
|
||||
this.log = log;
|
||||
this.configFactory = configFactory;
|
||||
|
|
|
@ -23,6 +23,7 @@ import com.metamx.druid.index.v1.serde.Registererer;
|
|||
import org.codehaus.jackson.map.ObjectMapper;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -43,16 +44,16 @@ public class RegisteringNode
|
|||
|
||||
private static boolean doneRegister = false;
|
||||
|
||||
private final ObjectMapper[] mappers;
|
||||
private final List<ObjectMapper> mappers;
|
||||
|
||||
public RegisteringNode(ObjectMapper... mappers)
|
||||
public RegisteringNode(List<ObjectMapper> mappers)
|
||||
{
|
||||
this.mappers = mappers;
|
||||
}
|
||||
|
||||
public RegisteringNode registerHandlers(Registererer... registererers)
|
||||
{
|
||||
registerHandlers(Arrays.asList(registererers), Arrays.asList(mappers));
|
||||
registerHandlers(Arrays.asList(registererers), mappers);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,6 +100,7 @@ import org.mortbay.jetty.servlet.ServletHolder;
|
|||
import org.skife.config.ConfigurationObjectFactory;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
@ -145,7 +146,7 @@ public class IndexerCoordinatorNode extends RegisteringNode
|
|||
ConfigurationObjectFactory configFactory
|
||||
)
|
||||
{
|
||||
super(jsonMapper);
|
||||
super(Arrays.asList(jsonMapper));
|
||||
|
||||
this.jsonMapper = jsonMapper;
|
||||
this.lifecycle = lifecycle;
|
||||
|
|
|
@ -72,6 +72,7 @@ import org.mortbay.jetty.servlet.ServletHolder;
|
|||
import org.skife.config.ConfigurationObjectFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
@ -113,7 +114,7 @@ public class WorkerNode extends RegisteringNode
|
|||
ConfigurationObjectFactory configFactory
|
||||
)
|
||||
{
|
||||
super(jsonMapper);
|
||||
super(Arrays.asList(jsonMapper));
|
||||
|
||||
this.jsonMapper = jsonMapper;
|
||||
this.lifecycle = lifecycle;
|
||||
|
|
Loading…
Reference in New Issue