public class FrameSplitter extends H2O.H2OCountedCompleter<FrameSplitter>
The task creates ratios.length+1 output frame each containing a
demanded fraction of rows from source dataset
The tasks internally extract data from source chunks and create output chunks in preserving order of parts. I.e., the 1st partition contains the first P1-rows, the 2nd partition contains following P2-rows, ...
Assumptions and invariants
NOTE: the implementation is data-transfer expensive and in some cases it would be beneficial to use original implementation from 9af3f4e.
._priority| Constructor and Description |
|---|
FrameSplitter(Frame dataset,
double[] ratios,
Key<Frame>[] destKeys,
Key<Job> jobKey) |
FrameSplitter(H2O.H2OCountedCompleter cc,
Frame dataset,
double[] ratios,
Key<Frame>[] destKeys,
Key<Job> jobKey) |
| Modifier and Type | Method and Description |
|---|---|
void |
compute2()
Override to specify actual work to do
|
Frame[] |
getResult()
Blocking call to obtain a result of computation.
|
void |
onCompletion(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,
CountedCompleter caller)
Exceptional completion path; mostly does printing if the exception was
not handled earlier in the stack.
|
clone, compute, compute1, frozenType, icer, nextThrPriority, priority, read_impl, read, readJSON_impl, readJSON, write_impl, write, writeJSON_impl, writeJSON__tryComplete, addToPendingCount, 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, double[] ratios, Key<Frame>[] destKeys, Key<Job> jobKey)
public void compute2()
H2O.H2OCountedCompletercompute2 in class H2O.H2OCountedCompleter<FrameSplitter>public Frame[] getResult()
public void onCompletion(CountedCompleter caller)
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 CountedCompletercaller - the task invoking this method (which may
be this task itself).public boolean onExceptionalCompletion(java.lang.Throwable ex,
CountedCompleter caller)
H2O.H2OCountedCompleteronExceptionalCompletion in class H2O.H2OCountedCompleter<FrameSplitter>ex - the exceptioncaller - the task invoking this method (which may
be this task itself).