This is an automated email from the ASF dual-hosted git repository. openinx pushed a commit to branch HBASE-21879 in repository https://gitbox.apache.org/repos/asf/hbase.git
commit 59ac65bdb504bb79e88f001dc01543eb5a4de0c6 Author: Duo Zhang <zhang...@apache.org> AuthorDate: Wed Apr 3 18:52:58 2019 +0800 HBASE-22157 Include the cause when constructing RestoreSnapshotException in restoreSnapshot Signed-off-by: Zheng Hu <open...@gmail.com> --- .../main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java | 2 +- .../java/org/apache/hadoop/hbase/snapshot/HBaseSnapshotException.java | 2 +- .../java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotException.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java index 77e1423..6c89fc8 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java @@ -1942,7 +1942,7 @@ class RawAsyncHBaseAdmin implements AsyncAdmin { String msg = "Restore snapshot=" + snapshotName + " failed. Rollback to snapshot=" + failSafeSnapshotSnapshotName + " succeeded."; - future.completeExceptionally(new RestoreSnapshotException(msg)); + future.completeExceptionally(new RestoreSnapshotException(msg, err2)); } }); } else { diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/HBaseSnapshotException.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/HBaseSnapshotException.java index 07cf928..90a509e 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/HBaseSnapshotException.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/HBaseSnapshotException.java @@ -65,7 +65,7 @@ public class HBaseSnapshotException extends DoNotRetryIOException { * @param message description of what caused the failure * @param e root cause */ - public HBaseSnapshotException(String message, Exception e) { + public HBaseSnapshotException(String message, Throwable e) { super(message, e); } diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotException.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotException.java index a203ab7..b2b335c 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotException.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotException.java @@ -39,7 +39,7 @@ public class RestoreSnapshotException extends HBaseSnapshotException { super(msg); } - public RestoreSnapshotException(String message, Exception e) { + public RestoreSnapshotException(String message, Throwable e) { super(message, e); } }