|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.ipc.HBaseClient
public class HBaseClient
A client for an IPC service. IPC calls take a single Writable
as a
parameter, and return a Writable
as their value. A service runs on
a port and is defined by a parameter class and a value class.
This is the org.apache.hadoop.ipc.Client renamed as HBaseClient and moved into this package so can access package-private methods.
HBaseServer
Field Summary | |
---|---|
protected org.apache.hadoop.conf.Configuration |
conf
|
protected Hashtable<org.apache.hadoop.hbase.ipc.HBaseClient.ConnectionId,org.apache.hadoop.hbase.ipc.HBaseClient.Connection> |
connections
|
protected int |
counter
|
protected long |
failureSleep
|
protected int |
maxIdleTime
|
protected int |
maxRetries
|
protected int |
pingInterval
|
protected AtomicBoolean |
running
|
protected SocketFactory |
socketFactory
|
protected int |
socketTimeout
|
protected boolean |
tcpKeepAlive
|
protected boolean |
tcpNoDelay
|
protected Class<? extends org.apache.hadoop.io.Writable> |
valueClass
|
Constructor Summary | |
---|---|
HBaseClient(Class<? extends org.apache.hadoop.io.Writable> valueClass,
org.apache.hadoop.conf.Configuration conf)
Construct an IPC client with the default SocketFactory |
|
HBaseClient(Class<? extends org.apache.hadoop.io.Writable> valueClass,
org.apache.hadoop.conf.Configuration conf,
SocketFactory factory)
Construct an IPC client whose values are of the given Writable
class. |
Method Summary | |
---|---|
org.apache.hadoop.io.Writable[] |
call(org.apache.hadoop.io.Writable[] params,
InetSocketAddress[] addresses)
Makes a set of calls in parallel. |
org.apache.hadoop.io.Writable |
call(org.apache.hadoop.io.Writable param,
InetSocketAddress address)
Make a call, passing param , to the IPC server running at
address , returning the value. |
org.apache.hadoop.io.Writable |
call(org.apache.hadoop.io.Writable param,
InetSocketAddress addr,
org.apache.hadoop.security.UserGroupInformation ticket,
int rpcTimeout)
|
static void |
setPingInterval(org.apache.hadoop.conf.Configuration conf,
int pingInterval)
set the ping interval value in configuration |
static void |
setSocketTimeout(org.apache.hadoop.conf.Configuration conf,
int socketTimeout)
Set the socket timeout |
void |
stop()
Stop all threads related to this client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Hashtable<org.apache.hadoop.hbase.ipc.HBaseClient.ConnectionId,org.apache.hadoop.hbase.ipc.HBaseClient.Connection> connections
protected final Class<? extends org.apache.hadoop.io.Writable> valueClass
protected int counter
protected final AtomicBoolean running
protected final org.apache.hadoop.conf.Configuration conf
protected final int maxIdleTime
protected final int maxRetries
protected final long failureSleep
protected final boolean tcpNoDelay
protected final boolean tcpKeepAlive
protected int pingInterval
protected int socketTimeout
protected final SocketFactory socketFactory
Constructor Detail |
---|
public HBaseClient(Class<? extends org.apache.hadoop.io.Writable> valueClass, org.apache.hadoop.conf.Configuration conf, SocketFactory factory)
Writable
class.
valueClass
- value classconf
- configurationfactory
- socket factorypublic HBaseClient(Class<? extends org.apache.hadoop.io.Writable> valueClass, org.apache.hadoop.conf.Configuration conf)
valueClass
- value classconf
- configurationMethod Detail |
---|
public static void setPingInterval(org.apache.hadoop.conf.Configuration conf, int pingInterval)
conf
- ConfigurationpingInterval
- the ping intervalpublic static void setSocketTimeout(org.apache.hadoop.conf.Configuration conf, int socketTimeout)
conf
- ConfigurationsocketTimeout
- the socket timeoutpublic void stop()
public org.apache.hadoop.io.Writable call(org.apache.hadoop.io.Writable param, InetSocketAddress address) throws IOException
param
, 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.
param
- writable parameteraddress
- network address
IOException
- epublic org.apache.hadoop.io.Writable call(org.apache.hadoop.io.Writable param, InetSocketAddress addr, org.apache.hadoop.security.UserGroupInformation ticket, int rpcTimeout) throws IOException
IOException
public org.apache.hadoop.io.Writable[] call(org.apache.hadoop.io.Writable[] params, InetSocketAddress[] addresses) throws IOException
params
- writable parametersaddresses
- socket addresses
IOException
- e
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |