public class HiveMetaStoreUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
HiveMetaStoreUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Deserializer |
getDeserializer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hive.metastore.api.Partition part,
org.apache.hadoop.hive.metastore.api.Table table)
getDeserializer
Get the Deserializer for a partition.
|
static Deserializer |
getDeserializer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hive.metastore.api.Table table,
boolean skipConfError)
getDeserializer
Get the Deserializer for a table.
|
static Deserializer |
getDeserializer(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hive.metastore.api.Table table,
boolean skipConfError,
String lib) |
static Class<? extends Deserializer> |
getDeserializerClass(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hive.metastore.api.Table table) |
static org.apache.hadoop.hive.metastore.api.FieldSchema |
getFieldSchemaFromTypeInfo(String fieldName,
TypeInfo typeInfo)
Convert TypeInfo to FieldSchema.
|
static List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getFieldsFromDeserializer(String tableName,
Deserializer deserializer) |
static IMetaStoreClient |
getHiveMetastoreClient(HiveConf hiveConf)
Get or create a hive client depending on whether it exits in cache or not
|
public static Deserializer getDeserializer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hive.metastore.api.Table table, boolean skipConfError) throws org.apache.hadoop.hive.metastore.api.MetaException
conf - - hadoop configtable - the tableorg.apache.hadoop.hive.metastore.api.MetaException - if any problems instantiating the Deserializer
todo - this should move somewhere into serde.jarpublic static Deserializer getDeserializer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hive.metastore.api.Table table, boolean skipConfError, String lib) throws org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.MetaExceptionpublic static Class<? extends Deserializer> getDeserializerClass(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hive.metastore.api.Table table) throws Exception
Exceptionpublic static Deserializer getDeserializer(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hive.metastore.api.Partition part, org.apache.hadoop.hive.metastore.api.Table table) throws org.apache.hadoop.hive.metastore.api.MetaException
conf - - hadoop configpart - the partitiontable - the tableorg.apache.hadoop.hive.metastore.api.MetaException - if any problems instantiating the Deserializerpublic static List<org.apache.hadoop.hive.metastore.api.FieldSchema> getFieldsFromDeserializer(String tableName, Deserializer deserializer) throws SerDeException, org.apache.hadoop.hive.metastore.api.MetaException
tableName - name of the tabledeserializer - deserializer to useSerDeException - if the serde throws an exceptionorg.apache.hadoop.hive.metastore.api.MetaException - if one of the fields or types in the table is invalidpublic static org.apache.hadoop.hive.metastore.api.FieldSchema getFieldSchemaFromTypeInfo(String fieldName, TypeInfo typeInfo)
public static IMetaStoreClient getHiveMetastoreClient(HiveConf hiveConf) throws org.apache.hadoop.hive.metastore.api.MetaException, IOException
hiveConf - The hive configurationorg.apache.hadoop.hive.metastore.api.MetaException - When HiveMetaStoreClient couldn't be createdIOExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.