public class BinarySortableSerDe extends AbstractSerDe
Modifier and Type | Field and Description |
---|---|
static Charset |
decimalCharSet |
static org.apache.commons.logging.Log |
LOG |
configErrors
Constructor and Description |
---|
BinarySortableSerDe() |
Modifier and Type | Method and Description |
---|---|
Object |
deserialize(org.apache.hadoop.io.Writable blob)
Deserialize an object out of a Writable blob.
|
static org.apache.hadoop.io.Text |
deserializeText(InputByteBuffer buffer,
boolean invert,
org.apache.hadoop.io.Text r) |
ObjectInspector |
getObjectInspector()
Get the object inspector that can be used to navigate through the internal
structure of the Object returned from deserialize(...).
|
SerDeStats |
getSerDeStats()
Returns statistics collected when serializing
|
Class<? extends org.apache.hadoop.io.Writable> |
getSerializedClass()
Returns the Writable class that would be returned by the serialize method.
|
boolean[] |
getSortOrders() |
void |
initialize(org.apache.hadoop.conf.Configuration conf,
Properties tbl)
Initialize the HiveSerializer.
|
org.apache.hadoop.io.Writable |
serialize(Object obj,
ObjectInspector objInspector)
Serialize an object by navigating inside the Object with the
ObjectInspector.
|
static void |
serializeBytes(ByteStream.Output buffer,
byte[] data,
int length,
boolean invert) |
static void |
serializeBytes(ByteStream.Output buffer,
byte[] data,
int offset,
int length,
boolean invert) |
static void |
serializeDouble(ByteStream.Output buffer,
double vd,
boolean invert) |
static void |
serializeFloat(ByteStream.Output buffer,
float vf,
boolean invert) |
static void |
serializeHiveDecimal(ByteStream.Output buffer,
HiveDecimal dec,
boolean invert) |
static void |
serializeHiveIntervalDayTime(ByteStream.Output buffer,
HiveIntervalDayTime intervalDayTime,
boolean invert) |
static void |
serializeHiveIntervalYearMonth(ByteStream.Output buffer,
HiveIntervalYearMonth intervalYearMonth,
boolean invert) |
static void |
serializeInt(ByteStream.Output buffer,
int v,
boolean invert) |
static void |
serializeLong(ByteStream.Output buffer,
long v,
boolean invert) |
static void |
serializeShort(ByteStream.Output buffer,
short v,
boolean invert) |
static void |
serializeStruct(ByteStream.Output byteStream,
Object[] fieldData,
List<ObjectInspector> fieldOis,
boolean[] sortableSortOrders) |
static void |
serializeTimestampWritable(ByteStream.Output buffer,
TimestampWritable t,
boolean invert) |
static void |
writeByte(ByteStream.RandomAccessOutput buffer,
byte b,
boolean invert) |
getConfigurationErrors, initialize
public static final org.apache.commons.logging.Log LOG
public static Charset decimalCharSet
public void initialize(org.apache.hadoop.conf.Configuration conf, Properties tbl) throws SerDeException
AbstractSerDe
initialize
in interface Deserializer
initialize
in interface Serializer
initialize
in class AbstractSerDe
conf
- System properties. Can be null in compile timetbl
- table propertiesSerDeException
public Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
AbstractSerDe
getSerializedClass
in interface Serializer
getSerializedClass
in class AbstractSerDe
public ObjectInspector getObjectInspector() throws SerDeException
AbstractSerDe
getObjectInspector
in interface Deserializer
getObjectInspector
in class AbstractSerDe
SerDeException
public Object deserialize(org.apache.hadoop.io.Writable blob) throws SerDeException
AbstractSerDe
deserialize
in interface Deserializer
deserialize
in class AbstractSerDe
blob
- The Writable object containing a serialized objectSerDeException
public static org.apache.hadoop.io.Text deserializeText(InputByteBuffer buffer, boolean invert, org.apache.hadoop.io.Text r) throws IOException
IOException
public org.apache.hadoop.io.Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException
AbstractSerDe
serialize
in interface Serializer
serialize
in class AbstractSerDe
SerDeException
public static void writeByte(ByteStream.RandomAccessOutput buffer, byte b, boolean invert)
public static void serializeBytes(ByteStream.Output buffer, byte[] data, int length, boolean invert)
public static void serializeBytes(ByteStream.Output buffer, byte[] data, int offset, int length, boolean invert)
public static void serializeShort(ByteStream.Output buffer, short v, boolean invert)
public static void serializeInt(ByteStream.Output buffer, int v, boolean invert)
public static void serializeLong(ByteStream.Output buffer, long v, boolean invert)
public static void serializeFloat(ByteStream.Output buffer, float vf, boolean invert)
public static void serializeDouble(ByteStream.Output buffer, double vd, boolean invert)
public static void serializeTimestampWritable(ByteStream.Output buffer, TimestampWritable t, boolean invert)
public static void serializeHiveIntervalYearMonth(ByteStream.Output buffer, HiveIntervalYearMonth intervalYearMonth, boolean invert)
public static void serializeHiveIntervalDayTime(ByteStream.Output buffer, HiveIntervalDayTime intervalDayTime, boolean invert)
public static void serializeHiveDecimal(ByteStream.Output buffer, HiveDecimal dec, boolean invert)
public SerDeStats getSerDeStats()
AbstractSerDe
getSerDeStats
in interface Deserializer
getSerDeStats
in interface Serializer
getSerDeStats
in class AbstractSerDe
public static void serializeStruct(ByteStream.Output byteStream, Object[] fieldData, List<ObjectInspector> fieldOis, boolean[] sortableSortOrders) throws SerDeException
SerDeException
public boolean[] getSortOrders()
Copyright © 2017 The Apache Software Foundation. All rights reserved.