jojochuang commented on a change in pull request #1884: HDFS-15202 Boost short 
circuit cache
URL: https://github.com/apache/hadoop/pull/1884#discussion_r399084460
 
 

 ##########
 File path: 
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/DfsClientConf.java
 ##########
 @@ -290,6 +291,16 @@ public DfsClientConf(Configuration conf) {
     leaseHardLimitPeriod =
         conf.getLong(HdfsClientConfigKeys.DFS_LEASE_HARDLIMIT_KEY,
             HdfsClientConfigKeys.DFS_LEASE_HARDLIMIT_DEFAULT) * 1000;
+
+    clientShortCircuitNum = conf.getInt(
+        HdfsClientConfigKeys.DFS_SHORT_CIRCUIT_NUM,
+        HdfsClientConfigKeys.DFS_SHORT_CIRCUIT_NUM_DEFAULT);
+    Preconditions.checkArgument(clientShortCircuitNum >= 1,
+        HdfsClientConfigKeys.DFS_SHORT_CIRCUIT_NUM +
+        "can't be less then 1.");
+    Preconditions.checkArgument(clientShortCircuitNum <= 5,
+        HdfsClientConfigKeys.DFS_SHORT_CIRCUIT_NUM +
 
 Review comment:
   any reason why this is limited to 5?

----------------------------------------------------------------
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