water
Class MRTask<T extends MRTask>

java.lang.Object
  extended by jsr166y.ForkJoinTask<java.lang.Void>
      extended by jsr166y.CountedCompleter
          extended by water.H2O.H2OCountedCompleter
              extended by water.DTask<T>
                  extended by water.DRemoteTask<T>
                      extended by water.MRTask<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.concurrent.Future<java.lang.Void>, Freezable
Direct Known Subclasses:
BaseStatsTask, BitsCmpTask, BooleanVectorFilter, ConfusionTask, Covariance.COV_Task, DatasetCompare, DParseTask, Helpers.ScallarCollector, Histogram.BinningTask, Histogram.OutlineTask, KMeans.Lloyds, KMeans.Sampler, KMeans.Sqr, KMeansModel.KMeansApply, KMeansModel.KMeansScore, LinearRegression.CalcRegressionTask, LinearRegression.CalcSquareErrorsTasks, LinearRegression.CalcSumsTask, MinorityClasses.ClassExtractTask, MinorityClasses.CountMClassRowsTask, MinorityClasses.HistogramTask, MinorityClasses.ReplicationTask, MRColumnProducer, NewRowVecTask, NOPTask, ParseDataset.GuessSetupTsk, ParseDataset2.EnumFetchTask, ParseDataset2.MultiFileParseTask, ParseDataset2.SVFTask, PersistS3Task, RowTask, RowVecTask, ScoreTask, SliceFilter

public abstract class MRTask<T extends MRTask>
extends DRemoteTask<T>

Map/Reduce style distributed computation.

See Also:
Serialized Form

Field Summary
protected  int _hi
           
protected  int _lo
           
 
Fields inherited from class water.DRemoteTask
_fs, _is_local, _keys
 
Fields inherited from class water.DTask
_cls, _eFromNode, _exception, _fname, _lineNum, _msg, _mth
 
Constructor Summary
MRTask()
           
 
Method Summary
 int hi()
           
 void init()
           
 void lcompute()
          Do all the keys in the list associated with this Node.
 int lo()
           
 void lonCompletion(jsr166y.CountedCompleter caller)
           
abstract  void map(Key key)
          Run some useful function over this local key, and record the results in the this MRTask.
 long memOverheadPerChunk()
           
 boolean onExceptionalCompletion(java.lang.Throwable ex, jsr166y.CountedCompleter caller)
          Performs an action when method ForkJoinTask.completeExceptionally(java.lang.Throwable) is invoked or method CountedCompleter.compute() throws an exception, and this task has not otherwise already completed normally.
 
Methods inherited from class water.DRemoteTask
alsoBlockFor, alsoBlockFor, clone, compute2, dfork, getFutures, invoke, invokeOnAllNodes, keys, merge, merge, merge, onCompletion, reduce, reduceAlsoBlock
 
Methods inherited from class water.DTask
copyOver, dinvoke, frozenType, getDException, hasException, logVerbose, newInstance, onAck, onAckAck, read, setException, toDocField, write, writeJSONFields
 
Methods inherited from class water.H2O.H2OCountedCompleter
compute, priority
 
Methods inherited from class jsr166y.CountedCompleter
addToPendingCount, compareAndSetPendingCount, complete, exec, getCompleter, getPendingCount, getRawResult, setCompleter, setPendingCount, setRawResult, tryComplete
 
Methods inherited from class jsr166y.ForkJoinTask
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_lo

protected transient int _lo

_hi

protected transient int _hi
Constructor Detail

MRTask

public MRTask()
Method Detail

memOverheadPerChunk

public long memOverheadPerChunk()

init

public void init()
Overrides:
init in class DRemoteTask<T extends MRTask>

map

public abstract void map(Key key)
Run some useful function over this local key, and record the results in the this MRTask.


lcompute

public final void lcompute()
Do all the keys in the list associated with this Node. Roll up the results into this MRTask.

Specified by:
lcompute in class DRemoteTask<T extends MRTask>

lonCompletion

public final void lonCompletion(jsr166y.CountedCompleter caller)
Overrides:
lonCompletion in class DRemoteTask<T extends MRTask>

onExceptionalCompletion

public final boolean onExceptionalCompletion(java.lang.Throwable ex,
                                             jsr166y.CountedCompleter caller)
Description copied from class: jsr166y.CountedCompleter
Performs an action when method ForkJoinTask.completeExceptionally(java.lang.Throwable) is invoked or method CountedCompleter.compute() throws an exception, and this task has not otherwise already completed normally. On entry to this method, this task ForkJoinTask.isCompletedAbnormally(). The return value of this method controls further propagation: If true and this task has a completer, then this completer is also completed exceptionally. The default implementation of this method does nothing except return true.

Overrides:
onExceptionalCompletion in class DTask<T extends MRTask>
Parameters:
ex - the exception
caller - the task invoking this method (which may be this task itself).
Returns:
true if this exception should be propagated to this tasks completer, if one exists.

lo

public final int lo()

hi

public final int hi()