Class IPFailoverProxyProvider<T>
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider<T>
org.apache.hadoop.hdfs.server.namenode.ha.IPFailoverProxyProvider<T>
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.io.retry.FailoverProxyProvider<T>
A NNFailoverProxyProvider implementation which works on IP failover setup.
Only one proxy is used to connect to both servers and switching between
the servers is done by the environment/infrastructure, which guarantees
clients can consistently reach only one node at a time.
Clients with a live connection will likely get connection reset after an
IP failover. This case will be handled by the
FailoverOnNetworkExceptionRetry retry policy. I.e. if the call is
not idempotent, it won't get retried.
A connection reset while setting up a connection (i.e. before sending a
request) will be handled in ipc client.
The namenode URI must contain a resolvable host name.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider
AbstractNNFailoverProxyProvider.NNProxyInfo<T>Nested classes/interfaces inherited from interface org.apache.hadoop.io.retry.FailoverProxyProvider
org.apache.hadoop.io.retry.FailoverProxyProvider.ProxyInfo<T extends Object> -
Field Summary
Fields inherited from class org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider
conf, factory, fallbackToSimpleAuth, LOG, ugi, xface -
Constructor Summary
ConstructorsConstructorDescriptionIPFailoverProxyProvider(org.apache.hadoop.conf.Configuration conf, URI uri, Class<T> xface, HAProxyFactory<T> factory) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the proxy,getProxy()voidperformFailover(T currentProxy) Nothing to do for IP failoverbooleanLogical URI is not used for IP failover.Methods inherited from class org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider
createProxyIfNeeded, getFallbackToSimpleAuth, getInterface, getProxyAddresses, getRandomOrder, setFallbackToSimpleAuth
-
Constructor Details
-
IPFailoverProxyProvider
public IPFailoverProxyProvider(org.apache.hadoop.conf.Configuration conf, URI uri, Class<T> xface, HAProxyFactory<T> factory)
-
-
Method Details
-
getProxy
-
performFailover
Nothing to do for IP failover -
close
Close the proxy,- Throws:
IOException
-
useLogicalURI
public boolean useLogicalURI()Logical URI is not used for IP failover.- Specified by:
useLogicalURIin classAbstractNNFailoverProxyProvider<T>- Returns:
- true if logical HA URI is used. false, if not used.
-