HCatUtil
insteadpublic class HCatUtil
extends java.lang.Object
Constructor and Description |
---|
HCatUtil()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkJobContextIfRunningFromBackend(JobContext j)
Deprecated.
|
static void |
closeHiveClientQuietly(HiveMetaStoreClient client)
Deprecated.
|
static void |
configureOutputStorageHandler(HCatStorageHandler storageHandler,
Configuration conf,
OutputJobInfo outputJobInfo)
Deprecated.
|
static void |
copyConf(Configuration src,
Configuration dest)
Deprecated.
Replace the contents of dest with the contents of src
|
static void |
copyJobPropertiesToJobConf(java.util.Map<java.lang.String,java.lang.String> jobProperties,
JobConf jobConf)
Deprecated.
|
static byte[] |
decodeBytes(java.lang.String str)
Deprecated.
|
static java.lang.Object |
deserialize(java.lang.String str)
Deprecated.
|
static java.lang.String |
encodeBytes(byte[] bytes)
Deprecated.
|
static HCatSchema |
extractSchema(Partition partition)
Deprecated.
|
static HCatSchema |
extractSchema(Table table)
Deprecated.
|
static <any> |
extractThriftToken(java.lang.String tokenStrForm,
java.lang.String tokenSignature)
Deprecated.
|
static Pair<java.lang.String,java.lang.String> |
getDbAndTableName(java.lang.String tableName)
Deprecated.
|
static java.util.List<FieldSchema> |
getFieldSchemaList(java.util.List<HCatFieldSchema> hcatFields)
Deprecated.
|
static java.util.List<HCatFieldSchema> |
getHCatFieldSchemaList(FieldSchema... fields)
Deprecated.
|
static java.util.List<HCatFieldSchema> |
getHCatFieldSchemaList(java.util.List<FieldSchema> fields)
Deprecated.
|
static HiveMetaStoreClient |
getHiveClient(HiveConf hiveConf)
Deprecated.
Get or create a hive client depending on whether it exits in cache or not
|
static HiveConf |
getHiveConf(Configuration conf)
Deprecated.
|
static java.util.Map<java.lang.String,java.lang.String> |
getInputJobProperties(HCatStorageHandler storageHandler,
InputJobInfo inputJobInfo)
Deprecated.
|
static JobConf |
getJobConfFromContext(JobContext jobContext)
Deprecated.
|
static <any> |
getJobTrackerDelegationToken(Configuration conf,
java.lang.String userName)
Deprecated.
|
static HCatSchema |
getPartitionColumns(Table table)
Deprecated.
return the partition columns from a table instance
|
static HCatStorageHandler |
getStorageHandler(Configuration conf,
PartInfo partitionInfo)
Deprecated.
|
static HCatStorageHandler |
getStorageHandler(Configuration conf,
StorerInfo storerInfo)
Deprecated.
Create an instance of a storage handler defined in storerInfo.
|
static HCatStorageHandler |
getStorageHandler(Configuration conf,
java.lang.String storageHandler,
java.lang.String serDe,
java.lang.String inputFormat,
java.lang.String outputFormat)
Deprecated.
Create an instance of a storage handler.
|
static Table |
getTable(HiveMetaStoreClient client,
java.lang.String dbName,
java.lang.String tableName)
Deprecated.
|
static HCatSchema |
getTableSchemaWithPtnCols(Table table)
Deprecated.
|
static boolean |
isHadoop23()
Deprecated.
|
static java.lang.String |
serialize(java.io.Serializable obj)
Deprecated.
|
static boolean |
validateExecuteBitPresentIfReadOrWrite(FsAction perms)
Deprecated.
Ensure that read or write permissions are not granted without also
granting execute permissions.
|
static boolean |
validateMorePermissive(FsAction first,
FsAction second)
Deprecated.
Test if the first FsAction is more permissive than the second.
|
static java.util.List<FieldSchema> |
validatePartitionSchema(Table table,
HCatSchema partitionSchema)
Deprecated.
Validate partition schema, checks if the column types match between the
partition and the existing table schema.
|
public static boolean checkJobContextIfRunningFromBackend(JobContext j)
public static java.lang.String serialize(java.io.Serializable obj) throws java.io.IOException
java.io.IOException
public static java.lang.Object deserialize(java.lang.String str) throws java.io.IOException
java.io.IOException
public static java.lang.String encodeBytes(byte[] bytes)
public static byte[] decodeBytes(java.lang.String str)
public static java.util.List<HCatFieldSchema> getHCatFieldSchemaList(FieldSchema... fields) throws HCatException
HCatException
public static java.util.List<HCatFieldSchema> getHCatFieldSchemaList(java.util.List<FieldSchema> fields) throws HCatException
HCatException
public static HCatSchema extractSchema(Table table) throws HCatException
HCatException
public static HCatSchema extractSchema(Partition partition) throws HCatException
HCatException
public static java.util.List<FieldSchema> getFieldSchemaList(java.util.List<HCatFieldSchema> hcatFields)
public static Table getTable(HiveMetaStoreClient client, java.lang.String dbName, java.lang.String tableName) throws NoSuchObjectException, org.apache.thrift.TException, MetaException
NoSuchObjectException
org.apache.thrift.TException
MetaException
public static HCatSchema getTableSchemaWithPtnCols(Table table) throws java.io.IOException
java.io.IOException
public static HCatSchema getPartitionColumns(Table table) throws java.io.IOException
table
- the instance to extract partition columns fromjava.io.IOException
public static java.util.List<FieldSchema> validatePartitionSchema(Table table, HCatSchema partitionSchema) throws java.io.IOException
table
- the tablepartitionSchema
- the partition schemajava.io.IOException
- Signals that an I/O exception has occurred.public static boolean validateMorePermissive(FsAction first, FsAction second)
public static boolean validateExecuteBitPresentIfReadOrWrite(FsAction perms)
perms
- The FsAction to verifypublic static <any> getJobTrackerDelegationToken(Configuration conf, java.lang.String userName) throws java.lang.Exception
java.lang.Exception
public static <any> extractThriftToken(java.lang.String tokenStrForm, java.lang.String tokenSignature) throws MetaException, org.apache.thrift.TException, java.io.IOException
MetaException
org.apache.thrift.TException
java.io.IOException
public static HCatStorageHandler getStorageHandler(Configuration conf, StorerInfo storerInfo) throws java.io.IOException
conf
- job's configuration will be used to configure the Configurable StorageHandlerstorerInfo
- StorerInfo to definining the StorageHandler and InputFormat, OutputFormat and SerDejava.io.IOException
public static HCatStorageHandler getStorageHandler(Configuration conf, PartInfo partitionInfo) throws java.io.IOException
java.io.IOException
public static HCatStorageHandler getStorageHandler(Configuration conf, java.lang.String storageHandler, java.lang.String serDe, java.lang.String inputFormat, java.lang.String outputFormat) throws java.io.IOException
conf
- job's configuration will be used to configure the Configurable StorageHandlerstorageHandler
- fully qualified class name of the desired StorageHandle instanceserDe
- fully qualified class name of the desired SerDe instanceinputFormat
- fully qualified class name of the desired InputFormat instanceoutputFormat
- fully qualified class name of the desired outputFormat instancejava.io.IOException
public static Pair<java.lang.String,java.lang.String> getDbAndTableName(java.lang.String tableName) throws java.io.IOException
java.io.IOException
public static java.util.Map<java.lang.String,java.lang.String> getInputJobProperties(HCatStorageHandler storageHandler, InputJobInfo inputJobInfo)
public static void configureOutputStorageHandler(HCatStorageHandler storageHandler, Configuration conf, OutputJobInfo outputJobInfo)
public static void copyConf(Configuration src, Configuration dest)
src
- dest
- public static HiveMetaStoreClient getHiveClient(HiveConf hiveConf) throws MetaException, java.io.IOException
hiveConf
- The hive configurationMetaException
- When HiveMetaStoreClient couldn't be createdjava.io.IOException
public static void closeHiveClientQuietly(HiveMetaStoreClient client)
public static HiveConf getHiveConf(Configuration conf) throws java.io.IOException
java.io.IOException
public static JobConf getJobConfFromContext(JobContext jobContext)
public static void copyJobPropertiesToJobConf(java.util.Map<java.lang.String,java.lang.String> jobProperties, JobConf jobConf)
public static boolean isHadoop23()
Copyright © 2012 The Apache Software Foundation