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

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.WritableStringObjectInspector
All Implemented Interfaces:
ObjectInspector, SettableStringObjectInspector, StringObjectInspector, PrimitiveObjectInspector

public class WritableStringObjectInspector
extends AbstractPrimitiveWritableObjectInspector
implements SettableStringObjectInspector

A WritableStringObjectInspector inspects a Text Object.


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
 
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(String value)
          Create an object with the value.
 Object create(org.apache.hadoop.io.Text value)
          Create an object with the value.
 String getPrimitiveJavaObject(Object o)
          Get the String representation of the data.
 org.apache.hadoop.io.Text getPrimitiveWritableObject(Object o)
          Return the data in an instance of primitive writable Object.
 void set(Object o, String value)
          Set the object with the value.
 void set(Object o, org.apache.hadoop.io.Text value)
          Set the object with the value.
 
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
 

Method Detail

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

getPrimitiveWritableObject

public org.apache.hadoop.io.Text 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 StringObjectInspector
Specified by:
getPrimitiveWritableObject in interface PrimitiveObjectInspector
Overrides:
getPrimitiveWritableObject in class AbstractPrimitiveWritableObjectInspector

getPrimitiveJavaObject

public String getPrimitiveJavaObject(Object o)
Description copied from interface: StringObjectInspector
Get the String representation of the data.

Specified by:
getPrimitiveJavaObject in interface StringObjectInspector
Specified by:
getPrimitiveJavaObject in interface PrimitiveObjectInspector

create

public Object create(org.apache.hadoop.io.Text value)
Description copied from interface: SettableStringObjectInspector
Create an object with the value.

Specified by:
create in interface SettableStringObjectInspector

create

public Object create(String value)
Description copied from interface: SettableStringObjectInspector
Create an object with the value.

Specified by:
create in interface SettableStringObjectInspector

set

public void set(Object o,
                org.apache.hadoop.io.Text value)
Description copied from interface: SettableStringObjectInspector
Set the object with the value.

Specified by:
set in interface SettableStringObjectInspector

set

public void set(Object o,
                String value)
Description copied from interface: SettableStringObjectInspector
Set the object with the value.

Specified by:
set in interface SettableStringObjectInspector


Copyright © 2009 The Apache Software Foundation