public abstract class FileScannerV2 extends Object implements Scanner
Modifier and Type | Field and Description |
---|---|
protected int |
allocatedDiskId |
protected AtomicBoolean |
closed |
protected int |
columnNum |
protected org.apache.hadoop.conf.Configuration |
conf |
protected AtomicBoolean |
firstSchdeuled |
protected FileFragment |
fragment |
protected org.apache.hadoop.fs.FileSystem |
fs |
protected boolean |
inited |
protected TableMeta |
meta |
protected float |
progress |
protected Schema |
schema |
protected StorageManagerV2.StorgaeManagerContext |
smContext |
protected TableStats |
tableStats |
protected Column[] |
targets |
protected long |
totalScanTime |
Constructor and Description |
---|
FileScannerV2(org.apache.hadoop.conf.Configuration conf,
TableMeta meta,
Schema schema,
FileFragment fragment) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close scanner
|
int |
getDiskId() |
protected abstract long |
getFilePosition() |
String |
getId() |
TableStats |
getInputStats() |
org.apache.hadoop.fs.Path |
getPath() |
float |
getProgress()
How much of the input has the Scanner consumed
|
Schema |
getSchema() |
void |
init() |
protected abstract boolean |
initFirstScan(int maxBytesPerSchedule) |
boolean |
isClosed() |
abstract boolean |
isFetchProcessing() |
abstract boolean |
isStopScanScheduling() |
Tuple |
next()
It returns one tuple at each call.
|
protected abstract Tuple |
nextTuple() |
protected abstract long[] |
reportReadBytes() |
void |
reset()
Reset the cursor.
|
void |
scan(int maxBytesPerSchedule) |
abstract void |
scannerReset() |
protected abstract boolean |
scanNext(int length) |
void |
setAllocatedDiskId(int allocatedDiskId) |
void |
setSearchCondition(Object expr)
Set a search condition
|
void |
setStorageManagerContext(StorageManagerV2.StorgaeManagerContext context) |
void |
setTarget(Column[] targets)
Set target columns
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isProjectable, isSelectable, isSplittable
protected AtomicBoolean closed
protected org.apache.hadoop.fs.FileSystem fs
protected boolean inited
protected final org.apache.hadoop.conf.Configuration conf
protected final TableMeta meta
protected final Schema schema
protected final FileFragment fragment
protected final int columnNum
protected Column[] targets
protected long totalScanTime
protected int allocatedDiskId
protected StorageManagerV2.StorgaeManagerContext smContext
protected AtomicBoolean firstSchdeuled
protected float progress
protected TableStats tableStats
public FileScannerV2(org.apache.hadoop.conf.Configuration conf, TableMeta meta, Schema schema, FileFragment fragment) throws IOException
IOException
protected abstract boolean scanNext(int length) throws IOException
IOException
protected abstract boolean initFirstScan(int maxBytesPerSchedule) throws IOException
IOException
protected abstract long getFilePosition() throws IOException
IOException
protected abstract Tuple nextTuple() throws IOException
IOException
public abstract boolean isFetchProcessing()
public abstract boolean isStopScanScheduling()
public abstract void scannerReset()
protected abstract long[] reportReadBytes()
public void init() throws IOException
init
in interface Scanner
IOException
public void reset() throws IOException
Scanner
reset
in interface Scanner
IOException
- if internal I/O error occurs during reset methodpublic void setAllocatedDiskId(int allocatedDiskId)
public String getId()
public Schema getSchema()
getSchema
in interface SchemaObject
public void setTarget(Column[] targets)
Scanner
public org.apache.hadoop.fs.Path getPath()
public int getDiskId()
public void setSearchCondition(Object expr)
Scanner
setSearchCondition
in interface Scanner
expr
- to be searched
TODO - to be changed Object typepublic void setStorageManagerContext(StorageManagerV2.StorgaeManagerContext context)
public void scan(int maxBytesPerSchedule) throws IOException
IOException
public void close() throws IOException
Scanner
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Scanner
IOException
- if internal I/O error occurs during close methodpublic boolean isClosed()
public Tuple next() throws IOException
Scanner
next
in interface Scanner
IOException
- if internal I/O error occurs during next methodpublic float getProgress()
Scanner
getProgress
in interface Scanner
0.0
to 1.0
.public TableStats getInputStats()
getInputStats
in interface Scanner
Copyright © 2014 Apache Software Foundation. All Rights Reserved.