public class DelimitedRecordHiveMapper extends Object implements HiveMapper
Constructor and Description |
---|
DelimitedRecordHiveMapper() |
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.
|
String |
getFieldDelimiter() |
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.
|
DelimitedRecordHiveMapper |
withColumnFields(Fields columnFields) |
DelimitedRecordHiveMapper |
withFieldDelimiter(String delimiter) |
DelimitedRecordHiveMapper |
withPartitionFields(Fields partitionFields) |
DelimitedRecordHiveMapper |
withTimeAsPartitionField(String timeFormat) |
void |
write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch,
Tuple tuple) |
public DelimitedRecordHiveMapper withColumnFields(Fields columnFields)
public DelimitedRecordHiveMapper withPartitionFields(Fields partitionFields)
public DelimitedRecordHiveMapper withFieldDelimiter(String delimiter)
public DelimitedRecordHiveMapper 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
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
mapPartitions
in interface HiveMapper
public List<String> mapPartitions(TridentTuple tuple)
HiveMapper
mapPartitions
in interface HiveMapper
public byte[] mapRecord(Tuple tuple)
HiveMapper
mapRecord
in interface HiveMapper
public byte[] mapRecord(TridentTuple tuple)
HiveMapper
mapRecord
in interface HiveMapper
public String getFieldDelimiter()
Copyright © 2023 The Apache Software Foundation. All rights reserved.