public class AvroColumnWriter<D> extends Object
Each primitive type is written to a separate column.
Output is buffered until writeTo(OutputStream)
is called. The
sizeEstimate()
indicates both the amount of data buffered and the
size of the file that will be written.
Modifier and Type | Field and Description |
---|---|
static String |
SCHEMA_KEY |
Constructor and Description |
---|
AvroColumnWriter(Schema s,
ColumnFileMetaData meta) |
AvroColumnWriter(Schema s,
ColumnFileMetaData meta,
GenericData model) |
Modifier and Type | Method and Description |
---|---|
long |
sizeEstimate()
Return the approximate size of the file that will be written.
|
void |
write(D value)
Add a row to the file.
|
void |
writeTo(File file)
Write all rows added to the named file.
|
void |
writeTo(OutputStream out)
Write all rows added to the named output stream.
|
public static final String SCHEMA_KEY
public AvroColumnWriter(Schema s, ColumnFileMetaData meta) throws IOException
IOException
public AvroColumnWriter(Schema s, ColumnFileMetaData meta, GenericData model) throws IOException
IOException
public long sizeEstimate()
writeTo(OutputStream)
.public void writeTo(OutputStream out) throws IOException
IOException
public void writeTo(File file) throws IOException
IOException
public void write(D value) throws IOException
IOException
Copyright © 2009–2022 The Apache Software Foundation. All rights reserved.