org.apache.hama.bsp
Class TaskRunner

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.hama.bsp.TaskRunner
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
BSPTaskRunner

public class TaskRunner
extends java.lang.Thread

Base class that runs a task in a separate process.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static org.apache.commons.logging.Log LOG
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TaskRunner(BSPTask bspTask, GroomServer groom, BSPJob conf)
           
 
Method Summary
 Task getTask()
           
 void kill()
          Kill the child process
 boolean prepare()
          Called to assemble this task's input.
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

TaskRunner

public TaskRunner(BSPTask bspTask,
                  GroomServer groom,
                  BSPJob conf)
Method Detail

getTask

public Task getTask()

prepare

public boolean prepare()
                throws java.io.IOException
Called to assemble this task's input. This method is run in the parent process before the child is spawned. It should not execute user code, only system code.

Throws:
java.io.IOException

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

kill

public void kill()
Kill the child process



Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.