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
HiveMapperGiven a endPoint, returns a RecordWriter with columnNames.
createRecordWriter in interface HiveMapperorg.apache.hive.hcatalog.streaming.StreamingExceptionIOExceptionClassNotFoundExceptionpublic void write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch,
Tuple tuple)
throws org.apache.hive.hcatalog.streaming.StreamingException,
IOException,
InterruptedException
write in interface HiveMapperorg.apache.hive.hcatalog.streaming.StreamingExceptionIOExceptionInterruptedExceptionpublic List<String> mapPartitions(Tuple tuple)
HiveMapperGiven a tuple, return a hive partition values list.
mapPartitions in interface HiveMapperpublic List<String> mapPartitions(TridentTuple tuple)
HiveMapperGiven a TridetnTuple, return a hive partition values list.
mapPartitions in interface HiveMapperpublic byte[] mapRecord(Tuple tuple)
HiveMapperGiven a tuple, maps to a HiveRecord based on columnFields.
mapRecord in interface HiveMapperpublic byte[] mapRecord(TridentTuple tuple)
HiveMapperGiven a TridentTuple, maps to a HiveRecord based on columnFields.
mapRecord in interface HiveMapperCopyright © 2021 The Apache Software Foundation. All rights reserved.