HBASE-22157 Include the cause when constructing RestoreSnapshotException in restoreSnapshot
Signed-off-by: Zheng Hu <openinx@gmail.com>
This commit is contained in:
parent
129d806732
commit
3e8152837e
|
@ -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 {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue