org.apache.flume.sink.hive
Class HiveDelimitedTextSerializer

java.lang.Object
  extended by org.apache.flume.sink.hive.HiveDelimitedTextSerializer
All Implemented Interfaces:
Configurable, HiveEventSerializer

public class HiveDelimitedTextSerializer
extends Object
implements HiveEventSerializer

Forwards the incoming event body to Hive unmodified Sets up the delimiter and the field to column mapping


Field Summary
static String ALIAS
           
static String defaultDelimiter
           
static String SERIALIZER_DELIMITER
           
static String SERIALIZER_FIELDNAMES
           
static String SERIALIZER_SERDE_SEPARATOR
           
 
Constructor Summary
HiveDelimitedTextSerializer()
           
 
Method Summary
 void configure(Context context)
           Request the implementing class to (re)configure itself.
 org.apache.hive.hcatalog.streaming.RecordWriter createRecordWriter(org.apache.hive.hcatalog.streaming.HiveEndPoint endPoint)
           
 void write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch, Collection<byte[]> events)
           
 void write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch, Event e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIAS

public static final String ALIAS
See Also:
Constant Field Values

defaultDelimiter

public static final String defaultDelimiter
See Also:
Constant Field Values

SERIALIZER_DELIMITER

public static final String SERIALIZER_DELIMITER
See Also:
Constant Field Values

SERIALIZER_FIELDNAMES

public static final String SERIALIZER_FIELDNAMES
See Also:
Constant Field Values

SERIALIZER_SERDE_SEPARATOR

public static final String SERIALIZER_SERDE_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

HiveDelimitedTextSerializer

public HiveDelimitedTextSerializer()
Method Detail

write

public void write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch,
                  Event e)
           throws org.apache.hive.hcatalog.streaming.StreamingException,
                  IOException,
                  InterruptedException
Specified by:
write in interface HiveEventSerializer
Throws:
org.apache.hive.hcatalog.streaming.StreamingException
IOException
InterruptedException

write

public void write(org.apache.hive.hcatalog.streaming.TransactionBatch txnBatch,
                  Collection<byte[]> events)
           throws org.apache.hive.hcatalog.streaming.StreamingException,
                  IOException,
                  InterruptedException
Specified by:
write in interface HiveEventSerializer
Throws:
org.apache.hive.hcatalog.streaming.StreamingException
IOException
InterruptedException

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
Specified by:
createRecordWriter in interface HiveEventSerializer
Throws:
org.apache.hive.hcatalog.streaming.StreamingException
IOException
ClassNotFoundException

configure

public void configure(Context context)
Description copied from interface: Configurable

Request the implementing class to (re)configure itself.

When configuration parameters are changed, they must be reflected by the component asap.

There are no thread safety guarrantees on when configure might be called.

Specified by:
configure in interface Configurable


Copyright © 2009-2015 Apache Software Foundation. All Rights Reserved.