Skip to content

Commit 3e81528

Browse files
committed
HBASE-22157 Include the cause when constructing RestoreSnapshotException in restoreSnapshot
Signed-off-by: Zheng Hu <openinx@gmail.com>
1 parent 129d806 commit 3e81528

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1942,7 +1942,7 @@ private CompletableFuture<Void> restoreSnapshot(String snapshotName, TableName t
19421942
String msg =
19431943
"Restore snapshot=" + snapshotName + " failed. Rollback to snapshot=" +
19441944
failSafeSnapshotSnapshotName + " succeeded.";
1945-
future.completeExceptionally(new RestoreSnapshotException(msg));
1945+
future.completeExceptionally(new RestoreSnapshotException(msg, err2));
19461946
}
19471947
});
19481948
} else {

hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/HBaseSnapshotException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public HBaseSnapshotException(String msg, Throwable cause, SnapshotDescription d
6565
* @param message description of what caused the failure
6666
* @param e root cause
6767
*/
68-
public HBaseSnapshotException(String message, Exception e) {
68+
public HBaseSnapshotException(String message, Throwable e) {
6969
super(message, e);
7070
}
7171

hbase-client/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public RestoreSnapshotException(String msg) {
3939
super(msg);
4040
}
4141

42-
public RestoreSnapshotException(String message, Exception e) {
42+
public RestoreSnapshotException(String message, Throwable e) {
4343
super(message, e);
4444
}
4545
}

0 commit comments

Comments
 (0)