public final class DrillHiveMetaStoreClientFactory extends Object
DrillHiveMetaStoreClient
instances.Modifier and Type | Method and Description |
---|---|
static DrillHiveMetaStoreClient |
createClientWithAuthz(DrillHiveMetaStoreClient processUserMetaStoreClient,
org.apache.hadoop.hive.conf.HiveConf hiveConf,
String userName)
Create a DrillHiveMetaStoreClient for cases where:
1.
|
static DrillHiveMetaStoreClient |
createCloseableClientWithCaching(org.apache.hadoop.hive.conf.HiveConf hiveConf)
Create a DrillMetaStoreClient that can be shared across multiple users.
|
static void |
setTokenStr(org.apache.hadoop.security.UserGroupInformation ugi,
String tokenStr,
String tokenService)
Create a delegation token object for the given token string and service.
|
public static DrillHiveMetaStoreClient createClientWithAuthz(DrillHiveMetaStoreClient processUserMetaStoreClient, org.apache.hadoop.hive.conf.HiveConf hiveConf, String userName)
processUserMetaStoreClient
- MetaStoreClient of process user. Useful for generating the delegation tokens when
SASL (KERBEROS or custom SASL implementations) is enabled.hiveConf
- Conf including authorization configurationuserName
- User who is trying to access the Hive metadatapublic static void setTokenStr(org.apache.hadoop.security.UserGroupInformation ugi, String tokenStr, String tokenService) throws IOException
ugi
- user group informationtokenStr
- token stringtokenService
- token serviceIOException
- if error happened during decoding token stringpublic static DrillHiveMetaStoreClient createCloseableClientWithCaching(org.apache.hadoop.hive.conf.HiveConf hiveConf) throws org.apache.hadoop.hive.metastore.api.MetaException
hiveConf
- hive properties set in Drill storage pluginorg.apache.hadoop.hive.metastore.api.MetaException
- when initialization failedCopyright © 1970 The Apache Software Foundation. All rights reserved.