hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop] bshashikant commented on a change in pull request #2370: HDFS-15614. Initialize snapshot trash root during NameNode startup if enabled
Date Fri, 09 Oct 2020 10:35:23 GMT

bshashikant commented on a change in pull request #2370:
URL: https://github.com/apache/hadoop/pull/2370#discussion_r502332901



##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
##########
@@ -2031,6 +2033,10 @@ private String metaSaveAsString() {
     return sw.toString();
   }
 
+  public boolean getIsSnapshotTrashRootEnabled() {

Review comment:
       getIsSnapshotTrashRootEnabled --> isSnapshotTrashRootEnabled??

##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
##########
@@ -781,6 +781,10 @@ protected void initialize(Configuration conf) throws IOException {
       }
     }
 
+    if (namesystem.getIsSnapshotTrashRootEnabled()) {

Review comment:
       how about doing this here:
    @Override
       public void startActiveServices() throws IOException {
         try {
           namesystem.startActiveServices();
           startTrashEmptier(getConf());
         } catch (Throwable t) {
           doImmediateShutdown(t);
         }
       }
   
   Just before starting the trashEmptier thread. We don't need to check for Active or standby
state here as these should be called in only Active NameNode.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message