|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hdfs.NameNodeProxies
public class NameNodeProxies
Create proxy objects to communicate with a remote NN. All remote access to an
NN should be funneled through this class. Most of the time you'll want to use
createProxy(Configuration, URI, Class)
, which will
create either an HA- or non-HA-enabled client proxy as appropriate.
Nested Class Summary | |
---|---|
static class |
NameNodeProxies.ProxyAndInfo<PROXYTYPE>
Wrapper for a client proxy as well as its associated service ID. |
Constructor Summary | |
---|---|
NameNodeProxies()
|
Method Summary | ||
---|---|---|
static
|
createFailoverProxyProvider(org.apache.hadoop.conf.Configuration conf,
Class<org.apache.hadoop.io.retry.FailoverProxyProvider<T>> failoverProxyProviderClass,
Class<T> xface,
URI nameNodeUri)
Creates the Failover proxy provider instance |
|
static
|
createNonHAProxy(org.apache.hadoop.conf.Configuration conf,
InetSocketAddress nnAddr,
Class<T> xface,
org.apache.hadoop.security.UserGroupInformation ugi,
boolean withRetries)
Creates an explicitly non-HA-enabled proxy object. |
|
static
|
createProxy(org.apache.hadoop.conf.Configuration conf,
URI nameNodeUri,
Class<T> xface)
Creates the namenode proxy with the passed protocol. |
|
static
|
getFailoverProxyProviderClass(org.apache.hadoop.conf.Configuration conf,
URI nameNodeUri,
Class<T> xface)
Gets the configured Failover proxy provider's class |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NameNodeProxies()
Method Detail |
---|
public static <T> NameNodeProxies.ProxyAndInfo<T> createProxy(org.apache.hadoop.conf.Configuration conf, URI nameNodeUri, Class<T> xface) throws IOException
conf
- the configuration containing the required IPC
properties, client failover configurations, etc.nameNodeUri
- the URI pointing either to a specific NameNode
or to a logical nameservice.xface
- the IPC interface which should be created
IOException
- if there is an error creating the proxypublic static <T> NameNodeProxies.ProxyAndInfo<T> createNonHAProxy(org.apache.hadoop.conf.Configuration conf, InetSocketAddress nnAddr, Class<T> xface, org.apache.hadoop.security.UserGroupInformation ugi, boolean withRetries) throws IOException
createProxy(org.apache.hadoop.conf.Configuration, java.net.URI, java.lang.Class)
.
conf
- the configuration objectnnAddr
- address of the remote NN to connect toxface
- the IPC interface which should be createdugi
- the user who is making the calls on the proxy objectwithRetries
- certain interfaces have a non-standard retry policy
IOException
public static <T> Class<org.apache.hadoop.io.retry.FailoverProxyProvider<T>> getFailoverProxyProviderClass(org.apache.hadoop.conf.Configuration conf, URI nameNodeUri, Class<T> xface) throws IOException
IOException
public static <T> org.apache.hadoop.io.retry.FailoverProxyProvider<T> createFailoverProxyProvider(org.apache.hadoop.conf.Configuration conf, Class<org.apache.hadoop.io.retry.FailoverProxyProvider<T>> failoverProxyProviderClass, Class<T> xface, URI nameNodeUri) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |