public class StrictRegexWriter extends AbstractRecordWriter
bucketIds, totalBuckets
Constructor and Description |
---|
StrictRegexWriter(HiveEndPoint endPoint,
HiveConf conf,
StreamingConnection conn) |
StrictRegexWriter(HiveEndPoint endPoint,
StreamingConnection conn) |
StrictRegexWriter(String regex,
HiveEndPoint endPoint,
HiveConf conf,
StreamingConnection conn) |
Modifier and Type | Method and Description |
---|---|
Object |
encode(byte[] utf8StrRecord)
Encode Utf8 encoded string bytes using RegexSerDe
|
protected ObjectInspector[] |
getBucketObjectInspectors() |
protected StructField[] |
getBucketStructFields() |
protected StructObjectInspector |
getRecordObjectInspector() |
AbstractSerDe |
getSerde()
Get the SerDe for the Objects created by
AbstractRecordWriter.encode(byte[]) . |
void |
write(long transactionId,
byte[] record)
Writes using a hive RecordUpdater
|
clear, closeBatch, flush, getBucket, getObjectInspectorsForBucketedCols, newBatch
public StrictRegexWriter(HiveEndPoint endPoint, StreamingConnection conn) throws ConnectionError, SerializationError, StreamingException
endPoint
- the end point to write toconn
- connection this Writer is to be used withConnectionError
SerializationError
StreamingException
public StrictRegexWriter(HiveEndPoint endPoint, HiveConf conf, StreamingConnection conn) throws ConnectionError, SerializationError, StreamingException
endPoint
- the end point to write toconf
- a Hive conf object. Should be null if not using advanced Hive settings.conn
- connection this Writer is to be used withConnectionError
SerializationError
StreamingException
public StrictRegexWriter(String regex, HiveEndPoint endPoint, HiveConf conf, StreamingConnection conn) 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.conn
- connection this Writer is to be used withConnectionError
SerializationError
StreamingException
public AbstractSerDe getSerde()
AbstractRecordWriter
AbstractRecordWriter.encode(byte[])
. This is public so that test
frameworks can use it.getSerde
in class AbstractRecordWriter
protected StructObjectInspector getRecordObjectInspector()
getRecordObjectInspector
in class AbstractRecordWriter
protected StructField[] getBucketStructFields()
getBucketStructFields
in class AbstractRecordWriter
protected ObjectInspector[] getBucketObjectInspectors()
getBucketObjectInspectors
in class AbstractRecordWriter
public void write(long transactionId, byte[] record) throws StreamingIOFailure, SerializationError
RecordWriter
transactionId
- the ID of the Txn in which the write occursrecord
- the record to be writtenStreamingIOFailure
SerializationError
public Object encode(byte[] utf8StrRecord) throws SerializationError
encode
in class AbstractRecordWriter
utf8StrRecord
- SerializationError
Copyright © 2021 The Apache Software Foundation. All rights reserved.