org.apache.flume.sink.hbase
Class HBaseSinkSecurityManager

java.lang.Object
  extended by org.apache.flume.sink.hbase.HBaseSinkSecurityManager

public class HBaseSinkSecurityManager
extends Object

Class to handle logging into HBase with the credentials passed in.


Constructor Summary
HBaseSinkSecurityManager()
           
 
Method Summary
static boolean isSecurityEnabled(org.apache.hadoop.conf.Configuration conf)
          Checks if security is enabled for the HBase cluster.
static org.apache.hadoop.hbase.security.User login(org.apache.hadoop.conf.Configuration conf, String hostname, String kerberosPrincipal, String kerberosKeytab)
          Login the user using the configuration, and the hostname specified to use for logging in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HBaseSinkSecurityManager

public HBaseSinkSecurityManager()
Method Detail

isSecurityEnabled

public static boolean isSecurityEnabled(org.apache.hadoop.conf.Configuration conf)
Checks if security is enabled for the HBase cluster.

Returns:
- true if security is enabled on the HBase cluster and the underlying HDFS cluster.

login

public static org.apache.hadoop.hbase.security.User login(org.apache.hadoop.conf.Configuration conf,
                                                          String hostname,
                                                          String kerberosPrincipal,
                                                          String kerberosKeytab)
                                                   throws IOException
Login the user using the configuration, and the hostname specified to use for logging in.

Parameters:
conf - - Configuration to use for logging the user in.
hostname - - The hostname to use for logging the user in. If no hostname is specified (null or empty string), the canonical hostname for the address returned by InetAddress.getLocalHost() will be used.
Returns:
The logged in HBase User.
Throws:
IOException - if login failed, or hostname lookup failed.


Copyright © 2009-2013 Apache Software Foundation. All Rights Reserved.