Class WrappedFailoverProxyProvider<T>
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider<T>
org.apache.hadoop.hdfs.server.namenode.ha.WrappedFailoverProxyProvider<T>
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.io.retry.FailoverProxyProvider<T>
A NNFailoverProxyProvider implementation which wrapps old implementations
directly implementing the
FailoverProxyProvider interface.
It is assumed that the old impelmentation is using logical URI.-
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
ConstructorsConstructorDescriptionWrappedFailoverProxyProvider(org.apache.hadoop.io.retry.FailoverProxyProvider<T> provider) Wrap the given instance of an old FailoverProxyProvider. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the proxy,org.apache.hadoop.io.retry.FailoverProxyProvider.ProxyInfo<T>getProxy()voidperformFailover(T currentProxy) booleanAssume logical URI is used for old proxy provider implementations.Methods inherited from class org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider
createProxyIfNeeded, getFallbackToSimpleAuth, getProxyAddresses, getRandomOrder, setFallbackToSimpleAuth
-
Constructor Details
-
WrappedFailoverProxyProvider
Wrap the given instance of an old FailoverProxyProvider.
-
-
Method Details
-
getInterface
- Specified by:
getInterfacein interfaceorg.apache.hadoop.io.retry.FailoverProxyProvider<T>- Overrides:
getInterfacein classAbstractNNFailoverProxyProvider<T>
-
getProxy
-
performFailover
-
close
Close the proxy,- Throws:
IOException
-
useLogicalURI
public boolean useLogicalURI()Assume logical URI is used for old proxy provider implementations.- Specified by:
useLogicalURIin classAbstractNNFailoverProxyProvider<T>- Returns:
- true if logical HA URI is used. false, if not used.
-