Interface HAProxyFactory<T>
- All Known Implementing Classes:
ClientHAProxyFactory
@Private
public interface HAProxyFactory<T>
This interface aims to decouple the proxy creation implementation that used
in
AbstractNNFailoverProxyProvider. Client side can use
ClientProtocol to initialize the
proxy while the server side can use NamenodeProtocols-
Method Summary
Modifier and TypeMethodDescriptioncreateProxy(org.apache.hadoop.conf.Configuration conf, InetSocketAddress nnAddr, Class<T> xface, org.apache.hadoop.security.UserGroupInformation ugi, boolean withRetries) createProxy(org.apache.hadoop.conf.Configuration conf, InetSocketAddress nnAddr, Class<T> xface, org.apache.hadoop.security.UserGroupInformation ugi, boolean withRetries, AtomicBoolean fallbackToSimpleAuth) default voidsetAlignmentContext(org.apache.hadoop.ipc.AlignmentContext alignmentContext) Set the alignment context to be used when creating new proxies using this factory.
-
Method Details
-
createProxy
T createProxy(org.apache.hadoop.conf.Configuration conf, InetSocketAddress nnAddr, Class<T> xface, org.apache.hadoop.security.UserGroupInformation ugi, boolean withRetries, AtomicBoolean fallbackToSimpleAuth) throws IOException - Throws:
IOException
-
createProxy
T createProxy(org.apache.hadoop.conf.Configuration conf, InetSocketAddress nnAddr, Class<T> xface, org.apache.hadoop.security.UserGroupInformation ugi, boolean withRetries) throws IOException - Throws:
IOException
-
setAlignmentContext
default void setAlignmentContext(org.apache.hadoop.ipc.AlignmentContext alignmentContext) Set the alignment context to be used when creating new proxies using this factory. Not all implementations will use this alignment context.
-