Class RouterObserverReadProxyProvider<T>
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider<T>
org.apache.hadoop.hdfs.server.namenode.ha.RouterObserverReadProxyProvider<T>
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.io.retry.FailoverProxyProvider<T>
- Direct Known Subclasses:
RouterObserverReadConfiguredFailoverProxyProvider
A
FailoverProxyProvider implementation
to support automatic msync-ing when using routers.
This constructs a wrapper proxy around an internal one, and
injects msync calls when necessary via the InvocationHandler.-
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, ugi, xface -
Constructor Summary
ConstructorsConstructorDescriptionRouterObserverReadProxyProvider(org.apache.hadoop.conf.Configuration conf, URI uri, Class<T> xface, HAProxyFactory<T> factory) RouterObserverReadProxyProvider(org.apache.hadoop.conf.Configuration conf, URI uri, Class<T> xface, HAProxyFactory<T> factory, AbstractNNFailoverProxyProvider<T> failoverProxy) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()org.apache.hadoop.ipc.AlignmentContextorg.apache.hadoop.io.retry.FailoverProxyProvider.ProxyInfo<T>getProxy()voidperformFailover(T currentProxy) booleanInquire whether logical HA URI is used for the implementation.Methods inherited from class org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider
createProxyIfNeeded, getFallbackToSimpleAuth, getInterface, getProxyAddresses, getRandomOrder, setFallbackToSimpleAuth
-
Constructor Details
-
RouterObserverReadProxyProvider
public RouterObserverReadProxyProvider(org.apache.hadoop.conf.Configuration conf, URI uri, Class<T> xface, HAProxyFactory<T> factory) -
RouterObserverReadProxyProvider
public RouterObserverReadProxyProvider(org.apache.hadoop.conf.Configuration conf, URI uri, Class<T> xface, HAProxyFactory<T> factory, AbstractNNFailoverProxyProvider<T> failoverProxy)
-
-
Method Details
-
getAlignmentContext
public org.apache.hadoop.ipc.AlignmentContext getAlignmentContext() -
getProxy
-
performFailover
-
useLogicalURI
public boolean useLogicalURI()Description copied from class:AbstractNNFailoverProxyProviderInquire whether logical HA URI is used for the implementation. If it is used, a special token handling may be needed to make sure a token acquired from a node in the HA pair can be used against the other node.- Specified by:
useLogicalURIin classAbstractNNFailoverProxyProvider<T>- Returns:
- true if logical HA URI is used. false, if not used.
-
close
- Throws:
IOException
-