org.apache.hadoop.tools.rumen
Class ResourceUsageMetrics

java.lang.Object
  extended by org.apache.hadoop.tools.rumen.ResourceUsageMetrics
All Implemented Interfaces:
org.apache.hadoop.io.Writable, DeepCompare

public class ResourceUsageMetrics
extends Object
implements org.apache.hadoop.io.Writable, DeepCompare

Captures the resource usage metrics.


Constructor Summary
ResourceUsageMetrics()
           
 
Method Summary
 void deepCompare(DeepCompare other, TreePath loc)
           
 long getCumulativeCpuUsage()
          Get the cumulative CPU usage.
 long getHeapUsage()
          Get the total heap usage.
 long getPhysicalMemoryUsage()
          Get the physical memory usage.
 long getVirtualMemoryUsage()
          Get the virtual memory usage.
 void readFields(DataInput in)
           
 void setCumulativeCpuUsage(long usage)
          Set the cumulative CPU usage.
 void setHeapUsage(long usage)
          Set the total heap usage.
 void setPhysicalMemoryUsage(long usage)
          Set the physical memory usage.
 void setVirtualMemoryUsage(long usage)
          Set the virtual memory usage.
 int size()
          Returns the size of the serialized data
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceUsageMetrics

public ResourceUsageMetrics()
Method Detail

getCumulativeCpuUsage

public long getCumulativeCpuUsage()
Get the cumulative CPU usage.


setCumulativeCpuUsage

public void setCumulativeCpuUsage(long usage)
Set the cumulative CPU usage.


getVirtualMemoryUsage

public long getVirtualMemoryUsage()
Get the virtual memory usage.


setVirtualMemoryUsage

public void setVirtualMemoryUsage(long usage)
Set the virtual memory usage.


getPhysicalMemoryUsage

public long getPhysicalMemoryUsage()
Get the physical memory usage.


setPhysicalMemoryUsage

public void setPhysicalMemoryUsage(long usage)
Set the physical memory usage.


getHeapUsage

public long getHeapUsage()
Get the total heap usage.


setHeapUsage

public void setHeapUsage(long usage)
Set the total heap usage.


size

public int size()
Returns the size of the serialized data


readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

deepCompare

public void deepCompare(DeepCompare other,
                        TreePath loc)
                 throws DeepInequalityException
Specified by:
deepCompare in interface DeepCompare
Parameters:
other - the other comparand that's being compared to me
loc - the path that got to me. In the root, myLocation is null. To process the scalar foo field of the root we will make a recursive call with a TreePath whose fieldName is "bar" and whose index is -1 and whose parent is null. To process the plural bar field of the root we will make a recursive call with a TreePath whose fieldName is "foo" and whose index is -1 and whose parent is also null.
Throws:
DeepInequalityException


Copyright © 2013 Apache Software Foundation. All Rights Reserved.