Hexiaoqiao commented on code in PR #6514:
URL: https://github.com/apache/hadoop/pull/6514#discussion_r1516099526
##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java:
##########
@@ -530,6 +530,9 @@ interface StripedRead {
* span 6 DNs, so this default value accommodates 3 read streams
*/
int THREADPOOL_SIZE_DEFAULT = 18;
+
+ String WEAK_REF_BUFFER_POOL_KEY = PREFIX +
"bufferpool.weak.references.enabled";
+ boolean WEAK_REF_BUFFER_POOL_DEFAULT = false;
Review Comment:
Please also add this default config to core-default.xml.
##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java:
##########
@@ -3159,6 +3165,21 @@ private void initThreadsNumForStripedReads(int
numThreads) {
}
}
+ private void initBufferPoolForStripedReads(boolean useWeakReference) {
+ if (STRIPED_READ_BUFFER_POOL != null) {
+ return;
+ }
+ synchronized (DFSClient.class) {
Review Comment:
What this `synchronized` would like to protect?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]