Class TraceRecordBatch
java.lang.Object
org.apache.drill.exec.record.AbstractRecordBatch<T>
org.apache.drill.exec.record.AbstractUnaryRecordBatch<T>
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.BatchState
Nested 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
incoming
Fields inherited from class org.apache.drill.exec.record.AbstractUnaryRecordBatch
callBack
Fields inherited from class org.apache.drill.exec.record.AbstractRecordBatch
batchStatsContext, container, context, oContext, popConfig, state, stats, unionTypeEnabled
Fields inherited from interface org.apache.drill.exec.record.RecordBatch
MAX_BATCH_ROW_COUNT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected RecordBatch.IterOutcome
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.void
dump()
Perform dump of this batch's state to logs.int
Get the number of records.protected boolean
Methods inherited from class org.apache.drill.exec.record.AbstractSingleRecordBatch
getFinalOutcome, getIncoming
Methods inherited from class org.apache.drill.exec.record.AbstractUnaryRecordBatch
cancelIncoming, getLastKnownOutcome, handleNullInput, innerNext, setLastKnownOutcome
Methods 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, schemaChangeException
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:VectorAccessible
Get 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:
doWork
in classAbstractUnaryRecordBatch<Trace>
-
setupNewSchema
protected boolean setupNewSchema()- Specified by:
setupNewSchema
in classAbstractUnaryRecordBatch<Trace>
-
getSelectionVector2
- Specified by:
getSelectionVector2
in interfaceVectorAccessible
- Overrides:
getSelectionVector2
in classAbstractRecordBatch<Trace>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classAbstractRecordBatch<Trace>
-
dump
public void dump()Description copied from interface:RecordBatch
Perform dump of this batch's state to logs.
-