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
IOExceptionpublic AvroColumnWriter(Schema s, ColumnFileMetaData meta, GenericData model) throws IOException
IOExceptionpublic long sizeEstimate()
writeTo(OutputStream).public void writeTo(OutputStream out) throws IOException
IOExceptionpublic void writeTo(File file) throws IOException
IOExceptionpublic void write(D value) throws IOException
IOExceptionCopyright © 2009–2023 The Apache Software Foundation. All rights reserved.