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 class
HiveWriter.CommitFailure
Deprecated, for removal: This API element is subject to removal in a future version.static class
HiveWriter.ConnectFailure
Deprecated, for removal: This API element is subject to removal in a future version.static class
HiveWriter.Failure
Deprecated, for removal: This API element is subject to removal in a future version.static class
HiveWriter.TxnBatchFailure
Deprecated, for removal: This API element is subject to removal in a future version.static class
HiveWriter.TxnFailure
Deprecated, for removal: This API element is subject to removal in a future version.static class
HiveWriter.WriteFailure
Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
closed
Deprecated, 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 void
abort()
Deprecated, for removal: This API element is subject to removal in a future version.Aborts the current Txn and switches to next Txn.void
close()
Deprecated, for removal: This API element is subject to removal in a future version.Close the Transaction Batch and connection.void
flush(boolean rollToNext)
Deprecated, for removal: This API element is subject to removal in a future version.Commits the current Txn if totalRecordsPerTransaction > 0 .void
flushAndClose()
Deprecated, for removal: This API element is subject to removal in a future version.Flush and Close current transactionBatch.long
getLastUsed()
Deprecated, for removal: This API element is subject to removal in a future version.org.apache.hive.hcatalog.streaming.RecordWriter
getRecordWriter(HiveMapper mapper, boolean tokenAuthEnabled)
Deprecated, for removal: This API element is subject to removal in a future version.int
getTotalRecords()
Deprecated, for removal: This API element is subject to removal in a future version.returns totalRecords written so far in a transaction.void
heartBeat()
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.String
toString()
Deprecated, for removal: This API element is subject to removal in a future version.void
write(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.ConnectFailure
Deprecated, 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, InterruptedException
Deprecated, 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
-
flush
public void flush(boolean rollToNext) throws HiveWriter.CommitFailure, HiveWriter.TxnBatchFailure, HiveWriter.TxnFailure, InterruptedException
Deprecated, 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 InterruptedException
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.- 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, InterruptedException
Deprecated, for removal: This API element is subject to removal in a future version.Flush and Close current transactionBatch.
-
close
public void close() throws IOException, InterruptedException
Deprecated, for removal: This API element is subject to removal in a future version.Close the Transaction Batch and connection.- Throws:
IOException
InterruptedException
-
abort
public void abort() throws org.apache.hive.hcatalog.streaming.StreamingException, HiveWriter.TxnBatchFailure, InterruptedException
Deprecated, 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.TxnBatchFailure
InterruptedException
-
getLastUsed
public long getLastUsed()
Deprecated, for removal: This API element is subject to removal in a future version.
-
-