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 Summary
Nested 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 Summary
Fields Modifier and Type Field Description protected booleanclosedDeprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Summary
Constructors 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 Summary
All 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
-
HiveWriter
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, boolean tokenAuthEnabled) throws InterruptedException, HiveWriter.ConnectFailureDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Detail
-
getRecordWriter
public 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
-
toString
public String toString()
Deprecated, for removal: This API element is subject to removal in a future version.
-
write
public 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.WriteFailureorg.apache.hive.hcatalog.streaming.SerializationErrorInterruptedException
-
flush
public 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
-
heartBeat
public 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
-
getTotalRecords
public int getTotalRecords()
Deprecated, for removal: This API element is subject to removal in a future version.returns totalRecords written so far in a transaction.
-
flushAndClose
public 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.
-
close
public 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:
IOExceptionInterruptedException
-
abort
public 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 TxnHiveWriter.TxnBatchFailureInterruptedException
-
getLastUsed
public long getLastUsed()
Deprecated, for removal: This API element is subject to removal in a future version.
-
-