org.apache.hadoop.hive.serde2.lazy
Class LazyFactory

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.lazy.LazyFactory

public class LazyFactory
extends Object


Constructor Summary
LazyFactory()
           
 
Method Summary
static LazyObject createLazyObject(TypeInfo typeInfo)
          Create a hierarchical LazyObject based on the given typeInfo.
static ObjectInspector createLazyObjectInspector(TypeInfo typeInfo, byte[] separator, int separatorIndex, org.apache.hadoop.io.Text nullSequence)
          Create a hierarchical ObjectInspector for LazyObject with the given typeInfo.
static LazyPrimitive<?> createLazyPrimitiveClass(Class<?> c)
          Create a lazy primitive class given the java class.
static ObjectInspector createLazyStructInspector(List<String> columnNames, List<TypeInfo> typeInfos, byte[] separators, org.apache.hadoop.io.Text nullSequence, boolean lastColumnTakesRest)
          Create a hierarchical ObjectInspector for LazyStruct with the given columnNames and columnTypeInfos.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyFactory

public LazyFactory()
Method Detail

createLazyPrimitiveClass

public static LazyPrimitive<?> createLazyPrimitiveClass(Class<?> c)
Create a lazy primitive class given the java class.


createLazyObject

public static LazyObject createLazyObject(TypeInfo typeInfo)
Create a hierarchical LazyObject based on the given typeInfo.


createLazyObjectInspector

public static ObjectInspector createLazyObjectInspector(TypeInfo typeInfo,
                                                        byte[] separator,
                                                        int separatorIndex,
                                                        org.apache.hadoop.io.Text nullSequence)
Create a hierarchical ObjectInspector for LazyObject with the given typeInfo.

Parameters:
typeInfo - The type information for the LazyObject
separator - The array of separators for delimiting each level
separatorIndex - The current level (for separators). List(array), struct uses 1 level of separator, and map uses 2 levels: the first one for delimiting entries, the second one for delimiting key and values.
nullSequence - The sequence of bytes representing NULL.
Returns:
The ObjectInspector

createLazyStructInspector

public static ObjectInspector createLazyStructInspector(List<String> columnNames,
                                                        List<TypeInfo> typeInfos,
                                                        byte[] separators,
                                                        org.apache.hadoop.io.Text nullSequence,
                                                        boolean lastColumnTakesRest)
Create a hierarchical ObjectInspector for LazyStruct with the given columnNames and columnTypeInfos.

Parameters:
lastColumnTakesRest - whether the last column of the struct should take the rest of the row if there are extra fields.
See Also:
createLazyObjectInspector(TypeInfo, byte[], int, Text)


Copyright © 2009 The Apache Software Foundation