public abstract class CoprocessorIterator<T> extends Object implements Iterator<T>
Modifier and Type | Field and Description |
---|---|
protected int |
chunkIndex |
protected List<Chunk> |
chunkList |
protected DAGRequest |
dagRequest |
protected CodecDataInput |
dataInput |
protected boolean |
eof |
protected DataType[] |
handleTypes |
protected List<RangeSplitter.RegionTask> |
regionTasks |
protected RowReader |
rowReader |
protected SchemaInfer |
schemaInfer |
protected TiSession |
session |
protected int |
taskIndex |
Modifier and Type | Method and Description |
---|---|
static CoprocessorIterator<Long> |
getHandleIterator(TiDAGRequest req,
List<RangeSplitter.RegionTask> regionTasks,
TiSession session)
Build a DAGIterator from TiDAGRequest and region tasks to get handles
|
static CoprocessorIterator<Row> |
getRowIterator(TiDAGRequest req,
List<RangeSplitter.RegionTask> regionTasks,
TiSession session)
Build a DAGIterator from TiDAGRequest and region tasks to get rows
|
static CoprocessorIterator<TiChunk> |
getTiChunkIterator(TiDAGRequest req,
List<RangeSplitter.RegionTask> regionTasks,
TiSession session,
int numOfRows)
Build a DAGIterator from TiDAGRequest and region tasks to get rows
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, hasNext, next, remove
protected final TiSession session
protected final List<RangeSplitter.RegionTask> regionTasks
protected final DAGRequest dagRequest
protected final DataType[] handleTypes
protected RowReader rowReader
protected CodecDataInput dataInput
protected boolean eof
protected int taskIndex
protected int chunkIndex
protected SchemaInfer schemaInfer
public static CoprocessorIterator<Row> getRowIterator(TiDAGRequest req, List<RangeSplitter.RegionTask> regionTasks, TiSession session)
When we are preforming a scan request using coveringIndex, IndexScan
should be used to read index rows. In other circumstances,
TableScan
is used to scan table rows.
req
- TiDAGRequest builtregionTasks
- a list or RegionTask each contains a task on a single regionsession
- TiSessionpublic static CoprocessorIterator<TiChunk> getTiChunkIterator(TiDAGRequest req, List<RangeSplitter.RegionTask> regionTasks, TiSession session, int numOfRows)
When we are preforming a scan request using coveringIndex, IndexScan
should be used to read index rows. In other circumstances,
TableScan
is used to scan table rows.
req
- TiDAGRequest builtregionTasks
- a list or RegionTask each contains a task on a single regionsession
- TiSessionpublic static CoprocessorIterator<Long> getHandleIterator(TiDAGRequest req, List<RangeSplitter.RegionTask> regionTasks, TiSession session)
When we use getHandleIterator, we must be preforming a IndexScan.
req
- TiDAGRequest builtregionTasks
- a list or RegionTask each contains a task on a single regionsession
- TiSessionCopyright © 2024 PingCAP. All rights reserved.