Class TraceRecordBatch
java.lang.Object
org.apache.drill.exec.record.AbstractRecordBatch<Trace>
org.apache.drill.exec.record.AbstractUnaryRecordBatch<Trace>
org.apache.drill.exec.record.AbstractSingleRecordBatch<Trace>
org.apache.drill.exec.physical.impl.trace.TraceRecordBatch
- All Implemented Interfaces:
AutoCloseable,Iterable<VectorWrapper<?>>,CloseableRecordBatch,RecordBatch,VectorAccessible
Contains value vectors which are exactly the same
as the incoming record batch's value vectors. If the incoming
record batch has a selection vector (type 2) then TraceRecordBatch
will also contain a selection vector.
Purpose of this record batch is to dump the data associated with all the value vectors and selection vector to disk.
This record batch does not modify any data or schema, it simply consumes the incoming record batch's data, dump to disk and pass the same set of value vectors (and selection vectors) to its parent record batch.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.record.AbstractRecordBatch
AbstractRecordBatch.BatchStateNested classes/interfaces inherited from interface org.apache.drill.exec.record.RecordBatch
RecordBatch.IterOutcome -
Field Summary
Fields inherited from class org.apache.drill.exec.record.AbstractSingleRecordBatch
incomingFields inherited from class org.apache.drill.exec.record.AbstractUnaryRecordBatch
callBackFields inherited from class org.apache.drill.exec.record.AbstractRecordBatch
batchStatsContext, container, context, oContext, popConfig, state, stats, unionTypeEnabledFields inherited from interface org.apache.drill.exec.record.RecordBatch
MAX_BATCH_ROW_COUNT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected RecordBatch.IterOutcomedoWork()Invoked for every record batch and it simply dumps the buffers associated with all the value vectors in this record batch to a log file.voiddump()Perform dump of this batch's state to logs.intGet the number of records.protected booleanMethods inherited from class org.apache.drill.exec.record.AbstractSingleRecordBatch
getFinalOutcome, getIncomingMethods inherited from class org.apache.drill.exec.record.AbstractUnaryRecordBatch
cancelIncoming, getLastKnownOutcome, handleNullInput, innerNext, setLastKnownOutcomeMethods inherited from class org.apache.drill.exec.record.AbstractRecordBatch
buildSchema, cancel, checkContinue, getContainer, getContext, getOutgoingContainer, getPopConfig, getRecordBatchStatsContext, getSchema, getSelectionVector4, getValueAccessorById, getValueVectorId, getWritableBatch, isRecordBatchStatsLoggingEnabled, iterator, next, next, next, schemaChangeException, schemaChangeExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TraceRecordBatch
public TraceRecordBatch(Trace pop, RecordBatch incoming, FragmentContext context) throws ExecutionSetupException - Throws:
ExecutionSetupException
-
-
Method Details
-
getRecordCount
public int getRecordCount()Description copied from interface:VectorAccessibleGet the number of records.- Returns:
- number of records
-
doWork
Invoked for every record batch and it simply dumps the buffers associated with all the value vectors in this record batch to a log file.- Specified by:
doWorkin classAbstractUnaryRecordBatch<Trace>
-
setupNewSchema
protected boolean setupNewSchema()- Specified by:
setupNewSchemain classAbstractUnaryRecordBatch<Trace>
-
getSelectionVector2
- Specified by:
getSelectionVector2in interfaceVectorAccessible- Overrides:
getSelectionVector2in classAbstractRecordBatch<Trace>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classAbstractRecordBatch<Trace>
-
dump
public void dump()Description copied from interface:RecordBatchPerform dump of this batch's state to logs.
-