This project has retired. For details please refer to its Attic page.
Orcs (Apache Crunch 0.11.0 API)

org.apache.crunch.types.orc
Class Orcs

java.lang.Object
  extended by org.apache.crunch.types.orc.Orcs

public class Orcs
extends Object

Utilities to create PTypes for ORC serialization / deserialization


Constructor Summary
Orcs()
           
 
Method Summary
static PType<org.apache.hadoop.hive.ql.io.orc.OrcStruct> orcs(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo typeInfo)
          Create a PType to directly use OrcStruct as the deserialized format.
static
<T> PType<T>
reflects(Class<T> clazz)
          Create a PType which uses reflection to serialize/deserialize java POJOs to/from ORC.
static PType<TupleN> tuples(PType... ptypes)
          Create a tuple-based PType.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Orcs

public Orcs()
Method Detail

orcs

public static final PType<org.apache.hadoop.hive.ql.io.orc.OrcStruct> orcs(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo typeInfo)
Create a PType to directly use OrcStruct as the deserialized format. This is the fastest way for serialization/deserializations. However, users need to use ObjectInspectors to handle the OrcStruct. Currently, void and union types are not supported.

Parameters:
typeInfo -
Returns:

reflects

public static final <T> PType<T> reflects(Class<T> clazz)
Create a PType which uses reflection to serialize/deserialize java POJOs to/from ORC. There are some restrictions of the POJO: 1) it must have a default, no-arg constructor; 2) All of its fields must be Hive primitive types or collection types that have Hive equivalents; 3) Void and Union are not supported yet.

Parameters:
clazz -
Returns:

tuples

public static final PType<TupleN> tuples(PType... ptypes)
Create a tuple-based PType. Users can use other Crunch PTypes (such as Writables.ints(), Orcs.reflects(), Writables.pairs(), ...) to construct the PType. Currently, nulls and unions are not supported.

Parameters:
ptypes -
Returns:


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.