org.apache.hadoop.hive.ql.security
Class InjectableDummyAuthenticator

java.lang.Object
  extended by 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


Constructor Summary
InjectableDummyAuthenticator()
           
 
Method Summary
 void destroy()
           
 org.apache.hadoop.conf.Configuration getConf()
           
 List<String> getGroupNames()
           
 String getUserName()
           
static void injectGroupNames(List<String> groups)
           
static void injectHmapClass(Class<? extends HiveMetastoreAuthenticationProvider> clazz)
           
static void injectMode(boolean mode)
           
static void injectUserName(String user)
           
 void setConf(org.apache.hadoop.conf.Configuration config)
           
 void setMetaStoreHandler(HiveMetaStore.HMSHandler handler)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectableDummyAuthenticator

public InjectableDummyAuthenticator()
Method Detail

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