public abstract class BaseRootExec extends Object implements RootExec
Modifier and Type | Field and Description |
---|---|
static String |
ENABLE_BATCH_DUMP_CONFIG |
protected RootFragmentContext |
fragmentContext |
protected OperatorContext |
oContext |
protected OperatorStats |
stats |
Constructor and Description |
---|
BaseRootExec(RootFragmentContext fragmentContext,
OperatorContext oContext,
PhysicalOperator config) |
BaseRootExec(RootFragmentContext fragmentContext,
PhysicalOperator config) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
dumpBatches(Throwable t)
Dump failed batches' state preceded by its parent's state to logs.
|
static <T> T |
findLeaf(List<T> dag,
Throwable e)
Given a list of operators and a stack trace, walks the stack trace and
the operator list to find the leaf-most operator, which is the one
that was active when the exception was thrown.
|
abstract boolean |
innerNext() |
boolean |
next()
Do the next batch of work.
|
RecordBatch.IterOutcome |
next(RecordBatch b) |
void |
receivingFragmentFinished(ExecProtos.FragmentHandle handle)
Inform sender that receiving fragment is finished and doesn't need any more
data.
|
public static final String ENABLE_BATCH_DUMP_CONFIG
protected OperatorStats stats
protected OperatorContext oContext
protected RootFragmentContext fragmentContext
public BaseRootExec(RootFragmentContext fragmentContext, PhysicalOperator config) throws OutOfMemoryException
OutOfMemoryException
public BaseRootExec(RootFragmentContext fragmentContext, OperatorContext oContext, PhysicalOperator config) throws OutOfMemoryException
OutOfMemoryException
public final boolean next()
RootExec
public final RecordBatch.IterOutcome next(RecordBatch b)
public abstract boolean innerNext()
public void receivingFragmentFinished(ExecProtos.FragmentHandle handle)
RootExec
RootExec.next()
will return false.receivingFragmentFinished
in interface RootExec
handle
- The handle pointing to the downstream receiver that does not need
anymore data.public void dumpBatches(Throwable t)
RootExec
dumpBatches
in interface RootExec
t
- the exception thrown by an operator and which therefore
records, in its stack trace, which operators were active on the stackpublic void close() throws Exception
close
in interface AutoCloseable
Exception
public static <T> T findLeaf(List<T> dag, Throwable e)
Not all operators leave a mark in the trace. In particular if a the call stack is only through base-class methods, then we have no way to know the actual class during the call. This is OK because the leaf methods are just pass-through operations, they are unlikely to fail.
T
- the type of the operator. Parameterized to allow easier
testingdag
- the list of operators from root-most to leaf-moste
- the exception thrown somewhere in the operator treeCopyright © 1970 The Apache Software Foundation. All rights reserved.