Package org.apache.storm.scheduler
Class TopologyDetails
java.lang.Object
org.apache.storm.scheduler.TopologyDetails
-
Constructor Summary
ConstructorsConstructorDescriptionTopologyDetails(String topologyId, Map<String, Object> topologyConf, StormTopology topology, int numWorkers, String owner) TopologyDetails(String topologyId, Map<String, Object> topologyConf, StormTopology topology, int numWorkers, Map<ExecutorDetails, String> executorToComponents, int launchTime, String owner) TopologyDetails(String topologyId, Map<String, Object> topologyConf, StormTopology topology, int numWorkers, Map<ExecutorDetails, String> executorToComponents, String owner) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResourcesForExec(ExecutorDetails exec, NormalizedResourceRequest resourceList) add resource requirements for a executor.booleanGet approximate resources for given topology executors.Get an approximate total resources needed for this topology.getConf()getId()intGet the timestamp of when this topology was launched.getName()intGets the off heap memory requirement for a certain task within a topology.Gets the on heap memory requirement for a certain task within a topology.doubledoubledoubledoublegetSharedMemoryRequests(Collection<ExecutorDetails> executors) Gets the total memory resource list for a set of tasks that is part of a topology.get the resources requirements for a executor.intget the priority of this topology.Get the user that submitted this topology.Get the max heap size for a worker used by this topology.Get the total CPU requirement for executor.Gets the total memory requirement for a task.doubleNote: The public API relevant to resource aware scheduling is unstable as of May 2015.doubleNote: The public API relevant to resource aware scheduling is unstable as of May 2015.doubleNote: The public API relevant to resource aware scheduling is unstable as of May 2015.Get the total resource requirement for an executor.intGet how long this topology has been executing.Returns a representation of the non-system components of the topology graph.booleanhasExecInTopo(ExecutorDetails exec) Checks if a executor is part of this topology.inthashCode()booleanDetermine if there are non-system spouts.selectExecutorToComponent(Collection<ExecutorDetails> executors) toString()
-
Constructor Details
-
TopologyDetails
-
TopologyDetails
public TopologyDetails(String topologyId, Map<String, Object> topologyConf, StormTopology topology, int numWorkers, Map<ExecutorDetails, String> executorToComponents, String owner) -
TopologyDetails
public TopologyDetails(String topologyId, Map<String, Object> topologyConf, StormTopology topology, int numWorkers, Map<ExecutorDetails, String> executorToComponents, int launchTime, String owner)
-
-
Method Details
-
getId
-
getName
-
getConf
-
getNumWorkers
public int getNumWorkers() -
getTopology
-
getExecutorToComponent
-
selectExecutorToComponent
-
getComponentToExecutors
-
getExecutors
-
getUserTopolgyComponents
Returns a representation of the non-system components of the topology graph. Each Component object in the returning map is populated with the list of its parents, children and execs assigned to that component.- Returns:
- a map of components
-
hasSpouts
public boolean hasSpouts()Determine if there are non-system spouts.- Returns:
- true if there is at least one non-system spout, false otherwise
-
getComponentFromExecutor
-
getOnHeapMemoryRequirement
Gets the on heap memory requirement for a certain task within a topology.- Parameters:
exec- the executor the inquiry is concerning.- Returns:
- Double the amount of on heap memory requirement for this exec in topology topoId.
-
getOffHeapMemoryRequirement
Gets the off heap memory requirement for a certain task within a topology.- Parameters:
exec- the executor the inquiry is concerning.- Returns:
- Double the amount of off heap memory requirement for this exec in topology topoId.
-
getTotalMemReqTask
Gets the total memory requirement for a task.- Parameters:
exec- the executor the inquiry is concerning.- Returns:
- Double the total memory requirement for this exec in topology topoId.
-
getTotalResources
Get the total resource requirement for an executor.- Parameters:
exec- the executor to get the resources for.- Returns:
- Double the total about of cpu requirement for executor
-
getApproximateTotalResources
Get an approximate total resources needed for this topology. ignores shared memory.- Returns:
- the approximate total resources needed for this topology.
-
getApproximateResources
Get approximate resources for given topology executors. ignores shared memory.- Parameters:
execs- the executors the inquiry is concerning.- Returns:
- the approximate resources for the executors.
-
getTotalCpuReqTask
Get the total CPU requirement for executor.- Returns:
- generic resource mapping requirement for the executor
-
getTotalRequestedMemOnHeap
public double getTotalRequestedMemOnHeap()Note: The public API relevant to resource aware scheduling is unstable as of May 2015. We reserve the right to change them.- Returns:
- the total on-heap memory requested for this topology
-
getTotalRequestedMemOffHeap
public double getTotalRequestedMemOffHeap()Note: The public API relevant to resource aware scheduling is unstable as of May 2015. We reserve the right to change them.- Returns:
- the total off-heap memory requested for this topology
-
getTotalRequestedCpu
public double getTotalRequestedCpu()Note: The public API relevant to resource aware scheduling is unstable as of May 2015. We reserve the right to change them.- Returns:
- the total cpu requested for this topology
-
getTotalRequestedGenericResources
-
getTaskResourceReqList
get the resources requirements for a executor.- Parameters:
exec- executor details- Returns:
- a map containing the resource requirements for this exec
-
hasExecInTopo
Checks if a executor is part of this topology.- Returns:
- Boolean whether or not a certain ExecutorDetail is included in the resourceList.
-
addResourcesForExec
add resource requirements for a executor. -
getTopologyWorkerMaxHeapSize
Get the max heap size for a worker used by this topology.- Returns:
- the worker max heap size
-
getTopologySubmitter
Get the user that submitted this topology. -
getTopologyPriority
public int getTopologyPriority()get the priority of this topology. -
getLaunchTime
public int getLaunchTime()Get the timestamp of when this topology was launched. -
getUpTime
public int getUpTime()Get how long this topology has been executing. -
toString
-
hashCode
public int hashCode() -
equals
-