public class FrameSplitter extends H2O.H2OCountedCompleter
The task creates ratios.length+1 output frame each containing a
demanded fraction of rows from source dataset
The task internally processes each chunk of each column of source dataset and extract i-th fraction of chunk rows into output chunk. The task does not shuffle rows inside the tasks, nevertheless it would be possible.
Assumptions and invariants
| Constructor and Description |
|---|
FrameSplitter(Frame dataset,
float[] ratios) |
FrameSplitter(Frame dataset,
float[] ratios,
Key[] destKeys,
Key jobKey,
long seed) |
FrameSplitter(Frame dataset,
float[] ratios,
long seed) |
| Modifier and Type | Method and Description |
|---|---|
void |
compute2() |
Frame[] |
getResult() |
void |
onCompletion(jsr166y.CountedCompleter caller)
Performs an action when method
CountedCompleter.tryComplete() is invoked
and there are no pending counts, or when the unconditional
method CountedCompleter.complete(java.lang.Void) is invoked. |
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. |
clone, compute, priorityaddToPendingCount, compareAndSetPendingCount, complete, exec, getCompleter, getPendingCount, getRawResult, setCompleter, setPendingCount, setRawResult, tryCompleteadapt, 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, tryUnforkpublic FrameSplitter(Frame dataset, float[] ratios)
public FrameSplitter(Frame dataset, float[] ratios, long seed)
public void compute2()
compute2 in class H2O.H2OCountedCompleterpublic void onCompletion(jsr166y.CountedCompleter caller)
jsr166y.CountedCompleterCountedCompleter.tryComplete() is invoked
and there are no pending counts, or when the unconditional
method CountedCompleter.complete(java.lang.Void) is invoked. By default, this method
does nothing.onCompletion in class jsr166y.CountedCompletercaller - the task invoking this method (which may
be this task itself).public boolean onExceptionalCompletion(java.lang.Throwable ex,
jsr166y.CountedCompleter caller)
jsr166y.CountedCompleterForkJoinTask.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.onExceptionalCompletion in class H2O.H2OCountedCompleterex - the exceptioncaller - the task invoking this method (which may
be this task itself).public Frame[] getResult()