org.apache.hadoop.hive.serde2.columnar
Class ColumnarSerDe

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.AbstractSerDe
      extended by org.apache.hadoop.hive.serde2.columnar.ColumnarSerDeBase
          extended by org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe
All Implemented Interfaces:
Deserializer, SerDe, Serializer

public class ColumnarSerDe
extends ColumnarSerDeBase

ColumnarSerDe is used for columnar based storage supported by RCFile. ColumnarSerDe differentiate from LazySimpleSerDe in:
(1) ColumnarSerDe uses a ColumnarStruct as its lazy Object
(2) ColumnarSerDe initialize ColumnarStruct's field directly. But under the field level, it works like LazySimpleSerDe


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
ColumnarSerDe()
           
 
Method Summary
 void initialize(org.apache.hadoop.conf.Configuration conf, Properties tbl)
          Initialize the SerDe given the parameters.
 org.apache.hadoop.io.Writable serialize(Object obj, ObjectInspector objInspector)
          Serialize a row of data.
 String toString()
           
 
Methods inherited from class org.apache.hadoop.hive.serde2.columnar.ColumnarSerDeBase
deserialize, getObjectInspector, getSerDeStats, getSerializedClass
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

ColumnarSerDe

public ColumnarSerDe()
              throws SerDeException
Throws:
SerDeException
Method Detail

toString

public String toString()
Overrides:
toString in class Object

initialize

public void initialize(org.apache.hadoop.conf.Configuration conf,
                       Properties tbl)
                throws SerDeException
Initialize the SerDe given the parameters.

Specified by:
initialize in interface Deserializer
Specified by:
initialize in interface Serializer
Specified by:
initialize in class AbstractSerDe
Parameters:
conf - System properties
tbl - table properties
Throws:
SerDeException
See Also:
Deserializer.initialize(Configuration, Properties)

serialize

public org.apache.hadoop.io.Writable serialize(Object obj,
                                               ObjectInspector objInspector)
                                        throws SerDeException
Serialize a row of data.

Specified by:
serialize in interface Serializer
Specified by:
serialize in class AbstractSerDe
Parameters:
obj - The row object
objInspector - The ObjectInspector for the row object
Returns:
The serialized Writable object
Throws:
SerDeException
See Also:
Serializer.serialize(Object, ObjectInspector)


Copyright © 2014 The Apache Software Foundation. All rights reserved.