public class HiveWriter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HiveWriter.CommitFailure |
static class |
HiveWriter.ConnectFailure |
static class |
HiveWriter.Failure |
static class |
HiveWriter.TxnBatchFailure |
static class |
HiveWriter.TxnFailure |
static class |
HiveWriter.WriteFailure |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed |
| Constructor and Description |
|---|
HiveWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint,
int txnsPerBatch,
boolean autoCreatePartitions,
long callTimeout,
ExecutorService callTimeoutPool,
HiveMapper mapper,
org.apache.hadoop.security.UserGroupInformation ugi) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Aborts the current Txn and switches to next Txn.
|
void |
close()
Close the Transaction Batch and connection
|
void |
flush(boolean rollToNext)
Commits the current Txn.
|
long |
getLastUsed() |
void |
heartBeat()
Queues up a heartbeat request on the current and remaining txns using the
heartbeatThdPool and returns immediately
|
void |
setHeartBeatNeeded() |
String |
toString() |
void |
write(byte[] record)
Write data
|
public HiveWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint,
int txnsPerBatch,
boolean autoCreatePartitions,
long callTimeout,
ExecutorService callTimeoutPool,
HiveMapper mapper,
org.apache.hadoop.security.UserGroupInformation ugi)
throws InterruptedException,
HiveWriter.ConnectFailure
public void setHeartBeatNeeded()
public void write(byte[] record)
throws HiveWriter.WriteFailure,
InterruptedException
public void flush(boolean rollToNext)
throws HiveWriter.CommitFailure,
HiveWriter.TxnBatchFailure,
HiveWriter.TxnFailure,
InterruptedException
public void heartBeat()
throws InterruptedException
InterruptedExceptionpublic void close()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic void abort()
throws InterruptedException
InterruptedException - if could not get new Transaction Batch, or switch to next Txnpublic long getLastUsed()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.