public interface TransactionBatch
| Modifier and Type | Interface and Description |
|---|---|
static class |
TransactionBatch.TxnState |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Abort the currently open transaction
|
void |
beginNextTransaction()
Activate the next available transaction in the current transaction batch
|
void |
close()
Close the TransactionBatch
|
void |
commit()
Commit the currently open transaction
|
TransactionBatch.TxnState |
getCurrentTransactionState()
get state of current transaction
|
Long |
getCurrentTxnId()
Get Id of currently open transaction
|
void |
heartbeat()
Issues a heartbeat to hive metastore on the current and remaining txn ids
to keep them from expiring
|
int |
remainingTransactions()
Remaining transactions are the ones that are not committed or aborted or open.
|
void |
write(byte[] record)
Write record using RecordWriter
|
void |
write(Collection<byte[]> records)
Write records using RecordWriter
|
void beginNextTransaction()
throws StreamingException,
InterruptedException
StreamingException - if not able to switch to next TxnInterruptedException - if call in interruptedLong getCurrentTxnId()
TransactionBatch.TxnState getCurrentTransactionState()
void commit()
throws StreamingException,
InterruptedException
StreamingException - if there are errors committingInterruptedException - if call in interruptedvoid abort()
throws StreamingException,
InterruptedException
StreamingException - if there are errorsInterruptedException - if call in interruptedint remainingTransactions()
void write(byte[] record)
throws StreamingException,
InterruptedException
record - the data to be writtenStreamingException - if there are errors when writingInterruptedException - if call in interruptedvoid write(Collection<byte[]> records) throws StreamingException, InterruptedException
StreamingException - if there are errors when writingInterruptedException - if call in interruptedvoid heartbeat()
throws StreamingException
StreamingException - if there are errorsvoid close()
throws StreamingException,
InterruptedException
StreamingException - if there are errors closing batchInterruptedException - if call in interruptedCopyright © 2017 The Apache Software Foundation. All rights reserved.