HDFS-14142. Move ipfailover config key out of HdfsClientConfigKeys. Contributed 
by Chen Liang.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b8ad6c85
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b8ad6c85
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b8ad6c85

Branch: refs/heads/HDFS-12943
Commit: b8ad6c85a549a6f17cf6675e58ef002d84059d3c
Parents: 2904aa3
Author: Chen Liang <cli...@apache.org>
Authored: Wed Dec 12 10:39:39 2018 -0800
Committer: Konstantin V Shvachko <s...@apache.org>
Committed: Mon Dec 24 09:34:01 2018 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java | 3 ---
 .../ha/ObserverReadProxyProviderWithIPFailover.java         | 9 +++++----
 2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b8ad6c85/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
index f26ce20..9d20933 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
@@ -192,9 +192,6 @@ public interface HdfsClientConfigKeys {
   String DFS_PROVIDED_ALIASMAP_INMEMORY_RPC_ADDRESS =
       "dfs.provided.aliasmap.inmemory.dnrpc-address";
 
-  String DFS_CLIENT_FAILOVER_IPFAILOVER_VIRTUAL_ADDRESS =
-      Failover.PREFIX + "ipfailover.virtual-address";
-
   /**
    * These are deprecated config keys to client code.
    */

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b8ad6c85/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProviderWithIPFailover.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProviderWithIPFailover.java
 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProviderWithIPFailover.java
index 22f6dd3..fc12386 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProviderWithIPFailover.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ObserverReadProxyProviderWithIPFailover.java
@@ -22,13 +22,12 @@ import java.net.URI;
 
 import java.util.Collections;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hdfs.client.HdfsClientConfigKeys;
 import org.apache.hadoop.hdfs.HAUtilClient;
 import org.apache.hadoop.hdfs.protocol.ClientProtocol;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static 
org.apache.hadoop.hdfs.client.HdfsClientConfigKeys.DFS_CLIENT_FAILOVER_IPFAILOVER_VIRTUAL_ADDRESS;
-
 /**
  * Extends {@link ObserverReadProxyProvider} to support NameNode IP failover.
  *
@@ -81,6 +80,9 @@ public class ObserverReadProxyProviderWithIPFailover<T 
extends ClientProtocol>
   private static final Logger LOG = LoggerFactory.getLogger(
       ObserverReadProxyProviderWithIPFailover.class);
 
+  private static final String IPFAILOVER_CONFIG_PREFIX =
+      HdfsClientConfigKeys.Failover.PREFIX + "ipfailover.virtual-address";
+
   /**
    * By default ObserverReadProxyProviderWithIPFailover
    * uses {@link IPFailoverProxyProvider} for failover.
@@ -123,8 +125,7 @@ public class ObserverReadProxyProviderWithIPFailover<T 
extends ClientProtocol>
 
   private static URI getFailoverVirtualIP(
       Configuration conf, String nameServiceID) {
-    String configKey = DFS_CLIENT_FAILOVER_IPFAILOVER_VIRTUAL_ADDRESS
-        + "." + nameServiceID;
+    String configKey = IPFAILOVER_CONFIG_PREFIX + "." + nameServiceID;
     String virtualIP = conf.get(configKey);
     LOG.info("Name service ID {} will use virtual IP {} for failover",
         nameServiceID, virtualIP);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to