public class BinarySortableSerDe extends AbstractSerDe
| Modifier and Type | Field and Description |
|---|---|
static Charset |
decimalCharSet |
static org.slf4j.Logger |
LOG |
static byte |
ONE |
static byte |
ZERO |
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) |
byte[] |
getNotNullMarkers() |
byte[] |
getNullMarkers() |
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,
org.apache.hadoop.hive.common.type.HiveDecimal dec,
boolean invert) |
static void |
serializeHiveDecimal(ByteStream.Output buffer,
org.apache.hadoop.hive.common.type.HiveDecimal dec,
boolean invert,
byte[] scratchBuffer)
Decimals are encoded in three pieces:Decimals are encoded in three pieces:
Sign: 1, 2 or 3 for smaller, equal or larger than 0 respectively
Factor: Number that indicates the amount of digits you have to move
the decimal point left or right until the resulting number is smaller
than zero but has something other than 0 as the first digit.
|
static void |
serializeHiveDecimal(ByteStream.Output buffer,
org.apache.hadoop.hive.serde2.io.HiveDecimalWritable decWritable,
boolean invert,
byte[] scratchBuffer) |
static void |
serializeHiveIntervalDayTime(ByteStream.Output buffer,
org.apache.hadoop.hive.common.type.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 |
serializeOldHiveDecimal(ByteStream.Output buffer,
org.apache.hadoop.hive.common.type.HiveDecimalV1 oldDec,
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,
byte[] nullMarkers,
byte[] notNullMarkers) |
static void |
serializeTimestampTZWritable(ByteStream.Output buffer,
TimestampLocalTZWritable t,
boolean invert) |
static void |
serializeTimestampWritable(ByteStream.Output buffer,
TimestampWritableV2 t,
boolean invert) |
static void |
writeByte(ByteStream.RandomAccessOutput buffer,
byte b,
boolean invert) |
getConfigurationErrors, initialize, shouldStoreFieldsInMetastorepublic static final org.slf4j.Logger LOG
public static final byte ZERO
public static final byte ONE
public static Charset decimalCharSet
public void initialize(org.apache.hadoop.conf.Configuration conf,
Properties tbl)
throws SerDeException
AbstractSerDeinitialize in interface Deserializerinitialize in interface Serializerinitialize in class AbstractSerDeconf - System properties. Can be null in compile timetbl - table propertiesSerDeExceptionpublic Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
AbstractSerDegetSerializedClass in interface SerializergetSerializedClass in class AbstractSerDepublic ObjectInspector getObjectInspector() throws SerDeException
AbstractSerDegetObjectInspector in interface DeserializergetObjectInspector in class AbstractSerDeSerDeExceptionpublic Object deserialize(org.apache.hadoop.io.Writable blob) throws SerDeException
AbstractSerDedeserialize in interface Deserializerdeserialize in class AbstractSerDeblob - The Writable object containing a serialized objectSerDeExceptionpublic static org.apache.hadoop.io.Text deserializeText(InputByteBuffer buffer, boolean invert, org.apache.hadoop.io.Text r) throws IOException
IOExceptionpublic org.apache.hadoop.io.Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException
AbstractSerDeserialize in interface Serializerserialize in class AbstractSerDeSerDeExceptionpublic 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, TimestampWritableV2 t, boolean invert)
public static void serializeTimestampTZWritable(ByteStream.Output buffer, TimestampLocalTZWritable t, boolean invert)
public static void serializeHiveIntervalYearMonth(ByteStream.Output buffer, HiveIntervalYearMonth intervalYearMonth, boolean invert)
public static void serializeHiveIntervalDayTime(ByteStream.Output buffer, org.apache.hadoop.hive.common.type.HiveIntervalDayTime intervalDayTime, boolean invert)
public static void serializeOldHiveDecimal(ByteStream.Output buffer, org.apache.hadoop.hive.common.type.HiveDecimalV1 oldDec, boolean invert)
public static void serializeHiveDecimal(ByteStream.Output buffer, org.apache.hadoop.hive.common.type.HiveDecimal dec, boolean invert)
public static void serializeHiveDecimal(ByteStream.Output buffer, org.apache.hadoop.hive.common.type.HiveDecimal dec, boolean invert, byte[] scratchBuffer)
buffer - dec - invert - scratchBuffer - public static void serializeHiveDecimal(ByteStream.Output buffer, org.apache.hadoop.hive.serde2.io.HiveDecimalWritable decWritable, boolean invert, byte[] scratchBuffer)
public SerDeStats getSerDeStats()
AbstractSerDegetSerDeStats in interface DeserializergetSerDeStats in interface SerializergetSerDeStats in class AbstractSerDepublic static void serializeStruct(ByteStream.Output byteStream, Object[] fieldData, List<ObjectInspector> fieldOis, boolean[] sortableSortOrders, byte[] nullMarkers, byte[] notNullMarkers) throws SerDeException
SerDeExceptionpublic boolean[] getSortOrders()
public byte[] getNullMarkers()
public byte[] getNotNullMarkers()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.