org.apache.hadoop.hbase.ipc
Class SecureClient

java.lang.Object
  extended by org.apache.hadoop.hbase.ipc.HBaseClient
      extended by org.apache.hadoop.hbase.ipc.SecureClient

public class SecureClient
extends HBaseClient

A client for an IPC service, which support SASL authentication of connections using either GSSAPI for Kerberos authentication or DIGEST-MD5 for authentication using signed tokens.

This is a copy of org.apache.hadoop.ipc.Client from secure Hadoop, reworked to remove code duplicated with org.apache.hadoop.hbase.HBaseClient. This is part of the loadable SecureRpcEngine, and only functions in connection with a SecureServer instance.


Nested Class Summary
protected  class SecureClient.SecureConnection
          Thread that reads responses and notifies callers.
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.ipc.HBaseClient
HBaseClient.Call, HBaseClient.CallTimeoutException, HBaseClient.Connection, HBaseClient.ConnectionId, HBaseClient.FailedServerException, HBaseClient.ParallelCall, HBaseClient.ParallelResults
 
Field Summary
static boolean IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_DEFAULT
           
static String IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_KEY
           
protected static Map<String,org.apache.hadoop.security.token.TokenSelector<? extends org.apache.hadoop.security.token.TokenIdentifier>> tokenHandlers
           
 
Fields inherited from class org.apache.hadoop.hbase.ipc.HBaseClient
bindAddress, clusterId, conf, connections, counter, FAILED_SERVER_EXPIRY_DEFAULT, FAILED_SERVER_EXPIRY_KEY, failedServers, failureSleep, maxIdleTime, maxRetries, pingInterval, running, socketFactory, socketTimeout, tcpKeepAlive, tcpNoDelay, valueClass
 
Constructor Summary
SecureClient(Class<? extends org.apache.hadoop.io.Writable> valueClass, org.apache.hadoop.conf.Configuration conf, SocketFactory factory, UserProvider provider)
          Construct an IPC client whose values are of the given Writable class.
SecureClient(Class<? extends org.apache.hadoop.io.Writable> valueClass, org.apache.hadoop.conf.Configuration conf, UserProvider provider)
          Construct an IPC client with the default SocketFactory
 
Method Summary
protected  SecureClient.SecureConnection createConnection(HBaseClient.ConnectionId remoteId)
          Creates a SecureConnection.
 
Methods inherited from class org.apache.hadoop.hbase.ipc.HBaseClient
call, call, call, call, call, getClusterId, getConnection, getPoolSize, getPoolType, setPingInterval, setSocketTimeout, stop, wrapException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_KEY

public static final String IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_KEY
See Also:
Constant Field Values

IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_DEFAULT

public static final boolean IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_DEFAULT
See Also:
Constant Field Values

tokenHandlers

protected static Map<String,org.apache.hadoop.security.token.TokenSelector<? extends org.apache.hadoop.security.token.TokenIdentifier>> tokenHandlers
Constructor Detail

SecureClient

public SecureClient(Class<? extends org.apache.hadoop.io.Writable> valueClass,
                    org.apache.hadoop.conf.Configuration conf,
                    SocketFactory factory,
                    UserProvider provider)
Construct an IPC client whose values are of the given Writable class.

Parameters:
valueClass - value class
conf - configuration
factory - socket factory

SecureClient

public SecureClient(Class<? extends org.apache.hadoop.io.Writable> valueClass,
                    org.apache.hadoop.conf.Configuration conf,
                    UserProvider provider)
Construct an IPC client with the default SocketFactory

Parameters:
valueClass - value class
conf - configuration
Method Detail

createConnection

protected SecureClient.SecureConnection createConnection(HBaseClient.ConnectionId remoteId)
                                                  throws IOException
Creates a SecureConnection. Can be overridden by a subclass for testing.

Overrides:
createConnection in class HBaseClient
Parameters:
remoteId - - the ConnectionId to use for the connection creation.
Throws:
IOException


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.