@InterfaceAudience.Public @InterfaceStability.Stable public class LazySimpleSerDe extends AbstractEncodingAwareSerDe
| Modifier and Type | Class and Description |
|---|---|
static class |
LazySimpleSerDe.SerDeParameters
Deprecated.
|
charsetconfiguration, log, partitionProperties, properties, tableProperties| Constructor and Description |
|---|
LazySimpleSerDe() |
| Modifier and Type | Method and Description |
|---|---|
Object |
doDeserialize(org.apache.hadoop.io.Writable field)
Deserialize a row from the Writable to a LazyObject.
|
org.apache.hadoop.io.Writable |
doSerialize(Object obj,
ObjectInspector objInspector)
Serialize a row of data.
|
ObjectInspector |
getObjectInspector()
Returns the ObjectInspector for the row.
|
SerDeStats |
getSerDeStats()
Returns the statistics after (de)serialization)
|
Class<? extends org.apache.hadoop.io.Writable> |
getSerializedClass()
Returns the Writable Class after serialization.
|
void |
initialize(org.apache.hadoop.conf.Configuration configuration,
Properties tableProperties,
Properties partitionProperties)
Initialize the SerDe given the parameters.
|
static LazySimpleSerDe.SerDeParameters |
initSerdeParams(org.apache.hadoop.conf.Configuration job,
Properties tbl,
String serdeName)
Deprecated.
|
protected List<TypeInfo> |
parseColumnTypes()
NOTE: if "columns.types" is missing, all columns will be of String type.
|
static void |
serialize(ByteStream.Output out,
Object obj,
ObjectInspector objInspector,
byte[] separators,
int level,
org.apache.hadoop.io.Text nullSequence,
boolean escaped,
byte escapeChar,
boolean[] needsEscape)
Serialize the row into the StringBuilder.
|
protected void |
serializeField(ByteStream.Output out,
Object obj,
ObjectInspector objInspector,
LazySerDeParameters serdeParams) |
String |
toString() |
protected org.apache.hadoop.io.Writable |
transformFromUTF8(org.apache.hadoop.io.Writable blob)
transform Writable data from UTF-8 to charset before serialize.
|
protected org.apache.hadoop.io.Writable |
transformToUTF8(org.apache.hadoop.io.Writable blob)
transform Writable data from charset to UTF-8 before doDeserialize.
|
deserialize, serializegetColumnComments, getColumnNames, getColumnTypes, getConfiguration, getPartitionColumnComments, getPartitionColumnNames, getPartitionColumnTypes, parseColumnComments, parseColumnNames, parseColumnNames, parseColumnTypes, shouldStoreFieldsInMetastoreclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithandleJobLevelConfigurationpublic String toString()
toString in class AbstractSerDepublic void initialize(org.apache.hadoop.conf.Configuration configuration,
Properties tableProperties,
Properties partitionProperties)
throws SerDeException
initialize in class AbstractEncodingAwareSerDeconfiguration - Hadoop configurationtableProperties - Table propertiespartitionProperties - Partition properties (may be null if
table has no partitions)SerDeException - if SerDe fails to initializeprotected List<TypeInfo> parseColumnTypes()
parseColumnTypes in class AbstractSerDepublic Object doDeserialize(org.apache.hadoop.io.Writable field) throws SerDeException
doDeserialize in class AbstractEncodingAwareSerDefield - the Writable that contains the dataSerDeExceptionAbstractSerDe.deserialize(Writable)public ObjectInspector getObjectInspector() throws SerDeException
SerDeExceptionpublic Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
getSerializedClass in interface SerializergetSerializedClass in class AbstractSerDeAbstractSerDe.getSerializedClass()public org.apache.hadoop.io.Writable doSerialize(Object obj, ObjectInspector objInspector) throws SerDeException
doSerialize in class AbstractEncodingAwareSerDeobj - The row objectobjInspector - The ObjectInspector for the row objectSerDeExceptionAbstractSerDe.serialize(Object, ObjectInspector)protected void serializeField(ByteStream.Output out, Object obj, ObjectInspector objInspector, LazySerDeParameters serdeParams) throws SerDeException
SerDeExceptionpublic static void serialize(ByteStream.Output out, Object obj, ObjectInspector objInspector, byte[] separators, int level, org.apache.hadoop.io.Text nullSequence, boolean escaped, byte escapeChar, boolean[] needsEscape) throws IOException, SerDeException
out - The StringBuilder to store the serialized data.obj - The object for the current field.objInspector - The ObjectInspector for the current Object.separators - The separators array.level - The current level of separator.nullSequence - The byte sequence representing the NULL value.escaped - Whether we need to escape the data when writing outescapeChar - Which char to use as the escape char, e.g. '\\'needsEscape - Which byte needs to be escaped for 256 bytes.IOExceptionSerDeExceptionpublic SerDeStats getSerDeStats()
getSerDeStats in interface SerDegetSerDeStats in class AbstractSerDenull if stats are not supported by
this SerDe. Returns statistics collected when serializingprotected org.apache.hadoop.io.Writable transformFromUTF8(org.apache.hadoop.io.Writable blob)
AbstractEncodingAwareSerDetransformFromUTF8 in class AbstractEncodingAwareSerDeprotected org.apache.hadoop.io.Writable transformToUTF8(org.apache.hadoop.io.Writable blob)
AbstractEncodingAwareSerDetransformToUTF8 in class AbstractEncodingAwareSerDe@Deprecated public static LazySimpleSerDe.SerDeParameters initSerdeParams(org.apache.hadoop.conf.Configuration job, Properties tbl, String serdeName) throws SerDeException
SerDeExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.