avijayanhwx commented on a change in pull request #2160:
URL: https://github.com/apache/ozone/pull/2160#discussion_r618087401
##########
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:
Fixed
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/upgrade/OMUpgradeFinalizer.java
##########
@@ -48,70 +39,18 @@ public OMUpgradeFinalizer(OMLayoutVersionManager
versionManager) {
@Override
public StatusAndMessages finalize(String upgradeClientID, OzoneManager om)
throws IOException {
- ozoneManager = om;
- StatusAndMessages response = preFinalize(upgradeClientID, om);
- if (response.status() != FINALIZATION_REQUIRED) {
- return response;
- }
- // This requires some more investigation on how to do it properly while
- // requests are on the fly, and post finalize features one by one.
- // Until that is done, monitoring is not really doing anything meaningful
- // but this is a tradoff we can take for the first iteration either if
- // needed, as the finalization of the first few features should not take
- // that long. Follow up JIRA is in HDDS-4286
- // String threadName = "OzoneManager-Upgrade-Finalizer";
- // ExecutorService executor =
- // Executors.newSingleThreadExecutor(r -> new Thread(threadName));
- // executor.submit(new Worker(om));
- try {
- getFinalizationExecutor().execute(ozoneManager.getOmStorage(),
- this);
- } catch (Exception e) {
- e.printStackTrace();
- throw (IOException) e;
- }
- return STARTING_MSG;
+ return super.finalize(upgradeClientID, om);
Review comment:
Fixed
--
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]