public class ArrowWriterImpl extends Object implements BatchWriter<org.apache.arrow.vector.VectorSchemaRoot>
| Constructor and Description |
|---|
ArrowWriterImpl(String sessionId,
TableIdentifier identifier,
DataSchema schema,
long blockNumber,
WriterAttemptId attemptId,
WriterOptions writerOptions,
ArrowOptions arrowOptions) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Aborts this writer if it is failed.
|
void |
close() |
WriterCommitMessage |
commit()
Commits this writer after all records are written successfully, returns a commit message which
will be sent back to table sink
|
Metrics |
currentMetricsValues()
Returns metrics for this writer
|
org.apache.arrow.vector.VectorSchemaRoot |
newElement()
Returns an new element for
BatchWriter.write(T) |
void |
write(org.apache.arrow.vector.VectorSchemaRoot root)
Writes one element.
|
public ArrowWriterImpl(String sessionId, TableIdentifier identifier, DataSchema schema, long blockNumber, WriterAttemptId attemptId, WriterOptions writerOptions, ArrowOptions arrowOptions)
public org.apache.arrow.vector.VectorSchemaRoot newElement()
BatchWriterBatchWriter.write(T)newElement in interface BatchWriter<org.apache.arrow.vector.VectorSchemaRoot>public void write(org.apache.arrow.vector.VectorSchemaRoot root)
throws IOException
BatchWriter
If this method fails (by throwing an exception), BatchWriter.abort() will be called
write in interface BatchWriter<org.apache.arrow.vector.VectorSchemaRoot>IOException - if failure happens during IO.public void abort()
throws IOException
BatchWriterabort in interface BatchWriter<org.apache.arrow.vector.VectorSchemaRoot>IOException@Nullable public WriterCommitMessage commit() throws IOException
BatchWritercommit in interface BatchWriter<org.apache.arrow.vector.VectorSchemaRoot>IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic Metrics currentMetricsValues()
BatchWritercurrentMetricsValues in interface BatchWriter<org.apache.arrow.vector.VectorSchemaRoot>Copyright © 2024 Alibaba Cloud Computing. All rights reserved.