|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hive.serde2.avro.AvroSerdeUtils
public class AvroSerdeUtils
Utilities useful only to the AvroSerde itself. Not mean to be used by end-users but public for interop to the ql package.
| Field Summary | |
|---|---|
static String |
AVRO_SERDE_SCHEMA
|
static String |
EXCEPTION_MESSAGE
|
static String |
SCHEMA_LITERAL
|
static String |
SCHEMA_NONE
|
static String |
SCHEMA_URL
|
| Constructor Summary | |
|---|---|
AvroSerdeUtils()
|
|
| Method Summary | |
|---|---|
static org.apache.avro.Schema |
determineSchemaOrReturnErrorSchema(Properties props)
Attempt to determine the schema via the usual means, but do not throw an exception if we fail. |
static org.apache.avro.Schema |
determineSchemaOrThrowException(Properties properties)
Determine the schema to that's been provided for Avro serde work. |
static org.apache.avro.Schema |
getOtherTypeFromNullableType(org.apache.avro.Schema schema)
In a nullable type, get the schema for the non-nullable type. |
protected static org.apache.avro.Schema |
getSchemaFromHDFS(String schemaHDFSUrl,
org.apache.hadoop.conf.Configuration conf)
|
static boolean |
insideMRJob(org.apache.hadoop.mapred.JobConf job)
Determine if we're being executed from within an MR job or as part of a select * statement. |
static boolean |
isNullableType(org.apache.avro.Schema schema)
Determine if an Avro schema is of type Union[T, NULL]. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SCHEMA_LITERAL
public static final String SCHEMA_URL
public static final String SCHEMA_NONE
public static final String EXCEPTION_MESSAGE
public static final String AVRO_SERDE_SCHEMA
| Constructor Detail |
|---|
public AvroSerdeUtils()
| Method Detail |
|---|
public static org.apache.avro.Schema determineSchemaOrThrowException(Properties properties)
throws IOException,
AvroSerdeException
properties - containing a key pointing to the schema, one way or another
IOException - if error while trying to read the schema from another location
AvroSerdeException - if unable to find a schema or pointer to it in the propertiespublic static org.apache.avro.Schema determineSchemaOrReturnErrorSchema(Properties props)
protected static org.apache.avro.Schema getSchemaFromHDFS(String schemaHDFSUrl,
org.apache.hadoop.conf.Configuration conf)
throws IOException
IOExceptionpublic static boolean isNullableType(org.apache.avro.Schema schema)
public static org.apache.avro.Schema getOtherTypeFromNullableType(org.apache.avro.Schema schema)
public static boolean insideMRJob(org.apache.hadoop.mapred.JobConf job)
job - that contains things that are or are not set in a job
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||