public class CsvSerDe
extends org.apache.hadoop.hive.serde2.AbstractSerDe
AbstractSerDe
class and provides serialization/deserialization of csv (text) files.
It is intended to be used for creating hive tables backed by Sqoop2 generated text files.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ESCAPE_CHAR |
static java.lang.String |
QUOTE_CHAR |
static java.lang.String |
SEPARATOR_CHAR |
Constructor and Description |
---|
CsvSerDe() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
deserialize(org.apache.hadoop.io.Writable writable) |
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector |
getObjectInspector() |
org.apache.hadoop.hive.serde2.SerDeStats |
getSerDeStats() |
java.lang.Class<? extends org.apache.hadoop.io.Writable> |
getSerializedClass() |
void |
initialize(org.apache.hadoop.conf.Configuration conf,
java.util.Properties properties) |
org.apache.hadoop.io.Writable |
serialize(java.lang.Object obj,
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector oi) |
public static final java.lang.String ESCAPE_CHAR
public static final java.lang.String QUOTE_CHAR
public static final java.lang.String SEPARATOR_CHAR
public void initialize(org.apache.hadoop.conf.Configuration conf, java.util.Properties properties) throws org.apache.hadoop.hive.serde2.SerDeException
initialize
in interface org.apache.hadoop.hive.serde2.Deserializer
initialize
in interface org.apache.hadoop.hive.serde2.Serializer
initialize
in class org.apache.hadoop.hive.serde2.AbstractSerDe
org.apache.hadoop.hive.serde2.SerDeException
public org.apache.hadoop.io.Writable serialize(java.lang.Object obj, org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector oi) throws org.apache.hadoop.hive.serde2.SerDeException
serialize
in interface org.apache.hadoop.hive.serde2.Serializer
serialize
in class org.apache.hadoop.hive.serde2.AbstractSerDe
org.apache.hadoop.hive.serde2.SerDeException
public java.lang.Object deserialize(org.apache.hadoop.io.Writable writable) throws org.apache.hadoop.hive.serde2.SerDeException
deserialize
in interface org.apache.hadoop.hive.serde2.Deserializer
deserialize
in class org.apache.hadoop.hive.serde2.AbstractSerDe
org.apache.hadoop.hive.serde2.SerDeException
public org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector getObjectInspector() throws org.apache.hadoop.hive.serde2.SerDeException
getObjectInspector
in interface org.apache.hadoop.hive.serde2.Deserializer
getObjectInspector
in class org.apache.hadoop.hive.serde2.AbstractSerDe
org.apache.hadoop.hive.serde2.SerDeException
public org.apache.hadoop.hive.serde2.SerDeStats getSerDeStats()
getSerDeStats
in interface org.apache.hadoop.hive.serde2.Deserializer
getSerDeStats
in interface org.apache.hadoop.hive.serde2.Serializer
getSerDeStats
in class org.apache.hadoop.hive.serde2.AbstractSerDe
public java.lang.Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
getSerializedClass
in interface org.apache.hadoop.hive.serde2.Serializer
getSerializedClass
in class org.apache.hadoop.hive.serde2.AbstractSerDe
Copyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.