|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hcatalog.common.HCatUtil
public class HCatUtil
Constructor Summary | |
---|---|
HCatUtil()
|
Method Summary | |
---|---|
static void |
cancelJobTrackerDelegationToken(java.lang.String tokenStrForm,
java.lang.String tokenSignature)
|
static boolean |
checkJobContextIfRunningFromBackend(org.apache.hadoop.mapreduce.JobContext j)
|
static byte[] |
decodeBytes(java.lang.String str)
|
static java.lang.Object |
deserialize(java.lang.String str)
|
static java.lang.String |
encodeBytes(byte[] bytes)
|
static org.apache.hadoop.security.token.Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> |
extractJobTrackerToken(java.lang.String tokenStrForm,
java.lang.String tokenSignature)
|
static HCatSchema |
extractSchemaFromStorageDescriptor(org.apache.hadoop.hive.metastore.api.StorageDescriptor sd)
|
static org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier> |
extractThriftToken(java.lang.String tokenStrForm,
java.lang.String tokenSignature)
|
static java.util.List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getFieldSchemaList(java.util.List<HCatFieldSchema> hcatFields)
|
static java.util.List<HCatFieldSchema> |
getHCatFieldSchemaList(org.apache.hadoop.hive.metastore.api.FieldSchema... fields)
|
static java.util.List<HCatFieldSchema> |
getHCatFieldSchemaList(java.util.List<org.apache.hadoop.hive.metastore.api.FieldSchema> fields)
|
static org.apache.hadoop.security.token.Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> |
getJobTrackerDelegationToken(org.apache.hadoop.conf.Configuration conf,
java.lang.String userName)
|
static org.apache.hadoop.hive.metastore.api.Table |
getTable(org.apache.hadoop.hive.metastore.HiveMetaStoreClient client,
java.lang.String dbName,
java.lang.String tableName)
|
static HCatSchema |
getTableSchemaWithPtnCols(org.apache.hadoop.hive.metastore.api.Table table)
|
static void |
logAllTokens(org.apache.commons.logging.Log logger,
org.apache.hadoop.mapreduce.JobContext context)
|
static void |
logEntrySet(org.apache.commons.logging.Log logger,
java.lang.String itemName,
java.util.Set<? extends java.util.Map.Entry> entrySet)
|
static void |
logHiveConf(org.apache.commons.logging.Log logger,
org.apache.hadoop.hive.conf.HiveConf hc)
debug log the hive conf |
static void |
logList(org.apache.commons.logging.Log logger,
java.lang.String itemName,
java.util.List<? extends java.lang.Object> list)
|
static void |
logMap(org.apache.commons.logging.Log logger,
java.lang.String itemName,
java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
|
static void |
logStackTrace(org.apache.commons.logging.Log logger)
Logging stack trace |
static void |
logToken(org.apache.commons.logging.Log logger,
java.lang.String itemName,
org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> t)
|
static java.lang.String |
serialize(java.io.Serializable obj)
|
static boolean |
validateExecuteBitPresentIfReadOrWrite(org.apache.hadoop.fs.permission.FsAction perms)
Ensure that read or write permissions are not granted without also granting execute permissions. |
static boolean |
validateMorePermissive(org.apache.hadoop.fs.permission.FsAction first,
org.apache.hadoop.fs.permission.FsAction second)
Test if the first FsAction is more permissive than the second. |
static java.util.List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
validatePartitionSchema(org.apache.hadoop.hive.metastore.api.Table table,
HCatSchema partitionSchema)
Validate partition schema, checks if the column types match between the partition and the existing table schema. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HCatUtil()
Method Detail |
---|
public static boolean checkJobContextIfRunningFromBackend(org.apache.hadoop.mapreduce.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(org.apache.hadoop.hive.metastore.api.FieldSchema... fields) throws HCatException
HCatException
public static java.util.List<HCatFieldSchema> getHCatFieldSchemaList(java.util.List<org.apache.hadoop.hive.metastore.api.FieldSchema> fields) throws HCatException
HCatException
public static HCatSchema extractSchemaFromStorageDescriptor(org.apache.hadoop.hive.metastore.api.StorageDescriptor sd) throws HCatException
HCatException
public static java.util.List<org.apache.hadoop.hive.metastore.api.FieldSchema> getFieldSchemaList(java.util.List<HCatFieldSchema> hcatFields)
public static org.apache.hadoop.hive.metastore.api.Table getTable(org.apache.hadoop.hive.metastore.HiveMetaStoreClient client, java.lang.String dbName, java.lang.String tableName) throws java.lang.Exception
java.lang.Exception
public static HCatSchema getTableSchemaWithPtnCols(org.apache.hadoop.hive.metastore.api.Table table) throws java.io.IOException
java.io.IOException
public static java.util.List<org.apache.hadoop.hive.metastore.api.FieldSchema> validatePartitionSchema(org.apache.hadoop.hive.metastore.api.Table table, HCatSchema partitionSchema) throws java.io.IOException
table
- the tablepartitionSchema
- the partition schema
java.io.IOException
- Signals that an I/O exception has occurred.public static boolean validateMorePermissive(org.apache.hadoop.fs.permission.FsAction first, org.apache.hadoop.fs.permission.FsAction second)
public static boolean validateExecuteBitPresentIfReadOrWrite(org.apache.hadoop.fs.permission.FsAction perms)
perms
- The FsAction to verify
public static org.apache.hadoop.security.token.Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> getJobTrackerDelegationToken(org.apache.hadoop.conf.Configuration conf, java.lang.String userName) throws java.lang.Exception
java.lang.Exception
public static void cancelJobTrackerDelegationToken(java.lang.String tokenStrForm, java.lang.String tokenSignature) throws java.lang.Exception
java.lang.Exception
public static org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier> extractThriftToken(java.lang.String tokenStrForm, java.lang.String tokenSignature) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException, java.io.IOException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
java.io.IOException
public static org.apache.hadoop.security.token.Token<org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier> extractJobTrackerToken(java.lang.String tokenStrForm, java.lang.String tokenSignature) throws org.apache.hadoop.hive.metastore.api.MetaException, org.apache.thrift.TException, java.io.IOException
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.thrift.TException
java.io.IOException
public static void logStackTrace(org.apache.commons.logging.Log logger)
logger
- public static void logHiveConf(org.apache.commons.logging.Log logger, org.apache.hadoop.hive.conf.HiveConf hc)
logger
- hc
- public static void logList(org.apache.commons.logging.Log logger, java.lang.String itemName, java.util.List<? extends java.lang.Object> list)
public static void logMap(org.apache.commons.logging.Log logger, java.lang.String itemName, java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
public static void logEntrySet(org.apache.commons.logging.Log logger, java.lang.String itemName, java.util.Set<? extends java.util.Map.Entry> entrySet)
public static void logAllTokens(org.apache.commons.logging.Log logger, org.apache.hadoop.mapreduce.JobContext context) throws java.io.IOException
java.io.IOException
public static void logToken(org.apache.commons.logging.Log logger, java.lang.String itemName, org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> t) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |