org.apache.hadoop.hbase.ipc
Class SecureRpcEngine

java.lang.Object
  extended by org.apache.hadoop.hbase.ipc.SecureRpcEngine
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, RpcEngine

public class SecureRpcEngine
extends Object
implements RpcEngine

A loadable RPC engine supporting SASL authentication of connections, using GSSAPI for Kerberos authentication or DIGEST-MD5 for authentication via signed tokens.

This is a fork of the org.apache.hadoop.ipc.WriteableRpcEngine from secure Hadoop, reworked to eliminate code duplication with the existing HBase WritableRpcEngine.

See Also:
SecureClient, SecureServer

Nested Class Summary
static class SecureRpcEngine.Server
          An RPC Server.
 
Field Summary
protected static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
SecureRpcEngine()
           
 
Method Summary
 Object[] call(Method method, Object[][] params, InetSocketAddress[] addrs, Class<? extends VersionedProtocol> protocol, User ticket, org.apache.hadoop.conf.Configuration conf)
          Expert: Make multiple, parallel calls to a set of servers.
 void close()
          Shutdown this instance
 org.apache.hadoop.conf.Configuration getConf()
           
<T extends VersionedProtocol>
T
getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, org.apache.hadoop.conf.Configuration conf, int rpcTimeout)
          Construct a client-side proxy object that implements the named protocol, talking to a server at the named address.
 SecureRpcEngine.Server getServer(Class<? extends VersionedProtocol> protocol, Object instance, Class<?>[] ifaces, String bindAddress, int port, int numHandlers, int metaHandlerCount, boolean verbose, org.apache.hadoop.conf.Configuration conf, int highPriorityLevel)
          Construct a server for a protocol implementation instance listening on a port and address, with a secret manager.
protected static void log(String value)
           
 void setConf(org.apache.hadoop.conf.Configuration config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG
Constructor Detail

SecureRpcEngine

public SecureRpcEngine()
Method Detail

setConf

public void setConf(org.apache.hadoop.conf.Configuration config)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable

getConf

public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable

getProxy

public <T extends VersionedProtocol> T getProxy(Class<T> protocol,
                                                long clientVersion,
                                                InetSocketAddress addr,
                                                org.apache.hadoop.conf.Configuration conf,
                                                int rpcTimeout)
                                     throws IOException
Construct a client-side proxy object that implements the named protocol, talking to a server at the named address.

Specified by:
getProxy in interface RpcEngine
Parameters:
protocol - interface
clientVersion - version we are expecting
addr - remote address
conf - configuration
Returns:
proxy
Throws:
IOException - e

call

public Object[] call(Method method,
                     Object[][] params,
                     InetSocketAddress[] addrs,
                     Class<? extends VersionedProtocol> protocol,
                     User ticket,
                     org.apache.hadoop.conf.Configuration conf)
              throws IOException,
                     InterruptedException
Expert: Make multiple, parallel calls to a set of servers.

Specified by:
call in interface RpcEngine
Throws:
IOException
InterruptedException

close

public void close()
Description copied from interface: RpcEngine
Shutdown this instance

Specified by:
close in interface RpcEngine

getServer

public SecureRpcEngine.Server getServer(Class<? extends VersionedProtocol> protocol,
                                        Object instance,
                                        Class<?>[] ifaces,
                                        String bindAddress,
                                        int port,
                                        int numHandlers,
                                        int metaHandlerCount,
                                        boolean verbose,
                                        org.apache.hadoop.conf.Configuration conf,
                                        int highPriorityLevel)
                                 throws IOException
Construct a server for a protocol implementation instance listening on a port and address, with a secret manager.

Specified by:
getServer in interface RpcEngine
Throws:
IOException

log

protected static void log(String value)


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