public interface BatchWriter<T> extends Closeable
TableBatchWriteSession and is
responsible for writing data for an data partition.| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Aborts this writer if it is failed.
|
WriterCommitMessage |
commit()
Commits this writer after all records are written successfully, returns a commit message which
will be sent back to table sink
|
default Metrics |
currentMetricsValues()
Returns metrics for this writer
|
T |
newElement()
Returns an new element for
write(T) |
void |
write(T record)
Writes one element.
|
void write(T record) throws IOException
If this method fails (by throwing an exception), abort() will be called
IOException - if failure happens during IO.void abort()
throws IOException
IOExceptionWriterCommitMessage commit() throws IOException
IOExceptiondefault Metrics currentMetricsValues()
Copyright © 2024 Alibaba Cloud Computing. All rights reserved.