@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class ResourceCalculatorProcessTree extends Configured
Modifier and Type | Field and Description |
---|---|
static int |
UNAVAILABLE |
Constructor and Description |
---|
ResourceCalculatorProcessTree(String root)
Create process-tree instance with specified root process.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
checkPidPgrpidForMatch()
Verify that the tree process id is same as its process group id.
|
float |
getCpuUsagePercent()
Get the CPU usage by all the processes in the process-tree based on
average between samples as a ratio of overall CPU cycles similar to top.
|
long |
getCumulativeCpuTime()
Get the CPU time in millisecond used by all the processes in the
process-tree since the process-tree was created
|
long |
getCumulativeRssmem()
Deprecated.
|
long |
getCumulativeRssmem(int olderThanAge)
Deprecated.
|
long |
getCumulativeVmem()
Deprecated.
|
long |
getCumulativeVmem(int olderThanAge)
Deprecated.
|
abstract String |
getProcessTreeDump()
Get a dump of the process-tree.
|
static ResourceCalculatorProcessTree |
getResourceCalculatorProcessTree(String pid,
Class<? extends ResourceCalculatorProcessTree> clazz,
Configuration conf)
Create the ResourceCalculatorProcessTree rooted to specified process
from the class name and configure it.
|
long |
getRssMemorySize()
Get the resident set size (rss) memory used by all the processes
in the process-tree.
|
long |
getRssMemorySize(int olderThanAge)
Get the resident set size (rss) memory used by all the processes
in the process-tree that are older than the passed in age.
|
long |
getVirtualMemorySize()
Get the virtual memory used by all the processes in the
process-tree.
|
long |
getVirtualMemorySize(int olderThanAge)
Get the virtual memory used by all the processes in the
process-tree that are older than the passed in age.
|
abstract void |
updateProcessTree()
Update the process-tree with latest state.
|
getConf, setConf
public static final int UNAVAILABLE
public ResourceCalculatorProcessTree(String root)
root
- process-tree root-processpublic abstract void updateProcessTree()
public abstract String getProcessTreeDump()
public long getVirtualMemorySize()
UNAVAILABLE
if it cannot be calculated.@Deprecated public long getCumulativeVmem()
UNAVAILABLE
if it cannot be calculated.public long getRssMemorySize()
UNAVAILABLE
if it cannot be calculated.@Deprecated public long getCumulativeRssmem()
UNAVAILABLE
if it cannot be calculated.public long getVirtualMemorySize(int olderThanAge)
olderThanAge
- processes above this age are included in the
memory additionUNAVAILABLE
if it
cannot be calculated.@Deprecated public long getCumulativeVmem(int olderThanAge)
olderThanAge
- processes above this age are included in the
memory additionUNAVAILABLE
if it
cannot be calculated.public long getRssMemorySize(int olderThanAge)
olderThanAge
- processes above this age are included in the
memory additionUNAVAILABLE
if it cannot be
calculated.@Deprecated public long getCumulativeRssmem(int olderThanAge)
olderThanAge
- processes above this age are included in the
memory additionUNAVAILABLE
if it cannot be
calculated.public long getCumulativeCpuTime()
UNAVAILABLE
if it cannot be calculated.public float getCpuUsagePercent()
UNAVAILABLE
if CPU usage cannot be calculated or not available.public abstract boolean checkPidPgrpidForMatch()
public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree(String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf)
pid
- process pid of the root of the process treeclazz
- class-nameconf
- configure the plugin with this.Copyright © 2019 Apache Software Foundation. All rights reserved.