public static class TaskTrackerStatus.ResourceStatus
extends java.lang.Object
implements org.apache.hadoop.io.Writable
Modifier and Type | Method and Description |
---|---|
long |
getAvailableSpace()
Will return LONG_MAX if space hasn't been measured yet.
|
long |
getCpuFrequency()
Get the CPU frequency of this TaskTracker
Will return UNAVAILABLE if it cannot be obtained
|
float |
getCpuUsage()
Get the CPU usage on this TaskTracker
Will return UNAVAILABLE if it cannot be obtained
|
long |
getCumulativeCpuTime()
Get the cumulative CPU time on this TaskTracker since it is up
Will return UNAVAILABLE if it cannot be obtained
|
int |
getNumProcessors()
Get the number of processors on this TaskTracker
Will return UNAVAILABLE if it cannot be obtained
|
long |
getTotalPhysicalMemory()
Get the maximum amount of physical memory on the tasktracker.
|
long |
getTotalVirtualMemory()
Get the maximum amount of virtual memory on the tasktracker.
|
void |
readFields(java.io.DataInput in) |
void |
setCpuFrequency(long cpuFrequency)
Set the CPU frequency of this TaskTracker
If the input is not a valid number, it will be set to UNAVAILABLE
|
void |
setCpuUsage(float cpuUsage)
Set the CPU usage on this TaskTracker
|
void |
setCumulativeCpuTime(long cumulativeCpuTime)
Set the cumulative CPU time on this TaskTracker since it is up
It can be set to UNAVAILABLE if it is currently unavailable.
|
void |
setNumProcessors(int numProcessors)
Set the number of processors on this TaskTracker
If the input is not a valid number, it will be set to UNAVAILABLE
|
void |
write(java.io.DataOutput out) |
public long getTotalVirtualMemory()
JobConf.DISABLED_MEMORY_LIMIT
, it should be ignored
and not used in any computation.public long getTotalPhysicalMemory()
JobConf.DISABLED_MEMORY_LIMIT
, it should be ignored
and not used in any computation.public long getAvailableSpace()
public void setCpuFrequency(long cpuFrequency)
cpuFrequency
- CPU frequency in kHzpublic long getCpuFrequency()
public void setNumProcessors(int numProcessors)
numProcessors
- number of processorspublic int getNumProcessors()
public void setCumulativeCpuTime(long cumulativeCpuTime)
cumulativeCpuTime
- Used CPU time in millisecondpublic long getCumulativeCpuTime()
public void setCpuUsage(float cpuUsage)
cpuUsage
- CPU usage in %public float getCpuUsage()
public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
Copyright © 2009 The Apache Software Foundation