pustota2009 commented on a change in pull request #1884: HDFS-15202 Boost short
circuit cache
URL: https://github.com/apache/hadoop/pull/1884#discussion_r399620246
##########
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:
I'm not sure but afraid if someone has slowly CPU and set some big value (10
for example) it may overload CPU and negative affect to other processes. The
second reason, after 5 increasing performance quite small.
----------------------------------------------------------------
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]