public class StrictJsonWriter extends AbstractRecordWriter
bucketIds, totalBuckets
Constructor and Description |
---|
StrictJsonWriter(HiveEndPoint endPoint)
Deprecated.
As of release 1.3/2.1. Replaced by
StrictJsonWriter(HiveEndPoint, HiveConf, StreamingConnection) |
StrictJsonWriter(HiveEndPoint endPoint,
HiveConf conf)
Deprecated.
As of release 1.3/2.1. Replaced by
StrictJsonWriter(HiveEndPoint, HiveConf, StreamingConnection) |
StrictJsonWriter(HiveEndPoint endPoint,
HiveConf conf,
StreamingConnection conn) |
StrictJsonWriter(HiveEndPoint endPoint,
StreamingConnection conn) |
Modifier and Type | Method and Description |
---|---|
Object |
encode(byte[] utf8StrRecord)
Encode a record as an Object that Hive can read with the ObjectInspector associated with the
serde returned by
AbstractRecordWriter.getSerde() . |
protected ObjectInspector[] |
getBucketObjectInspectors() |
protected StructField[] |
getBucketStructFields() |
protected HCatRecordObjectInspector |
getRecordObjectInspector() |
SerDe |
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 StrictJsonWriter(HiveEndPoint endPoint) throws ConnectionError, SerializationError, StreamingException
StrictJsonWriter(HiveEndPoint, HiveConf, StreamingConnection)
public StrictJsonWriter(HiveEndPoint endPoint, HiveConf conf) throws StreamingException
StrictJsonWriter(HiveEndPoint, HiveConf, StreamingConnection)
StreamingException
public StrictJsonWriter(HiveEndPoint endPoint, StreamingConnection conn) throws ConnectionError, SerializationError, StreamingException
endPoint
- the end point to write toConnectionError
SerializationError
StreamingException
public StrictJsonWriter(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 SerDe getSerde()
AbstractRecordWriter
AbstractRecordWriter.encode(byte[])
. This is public so that test
frameworks can use it.getSerde
in class AbstractRecordWriter
protected HCatRecordObjectInspector 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
AbstractRecordWriter
AbstractRecordWriter.getSerde()
. This is public so that test frameworks can use it.encode
in class AbstractRecordWriter
utf8StrRecord
- record to be deserializedSerializationError
Copyright © 2017 The Apache Software Foundation. All rights reserved.