You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/09/28 06:56:20 UTC

[GitHub] [ozone] cchenax opened a new pull request #2684: HDDS-5786 datanode start failed due to empty datanode id file

cchenax opened a new pull request #2684:
URL: https://github.com/apache/ozone/pull/2684


   ## What changes were proposed in this pull request?
   
   datanode can start successful if empty datanode id file
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-5786
   
   ## How was this patch tested?
   
   unittest
   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [ozone] cchenax commented on a change in pull request #2684: HDDS-5786 datanode start failed due to empty datanode id file

Posted by GitBox <gi...@apache.org>.
cchenax commented on a change in pull request #2684:
URL: https://github.com/apache/ozone/pull/2684#discussion_r724755031



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java
##########
@@ -105,6 +106,12 @@ public static DatanodeDetails readDatanodeIdFile(File path)
           .setCurrentVersion(datanodeDetailsYaml.getCurrentVersion());
 
       datanodeDetails = builder.build();
+    } catch (NullPointerException e) {

Review comment:
       I will refactor this to explicitly handle the null reference




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [ozone] adoroszlai commented on pull request #2684: HDDS-5786 datanode start failed due to empty datanode id file

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on pull request #2684:
URL: https://github.com/apache/ozone/pull/2684#issuecomment-981761404


   /pending


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [ozone] errose28 commented on a change in pull request #2684: HDDS-5786 datanode start failed due to empty datanode id file

Posted by GitBox <gi...@apache.org>.
errose28 commented on a change in pull request #2684:
URL: https://github.com/apache/ozone/pull/2684#discussion_r718705574



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java
##########
@@ -105,6 +106,12 @@ public static DatanodeDetails readDatanodeIdFile(File path)
           .setCurrentVersion(datanodeDetailsYaml.getCurrentVersion());
 
       datanodeDetails = builder.build();
+    } catch (NullPointerException e) {

Review comment:
       Handling an unchecked exception like this is usually bad practice. Especially in a large try/catch block like this where it's unclear what the cause is. Can we refactor this to explicitly handle the null reference before it is dereferenced?




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [ozone] errose28 commented on a change in pull request #2684: HDDS-5786 datanode start failed due to empty datanode id file

Posted by GitBox <gi...@apache.org>.
errose28 commented on a change in pull request #2684:
URL: https://github.com/apache/ozone/pull/2684#discussion_r718705574



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java
##########
@@ -105,6 +106,12 @@ public static DatanodeDetails readDatanodeIdFile(File path)
           .setCurrentVersion(datanodeDetailsYaml.getCurrentVersion());
 
       datanodeDetails = builder.build();
+    } catch (NullPointerException e) {

Review comment:
       Handling an unchecked exception like this is usually bad practice. Especially in a large try/catch block like this where it's unclear what the cause is. Can we refactor this to explicitly handle the null reference before it is dereferenced?




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [ozone] github-actions[bot] commented on pull request #2684: HDDS-5786 datanode start failed due to empty datanode id file

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #2684:
URL: https://github.com/apache/ozone/pull/2684#issuecomment-998362017


   Thank you very much for the patch. I am closing this PR __temporarily__ as there was no activity recently and it is waiting for response from its author.
   
   It doesn't mean that this PR is not important or ignored: feel free to reopen the PR at any time.
   
   It only means that attention of committers is not required. We prefer to keep the review queue clean. This ensures PRs in need of review are more visible, which results in faster feedback for all PRs.
   
   If you need ANY help to finish this PR, please [contact the community](https://github.com/apache/hadoop-ozone#contact) on the mailing list or the slack channel."


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [ozone] github-actions[bot] closed pull request #2684: HDDS-5786 datanode start failed due to empty datanode id file

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #2684:
URL: https://github.com/apache/ozone/pull/2684


   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [ozone] cchenax commented on a change in pull request #2684: HDDS-5786 datanode start failed due to empty datanode id file

Posted by GitBox <gi...@apache.org>.
cchenax commented on a change in pull request #2684:
URL: https://github.com/apache/ozone/pull/2684#discussion_r724754124



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/DatanodeIdYaml.java
##########
@@ -105,6 +106,12 @@ public static DatanodeDetails readDatanodeIdFile(File path)
           .setCurrentVersion(datanodeDetailsYaml.getCurrentVersion());
 
       datanodeDetails = builder.build();
+    } catch (NullPointerException e) {

Review comment:
       the error detail is not exist,but we cluster has this problem that such as uuid was lost




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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