public class ExtendedMockBatchReader extends Object implements ManagedReader<SchemaNegotiator>
The definition is provided inside the sub scan used to create the
ScanBatch
used to create this record reader.
Constructor and Description |
---|
ExtendedMockBatchReader(MockTableDef.MockScanEntry config) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Release resources.
|
boolean |
next()
Read the next batch.
|
boolean |
open(SchemaNegotiator schemaNegotiator)
Setup the record reader.
|
public ExtendedMockBatchReader(MockTableDef.MockScanEntry config)
public boolean open(SchemaNegotiator schemaNegotiator)
ManagedReader
open
in interface ManagedReader<SchemaNegotiator>
schemaNegotiator
- mechanism to negotiate select and table
schemas, then create the row set reader used to load data into
value vectorspublic boolean next()
ManagedReader
This somewhat complex protocol avoids the need to allocate a final batch just to find out that no more data is available; it allows EOF to be returned along with the final batch.
next
in interface ManagedReader<SchemaNegotiator>
public void close()
ManagedReader
close
in interface ManagedReader<SchemaNegotiator>
Copyright © 1970 The Apache Software Foundation. All rights reserved.