public class TablesWriter extends java.lang.Object implements TableWriter
Committer determines that the current
table should be committed/completed, the table file is completed and a new table file is created.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes a writer, which means the table is complete now.
|
static TablesWriter |
create(TableSchema schema,
Committer committer,
AlluxioURI outputDir) |
long |
getBytes()
Note that the bytes written should take compression and encoding into consideration.
|
int |
getRows() |
void |
write(TableRow row)
Writes a row.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, createpublic static TablesWriter create(TableSchema schema, Committer committer, AlluxioURI outputDir) throws java.io.IOException
schema - the table schemacommitter - the committeroutputDir - the output directoryjava.io.IOException - when failed to create an internal table writerpublic void write(TableRow row) throws java.io.IOException
TableWriterwrite in interface TableWriterrow - a rowjava.io.IOException - when write failspublic void close()
throws java.io.IOException
TableWriterclose in interface TableWriterclose in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException - when failing to close the underlying output streampublic int getRows()
getRows in interface TableWriterpublic long getBytes()
TableWritergetBytes in interface TableWriterCopyright © 2022. All Rights Reserved.