public class JsonRecordHiveMapper extends Object implements HiveMapper
Constructor and Description |
---|
JsonRecordHiveMapper() |
Modifier and Type | Method and Description |
---|---|
org.apache.hive.hcatalog.streaming.RecordWriter |
createRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint)
Given a endPoint, returns a RecordWriter with columnNames.
|
List<String> |
mapPartitions(TridentTuple tuple)
Given a TridetnTuple, return a hive partition values list.
|
List<String> |
mapPartitions(Tuple tuple)
Given a tuple, return a hive partition values list.
|
byte[] |
mapRecord(TridentTuple tuple)
Given a TridentTuple, maps to a HiveRecord based on columnFields.
|
byte[] |
mapRecord(Tuple tuple)
Given a tuple, maps to a HiveRecord based on columnFields.
|
JsonRecordHiveMapper |
withColumnFields(Fields columnFields) |
JsonRecordHiveMapper |
withPartitionFields(Fields partitionFields) |
JsonRecordHiveMapper |
withTimeAsPartitionField(String timeFormat) |
void |
write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch,
Tuple tuple) |
public JsonRecordHiveMapper withColumnFields(Fields columnFields)
public JsonRecordHiveMapper withPartitionFields(Fields partitionFields)
public JsonRecordHiveMapper withTimeAsPartitionField(String timeFormat)
public org.apache.hive.hcatalog.streaming.RecordWriter createRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint) throws org.apache.hive.hcatalog.streaming.StreamingException, IOException, ClassNotFoundException
HiveMapper
Given a endPoint, returns a RecordWriter with columnNames.
createRecordWriter
in interface HiveMapper
org.apache.hive.hcatalog.streaming.StreamingException
IOException
ClassNotFoundException
public void write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch, Tuple tuple) throws org.apache.hive.hcatalog.streaming.StreamingException, IOException, InterruptedException
write
in interface HiveMapper
org.apache.hive.hcatalog.streaming.StreamingException
IOException
InterruptedException
public List<String> mapPartitions(Tuple tuple)
HiveMapper
Given a tuple, return a hive partition values list.
mapPartitions
in interface HiveMapper
public List<String> mapPartitions(TridentTuple tuple)
HiveMapper
Given a TridetnTuple, return a hive partition values list.
mapPartitions
in interface HiveMapper
public byte[] mapRecord(Tuple tuple)
HiveMapper
Given a tuple, maps to a HiveRecord based on columnFields.
mapRecord
in interface HiveMapper
public byte[] mapRecord(TridentTuple tuple)
HiveMapper
Given a TridentTuple, maps to a HiveRecord based on columnFields.
mapRecord
in interface HiveMapper
Copyright © 2022 The Apache Software Foundation. All rights reserved.