CURRENT_VERSION, HEADER, LOG, rpcMetrics
Constructor and Description |
---|
Server(Object instance,
Configuration conf,
String bindAddress,
int port)
Construct an RPC server.
|
Server(Object instance,
Configuration conf,
String bindAddress,
int port,
int numHandlers,
boolean verbose)
Construct an RPC server.
|
Modifier and Type | Method and Description |
---|---|
void |
authorize(Subject user,
org.apache.hadoop.ipc.ConnectionHeader connection)
Authorize the incoming client connection.
|
Writable |
call(Class<?> protocol,
Writable param,
long receivedTime)
Called for each call.
|
bind, call, get, getCallQueueLen, getListenerAddress, getNumOpenConnections, getRemoteAddress, getRemoteIp, join, setSocketSendBufSize, start, stop
public Server(Object instance, Configuration conf, String bindAddress, int port) throws IOException
instance
- the instance whose methods will be calledconf
- the configuration to usebindAddress
- the address to bind on to listen for connectionport
- the port to listen for connections onIOException
public Server(Object instance, Configuration conf, String bindAddress, int port, int numHandlers, boolean verbose) throws IOException
instance
- the instance whose methods will be calledconf
- the configuration to usebindAddress
- the address to bind on to listen for connectionport
- the port to listen for connections onnumHandlers
- the number of method handler threads to runverbose
- whether each call should be loggedIOException
public Writable call(Class<?> protocol, Writable param, long receivedTime) throws IOException
Server
call
in class Server
IOException
public void authorize(Subject user, org.apache.hadoop.ipc.ConnectionHeader connection) throws AuthorizationException
Server
authorize
in class Server
user
- client userconnection
- incoming connectionAuthorizationException
- when the client isn't authorized to talk the protocolCopyright © 2010 The Apache Software Foundation