Interface HiveMapper
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DelimitedRecordHiveMapper,JsonRecordHiveMapper
Maps a
org.apache.storm.tuple.Tupe object
to a row in an Hive table.-
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.void
-
Method Details
-
createRecordWriter
org.apache.hive.hcatalog.streaming.RecordWriter createRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint) throws org.apache.hive.hcatalog.streaming.StreamingException, IOException, ClassNotFoundException Given a endPoint, returns a RecordWriter with columnNames.- Throws:
org.apache.hive.hcatalog.streaming.StreamingExceptionIOExceptionClassNotFoundException
-
write
void write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch, Tuple tuple) throws org.apache.hive.hcatalog.streaming.StreamingException, IOException, InterruptedException - Throws:
org.apache.hive.hcatalog.streaming.StreamingExceptionIOExceptionInterruptedException
-
mapPartitions
Given a tuple, return a hive partition values list. -
mapPartitions
Given a TridetnTuple, return a hive partition values list. -
mapRecord
Given a tuple, maps to a HiveRecord based on columnFields. -
mapRecord
Given a TridentTuple, maps to a HiveRecord based on columnFields.
-