public class AvroAppender extends FileAppender
conf, enabledStats, inited, meta, path, schema
Constructor and Description |
---|
AvroAppender(org.apache.hadoop.conf.Configuration conf,
Schema schema,
TableMeta meta,
org.apache.hadoop.fs.Path path)
Creates a new AvroAppender.
|
Modifier and Type | Method and Description |
---|---|
void |
addTuple(Tuple tuple)
Write a Tuple to the Avro file.
|
void |
close()
Closes the Appender.
|
void |
flush()
Flushes the current state of the file.
|
long |
getOffset()
Gets the current offset.
|
TableStats |
getStats()
If table statistics is enabled, retrieve the table statistics.
|
void |
init()
Initializes the Appender.
|
enableStats
public AvroAppender(org.apache.hadoop.conf.Configuration conf, Schema schema, TableMeta meta, org.apache.hadoop.fs.Path path) throws IOException
conf
- Configuration properties.schema
- The table schema.meta
- The table metadata.path
- The path of the Parquet file to write to.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 void addTuple(Tuple tuple) throws IOException
tuple
- The Tuple to write.IOException
public void flush() throws IOException
IOException
public void close() throws IOException
IOException
public TableStats getStats()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.