From e138ea6a597c6d665748134586be47bcc3458b59 Mon Sep 17 00:00:00 2001 From: Amit Date: Wed, 4 Oct 2017 14:54:35 +0530 Subject: [PATCH] HBASE-18932 Backup masking exception in a scenario and though it fails , it shows success message Signed-off-by: tedyu --- .../hbase/backup/impl/IncrementalTableBackupClient.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java index 4efe04b74ed..52f6b5ca751 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java @@ -221,7 +221,7 @@ public class IncrementalTableBackupClient extends TableBackupClient { // fail the overall backup and return failBackup(conn, backupInfo, backupManager, e, "Unexpected Exception : ", BackupType.INCREMENTAL, conf); - return; + throw new IOException(e); } // case INCREMENTAL_COPY: @@ -237,7 +237,7 @@ public class IncrementalTableBackupClient extends TableBackupClient { String msg = "Unexpected exception in incremental-backup: incremental copy " + backupId; // fail the overall backup and return failBackup(conn, backupInfo, backupManager, e, msg, BackupType.INCREMENTAL, conf); - return; + throw new IOException(e); } // case INCR_BACKUP_COMPLETE: // set overall backup status: complete. Here we make sure to complete the backup. @@ -266,6 +266,7 @@ public class IncrementalTableBackupClient extends TableBackupClient { } catch (IOException e) { failBackup(conn, backupInfo, backupManager, e, "Unexpected Exception : ", BackupType.INCREMENTAL, conf); + throw new IOException(e); } }