org.apache.hadoop.hive.ql.security
Class InjectableDummyAuthenticator
java.lang.Object
org.apache.hadoop.hive.ql.security.InjectableDummyAuthenticator
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, HiveAuthenticationProvider, HiveMetastoreAuthenticationProvider
public class InjectableDummyAuthenticator
- extends Object
- implements HiveMetastoreAuthenticationProvider
InjectableDummyAuthenticator - An implementation of HiveMetastoreAuthenticationProvider
that wraps another Authenticator, but when asked to inject a user provided username
and groupnames, does so. This can be toggled back and forth to use in testing
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InjectableDummyAuthenticator
public InjectableDummyAuthenticator()
injectHmapClass
public static void injectHmapClass(Class<? extends HiveMetastoreAuthenticationProvider> clazz)
injectUserName
public static void injectUserName(String user)
injectGroupNames
public static void injectGroupNames(List<String> groups)
injectMode
public static void injectMode(boolean mode)
getUserName
public String getUserName()
- Specified by:
getUserName
in interface HiveAuthenticationProvider
getGroupNames
public List<String> getGroupNames()
- Specified by:
getGroupNames
in interface HiveAuthenticationProvider
getConf
public org.apache.hadoop.conf.Configuration getConf()
- Specified by:
getConf
in interface org.apache.hadoop.conf.Configurable
setConf
public void setConf(org.apache.hadoop.conf.Configuration config)
- Specified by:
setConf
in interface org.apache.hadoop.conf.Configurable
setMetaStoreHandler
public void setMetaStoreHandler(HiveMetaStore.HMSHandler handler)
- Description copied from interface:
HiveMetastoreAuthenticationProvider
- Allows invoker of HiveMetastoreAuthenticationProvider to send in a
hive metastore handler that can be used to provide data for any
authentication that needs to be done.
- Specified by:
setMetaStoreHandler
in interface HiveMetastoreAuthenticationProvider
destroy
public void destroy()
throws HiveException
- Specified by:
destroy
in interface HiveAuthenticationProvider
- Throws:
HiveException
Copyright © 2011 The Apache Software Foundation