org.apache.hama.bsp
Class Task
java.lang.Object
org.apache.hama.bsp.Task
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
- Direct Known Subclasses:
- BSPTask
public abstract class Task
- extends java.lang.Object
- implements org.apache.hadoop.io.Writable
Base class for tasks.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
jobId
protected BSPJobID jobId
jobFile
protected java.lang.String jobFile
taskId
protected TaskAttemptID taskId
partition
protected int partition
lDirAlloc
protected org.apache.hadoop.fs.LocalDirAllocator lDirAlloc
Task
public Task()
Task
public Task(BSPJobID jobId,
java.lang.String jobFile,
TaskAttemptID taskId,
int partition)
setJobFile
public void setJobFile(java.lang.String jobFile)
getJobFile
public java.lang.String getJobFile()
getTaskAttemptId
public TaskAttemptID getTaskAttemptId()
getTaskID
public TaskAttemptID getTaskID()
getJobID
public BSPJobID getJobID()
- Get the job name for this task.
- Returns:
- the job name
getPartition
public int getPartition()
- Get the index of this task within the job.
- Returns:
- the integer part of the task id
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
write
public void write(java.io.DataOutput out)
throws java.io.IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
java.io.IOException
readFields
public void readFields(java.io.DataInput in)
throws java.io.IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
java.io.IOException
run
public abstract void run(BSPJob job,
BSPPeerProtocol umbilical)
throws java.io.IOException
- Run this task as a part of the named job. This method is executed in the
child process.
- Parameters:
umbilical
- for progress reports
- Throws:
java.io.IOException
createRunner
public abstract BSPTaskRunner createRunner(GroomServer groom)
done
public void done(BSPPeerProtocol umbilical)
throws java.io.IOException
- Throws:
java.io.IOException
getConf
public abstract BSPJob getConf()
setConf
public abstract void setConf(BSPJob localJobConf)
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.