Class SupervisorUtils
java.lang.Object
org.apache.storm.daemon.supervisor.SupervisorUtils
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanblobNeedsWorkerRestart(Map<String, Object> blobInfo) Given the blob information returns the value of the workerRestart field, handling it being a boolean value, or if it's not specified then returns false.static List<LocalResource>Returns a list of LocalResources based on the blobstore-map passed in.static StringgetNumaIdForPort(Integer port, Map<String, Object> supervisorConf) getNumaIdForPort for a specific supervisor.getNumaMap(Map<String, Object> stormConf) Return supervisor numa configuration.getNumaPorts(Map<String, Object> supervisorConf) gets the set of all configured numa ports for a specific supervisor.getSlotsPorts(Map<String, Object> supervisorConf) protected LSWorkerHeartbeatreadWorkerHeartbeatImpl(Map<String, Object> conf, String workerId) static Map<String,LSWorkerHeartbeat> readWorkerHeartbeats(Map<String, Object> conf) Map from worker id to heartbeat.readWorkerHeartbeatsImpl(Map<String, Object> conf) static voidstatic voidstatic voidstatic booleanshouldUncompressBlob(Map<String, Object> blobInfo) Given the blob information returns the value of the uncompress field, handling it being a boolean value, or if it's not specified then returns false.static Collection<String>supervisorWorkerIds(Map<String, Object> conf) 
- 
Constructor Details- 
SupervisorUtilspublic SupervisorUtils()
 
- 
- 
Method Details- 
setInstance
- 
resetInstancepublic static void resetInstance()
- 
getNumaIdForPortgetNumaIdForPort for a specific supervisor.- Parameters:
- port- port
- supervisorConf- supervisorConf
- Returns:
- getNumaIdForPort
 
- 
getNumaPortsgets the set of all configured numa ports for a specific supervisor.- Parameters:
- supervisorConf- supervisorConf
- Returns:
- set of all numa ports
 
- 
getSlotsPorts
- 
rmrAsUser- Throws:
- IOException
 
- 
shouldUncompressBlobGiven the blob information returns the value of the uncompress field, handling it being a boolean value, or if it's not specified then returns false.
- 
blobNeedsWorkerRestartGiven the blob information returns the value of the workerRestart field, handling it being a boolean value, or if it's not specified then returns false.- Parameters:
- blobInfo- the info for the blob.
- Returns:
- true if the blob needs a worker restart by way of the callback else false.
 
- 
blobstoreMapToLocalresourcespublic static List<LocalResource> blobstoreMapToLocalresources(Map<String, Map<String, Object>> blobstoreMap) Returns a list of LocalResources based on the blobstore-map passed in.
- 
supervisorWorkerIds
- 
readWorkerHeartbeatsMap from worker id to heartbeat.
- 
getNumaMapReturn supervisor numa configuration.- Parameters:
- stormConf- stormConf
- Returns:
- getNumaMap
 
- 
readWorkerHeartbeatsImpl
- 
readWorkerHeartbeatImpl
 
-