org.apache.hadoop.yarn.util
Class WindowsBasedProcessTree

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.yarn.util.ResourceCalculatorProcessTree
          extended by org.apache.hadoop.yarn.util.WindowsBasedProcessTree
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable

@InterfaceAudience.Private
public class WindowsBasedProcessTree
extends ResourceCalculatorProcessTree


Constructor Summary
WindowsBasedProcessTree(String pid)
           
 
Method Summary
 boolean checkPidPgrpidForMatch()
          Verify that the tree process id is same as its process group id.
 long getCumulativeCpuTime()
          Get the CPU time in millisecond used by all the processes in the process-tree since the process-tree created
 long getCumulativeRssmem(int olderThanAge)
          Get the cumulative resident set size (rss) memory used by all the processes in the process-tree that are older than the passed in age.
 long getCumulativeVmem(int olderThanAge)
          Get the cumulative virtual memory used by all the processes in the process-tree that are older than the passed in age.
 String getProcessTreeDump()
          Get a dump of the process-tree.
static boolean isAvailable()
           
 void updateProcessTree()
          Update the process-tree with latest state.
 
Methods inherited from class org.apache.hadoop.yarn.util.ResourceCalculatorProcessTree
getCumulativeRssmem, getCumulativeVmem, getResourceCalculatorProcessTree
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowsBasedProcessTree

public WindowsBasedProcessTree(String pid)
Method Detail

isAvailable

public static boolean isAvailable()

updateProcessTree

public void updateProcessTree()
Description copied from class: ResourceCalculatorProcessTree
Update the process-tree with latest state. Each call to this function should increment the age of the running processes that already exist in the process tree. Age is used other API's of the interface.

Specified by:
updateProcessTree in class ResourceCalculatorProcessTree

checkPidPgrpidForMatch

public boolean checkPidPgrpidForMatch()
Description copied from class: ResourceCalculatorProcessTree
Verify that the tree process id is same as its process group id.

Specified by:
checkPidPgrpidForMatch in class ResourceCalculatorProcessTree
Returns:
true if the process id matches else return false.

getProcessTreeDump

public String getProcessTreeDump()
Description copied from class: ResourceCalculatorProcessTree
Get a dump of the process-tree.

Specified by:
getProcessTreeDump in class ResourceCalculatorProcessTree
Returns:
a string concatenating the dump of information of all the processes in the process-tree

getCumulativeVmem

public long getCumulativeVmem(int olderThanAge)
Description copied from class: ResourceCalculatorProcessTree
Get the cumulative virtual memory used by all the processes in the process-tree that are older than the passed in age.

Specified by:
getCumulativeVmem in class ResourceCalculatorProcessTree
Parameters:
olderThanAge - processes above this age are included in the memory addition
Returns:
cumulative virtual memory used by the process-tree in bytes, for processes older than this age.

getCumulativeRssmem

public long getCumulativeRssmem(int olderThanAge)
Description copied from class: ResourceCalculatorProcessTree
Get the cumulative resident set size (rss) memory used by all the processes in the process-tree that are older than the passed in age.

Specified by:
getCumulativeRssmem in class ResourceCalculatorProcessTree
Parameters:
olderThanAge - processes above this age are included in the memory addition
Returns:
cumulative rss memory used by the process-tree in bytes, for processes older than this age. return 0 if it cannot be calculated

getCumulativeCpuTime

public long getCumulativeCpuTime()
Description copied from class: ResourceCalculatorProcessTree
Get the CPU time in millisecond used by all the processes in the process-tree since the process-tree created

Specified by:
getCumulativeCpuTime in class ResourceCalculatorProcessTree
Returns:
cumulative CPU time in millisecond since the process-tree created return 0 if it cannot be calculated


Copyright © 2014 Apache Software Foundation. All Rights Reserved.