Class DelimitedRecordHiveMapper
- java.lang.Object
-
- org.apache.storm.hive.bolt.mapper.DelimitedRecordHiveMapper
-
- All Implemented Interfaces:
Serializable,HiveMapper
public class DelimitedRecordHiveMapper extends Object implements HiveMapper
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DelimitedRecordHiveMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.hive.hcatalog.streaming.RecordWritercreateRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint)Given a endPoint, returns a RecordWriter with columnNames.StringgetFieldDelimiter()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.DelimitedRecordHiveMapperwithColumnFields(Fields columnFields)DelimitedRecordHiveMapperwithFieldDelimiter(String delimiter)DelimitedRecordHiveMapperwithPartitionFields(Fields partitionFields)DelimitedRecordHiveMapperwithTimeAsPartitionField(String timeFormat)voidwrite(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch, Tuple tuple)
-
-
-
Method Detail
-
withColumnFields
public DelimitedRecordHiveMapper withColumnFields(Fields columnFields)
-
withPartitionFields
public DelimitedRecordHiveMapper withPartitionFields(Fields partitionFields)
-
withFieldDelimiter
public DelimitedRecordHiveMapper withFieldDelimiter(String delimiter)
-
withTimeAsPartitionField
public DelimitedRecordHiveMapper withTimeAsPartitionField(String timeFormat)
-
createRecordWriter
public org.apache.hive.hcatalog.streaming.RecordWriter createRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint) throws org.apache.hive.hcatalog.streaming.StreamingException, IOException, ClassNotFoundExceptionDescription copied from interface:HiveMapperGiven a endPoint, returns a RecordWriter with columnNames.- Specified by:
createRecordWriterin interfaceHiveMapper- Throws:
org.apache.hive.hcatalog.streaming.StreamingExceptionIOExceptionClassNotFoundException
-
write
public void write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch, Tuple tuple) throws org.apache.hive.hcatalog.streaming.StreamingException, IOException, InterruptedException- Specified by:
writein interfaceHiveMapper- Throws:
org.apache.hive.hcatalog.streaming.StreamingExceptionIOExceptionInterruptedException
-
mapPartitions
public List<String> mapPartitions(Tuple tuple)
Description copied from interface:HiveMapperGiven a tuple, return a hive partition values list.- Specified by:
mapPartitionsin interfaceHiveMapper
-
mapPartitions
public List<String> mapPartitions(TridentTuple tuple)
Description copied from interface:HiveMapperGiven a TridetnTuple, return a hive partition values list.- Specified by:
mapPartitionsin interfaceHiveMapper
-
mapRecord
public byte[] mapRecord(Tuple tuple)
Description copied from interface:HiveMapperGiven a tuple, maps to a HiveRecord based on columnFields.- Specified by:
mapRecordin interfaceHiveMapper
-
mapRecord
public byte[] mapRecord(TridentTuple tuple)
Description copied from interface:HiveMapperGiven a TridentTuple, maps to a HiveRecord based on columnFields.- Specified by:
mapRecordin interfaceHiveMapper
-
getFieldDelimiter
public String getFieldDelimiter()
-
-