public interface RecordWriter
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the RecordUpdater.
|
void |
flush()
Flush records from buffer.
|
Set<String> |
getPartitions()
Get the set of partitions that were added by the record writer.
|
void |
init(StreamingConnection connection,
long minWriteId,
long maxWriteID)
Initialize record writer.
|
void |
write(long writeId,
byte[] record)
Writes using a hive RecordUpdater.
|
void |
write(long writeId,
InputStream inputStream)
Writes using a hive RecordUpdater.
|
void init(StreamingConnection connection, long minWriteId, long maxWriteID) throws StreamingException
connection - - streaming connectionminWriteId - - min write idmaxWriteID - - max write idStreamingException - - thrown when initialization failedvoid write(long writeId,
byte[] record)
throws StreamingException
writeId - - the write ID of the table mapping to Txn in which the write occursrecord - - the record to be writtenStreamingException - - thrown when write failsvoid write(long writeId,
InputStream inputStream)
throws StreamingException
writeId - - the write ID of the table mapping to Txn in which the write occursinputStream - - the record to be writtenStreamingException - - thrown when write failsvoid flush()
throws StreamingException
StreamingException - - thrown when flush failsvoid close()
throws StreamingException
StreamingException - - thrown when record writer cannot be closed.Copyright © 2019 The Apache Software Foundation. All Rights Reserved.