Class JsonRecordHiveMapper
java.lang.Object
org.apache.storm.hive.bolt.mapper.JsonRecordHiveMapper
- All Implemented Interfaces:
Serializable,HiveMapper
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hive.hcatalog.streaming.RecordWritercreateRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint) Given a endPoint, returns a RecordWriter with columnNames.mapPartitions(TridentTuple tuple) Given a TridetnTuple, return a hive partition values list.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[]Given a tuple, maps to a HiveRecord based on columnFields.withColumnFields(Fields columnFields) withPartitionFields(Fields partitionFields) withTimeAsPartitionField(String timeFormat) void
-
Constructor Details
-
JsonRecordHiveMapper
public JsonRecordHiveMapper()
-
-
Method Details
-
withColumnFields
-
withPartitionFields
-
withTimeAsPartitionField
-
createRecordWriter
public org.apache.hive.hcatalog.streaming.RecordWriter createRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint) throws org.apache.hive.hcatalog.streaming.StreamingException, IOException, ClassNotFoundException Description 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
Description copied from interface:HiveMapperGiven a tuple, return a hive partition values list.- Specified by:
mapPartitionsin interfaceHiveMapper
-
mapPartitions
Description copied from interface:HiveMapperGiven a TridetnTuple, return a hive partition values list.- Specified by:
mapPartitionsin interfaceHiveMapper
-
mapRecord
Description copied from interface:HiveMapperGiven a tuple, maps to a HiveRecord based on columnFields.- Specified by:
mapRecordin interfaceHiveMapper
-
mapRecord
Description copied from interface:HiveMapperGiven a TridentTuple, maps to a HiveRecord based on columnFields.- Specified by:
mapRecordin interfaceHiveMapper
-