|
||||||||||
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,
URI nameNodeUri,
Class<T> xface,
boolean checkPort,
AtomicBoolean fallbackToSimpleAuth)
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
|
createNonHAProxy(org.apache.hadoop.conf.Configuration conf,
InetSocketAddress nnAddr,
Class<T> xface,
org.apache.hadoop.security.UserGroupInformation ugi,
boolean withRetries,
AtomicBoolean fallbackToSimpleAuth)
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
|
createProxy(org.apache.hadoop.conf.Configuration conf,
URI nameNodeUri,
Class<T> xface,
AtomicBoolean fallbackToSimpleAuth)
Creates the namenode proxy with the passed protocol. |
|
static
|
createProxyWithLossyRetryHandler(org.apache.hadoop.conf.Configuration config,
URI nameNodeUri,
Class<T> xface,
int numResponseToDrop,
AtomicBoolean fallbackToSimpleAuth)
Generate a dummy namenode proxy instance that utilizes our hacked LossyRetryInvocationHandler . |
|
static
|
getFailoverProxyProviderClass(org.apache.hadoop.conf.Configuration conf,
URI nameNodeUri)
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> createProxy(org.apache.hadoop.conf.Configuration conf, URI nameNodeUri, Class<T> xface, AtomicBoolean fallbackToSimpleAuth) 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 createdfallbackToSimpleAuth
- set to true or false during calls to indicate if
a secure client falls back to simple auth
IOException
- if there is an error creating the proxypublic static <T> NameNodeProxies.ProxyAndInfo<T> createProxyWithLossyRetryHandler(org.apache.hadoop.conf.Configuration config, URI nameNodeUri, Class<T> xface, int numResponseToDrop, AtomicBoolean fallbackToSimpleAuth) throws IOException
LossyRetryInvocationHandler
. Proxy instance generated using this
method will proactively drop RPC responses. Currently this method only
support HA setup. null will be returned if the given configuration is not
for HA.
config
- 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 creatednumResponseToDrop
- The number of responses to drop for each RPC callfallbackToSimpleAuth
- set to true or false during calls to indicate if
a secure client falls back to simple auth
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> NameNodeProxies.ProxyAndInfo<T> createNonHAProxy(org.apache.hadoop.conf.Configuration conf, InetSocketAddress nnAddr, Class<T> xface, org.apache.hadoop.security.UserGroupInformation ugi, boolean withRetries, AtomicBoolean fallbackToSimpleAuth) 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 policyfallbackToSimpleAuth
- - set to true or false during this method to
indicate if a secure client falls back to simple auth
IOException
public static <T> Class<org.apache.hadoop.io.retry.FailoverProxyProvider<T>> getFailoverProxyProviderClass(org.apache.hadoop.conf.Configuration conf, URI nameNodeUri) throws IOException
IOException
public static <T> AbstractNNFailoverProxyProvider<T> createFailoverProxyProvider(org.apache.hadoop.conf.Configuration conf, URI nameNodeUri, Class<T> xface, boolean checkPort, AtomicBoolean fallbackToSimpleAuth) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |