限定符和类型 | 字段和说明 |
---|---|
static int |
IPC_CLIENT_CONNECT_MAX_RETRIES_DEFAULT |
static String |
IPC_CLIENT_CONNECT_MAX_RETRIES_KEY |
static org.apache.commons.logging.Log |
LOG |
构造器和说明 |
---|
Client(Class<? extends Writable> valueClass,
Configuration conf)
Construct an IPC client with the default SocketFactory
|
Client(Class<? extends Writable> valueClass,
Configuration conf,
SocketFactory factory)
Construct an IPC client whose values are of the given
Writable
class. |
限定符和类型 | 方法和说明 |
---|---|
Writable[] |
call(Writable[] params,
InetSocketAddress[] addresses)
|
Writable[] |
call(Writable[] params,
InetSocketAddress[] addresses,
Class<?> protocol,
UserGroupInformation ticket)
|
Writable[] |
call(Writable[] params,
InetSocketAddress[] addresses,
Class<?> protocol,
UserGroupInformation ticket,
Configuration conf)
Makes a set of calls in parallel.
|
Writable |
call(Writable param,
org.apache.hadoop.ipc.Client.ConnectionId remoteId)
Make a call, passing
param , to the IPC server defined by
remoteId , returning the value. |
Writable |
call(Writable param,
InetSocketAddress address)
已过时。
Use
call(Writable, ConnectionId) instead |
Writable |
call(Writable param,
InetSocketAddress addr,
Class<?> protocol,
UserGroupInformation ticket,
int rpcTimeout)
已过时。
Use
call(Writable, ConnectionId) instead |
Writable |
call(Writable param,
InetSocketAddress addr,
Class<?> protocol,
UserGroupInformation ticket,
int rpcTimeout,
Configuration conf)
Make a call, passing
param , to the IPC server running at
address which is servicing the protocol protocol,
with the ticket credentials, rpcTimeout as timeout
and conf as configuration for this connection, returning the
value. |
Writable |
call(Writable param,
InetSocketAddress addr,
UserGroupInformation ticket)
已过时。
Use
call(Writable, ConnectionId) instead |
static int |
getTimeout(Configuration conf)
The time after which a RPC will timeout.
|
static void |
setPingInterval(Configuration conf,
int pingInterval)
set the ping interval value in configuration
|
void |
stop()
Stop all threads related to this client.
|
public static final String IPC_CLIENT_CONNECT_MAX_RETRIES_KEY
public static final int IPC_CLIENT_CONNECT_MAX_RETRIES_DEFAULT
public static final org.apache.commons.logging.Log LOG
public Client(Class<? extends Writable> valueClass, Configuration conf, SocketFactory factory)
Writable
class.public Client(Class<? extends Writable> valueClass, Configuration conf)
valueClass
- conf
- public static final void setPingInterval(Configuration conf, int pingInterval)
conf
- ConfigurationpingInterval
- the ping intervalpublic static final int getTimeout(Configuration conf)
conf
- Configurationpublic void stop()
@Deprecated public Writable call(Writable param, InetSocketAddress address) throws InterruptedException, IOException
call(Writable, ConnectionId)
insteadparam
, to the IPC server running at
address
, returning the value. Throws exceptions if there are
network problems or if the remote code threw an exception.@Deprecated public Writable call(Writable param, InetSocketAddress addr, UserGroupInformation ticket) throws InterruptedException, IOException
call(Writable, ConnectionId)
insteadparam
, to the IPC server running at
address
with the ticket
credentials, returning
the value.
Throws exceptions if there are network problems or if the remote code
threw an exception.@Deprecated public Writable call(Writable param, InetSocketAddress addr, Class<?> protocol, UserGroupInformation ticket, int rpcTimeout) throws InterruptedException, IOException
call(Writable, ConnectionId)
insteadparam
, to the IPC server running at
address
which is servicing the protocol
protocol,
with the ticket
credentials and rpcTimeout
as
timeout, returning the value.
Throws exceptions if there are network problems or if the remote code
threw an exception.public Writable call(Writable param, InetSocketAddress addr, Class<?> protocol, UserGroupInformation ticket, int rpcTimeout, Configuration conf) throws InterruptedException, IOException
param
, to the IPC server running at
address
which is servicing the protocol
protocol,
with the ticket
credentials, rpcTimeout
as timeout
and conf
as configuration for this connection, returning the
value. Throws exceptions if there are network problems or if the remote code
threw an exception.public Writable call(Writable param, org.apache.hadoop.ipc.Client.ConnectionId remoteId) throws InterruptedException, IOException
param
, to the IPC server defined by
remoteId
, returning the value.
Throws exceptions if there are network problems or if the remote code
threw an exception.@Deprecated public Writable[] call(Writable[] params, InetSocketAddress[] addresses) throws IOException, InterruptedException
@Deprecated public Writable[] call(Writable[] params, InetSocketAddress[] addresses, Class<?> protocol, UserGroupInformation ticket) throws IOException, InterruptedException
public Writable[] call(Writable[] params, InetSocketAddress[] addresses, Class<?> protocol, UserGroupInformation ticket, Configuration conf) throws IOException, InterruptedException
Copyright © 2009 The Apache Software Foundation