public static class RawFile.RawFileScanner extends FileScanner implements SeekableScanner
columnNum, conf, fragment, inited, meta, progress, schema, tableStats, targets
Constructor and Description |
---|
RawFile.RawFileScanner(org.apache.hadoop.conf.Configuration conf,
Schema schema,
TableMeta meta,
FileFragment fragment) |
RawFile.RawFileScanner(org.apache.hadoop.conf.Configuration conf,
Schema schema,
TableMeta meta,
org.apache.hadoop.fs.Path path) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close scanner
|
static int |
decodeZigZag32(int n)
Decode a ZigZag-encoded 32-bit value.
|
static long |
decodeZigZag64(long n)
Decode a ZigZag-encoded 64-bit value.
|
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.
|
int |
readRawVarint32()
Read a raw Varint from the stream.
|
long |
readRawVarint64()
Read a raw Varint from the stream.
|
void |
reset()
Reset the cursor.
|
void |
seek(long offset) |
getFileSystem, getInputStats, getSchema, setSearchCondition, setTarget
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputStats, setSearchCondition, setTarget
getSchema
public RawFile.RawFileScanner(org.apache.hadoop.conf.Configuration conf, Schema schema, TableMeta meta, org.apache.hadoop.fs.Path path) throws IOException
IOException
public RawFile.RawFileScanner(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 long getNextOffset() throws IOException
getNextOffset
in interface SeekableScanner
IOException
public void seek(long offset) throws IOException
seek
in interface SeekableScanner
IOException
public static int decodeZigZag32(int n)
n
- An unsigned 32-bit integer, stored in a signed int because
Java has no explicit unsigned support.public static long decodeZigZag64(long n)
n
- An unsigned 64-bit integer, stored in a signed int because
Java has no explicit unsigned support.public int readRawVarint32() throws IOException
IOException
public long readRawVarint64() throws IOException
IOException
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 boolean isSplittable()
Scanner
isSplittable
in interface Scanner
public float getProgress()
Scanner
getProgress
in interface Scanner
getProgress
in class FileScanner
0.0
to 1.0
.Copyright © 2014 Apache Software Foundation. All Rights Reserved.