Class LoadQueueTaskMaster
- java.lang.Object
-
- org.apache.druid.server.coordinator.loading.LoadQueueTaskMaster
-
public class LoadQueueTaskMaster extends Object
Provides LoadQueuePeons
-
-
Constructor Summary
Constructors Constructor Description LoadQueueTaskMaster(com.google.inject.Provider<org.apache.curator.framework.CuratorFramework> curatorFrameworkProvider, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, ScheduledExecutorService peonExec, ExecutorService callbackExec, DruidCoordinatorConfig config, org.apache.druid.java.util.http.client.HttpClient httpClient, ZkPathsConfig zkPaths)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,LoadQueuePeon>getAllPeons()LoadQueuePeongetPeonForServer(ImmutableDruidServer server)booleanisHttpLoading()voidonLeaderStart()voidonLeaderStop()Stops and removes all peons.voidresetPeonsForNewServers(List<ImmutableDruidServer> currentServers)Creates a peon for each of the given servers, if it doesn't already exist and removes peons for servers not present in the cluster anymore.
-
-
-
Constructor Detail
-
LoadQueueTaskMaster
public LoadQueueTaskMaster(com.google.inject.Provider<org.apache.curator.framework.CuratorFramework> curatorFrameworkProvider, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, ScheduledExecutorService peonExec, ExecutorService callbackExec, DruidCoordinatorConfig config, org.apache.druid.java.util.http.client.HttpClient httpClient, ZkPathsConfig zkPaths)
-
-
Method Detail
-
getAllPeons
public Map<String,LoadQueuePeon> getAllPeons()
-
getPeonForServer
public LoadQueuePeon getPeonForServer(ImmutableDruidServer server)
-
resetPeonsForNewServers
public void resetPeonsForNewServers(List<ImmutableDruidServer> currentServers)
Creates a peon for each of the given servers, if it doesn't already exist and removes peons for servers not present in the cluster anymore.This method must not run concurrently with
onLeaderStart()andonLeaderStop()so that there are no stray peons if the Coordinator is not leader anymore.
-
onLeaderStart
public void onLeaderStart()
-
onLeaderStop
public void onLeaderStop()
Stops and removes all peons.
-
isHttpLoading
public boolean isHttpLoading()
-
-