public final class HiveUtils extends Object
Modifier and Type | Field and Description |
---|---|
static char |
COLON |
static String |
LBRACE |
static String |
LBRACKET |
static String |
LINE_SEP |
static org.apache.commons.logging.Log |
LOG |
static char |
QUOTE |
static String |
RBRACE |
static String |
RBRACKET |
Modifier and Type | Method and Description |
---|---|
static String |
escapeString(String str) |
static org.apache.hadoop.io.Text |
escapeText(org.apache.hadoop.io.Text text) |
static HiveAuthenticationProvider |
getAuthenticator(org.apache.hadoop.conf.Configuration conf,
HiveConf.ConfVars authenticatorConfKey) |
static HiveAuthorizationProvider |
getAuthorizeProviderManager(org.apache.hadoop.conf.Configuration conf,
String authzClassName,
HiveAuthenticationProvider authenticator,
boolean nullIfOtherClass)
Create a new instance of HiveAuthorizationProvider
|
static HiveAuthorizerFactory |
getAuthorizerFactory(org.apache.hadoop.conf.Configuration conf,
HiveConf.ConfVars authorizationProviderConfKey)
Return HiveAuthorizerFactory used by new authorization plugin interface.
|
static HiveIndexHandler |
getIndexHandler(HiveConf conf,
String indexHandlerClass) |
static List<HiveMetastoreAuthorizationProvider> |
getMetaStoreAuthorizeProviderManagers(org.apache.hadoop.conf.Configuration conf,
HiveConf.ConfVars authorizationProviderConfKey,
HiveAuthenticationProvider authenticator) |
static HiveStorageHandler |
getStorageHandler(org.apache.hadoop.conf.Configuration conf,
String className) |
static String |
getUnparsedColumnNamesFromFieldSchema(List<FieldSchema> fieldSchemas)
Convert FieldSchemas to columnNames with backticks around them.
|
static String |
lightEscapeString(String str) |
static int |
unescapeText(org.apache.hadoop.io.Text text) |
static String |
unparseIdentifier(String identifier)
Regenerate an identifier as part of unparsing it back to SQL text.
|
static String |
unparseIdentifier(String identifier,
org.apache.hadoop.conf.Configuration conf) |
public static final char QUOTE
public static final char COLON
public static final String LBRACKET
public static final String RBRACKET
public static final String LBRACE
public static final String RBRACE
public static final String LINE_SEP
public static final org.apache.commons.logging.Log LOG
public static org.apache.hadoop.io.Text escapeText(org.apache.hadoop.io.Text text)
public static int unescapeText(org.apache.hadoop.io.Text text)
public static String unparseIdentifier(String identifier)
public static String unparseIdentifier(String identifier, org.apache.hadoop.conf.Configuration conf)
public static HiveStorageHandler getStorageHandler(org.apache.hadoop.conf.Configuration conf, String className) throws HiveException
HiveException
public static HiveIndexHandler getIndexHandler(HiveConf conf, String indexHandlerClass) throws HiveException
HiveException
public static List<HiveMetastoreAuthorizationProvider> getMetaStoreAuthorizeProviderManagers(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars authorizationProviderConfKey, HiveAuthenticationProvider authenticator) throws HiveException
HiveException
public static HiveAuthorizationProvider getAuthorizeProviderManager(org.apache.hadoop.conf.Configuration conf, String authzClassName, HiveAuthenticationProvider authenticator, boolean nullIfOtherClass) throws HiveException
conf
- authzClassName
- - authorization provider class nameauthenticator
- nullIfOtherClass
- - return null if configuration
does not point to a HiveAuthorizationProvider subclassHiveException
public static HiveAuthorizerFactory getAuthorizerFactory(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars authorizationProviderConfKey) throws HiveException
conf
- authorizationProviderConfKey
- HiveException
- if HiveAuthorizerFactory specified in configuration could notpublic static HiveAuthenticationProvider getAuthenticator(org.apache.hadoop.conf.Configuration conf, HiveConf.ConfVars authenticatorConfKey) throws HiveException
HiveException
public static String getUnparsedColumnNamesFromFieldSchema(List<FieldSchema> fieldSchemas)
Copyright © 2017 The Apache Software Foundation. All rights reserved.