org.apache.hadoop.hive.serde2.objectinspector.primitive
Class WritableStringObjectInspector
java.lang.Object
org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveObjectInspector
org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveWritableObjectInspector
org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableStringObjectInspector
- All Implemented Interfaces:
- Cloneable, ObjectInspector, SettableStringObjectInspector, StringObjectInspector, PrimitiveObjectInspector, PrimitiveTypeSpec
- Direct Known Subclasses:
- WritableConstantStringObjectInspector
public class WritableStringObjectInspector
- extends AbstractPrimitiveWritableObjectInspector
- implements SettableStringObjectInspector
A WritableStringObjectInspector inspects a Text Object.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 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(Text value)
- Description copied from interface:
SettableStringObjectInspector
- Create an object with the value.
- Specified by:
create
in interface SettableStringObjectInspector
set
public Object set(Object o,
Text value)
- Description copied from interface:
SettableStringObjectInspector
- Set the object with the value. Return the object that has the new value.
In most cases the returned value should be the same as o, but in case o is
unmodifiable, this will return a new object with new value.
- Specified by:
set
in interface SettableStringObjectInspector
Copyright © 2012 The Apache Software Foundation