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

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.lazy.LazyObjectBase
      extended by org.apache.hadoop.hive.serde2.lazy.LazyObject<OI>
          extended by org.apache.hadoop.hive.serde2.lazy.LazyPrimitive<LazyTimestampObjectInspector,TimestampWritable>
              extended by org.apache.hadoop.hive.serde2.lazy.LazyTimestamp

public class LazyTimestamp
extends LazyPrimitive<LazyTimestampObjectInspector,TimestampWritable>

LazyTimestamp. Serializes and deserializes a Timestamp in the JDBC timestamp format YYYY-MM-DD HH:MM:SS.[fff...]


Field Summary
 
Fields inherited from class org.apache.hadoop.hive.serde2.lazy.LazyPrimitive
data, isNull
 
Fields inherited from class org.apache.hadoop.hive.serde2.lazy.LazyObject
oi
 
Constructor Summary
LazyTimestamp(LazyTimestamp copy)
           
LazyTimestamp(LazyTimestampObjectInspector oi)
           
 
Method Summary
 TimestampWritable getWritableObject()
           
 void init(ByteArrayRef bytes, int start, int length)
          Initilizes LazyTimestamp object by interpreting the input bytes as a JDBC timestamp string
static void writeUTF8(OutputStream out, TimestampWritable i)
          Writes a Timestamp in JDBC timestamp format to the output stream
 
Methods inherited from class org.apache.hadoop.hive.serde2.lazy.LazyPrimitive
getObject, hashCode, logExceptionMessage, toString
 
Methods inherited from class org.apache.hadoop.hive.serde2.lazy.LazyObject
getInspector, setInspector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyTimestamp

public LazyTimestamp(LazyTimestampObjectInspector oi)

LazyTimestamp

public LazyTimestamp(LazyTimestamp copy)
Method Detail

init

public void init(ByteArrayRef bytes,
                 int start,
                 int length)
Initilizes LazyTimestamp object by interpreting the input bytes as a JDBC timestamp string

Specified by:
init in class LazyObjectBase
Parameters:
bytes -
start -
length -
See Also:
ByteArrayRef

writeUTF8

public static void writeUTF8(OutputStream out,
                             TimestampWritable i)
                      throws IOException
Writes a Timestamp in JDBC timestamp format to the output stream

Parameters:
out - The output stream
i - The Timestamp to write
Throws:
IOException

getWritableObject

public TimestampWritable getWritableObject()
Overrides:
getWritableObject in class LazyPrimitive<LazyTimestampObjectInspector,TimestampWritable>


Copyright © 2013 The Apache Software Foundation