Package org.apache.storm.daemon.worker
Class WorkerState
java.lang.Object
org.apache.storm.daemon.worker.WorkerState
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructorsConstructorDescriptionWorkerState(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, Credentials initialCredentials) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidwe will wait all connections to be ready and then activate the spout/bolt when the worker bootup.booleanvoidcheckSerialize(KryoTupleSerializer serializer, AddressedTuple tuple) voidvoidgetConf()intgetPort()final WorkerTopologyContextfinal WorkerUserContextvoidbooleanCheck if this worker has remote outbound tasks.static booleanisConnectionReady(IConnection connection) booleanIf all the tasks are local tasks, the topology has only one worker.voidvoidvoidrefreshLoad(List<IRunningExecutor> execs) voidvoidrefreshStormActive(Runnable callback) voidvoidvoidsetCredentials(Credentials credentials) voidsuicideIfLocalAssignmentsChanged(Assignment assignment) booleanbooleantryTransferRemote(AddressedTuple tuple, Queue<AddressedTuple> pendingEmits, ITupleSerializer serializer) 
- 
Constructor Details- 
WorkerStatepublic WorkerState(Map<String, Object> conf, IContext mqContext, String topologyId, String assignmentId, Supplier<SupervisorIfaceFactory> supervisorIfaceSupplier, int port, String workerId, Map<String, throws IOException, InvalidTopologyExceptionObject> topologyConf, IStateStorage stateStorage, IStormClusterState stormClusterState, Collection<IAutoCredentials> autoCredentials, StormMetricRegistry metricRegistry, Credentials initialCredentials) - Throws:
- IOException
- InvalidTopologyException
 
 
- 
- 
Method Details- 
isConnectionReady
- 
getDeserializedWorkerHooks
- 
getConf
- 
getReceiver
- 
getTopologyId
- 
getPortpublic int getPort()
- 
getWorkerId
- 
getStateStorage
- 
getIsWorkerActive
- 
getIsTopologyActive
- 
getStormComponentToDebug
- 
getLocalExecutors
- 
getLocalTaskIds
- 
getLocalReceiveQueues
- 
getTopologyConf
- 
getTopology
- 
getSystemTopology
- 
getTaskToComponent
- 
getComponentToStreamToFields
- 
getComponentToSortedTasks
- 
getBlobToLastKnownVersion
- 
getCachedNodeToPortSocket
- 
getExecutorReceiveQueueMap
- 
getSuicideCallback
- 
getUptime
- 
getLoadMapping
- 
getAssignmentVersions
- 
getUserTimer
- 
makeTransferThread
- 
suicideIfLocalAssignmentsChanged
- 
refreshConnectionspublic void refreshConnections()
- 
refreshStormActivepublic void refreshStormActive()
- 
refreshStormActive
- 
refreshLoad
- 
refreshBackPressureStatuspublic void refreshBackPressureStatus()
- 
activateWorkerWhenAllConnectionsReadypublic void activateWorkerWhenAllConnectionsReady()we will wait all connections to be ready and then activate the spout/bolt when the worker bootup.
- 
tryTransferRemotepublic boolean tryTransferRemote(AddressedTuple tuple, Queue<AddressedTuple> pendingEmits, ITupleSerializer serializer) 
- 
flushRemotes- Throws:
- InterruptedException
 
- 
tryFlushRemotespublic boolean tryFlushRemotes()
- 
checkSerialize
- 
getWorkerTopologyContext
- 
getWorkerUserContext
- 
runWorkerStartHookspublic void runWorkerStartHooks()
- 
runWorkerShutdownHookspublic void runWorkerShutdownHooks()
- 
closeResourcespublic void closeResources()
- 
areAllConnectionsReadypublic boolean areAllConnectionsReady()
- 
getAutoCredentials
- 
getCredentials
- 
setCredentials
- 
getOutboundTasks
- 
hasRemoteOutboundTaskspublic boolean hasRemoteOutboundTasks()Check if this worker has remote outbound tasks.- Returns:
- true if this worker has remote outbound tasks; false otherwise.
 
- 
isSingleWorkerpublic boolean isSingleWorker()If all the tasks are local tasks, the topology has only one worker.- Returns:
- true if this worker is the single worker; false otherwise.
 
- 
haltWorkerTransferpublic void haltWorkerTransfer()
- 
getTransferQueue
- 
getMetricRegistry
 
-