public static class RawFile.RawFileAppender extends FileAppender
conf, enabledStats, inited, meta, path, schema
Constructor and Description |
---|
RawFile.RawFileAppender(org.apache.hadoop.conf.Configuration conf,
Schema schema,
TableMeta meta,
org.apache.hadoop.fs.Path path) |
Modifier and Type | Method and Description |
---|---|
void |
addTuple(Tuple t) |
void |
close() |
static int |
computeRawVarint32Size(int value)
Compute the number of bytes that would be needed to encode a varint.
|
static int |
encodeZigZag32(int n)
Encode a ZigZag-encoded 32-bit value.
|
static long |
encodeZigZag64(long n)
Encode a ZigZag-encoded 64-bit value.
|
void |
flush() |
long |
getOffset() |
TableStats |
getStats() |
void |
init() |
void |
writeRawVarint32(int value)
Encode and write a varint.
|
void |
writeRawVarint64(long value)
Encode and write a varint.
|
enableStats
public RawFile.RawFileAppender(org.apache.hadoop.conf.Configuration conf, Schema schema, TableMeta meta, org.apache.hadoop.fs.Path path) throws IOException
IOException
public void init() throws IOException
init
in interface Appender
init
in class FileAppender
IOException
public long getOffset() throws IOException
getOffset
in class FileAppender
IOException
public static int encodeZigZag32(int n)
n
- A signed 32-bit integer.public static long encodeZigZag64(long n)
n
- A signed 64-bit integer.public void writeRawVarint32(int value) throws IOException
value
is treated as
unsigned, so it won't be sign-extended if negative.IOException
public static int computeRawVarint32Size(int value)
value
is treated as unsigned, so it won't be sign-extended if
negative.public void writeRawVarint64(long value) throws IOException
IOException
public void addTuple(Tuple t) throws IOException
IOException
public void flush() throws IOException
IOException
public void close() throws IOException
IOException
public TableStats getStats()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.