jojochuang commented on a change in pull request #1700: HDFS-14963. Add HDFS 
Client machine caching active namenode index mechanism.
URL: https://github.com/apache/hadoop/pull/1700#discussion_r347572225
 
 

 ##########
 File path: 
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/ConfiguredFailoverProxyProvider.java
 ##########
 @@ -49,6 +56,14 @@ public ConfiguredFailoverProxyProvider(Configuration conf, 
URI uri,
       Class<T> xface, HAProxyFactory<T> factory, String addressKey) {
     super(conf, uri, xface, factory);
     this.proxies = getProxyAddresses(uri, addressKey);
+    this.cacheActiveEnabled = this.conf.getBoolean(
+        HdfsClientConfigKeys.Failover.CACHE_ACTIVE_ENABLED_KEY,
+        HdfsClientConfigKeys.Failover.CACHE_ACTIVE_ENABLED_DEFAULT);
+    String cacheActiveDir = this.conf.get(
+        HdfsClientConfigKeys.Failover.CACHE_ACTIVE_DIR_KEY,
+        HdfsClientConfigKeys.Failover.CACHE_ACTIVE_DIR_DEFAULT);
+    this.cacheActiveFile = new File(cacheActiveDir, uri.getHost());
 
 Review comment:
   good. so this'll work with multiple namespaces.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to