com.bigdata.service.mapred
Class AbstractJobAndTaskService.AbstractTaskWorker<M,T extends ITask>

java.lang.Object
  extended by com.bigdata.service.mapred.AbstractJobAndTaskService.AbstractTaskWorker<M,T>
All Implemented Interfaces:
Callable<Object>
Direct Known Subclasses:
ReduceService.ReduceTaskWorker
Enclosing class:
AbstractJobAndTaskService<M extends IJobMetadata,T extends ITask>

public abstract static class AbstractJobAndTaskService.AbstractTaskWorker<M,T extends ITask>
extends Object
implements Callable<Object>

Abstract base class for task workers running in the MapService or the ReduceService.

Version:
$Id: AbstractJobAndTaskService.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
protected  JobState<M> jobState
          The job state.
protected  T task
          The task to be executed.
 
Constructor Summary
protected AbstractJobAndTaskService.AbstractTaskWorker(JobState<M> jobState, T task)
           
 
Method Summary
 Object call()
          Invokes run() to run the task.
protected abstract  void run()
          Actually run the task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jobState

protected final JobState<M> jobState
The job state.


task

protected final T extends ITask task
The task to be executed.

Constructor Detail

AbstractJobAndTaskService.AbstractTaskWorker

protected AbstractJobAndTaskService.AbstractTaskWorker(JobState<M> jobState,
                                                       T task)
Method Detail

call

public Object call()
            throws Exception
Invokes run() to run the task. On completion, an Outcome is constructed and placed into JobState.outcomes.

Specified by:
call in interface Callable<Object>
Returns:
null
Throws:
Exception

run

protected abstract void run()
                     throws Exception
Actually run the task.

Throws:
Exception


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.