public interface StreamingTransaction
Modifier and Type | Method and Description |
---|---|
void |
abort()
Abort a transaction.
|
void |
beginNextTransaction()
get ready for the next transaction.
|
void |
close()
Free/close resources used by the streaming transaction.
|
void |
commit()
commit transaction.
|
void |
commit(Set<String> partitions)
Commit transaction and sent to the metastore the created partitions
in the process.
|
void |
commit(Set<String> partitions,
String key,
String value)
Commits atomically together with a key and a value.
|
HiveStreamingConnection.TxnState |
getCurrentTransactionState() |
long |
getCurrentTxnId() |
long |
getCurrentWriteId() |
Set<String> |
getPartitions()
Get the partitions that were used in this transaction.
|
List<TxnToWriteId> |
getTxnToWriteIds() |
boolean |
isClosed() |
int |
remainingTransactions() |
void |
write(byte[] record)
Write data withing a transaction.
|
void |
write(InputStream stream)
Write data within a transaction.
|
void beginNextTransaction() throws StreamingException
StreamingException
void commit() throws StreamingException
StreamingException
void commit(@Nullable Set<String> partitions) throws StreamingException
partitions
- to commit.StreamingException
void commit(@Nullable Set<String> partitions, @Nullable String key, @Nullable String value) throws StreamingException
partitions
- to commit.key
- to commit.value
- to commit.StreamingException
void abort() throws StreamingException
StreamingException
void write(byte[] record) throws StreamingException
record
- bytes to write.StreamingException
void write(InputStream stream) throws StreamingException
stream
- stream to write.StreamingException
void close() throws StreamingException
StreamingException
boolean isClosed()
HiveStreamingConnection.TxnState getCurrentTransactionState()
int remainingTransactions()
long getCurrentTxnId()
long getCurrentWriteId()
Set<String> getPartitions()
List<TxnToWriteId> getTxnToWriteIds()
Copyright © 2022 The Apache Software Foundation. All rights reserved.