Interface HiveMapper
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DelimitedRecordHiveMapper,JsonRecordHiveMapper
public interface HiveMapper extends Serializable
Maps aorg.apache.storm.tuple.Tupeobject to a row in an Hive table.
-
-
Method Summary
All Methods Instance Methods Abstract 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.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.voidwrite(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch, Tuple tuple)
-
-
-
Method Detail
-
createRecordWriter
org.apache.hive.hcatalog.streaming.RecordWriter createRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint) throws org.apache.hive.hcatalog.streaming.StreamingException, IOException, ClassNotFoundExceptionGiven 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
List<String> mapPartitions(Tuple tuple)
Given a tuple, return a hive partition values list.
-
mapPartitions
List<String> mapPartitions(TridentTuple tuple)
Given a TridetnTuple, return a hive partition values list.
-
mapRecord
byte[] mapRecord(Tuple tuple)
Given a tuple, maps to a HiveRecord based on columnFields.
-
mapRecord
byte[] mapRecord(TridentTuple tuple)
Given a TridentTuple, maps to a HiveRecord based on columnFields.
-
-