public class WorkerState extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
WorkerState.ILocalTransferCallback |
Constructor and Description |
---|
WorkerState(Map<String,Object> conf,
IContext mqContext,
String topologyId,
String assignmentId,
Supplier<SupervisorIfaceFactory> supervisorIfaceSupplier,
int port,
String workerId,
Map<String,Object> topologyConf,
IStateStorage stateStorage,
IStormClusterState stormClusterState,
Collection<IAutoCredentials> autoCredentials,
StormMetricRegistry metricRegistry) |
public WorkerState(Map<String,Object> conf, IContext mqContext, String topologyId, String assignmentId, Supplier<SupervisorIfaceFactory> supervisorIfaceSupplier, int port, String workerId, Map<String,Object> topologyConf, IStateStorage stateStorage, IStormClusterState stormClusterState, Collection<IAutoCredentials> autoCredentials, StormMetricRegistry metricRegistry) throws IOException, InvalidTopologyException
IOException
InvalidTopologyException
public static boolean isConnectionReady(IConnection connection)
public List<IWorkerHook> getDeserializedWorkerHooks()
public IConnection getReceiver()
public String getTopologyId()
public int getPort()
public String getWorkerId()
public IStateStorage getStateStorage()
public CountDownLatch getIsWorkerActive()
public AtomicBoolean getIsTopologyActive()
public AtomicReference<Map<String,DebugOptions>> getStormComponentToDebug()
public StormTopology getTopology()
public StormTopology getSystemTopology()
public AtomicReference<Map<NodeInfo,IConnection>> getCachedNodeToPortSocket()
public Runnable getSuicideCallback()
public Utils.UptimeComputer getUptime()
public LoadMapping getLoadMapping()
public AtomicReference<Map<String,VersionedData<Assignment>>> getAssignmentVersions()
public StormTimer getUserTimer()
public Utils.SmartThread makeTransferThread()
public void refreshConnections()
public void refreshStormActive()
public void refreshStormActive(Runnable callback)
public void refreshLoad(List<IRunningExecutor> execs)
public void refreshBackPressureStatus()
public void activateWorkerWhenAllConnectionsReady()
we will wait all connections to be ready and then activate the spout/bolt when the worker bootup.
public boolean tryTransferRemote(AddressedTuple tuple, Queue<AddressedTuple> pendingEmits, ITupleSerializer serializer)
public void flushRemotes() throws InterruptedException
InterruptedException
public boolean tryFlushRemotes()
public void checkSerialize(KryoTupleSerializer serializer, AddressedTuple tuple)
public final WorkerTopologyContext getWorkerTopologyContext()
public void runWorkerStartHooks()
public void runWorkerShutdownHooks()
public void closeResources()
public boolean areAllConnectionsReady()
public Collection<IAutoCredentials> getAutoCredentials()
public boolean hasRemoteOutboundTasks()
Check if this worker has remote outbound tasks.
public boolean isSingleWorker()
If all the tasks are local tasks, the topology has only one worker.
public void haltWorkerTransfer()
public JCQueue getTransferQueue()
public StormMetricRegistry getMetricRegistry()
Copyright © 2019 The Apache Software Foundation. All rights reserved.