hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject [hbase] branch branch-2 updated: HBASE-22157 Include the cause when constructing RestoreSnapshotException in restoreSnapshot
Date Thu, 04 Apr 2019 03:05:58 GMT
This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 7154f86  HBASE-22157 Include the cause when constructing RestoreSnapshotException
in restoreSnapshot
7154f86 is described below

commit 7154f86b4bf80f260c817cf9c4c81e6ccccc1ca4
Author: Duo Zhang <zhangduo@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 <openinx@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 cd61dd5..43cdc41 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
@@ -1936,7 +1936,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);
   }
 }


Mime
View raw message