org.apache.pig.builtin
Class Utf8StorageConverter
java.lang.Object
org.apache.pig.builtin.Utf8StorageConverter
- Direct Known Subclasses:
- BinaryStorage, HBaseStorage, PigStorage
public abstract class Utf8StorageConverter
- extends Object
This abstract class provides standard conversions between utf8 encoded data
and pig data types. It is intended to be extended by load and store
functions (such as PigStorage).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mBagFactory
protected BagFactory mBagFactory
mTupleFactory
protected TupleFactory mTupleFactory
mLog
protected final org.apache.commons.logging.Log mLog
Utf8StorageConverter
public Utf8StorageConverter()
bytesToBag
public DataBag bytesToBag(byte[] b)
throws IOException
- Throws:
IOException
bytesToCharArray
public String bytesToCharArray(byte[] b)
throws IOException
- Throws:
IOException
bytesToDouble
public Double bytesToDouble(byte[] b)
bytesToFloat
public Float bytesToFloat(byte[] b)
throws IOException
- Throws:
IOException
bytesToInteger
public Integer bytesToInteger(byte[] b)
throws IOException
- Throws:
IOException
bytesToLong
public Long bytesToLong(byte[] b)
throws IOException
- Throws:
IOException
bytesToMap
public Map<Object,Object> bytesToMap(byte[] b)
throws IOException
- Throws:
IOException
bytesToTuple
public Tuple bytesToTuple(byte[] b)
throws IOException
- Throws:
IOException
toBytes
public byte[] toBytes(DataBag bag)
throws IOException
- Throws:
IOException
toBytes
public byte[] toBytes(String s)
throws IOException
- Throws:
IOException
toBytes
public byte[] toBytes(Double d)
throws IOException
- Throws:
IOException
toBytes
public byte[] toBytes(Float f)
throws IOException
- Throws:
IOException
toBytes
public byte[] toBytes(Integer i)
throws IOException
- Throws:
IOException
toBytes
public byte[] toBytes(Long l)
throws IOException
- Throws:
IOException
toBytes
public byte[] toBytes(Map<Object,Object> m)
throws IOException
- Throws:
IOException
toBytes
public byte[] toBytes(Tuple t)
throws IOException
- Throws:
IOException
Copyright © ${year} The Apache Software Foundation