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/08/05 09:47:35 UTC

[GitHub] [ozone] ChenSammi opened a new pull request #2503: HDDS-5538. Uncatched NPE in GrpcReplicationService.

ChenSammi opened a new pull request #2503:
URL: https://github.com/apache/ozone/pull/2503


   https://issues.apache.org/jira/browse/HDDS-5538


-- 
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] ChenSammi commented on a change in pull request #2503: HDDS-5538. Uncaught NPE in GrpcReplicationService.

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



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/OnDemandContainerReplicationSource.java
##########
@@ -53,8 +55,10 @@ public void copyData(long containerId, OutputStream destination)
 
     Container container = controller.getContainer(containerId);
 
-    Preconditions.checkNotNull(
-        container, "Container is not found " + containerId);
+    if (container == null) {
+      throw new StorageContainerException("Container not found",

Review comment:
       Good point. 




-- 
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] jojochuang commented on a change in pull request #2503: HDDS-5538. Uncaught NPE in GrpcReplicationService.

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



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/OnDemandContainerReplicationSource.java
##########
@@ -53,8 +55,10 @@ public void copyData(long containerId, OutputStream destination)
 
     Container container = controller.getContainer(containerId);
 
-    Preconditions.checkNotNull(
-        container, "Container is not found " + containerId);
+    if (container == null) {
+      throw new StorageContainerException("Container not found",

Review comment:
       better to add container id too




-- 
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] ChenSammi commented on pull request #2503: HDDS-5538. Uncaught NPE in GrpcReplicationService.

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


   Thanks @jojochuang for the code review.


-- 
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] jojochuang merged pull request #2503: HDDS-5538. Uncaught NPE in GrpcReplicationService.

Posted by GitBox <gi...@apache.org>.
jojochuang merged pull request #2503:
URL: https://github.com/apache/ozone/pull/2503


   


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