Class Slot
java.lang.Object
java.lang.Thread
org.apache.storm.daemon.supervisor.Slot
- All Implemented Interfaces:
- AutoCloseable,- Runnable,- BlobChangingCallback
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.ThreadThread.State, Thread.UncaughtExceptionHandler
- 
Field SummaryFields inherited from class java.lang.ThreadMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
- 
Constructor SummaryConstructorsConstructorDescriptionSlot(AsyncLocalizer localizer, Map<String, Object> conf, ContainerLauncher containerLauncher, String host, int port, LocalState localState, IStormClusterState clusterState, ISupervisor supervisor, AtomicReference<Map<Long, LocalAssignment>> cachedCurrentAssignments, OnlyLatestExecutor<Integer> metricsExec, WorkerMetricsProcessor metricsProcessor, org.apache.storm.daemon.supervisor.SlotMetrics slotMetrics) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddProfilerActions(Set<org.apache.storm.daemon.supervisor.Slot.TopoProfileAction> actions) voidblobChanging(LocalAssignment assignment, int port, LocallyCachedBlob blob, GoodToGo go) Informs the listener that a blob has changed and is ready to update and replace a localized blob that has been marked as tied to the life cycle of the worker process.voidclose()get the workerID (nullable) from CURRENT container, if existed, or return null.voidrun()final voidsetNewAssignment(LocalAssignment newAssignment) Set a new assignment asynchronously.Methods inherited from class java.lang.ThreadactiveCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
- 
Constructor Details- 
Slotpublic Slot(AsyncLocalizer localizer, Map<String, Object> conf, ContainerLauncher containerLauncher, String host, int port, LocalState localState, IStormClusterState clusterState, ISupervisor supervisor, AtomicReference<Map<Long, throws ExceptionLocalAssignment>> cachedCurrentAssignments, OnlyLatestExecutor<Integer> metricsExec, WorkerMetricsProcessor metricsProcessor, org.apache.storm.daemon.supervisor.SlotMetrics slotMetrics) - Throws:
- Exception
 
 
- 
- 
Method Details- 
setNewAssignmentSet a new assignment asynchronously.- Parameters:
- newAssignment- the new assignment for this slot to run, null to run nothing
 
- 
blobChangingDescription copied from interface:BlobChangingCallbackInforms the listener that a blob has changed and is ready to update and replace a localized blob that has been marked as tied to the life cycle of the worker process.If `go.getLatch()` is never called before the method completes it is assumed that the listener is good with the blob changing. - Specified by:
- blobChangingin interface- BlobChangingCallback
- Parameters:
- assignment- the assignment this resource and callback are registered with.
- port- the port that this resource and callback are registered with.
- blob- the blob that is going to change.
- go- a way to indicate if the listener is ready for the resource to change.
 
- 
addProfilerActionspublic void addProfilerActions(Set<org.apache.storm.daemon.supervisor.Slot.TopoProfileAction> actions) 
- 
getWorkerIdget the workerID (nullable) from CURRENT container, if existed, or return null.- Returns:
- workerID
 
- 
runpublic void run()
- 
close- Specified by:
- closein interface- AutoCloseable
- Throws:
- Exception
 
 
-