public static class CSVFile.CSVScanner extends FileScanner implements SeekableScanner
columnNum, conf, fragment, inited, meta, progress, schema, tableStats, targets
Constructor and Description |
---|
CSVFile.CSVScanner(org.apache.hadoop.conf.Configuration conf,
Schema schema,
TableMeta meta,
FileFragment fragment) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close scanner
|
long |
getNextOffset() |
float |
getProgress()
How much of the input has the Scanner consumed
|
void |
init() |
boolean |
isProjectable()
It returns if the projection is executed in the underlying scanner layer.
|
boolean |
isSelectable()
It returns if the selection is executed in the underlying scanner layer.
|
boolean |
isSplittable()
It returns if the file is splittable.
|
Tuple |
next()
It returns one tuple at each call.
|
void |
reset()
Reset the cursor.
|
void |
seek(long offset) |
void |
setSearchCondition(Object expr)
Set a search condition
|
getFileSystem, getInputStats, getSchema, setTarget
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputStats, setTarget
getSchema
public CSVFile.CSVScanner(org.apache.hadoop.conf.Configuration conf, Schema schema, TableMeta meta, FileFragment fragment) throws IOException
IOException
public void init() throws IOException
init
in interface Scanner
init
in class FileScanner
IOException
public float getProgress()
Scanner
getProgress
in interface Scanner
getProgress
in class FileScanner
0.0
to 1.0
.public Tuple next() throws IOException
Scanner
next
in interface Scanner
IOException
- if internal I/O error occurs during next methodpublic void reset() throws IOException
Scanner
reset
in interface Scanner
IOException
- if internal I/O error occurs during reset methodpublic 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 isProjectable()
Scanner
isProjectable
in interface Scanner
public boolean isSelectable()
Scanner
isSelectable
in interface Scanner
public void setSearchCondition(Object expr)
Scanner
setSearchCondition
in interface Scanner
setSearchCondition
in class FileScanner
expr
- to be searched
TODO - to be changed Object typepublic void seek(long offset) throws IOException
seek
in interface SeekableScanner
IOException
public long getNextOffset() throws IOException
getNextOffset
in interface SeekableScanner
IOException
public boolean isSplittable()
Scanner
isSplittable
in interface Scanner
Copyright © 2014 Apache Software Foundation. All Rights Reserved.