org.apache.hadoop.hdfs.server.namenode.ha
Class WrappedFailoverProxyProvider<T>

java.lang.Object
  extended by org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider<T>
      extended by org.apache.hadoop.hdfs.server.namenode.ha.WrappedFailoverProxyProvider<T>
All Implemented Interfaces:
Closeable, org.apache.hadoop.io.retry.FailoverProxyProvider<T>

public class WrappedFailoverProxyProvider<T>
extends AbstractNNFailoverProxyProvider<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 interface org.apache.hadoop.io.retry.FailoverProxyProvider
org.apache.hadoop.io.retry.FailoverProxyProvider.ProxyInfo<T>
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider
fallbackToSimpleAuth
 
Constructor Summary
WrappedFailoverProxyProvider(org.apache.hadoop.io.retry.FailoverProxyProvider<T> provider)
          Wrap the given instance of an old FailoverProxyProvider.
 
Method Summary
 void close()
          Close the proxy,
 Class<T> getInterface()
           
 org.apache.hadoop.io.retry.FailoverProxyProvider.ProxyInfo<T> getProxy()
           
 void performFailover(T currentProxy)
           
 boolean useLogicalURI()
          Assume logical URI is used for old proxy provider implementations.
 
Methods inherited from class org.apache.hadoop.hdfs.server.namenode.ha.AbstractNNFailoverProxyProvider
setFallbackToSimpleAuth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrappedFailoverProxyProvider

public WrappedFailoverProxyProvider(org.apache.hadoop.io.retry.FailoverProxyProvider<T> provider)
Wrap the given instance of an old FailoverProxyProvider.

Method Detail

getInterface

public Class<T> getInterface()

getProxy

public org.apache.hadoop.io.retry.FailoverProxyProvider.ProxyInfo<T> getProxy()

performFailover

public void performFailover(T currentProxy)

close

public void close()
           throws IOException
Close the proxy,

Throws:
IOException

useLogicalURI

public boolean useLogicalURI()
Assume logical URI is used for old proxy provider implementations.

Specified by:
useLogicalURI in class AbstractNNFailoverProxyProvider<T>
Returns:
true if logical HA URI is used. false, if not used.


Copyright © 2014 Apache Software Foundation. All Rights Reserved.