HBASE-22157 Include the cause when constructing RestoreSnapshotException in restoreSnapshot

Signed-off-by: Zheng Hu <openinx@gmail.com>
This commit is contained in:
Duo Zhang 2019-04-03 18:52:58 +08:00
parent 129d806732
commit 3e8152837e
3 changed files with 3 additions and 3 deletions

View File

@ -1942,7 +1942,7 @@ class RawAsyncHBaseAdmin implements AsyncAdmin {
String msg = String msg =
"Restore snapshot=" + snapshotName + " failed. Rollback to snapshot=" + "Restore snapshot=" + snapshotName + " failed. Rollback to snapshot=" +
failSafeSnapshotSnapshotName + " succeeded."; failSafeSnapshotSnapshotName + " succeeded.";
future.completeExceptionally(new RestoreSnapshotException(msg)); future.completeExceptionally(new RestoreSnapshotException(msg, err2));
} }
}); });
} else { } else {

View File

@ -65,7 +65,7 @@ public class HBaseSnapshotException extends DoNotRetryIOException {
* @param message description of what caused the failure * @param message description of what caused the failure
* @param e root cause * @param e root cause
*/ */
public HBaseSnapshotException(String message, Exception e) { public HBaseSnapshotException(String message, Throwable e) {
super(message, e); super(message, e);
} }

View File

@ -39,7 +39,7 @@ public class RestoreSnapshotException extends HBaseSnapshotException {
super(msg); super(msg);
} }
public RestoreSnapshotException(String message, Exception e) { public RestoreSnapshotException(String message, Throwable e) {
super(message, e); super(message, e);
} }
} }