Grant Henke has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/15638 )
Change subject: KUDU-3099: Remove System.exit() calls from KuduBackup/KuduRestore ...................................................................... KUDU-3099: Remove System.exit() calls from KuduBackup/KuduRestore The System.exit() calls have a side effect that can cause Spark to fail even if the run function returns 0 on success. Rather than call System.exit() the run() method will return true on a successful run. We then throw a RuntimeException() in main if we find that run() failed, otherwise we call SparkSession's stop() method to cleanly shutdown Spark. Unfortunately the issue isn't easy to reproduce but we had one environment exhibiting the problem and we confirmed that this patch fixes the issue. TestKuduBackup.scala was modified where assertFalse() is used to check for failure and assertTrue() for success. Change-Id: I7d1b4796b6280adecd7dab685a0281af6b2570ce Reviewed-on: http://gerrit.cloudera.org:8080/15638 Tested-by: Grant Henke <[email protected]> Reviewed-by: Grant Henke <[email protected]> --- M java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduBackup.scala M java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduRestore.scala M java/kudu-backup/src/test/scala/org/apache/kudu/backup/TestKuduBackup.scala 3 files changed, 37 insertions(+), 33 deletions(-) Approvals: Grant Henke: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/15638 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I7d1b4796b6280adecd7dab685a0281af6b2570ce Gerrit-Change-Number: 15638 Gerrit-PatchSet: 4 Gerrit-Owner: Anonymous Coward <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120)
