public class StrictRegexWriter extends Object
| Constructor and Description |
|---|
StrictRegexWriter(HiveEndPoint endPoint) |
StrictRegexWriter(HiveEndPoint endPoint,
HiveConf conf) |
StrictRegexWriter(String regex,
HiveEndPoint endPoint,
HiveConf conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear bufferred writes.
|
void |
closeBatch()
Close the RecordUpdater.
|
void |
flush()
Flush records from buffer.
|
void |
newBatch(Long minTxnId,
Long maxTxnID)
Creates a new record updater for the new batch
|
void |
write(long transactionId,
byte[] record)
Writes using a hive RecordUpdater
|
public StrictRegexWriter(HiveEndPoint endPoint) throws ConnectionError, SerializationError, StreamingException
endPoint - the end point to write toConnectionErrorSerializationErrorStreamingExceptionpublic StrictRegexWriter(HiveEndPoint endPoint, HiveConf conf) throws ConnectionError, SerializationError, StreamingException
endPoint - the end point to write toconf - a Hive conf object. Should be null if not using advanced Hive settings.ConnectionErrorSerializationErrorStreamingExceptionpublic StrictRegexWriter(String regex, HiveEndPoint endPoint, HiveConf conf) throws ConnectionError, SerializationError, StreamingException
regex - to parse the dataendPoint - the end point to write toconf - a Hive conf object. Should be null if not using advanced Hive settings.ConnectionErrorSerializationErrorStreamingExceptionpublic void write(long transactionId,
byte[] record)
throws StreamingIOFailure,
SerializationError
RecordWritertransactionId - the ID of the Txn in which the write occursrecord - the record to be writtenStreamingIOFailureSerializationErrorpublic void flush()
throws StreamingIOFailure
RecordWriterflush in interface RecordWriterStreamingIOFailurepublic void clear()
throws StreamingIOFailure
RecordWriterclear in interface RecordWriterStreamingIOFailurepublic void newBatch(Long minTxnId, Long maxTxnID) throws StreamingIOFailure, SerializationError
newBatch in interface RecordWriterminTxnId - smallest Txnid in the batchmaxTxnID - largest Txnid in the batchStreamingIOFailure - if failed to create record updaterSerializationErrorpublic void closeBatch()
throws StreamingIOFailure
RecordWritercloseBatch in interface RecordWriterStreamingIOFailureCopyright © 2017 The Apache Software Foundation. All rights reserved.