Class ContainerMemoryTracker
java.lang.Object
org.apache.storm.daemon.supervisor.ContainerMemoryTracker
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionlonggetAssignedWorkerCount(String topologyId) Gets the number of worker ports assigned to the given topology id on this supervisor.longgetReservedMemoryMb(String topologyId) Gets the memory reserved by the given topology across all ports on this supervisor.getUsedMemoryMb(int port) Get the memory used by the worker on the given port.longgetUsedMemoryMb(String topologyId) Gets the memory used by the given topology across all ports on this supervisor.voidremove(int port) Clears the topology assignment and tracked memory for the given port.voidsetReservedMemoryMb(int port, String topologyId, long reservedMemoryMb) Sets the reserved memory for the given port and topology id.voidsetUsedMemoryMb(int port, String topologyId, long usedMemoryMb) Assigns the given topology id to the given port, and sets the used memory for that port and topology id.
- 
Constructor Details- 
ContainerMemoryTracker
 
- 
- 
Method Details- 
getUsedMemoryMbGet the memory used by the worker on the given port.- Parameters:
- port- The worker port
- Returns:
- The memory used by the worker, or empty if no worker exists on the given port.
 
- 
getUsedMemoryMbGets the memory used by the given topology across all ports on this supervisor.- Parameters:
- topologyId- The topology id
- Returns:
- The memory used by the given topology id
 
- 
getReservedMemoryMbGets the memory reserved by the given topology across all ports on this supervisor.- Parameters:
- topologyId- The topology id
- Returns:
- The memory reserved by the given topology id
 
- 
getAssignedWorkerCountGets the number of worker ports assigned to the given topology id on this supervisor.- Parameters:
- topologyId- The topology id
- Returns:
- The number of worker ports assigned to the given topology.
 
- 
removepublic void remove(int port) Clears the topology assignment and tracked memory for the given port.- Parameters:
- port- The worker port
 
- 
setUsedMemoryMbAssigns the given topology id to the given port, and sets the used memory for that port and topology id.- Parameters:
- port- The worker port
- topologyId- The topology id
- usedMemoryMb- The memory used by the topology
 
- 
setReservedMemoryMbSets the reserved memory for the given port and topology id.- Parameters:
- port- The worker port
- topologyId- The topology id
- reservedMemoryMb- The memory reserved by the topology
 
 
-