|
||||||||||
| 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.Invocation
A method invocation, including the method name and its parameters. |
static class |
HBaseRPC.Server
An RPC Server. |
static class |
HBaseRPC.VersionMismatch
A version mismatch for the RPC protocol. |
| Field Summary | |
|---|---|
protected static org.apache.hadoop.hbase.ipc.HBaseRPC.ClientCache |
CLIENTS
|
protected static org.apache.commons.logging.Log |
LOG
|
| Method Summary | |
|---|---|
static java.lang.Object[] |
call(java.lang.reflect.Method method,
java.lang.Object[][] params,
java.net.InetSocketAddress[] addrs,
org.apache.hadoop.conf.Configuration conf)
Expert: Make multiple, parallel calls to a set of servers. |
static org.apache.hadoop.ipc.VersionedProtocol |
getProxy(java.lang.Class<?> protocol,
long clientVersion,
java.net.InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
int rpcTimeout)
Construct a client-side proxy object with the default SocketFactory |
static org.apache.hadoop.ipc.VersionedProtocol |
getProxy(java.lang.Class<?> protocol,
long clientVersion,
java.net.InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
javax.net.SocketFactory factory,
int rpcTimeout)
Construct a client-side proxy object that implements the named protocol, talking to a server at the named address. |
static org.apache.hadoop.ipc.VersionedProtocol |
getProxy(java.lang.Class<?> protocol,
long clientVersion,
java.net.InetSocketAddress addr,
org.apache.hadoop.security.UserGroupInformation ticket,
org.apache.hadoop.conf.Configuration conf,
javax.net.SocketFactory factory,
int rpcTimeout)
Construct a client-side proxy object that implements the named protocol, talking to a server at the named address. |
static HBaseRPC.Server |
getServer(java.lang.Object instance,
java.lang.Class<?>[] ifaces,
java.lang.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. |
protected static void |
log(java.lang.String value)
|
static void |
stopProxy(org.apache.hadoop.ipc.VersionedProtocol proxy)
Stop this proxy and release its invoker's resource |
static org.apache.hadoop.ipc.VersionedProtocol |
waitForProxy(java.lang.Class protocol,
long clientVersion,
java.net.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
protected static final org.apache.hadoop.hbase.ipc.HBaseRPC.ClientCache CLIENTS
| Method Detail |
|---|
public static org.apache.hadoop.ipc.VersionedProtocol waitForProxy(java.lang.Class protocol,
long clientVersion,
java.net.InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
int maxAttempts,
int rpcTimeout,
long timeout)
throws java.io.IOException
protocol - protocol interfaceclientVersion - which client version we expectaddr - address of remote serviceconf - configurationmaxAttempts - max attemptsrpcTimeout - timeout for each RPCtimeout - timeout in milliseconds
java.io.IOException - e
public static org.apache.hadoop.ipc.VersionedProtocol getProxy(java.lang.Class<?> protocol,
long clientVersion,
java.net.InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
javax.net.SocketFactory factory,
int rpcTimeout)
throws java.io.IOException
protocol - interfaceclientVersion - version we are expectingaddr - remote addressconf - configurationfactory - socket factoryrpcTimeout - timeout for each RPC
java.io.IOException - e
public static org.apache.hadoop.ipc.VersionedProtocol getProxy(java.lang.Class<?> protocol,
long clientVersion,
java.net.InetSocketAddress addr,
org.apache.hadoop.security.UserGroupInformation ticket,
org.apache.hadoop.conf.Configuration conf,
javax.net.SocketFactory factory,
int rpcTimeout)
throws java.io.IOException
protocol - interfaceclientVersion - version we are expectingaddr - remote addressticket - ticketconf - configurationfactory - socket factoryrpcTimeout - timeout for each RPC
java.io.IOException - e
public static org.apache.hadoop.ipc.VersionedProtocol getProxy(java.lang.Class<?> protocol,
long clientVersion,
java.net.InetSocketAddress addr,
org.apache.hadoop.conf.Configuration conf,
int rpcTimeout)
throws java.io.IOException
protocol - interfaceclientVersion - version we are expectingaddr - remote addressconf - configurationrpcTimeout - timeout for each RPC
java.io.IOException - epublic static void stopProxy(org.apache.hadoop.ipc.VersionedProtocol proxy)
proxy - the proxy to be stopped
public static java.lang.Object[] call(java.lang.reflect.Method method,
java.lang.Object[][] params,
java.net.InetSocketAddress[] addrs,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
method - method to invokeparams - array of parametersaddrs - array of addressesconf - configuration
java.io.IOException - e
public static HBaseRPC.Server getServer(java.lang.Object instance,
java.lang.Class<?>[] ifaces,
java.lang.String bindAddress,
int port,
int numHandlers,
int metaHandlerCount,
boolean verbose,
org.apache.hadoop.conf.Configuration conf,
int highPriorityLevel)
throws java.io.IOException
instance - instancebindAddress - bind addressport - port to bind tonumHandlers - number of handlers to startverbose - verbose flagconf - configuration
java.io.IOException - eprotected static void log(java.lang.String value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||