|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.ipc.HBaseRPC
public class HBaseRPC
A simple RPC mechanism. This is a local hbase copy of the hadoop RPC so we can do things like address HADOOP-414 for hbase-only and try other hbase-specific optimizations like using our own version of ObjectWritable. Class has been renamed to avoid confusing it w/ hadoop versions.
A protocol is a Java interface. All parameters and return types must be one of:
boolean, byte,
char, short, int, long,
float, double, or void; orString; orWritable; or
| Nested Class Summary | |
|---|---|
static class |
HBaseRPC.UnknownProtocolException
An error requesting an RPC protocol that the server is not serving. |
static class |
HBaseRPC.VersionMismatch
A version mismatch for the RPC protocol. |
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
LOG
|
static String |
RPC_ENGINE_PROP
Configuration key for the RpcEngine implementation to load to
handle connection protocols. |
| Method Summary | |
|---|---|
static Object[] |
call(Method method,
Object[][] params,
InetSocketAddress[] addrs,
Class<? extends VersionedProtocol> protocol,
User ticket,
org.apache.hadoop.conf.Configuration conf)
Deprecated. Instead of calling statically, use getProtocolEngine(Class, org.apache.hadoop.conf.Configuration)
to obtain an RpcEngine instance and then use
RpcEngine.call(java.lang.reflect.Method, Object[][], java.net.InetSocketAddress[], Class, org.apache.hadoop.hbase.security.User, org.apache.hadoop.conf.Configuration) |
static VersionedProtocol |
getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
int rpcTimeout)
Construct a client-side proxy object with the default SocketFactory |
static VersionedProtocol |
getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
SocketFactory factory,
int rpcTimeout)
Construct a client-side proxy object that implements the named protocol, talking to a server at the named address. |
static VersionedProtocol |
getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
User ticket,
org.apache.hadoop.conf.Configuration conf,
SocketFactory factory,
int rpcTimeout)
Construct a client-side proxy object that implements the named protocol, talking to a server at the named address. |
static int |
getRpcTimeout()
|
static RpcServer |
getServer(Class 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. |
static RpcServer |
getServer(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. |
static void |
resetRpcTimeout()
|
static void |
setRpcTimeout(int rpcTimeout)
|
static void |
stopProxy(VersionedProtocol proxy)
Stop this proxy and release its invoker's resource |
static VersionedProtocol |
waitForProxy(Class protocol,
long clientVersion,
InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
int maxAttempts,
int rpcTimeout,
long timeout)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log LOG
public static final String RPC_ENGINE_PROP
RpcEngine implementation to load to
handle connection protocols. Handlers for individual protocols can be
configured using "hbase.rpc.engine." + protocol.class.name.
| Method Detail |
|---|
public static VersionedProtocol waitForProxy(Class protocol,
long clientVersion,
InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
int maxAttempts,
int rpcTimeout,
long timeout)
throws IOException
protocol - protocol interfaceclientVersion - which client version we expectaddr - address of remote serviceconf - configurationmaxAttempts - max attemptsrpcTimeout - timeout for each RPCtimeout - timeout in milliseconds
IOException - e
public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
SocketFactory factory,
int rpcTimeout)
throws IOException
protocol - interfaceclientVersion - version we are expectingaddr - remote addressconf - configurationfactory - socket factoryrpcTimeout - timeout for each RPC
IOException - e
public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
User ticket,
org.apache.hadoop.conf.Configuration conf,
SocketFactory factory,
int rpcTimeout)
throws IOException
protocol - interfaceclientVersion - version we are expectingaddr - remote addressticket - ticketconf - configurationfactory - socket factoryrpcTimeout - timeout for each RPC
IOException - e
public static VersionedProtocol getProxy(Class<? extends VersionedProtocol> protocol,
long clientVersion,
InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
int rpcTimeout)
throws IOException
protocol - interfaceclientVersion - version we are expectingaddr - remote addressconf - configurationrpcTimeout - timeout for each RPC
IOException - epublic static void stopProxy(VersionedProtocol proxy)
proxy - the proxy to be stopped
@Deprecated
public static Object[] call(Method method,
Object[][] params,
InetSocketAddress[] addrs,
Class<? extends VersionedProtocol> protocol,
User ticket,
org.apache.hadoop.conf.Configuration conf)
throws IOException,
InterruptedException
getProtocolEngine(Class, org.apache.hadoop.conf.Configuration)
to obtain an RpcEngine instance and then use
RpcEngine.call(java.lang.reflect.Method, Object[][], java.net.InetSocketAddress[], Class, org.apache.hadoop.hbase.security.User, org.apache.hadoop.conf.Configuration)
method - method to invokeparams - array of parametersaddrs - array of addressesconf - configuration
IOException - e
InterruptedException
public static RpcServer getServer(Object instance,
Class<?>[] ifaces,
String bindAddress,
int port,
int numHandlers,
int metaHandlerCount,
boolean verbose,
org.apache.hadoop.conf.Configuration conf,
int highPriorityLevel)
throws IOException
instance - instancebindAddress - bind addressport - port to bind tonumHandlers - number of handlers to startverbose - verbose flagconf - configuration
IOException - e
public static RpcServer getServer(Class 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
IOExceptionpublic static void setRpcTimeout(int rpcTimeout)
public static int getRpcTimeout()
public static void resetRpcTimeout()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||