ferhui commented on code in PR #6572:
URL: https://github.com/apache/hadoop/pull/6572#discussion_r1503709489


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/fgl/FineGrainedFSNamesystemLock.java:
##########


Review Comment:
   How about introducing the FGL implementation in another ticket. it's will be 
easy for review



##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -871,7 +876,10 @@ static FSNamesystem loadFromDisk(Configuration conf) 
throws IOException {
     this.contextFieldSeparator =
         conf.get(HADOOP_CALLER_CONTEXT_SEPARATOR_KEY,
             HADOOP_CALLER_CONTEXT_SEPARATOR_DEFAULT);
-    fsLock = new FSNamesystemLock(conf, detailedLockHoldTimeMetrics);
+    Class<? extends FSNamesystemLock> lockKlass = conf.getClass(
+        DFS_NAMENODE_LOCK_MODEL_PROVIDER_KEY, 
DFS_NAMENODE_LOCK_MODEL_PROVIDER_DEFAULT,
+        FSNamesystemLock.class);
+    fsLock = createLock(lockKlass, conf, detailedLockHoldTimeMetrics);

Review Comment:
   This is used for the FGL implementation, right? GlobalFSNamesystemLock is 
the original lock? If Im right, GlobalFSNamesystemLock should be the default 
class?



##########
hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml:
##########
@@ -3956,6 +3956,15 @@
   </description>
 </property>
 
+<property>
+  <name>dfs.namenode.lock.model.provider.class</name>
+  
<value>org.apache.hadoop.hdfs.server.namenode.fgl.FineGrainedFSNamesystemLock</value>
+  <description>
+    An implementation class of FSNamesystem lock.
+    Defaults to GlobalFSNamesystemLock.class

Review Comment:
   And here we should set GlobalFSNamesystemLock by default.



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

Reply via email to