org.apache.hadoop.mapred
Class TaskTrackerStatus.ResourceStatus

java.lang.Object
  extended by org.apache.hadoop.mapred.TaskTrackerStatus.ResourceStatus
All Implemented Interfaces:
Writable
Enclosing class:
TaskTrackerStatus

public static class TaskTrackerStatus.ResourceStatus
extends Object
implements Writable

Class representing a collection of resources on this tasktracker.


Method Summary
 long getAvailableSpace()
          Will return LONG_MAX if space hasn't been measured yet.
 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(DataInput in)
          Deserialize the fields of this object from in.
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTotalVirtualMemory

public long getTotalVirtualMemory()
Get the maximum amount of virtual memory on the tasktracker. If this is JobConf.DISABLED_MEMORY_LIMIT, it should be ignored and not used in any computation.

Returns:
the maximum amount of virtual memory on the tasktracker in bytes.

getTotalPhysicalMemory

public long getTotalPhysicalMemory()
Get the maximum amount of physical memory on the tasktracker. If this is JobConf.DISABLED_MEMORY_LIMIT, it should be ignored and not used in any computation.

Returns:
maximum amount of physical memory on the tasktracker in bytes.

getAvailableSpace

public long getAvailableSpace()
Will return LONG_MAX if space hasn't been measured yet.

Returns:
bytes of available local disk space on this tasktracker.

write

public void write(DataOutput out)
           throws IOException
Description copied from interface: Writable
Serialize the fields of this object to out.

Specified by:
write in interface Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Deserialize the fields of this object from in.

For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
IOException


Copyright © 2009 The Apache Software Foundation