Package org.apache.storm.scheduler
Class TopologyDetails
java.lang.Object
org.apache.storm.scheduler.TopologyDetails
- 
Constructor SummaryConstructorsConstructorDescriptionTopologyDetails(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 SummaryModifier 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
- 
TopologyDetailspublic TopologyDetails(String topologyId, Map<String, Object> topologyConf, StormTopology topology, int numWorkers, Map<ExecutorDetails, String> executorToComponents, String owner) 
- 
TopologyDetailspublic TopologyDetails(String topologyId, Map<String, Object> topologyConf, StormTopology topology, int numWorkers, Map<ExecutorDetails, String> executorToComponents, int launchTime, String owner) 
 
- 
- 
Method Details- 
getId
- 
getName
- 
getConf
- 
getNumWorkerspublic int getNumWorkers()
- 
getTopology
- 
getExecutorToComponent
- 
selectExecutorToComponent
- 
getComponentToExecutors
- 
getExecutors
- 
getUserTopolgyComponentsReturns 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
 
- 
hasSpoutspublic boolean hasSpouts()Determine if there are non-system spouts.- Returns:
- true if there is at least one non-system spout, false otherwise
 
- 
getComponentFromExecutor
- 
getOnHeapMemoryRequirementGets 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.
 
- 
getOffHeapMemoryRequirementGets 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.
 
- 
getTotalMemReqTaskGets 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.
 
- 
getTotalResourcesGet 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
 
- 
getApproximateTotalResourcesGet an approximate total resources needed for this topology. ignores shared memory.- Returns:
- the approximate total resources needed for this topology.
 
- 
getApproximateResourcesGet approximate resources for given topology executors. ignores shared memory.- Parameters:
- execs- the executors the inquiry is concerning.
- Returns:
- the approximate resources for the executors.
 
- 
getTotalCpuReqTaskGet the total CPU requirement for executor.- Returns:
- generic resource mapping requirement for the executor
 
- 
getTotalRequestedMemOnHeappublic 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
 
- 
getTotalRequestedMemOffHeappublic 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
 
- 
getTotalRequestedCpupublic 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
- 
getTaskResourceReqListget the resources requirements for a executor.- Parameters:
- exec- executor details
- Returns:
- a map containing the resource requirements for this exec
 
- 
hasExecInTopoChecks if a executor is part of this topology.- Returns:
- Boolean whether or not a certain ExecutorDetail is included in the resourceList.
 
- 
addResourcesForExecadd resource requirements for a executor.
- 
getTopologyWorkerMaxHeapSizeGet the max heap size for a worker used by this topology.- Returns:
- the worker max heap size
 
- 
getTopologySubmitterGet the user that submitted this topology.
- 
getTopologyPrioritypublic int getTopologyPriority()get the priority of this topology.
- 
getLaunchTimepublic int getLaunchTime()Get the timestamp of when this topology was launched.
- 
getUpTimepublic int getUpTime()Get how long this topology has been executing.
- 
toString
- 
hashCodepublic int hashCode()
- 
equals
 
-