Package org.apache.storm.hive.common
Class HiveWriter
- java.lang.Object
- 
- org.apache.storm.hive.common.HiveWriter
 
- 
 @Deprecated(since="2.7.1", forRemoval=true) public class HiveWriter extends Object Deprecated, for removal: This API element is subject to removal in a future version.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classHiveWriter.CommitFailureDeprecated, for removal: This API element is subject to removal in a future version.static classHiveWriter.ConnectFailureDeprecated, for removal: This API element is subject to removal in a future version.static classHiveWriter.FailureDeprecated, for removal: This API element is subject to removal in a future version.static classHiveWriter.TxnBatchFailureDeprecated, for removal: This API element is subject to removal in a future version.static classHiveWriter.TxnFailureDeprecated, for removal: This API element is subject to removal in a future version.static classHiveWriter.WriteFailureDeprecated, for removal: This API element is subject to removal in a future version.
 - 
Field SummaryFields Modifier and Type Field Description protected booleanclosedDeprecated, for removal: This API element is subject to removal in a future version.
 - 
Constructor SummaryConstructors Constructor 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, boolean tokenAuthEnabled)Deprecated, for removal: This API element is subject to removal in a future version.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidabort()Deprecated, for removal: This API element is subject to removal in a future version.Aborts the current Txn and switches to next Txn.voidclose()Deprecated, for removal: This API element is subject to removal in a future version.Close the Transaction Batch and connection.voidflush(boolean rollToNext)Deprecated, for removal: This API element is subject to removal in a future version.Commits the current Txn if totalRecordsPerTransaction > 0 .voidflushAndClose()Deprecated, for removal: This API element is subject to removal in a future version.Flush and Close current transactionBatch.longgetLastUsed()Deprecated, for removal: This API element is subject to removal in a future version.org.apache.hive.hcatalog.streaming.RecordWritergetRecordWriter(HiveMapper mapper, boolean tokenAuthEnabled)Deprecated, for removal: This API element is subject to removal in a future version.intgetTotalRecords()Deprecated, for removal: This API element is subject to removal in a future version.returns totalRecords written so far in a transaction.voidheartBeat()Deprecated, for removal: This API element is subject to removal in a future version.Queues up a heartbeat request on the current and remaining txns using the heartbeatThdPool and returns immediately.StringtoString()Deprecated, for removal: This API element is subject to removal in a future version.voidwrite(byte[] record)Deprecated, for removal: This API element is subject to removal in a future version.Write data.
 
- 
- 
- 
Constructor Detail- 
HiveWriterpublic HiveWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint, int txnsPerBatch, boolean autoCreatePartitions, long callTimeout, ExecutorService callTimeoutPool, HiveMapper mapper, org.apache.hadoop.security.UserGroupInformation ugi, boolean tokenAuthEnabled) throws InterruptedException, HiveWriter.ConnectFailureDeprecated, for removal: This API element is subject to removal in a future version.
 
- 
 - 
Method Detail- 
getRecordWriterpublic org.apache.hive.hcatalog.streaming.RecordWriter getRecordWriter(HiveMapper mapper, boolean tokenAuthEnabled) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
- Exception
 
 - 
toStringpublic String toString() Deprecated, for removal: This API element is subject to removal in a future version.
 - 
writepublic void write(byte[] record) throws HiveWriter.WriteFailure, org.apache.hive.hcatalog.streaming.SerializationError, InterruptedExceptionDeprecated, for removal: This API element is subject to removal in a future version.Write data.- Throws:
- HiveWriter.WriteFailure
- org.apache.hive.hcatalog.streaming.SerializationError
- InterruptedException
 
 - 
flushpublic void flush(boolean rollToNext) throws HiveWriter.CommitFailure, HiveWriter.TxnBatchFailure, HiveWriter.TxnFailure, InterruptedExceptionDeprecated, for removal: This API element is subject to removal in a future version.Commits the current Txn if totalRecordsPerTransaction > 0 . If 'rollToNext' is true, will switch to next Txn in batch or to a new TxnBatch if current Txn batch is exhausted
 - 
heartBeatpublic void heartBeat() throws InterruptedExceptionDeprecated, for removal: This API element is subject to removal in a future version.Queues up a heartbeat request on the current and remaining txns using the heartbeatThdPool and returns immediately.- Throws:
- InterruptedException
 
 - 
getTotalRecordspublic int getTotalRecords() Deprecated, for removal: This API element is subject to removal in a future version.returns totalRecords written so far in a transaction.
 - 
flushAndClosepublic void flushAndClose() throws HiveWriter.TxnBatchFailure, HiveWriter.TxnFailure, HiveWriter.CommitFailure, IOException, InterruptedExceptionDeprecated, for removal: This API element is subject to removal in a future version.Flush and Close current transactionBatch.
 - 
closepublic void close() throws IOException, InterruptedExceptionDeprecated, for removal: This API element is subject to removal in a future version.Close the Transaction Batch and connection.- Throws:
- IOException
- InterruptedException
 
 - 
abortpublic void abort() throws org.apache.hive.hcatalog.streaming.StreamingException, HiveWriter.TxnBatchFailure, InterruptedExceptionDeprecated, for removal: This API element is subject to removal in a future version.Aborts the current Txn and switches to next Txn.- Throws:
- org.apache.hive.hcatalog.streaming.StreamingException- if could not get new Transaction Batch, or switch to next Txn
- HiveWriter.TxnBatchFailure
- InterruptedException
 
 - 
getLastUsedpublic long getLastUsed() Deprecated, for removal: This API element is subject to removal in a future version.
 
- 
 
-