public interface TableWriter extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes a writer, which means the table is complete now.
|
static TableWriter |
create(TableSchema schema,
AlluxioURI uri) |
static TableWriter |
create(TableSchema schema,
AlluxioURI uri,
PartitionInfo partitionInfo) |
long |
getBytes()
Note that the bytes written should take compression and encoding into consideration.
|
int |
getRows() |
void |
write(TableRow row)
Writes a row.
|
static TableWriter create(TableSchema schema, AlluxioURI uri) throws IOException
schema
- the table schemauri
- the URI to the outputIOException
static TableWriter create(TableSchema schema, AlluxioURI uri, @Nullable PartitionInfo partitionInfo) throws IOException
schema
- the table schemauri
- the URI to the outputpartitionInfo
- the partition info (default configuration is used if null)IOException
void write(TableRow row) throws IOException
row
- a rowIOException
- when write failsvoid close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
- when failing to close the underlying output streamint getRows()
long getBytes()
Copyright © 2023. All Rights Reserved.