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/03/03 05:21:19 UTC

[GitHub] [ozone] sky76093016 opened a new pull request #1986: HDDS-4873. Re-replication failure throws NPE

sky76093016 opened a new pull request #1986:
URL: https://github.com/apache/ozone/pull/1986


   ## What changes were proposed in this pull request?
   
   Increase the log that helps users to use.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-4873
   
   ## How was this patch tested?
   
   No test.
   


----------------------------------------------------------------
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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a change in pull request #1986: HDDS-4873. Re-replication failure throws NPE

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



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/DownloadAndImportReplicator.java
##########
@@ -109,23 +109,26 @@ public void replicate(ReplicationTask task) {
     CompletableFuture<Path> tempTarFile = downloader
         .getContainerDataFromReplicas(containerID,
             sourceDatanodes);
-
-    try {
-      //wait for the download. This thread pool is limiting the paralell
-      //downloads, so it's ok to block here and wait for the full download.
-      Path path = tempTarFile.get();
-      long bytes = Files.size(path);
-
-      LOG.info("Container {} is downloaded with size {}, starting to import.",
-          containerID, bytes);
-      task.setTransferredBytes(bytes);
-
-      importContainer(containerID, path);
-      LOG.info("Container {} is replicated successfully", containerID);
-      task.setStatus(Status.DONE);
-    } catch (Exception e) {
-      LOG.error("Container {} replication was unsuccessful.", containerID, e);
+    if (tempTarFile == null) {
       task.setStatus(Status.FAILED);
+    }else{

Review comment:
       ```suggestion
       } else {
   ```




----------------------------------------------------------------
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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] cku328 merged pull request #1986: HDDS-4873. Re-replication failure throws NPE

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


   


----------------------------------------------------------------
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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] sky76093016 commented on pull request #1986: HDDS-4873. Re-replication failure throws NPE

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


   @jojochuang Can you review this PR for me?Thank you.


----------------------------------------------------------------
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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] jojochuang commented on pull request #1986: HDDS-4873. Re-replication failure throws NPE

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


   what Attila said. Thanks for the 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.

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] cku328 commented on a change in pull request #1986: HDDS-4873. Re-replication failure throws NPE

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



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/DownloadAndImportReplicator.java
##########
@@ -109,23 +109,26 @@ public void replicate(ReplicationTask task) {
     CompletableFuture<Path> tempTarFile = downloader
         .getContainerDataFromReplicas(containerID,
             sourceDatanodes);
-
-    try {
-      //wait for the download. This thread pool is limiting the paralell
-      //downloads, so it's ok to block here and wait for the full download.
-      Path path = tempTarFile.get();
-      long bytes = Files.size(path);
-
-      LOG.info("Container {} is downloaded with size {}, starting to import.",
-          containerID, bytes);
-      task.setTransferredBytes(bytes);
-
-      importContainer(containerID, path);
-      LOG.info("Container {} is replicated successfully", containerID);
-      task.setStatus(Status.DONE);
-    } catch (Exception e) {
-      LOG.error("Container {} replication was unsuccessful.", containerID, e);
+    if (tempTarFile == null) {
       task.setStatus(Status.FAILED);
+    } else {
+      try {
+        //wait for the download. This thread pool is limiting the parallel
+        //downloads, so it's ok to block here and wait for the full download.

Review comment:
       ```suggestion
           // Wait for the download. This thread pool is limiting the parallel
           // downloads, so it's ok to block here and wait for the full download.
   ```
   The comments in code should begin with a whitespace after the leading forward slashes.




----------------------------------------------------------------
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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org