org.apache.hadoop.hive.serde2.objectinspector.primitive
Class WritableTimestampObjectInspector

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveObjectInspector
      extended by org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveWritableObjectInspector
          extended by org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableTimestampObjectInspector
All Implemented Interfaces:
Cloneable, ObjectInspector, SettableTimestampObjectInspector, TimestampObjectInspector, PrimitiveObjectInspector
Direct Known Subclasses:
WritableConstantTimestampObjectInspector

public class WritableTimestampObjectInspector
extends AbstractPrimitiveWritableObjectInspector
implements SettableTimestampObjectInspector


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector
PrimitiveObjectInspector.PrimitiveCategory
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector
ObjectInspector.Category
 
Constructor Summary
WritableTimestampObjectInspector()
           
 
Method Summary
 Object copyObject(Object o)
          Get a copy of the Object in the same class, so the return value can be stored independently of the parameter.
 Object create(byte[] bytes, int offset)
           
 Object create(Timestamp t)
           
 Timestamp getPrimitiveJavaObject(Object o)
          Get the Java Primitive object.
 TimestampWritable getPrimitiveWritableObject(Object o)
          Return the data in an instance of primitive writable Object.
 Object set(Object o, byte[] bytes, int offset)
           
 Object set(Object o, Timestamp t)
           
 Object set(Object o, TimestampWritable t)
           
 
Methods inherited from class org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveWritableObjectInspector
preferWritable
 
Methods inherited from class org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveObjectInspector
getCategory, getJavaPrimitiveClass, getPrimitiveCategory, getPrimitiveWritableClass, getTypeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector
getJavaPrimitiveClass, getPrimitiveCategory, getPrimitiveWritableClass, preferWritable
 
Methods inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector
getCategory, getTypeName
 

Constructor Detail

WritableTimestampObjectInspector

public WritableTimestampObjectInspector()
Method Detail

getPrimitiveWritableObject

public TimestampWritable getPrimitiveWritableObject(Object o)
Description copied from interface: PrimitiveObjectInspector
Return the data in an instance of primitive writable Object. If the Object is already a primitive writable Object, just return o.

Specified by:
getPrimitiveWritableObject in interface TimestampObjectInspector
Specified by:
getPrimitiveWritableObject in interface PrimitiveObjectInspector
Overrides:
getPrimitiveWritableObject in class AbstractPrimitiveWritableObjectInspector

getPrimitiveJavaObject

public Timestamp getPrimitiveJavaObject(Object o)
Description copied from interface: PrimitiveObjectInspector
Get the Java Primitive object.

Specified by:
getPrimitiveJavaObject in interface TimestampObjectInspector
Specified by:
getPrimitiveJavaObject in interface PrimitiveObjectInspector

copyObject

public Object copyObject(Object o)
Description copied from interface: PrimitiveObjectInspector
Get a copy of the Object in the same class, so the return value can be stored independently of the parameter. If the Object is a Primitive Java Object, we just return the parameter since Primitive Java Object is immutable.

Specified by:
copyObject in interface PrimitiveObjectInspector

set

public Object set(Object o,
                  byte[] bytes,
                  int offset)
Specified by:
set in interface SettableTimestampObjectInspector

set

public Object set(Object o,
                  Timestamp t)
Specified by:
set in interface SettableTimestampObjectInspector

set

public Object set(Object o,
                  TimestampWritable t)
Specified by:
set in interface SettableTimestampObjectInspector

create

public Object create(byte[] bytes,
                     int offset)
Specified by:
create in interface SettableTimestampObjectInspector

create

public Object create(Timestamp t)
Specified by:
create in interface SettableTimestampObjectInspector


Copyright © 2011 The Apache Software Foundation