Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/13415 )
Change subject: [backup] KUDU-2787 Allow single table failures for backup and restore ...................................................................... Patch Set 4: (4 comments) http://gerrit.cloudera.org:8080/#/c/13415/4/java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduBackup.scala File java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduBackup.scala: http://gerrit.cloudera.org:8080/#/c/13415/4/java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduBackup.scala@140 PS4, Line 140: s"Failed to back up table $tableName: Look back in the logs for the full exception. Error: ${ex.toString}") Is ex.toString not the full exception? You should be able to use `log.error(msg, ex)` instead of calling ex.tostring. http://gerrit.cloudera.org:8080/#/c/13415/4/java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduBackup.scala@142 PS4, Line 142: if (backupResults.exists(_._2.isFailure)) Maybe return a boolean instead of an int here. That way this is just: // Return the success of the backup. backupResults.exists(_._2.isFailure) http://gerrit.cloudera.org:8080/#/c/13415/4/java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduBackup.scala@158 PS4, Line 158: System.exit(run(options, session)) Instead of calling System.exit which is difficult to capture in testing, can you instead throw a RuntimeException here if run returns false. http://gerrit.cloudera.org:8080/#/c/13415/4/java/kudu-backup/src/test/scala/org/apache/kudu/backup/TestKuduBackup.scala File java/kudu-backup/src/test/scala/org/apache/kudu/backup/TestKuduBackup.scala: http://gerrit.cloudera.org:8080/#/c/13415/4/java/kudu-backup/src/test/scala/org/apache/kudu/backup/TestKuduBackup.scala@107 PS4, Line 107: // Check that a backup of a missing table fails fast with an exception if the Is there a test for failOnFirstError = false? -- To view, visit http://gerrit.cloudera.org:8080/13415 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4f3731f8df04791727c44af9ade9989f2cc6ef95 Gerrit-Change-Number: 13415 Gerrit-PatchSet: 4 Gerrit-Owner: Will Berkeley <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Comment-Date: Wed, 29 May 2019 15:41:13 +0000 Gerrit-HasComments: Yes
