fapifta commented on a change in pull request #2160:
URL: https://github.com/apache/ozone/pull/2160#discussion_r618049044



##########
File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/upgrade/DataNodeUpgradeFinalizer.java
##########
@@ -41,63 +42,58 @@
     BasicUpgradeFinalizer<DatanodeStateMachine, HDDSLayoutVersionManager> {
   private static final Logger LOG =
       LoggerFactory.getLogger(DataNodeUpgradeFinalizer.class);
-  private DatanodeStateMachine datanodeStateMachine;
 
-  public DataNodeUpgradeFinalizer(HDDSLayoutVersionManager versionManager,
-                                  String optionalClientID) {
+  public DataNodeUpgradeFinalizer(HDDSLayoutVersionManager versionManager) {
     super(versionManager);
-    clientID = optionalClientID;
   }
 
   @Override
   public StatusAndMessages finalize(String upgradeClientID,
                                     DatanodeStateMachine dsm)
       throws IOException {
-    datanodeStateMachine = dsm;
-    StatusAndMessages response = preFinalize(upgradeClientID, dsm);
-    if (response.status() != FINALIZATION_REQUIRED) {
-      return response;
-    }
-    try {
-      getFinalizationExecutor().execute(dsm.getLayoutStorage(),
-          this);
-    } catch (Exception e) {
-      e.printStackTrace();
-      throw new IOException(e.getMessage());
-    }
-    return STARTING_MSG;
+    return super.finalize(upgradeClientID, dsm);

Review comment:
       after refactoring we don't need this method as it is just delegating to 
super.

##########
File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/upgrade/DataNodeUpgradeFinalizer.java
##########
@@ -41,63 +42,58 @@
     BasicUpgradeFinalizer<DatanodeStateMachine, HDDSLayoutVersionManager> {
   private static final Logger LOG =

Review comment:
       I believe we would be fine with the logger instance defined in the 
UpgradeFinalizer interface, as any of the actual finalizers will log to their 
respective component's log file.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to