HBASE-25937: Clarify UnknownRegionException (#3330)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
f640eef924
commit
d44292ac1a
|
@ -29,9 +29,21 @@ public class UnknownRegionException extends DoNotRetryRegionException {
|
|||
private static final long serialVersionUID = 1968858760475205392L;
|
||||
|
||||
/**
|
||||
* @param regionName the name of the region which is unknown
|
||||
* Constructs a new UnknownRegionException with the specified detail message.
|
||||
*
|
||||
* @param message the detail message
|
||||
*/
|
||||
public UnknownRegionException(String regionName) {
|
||||
super(regionName);
|
||||
public UnknownRegionException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new UnknownRegionException with the specified detail message and cause.
|
||||
*
|
||||
* @param message the detail message
|
||||
* @param cause the cause of the exception
|
||||
*/
|
||||
public UnknownRegionException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,10 @@ public class DoNotRetryRegionException extends DoNotRetryIOException {
|
|||
super(s);
|
||||
}
|
||||
|
||||
public DoNotRetryRegionException(String s, Throwable cause) {
|
||||
super(s, cause);
|
||||
}
|
||||
|
||||
public DoNotRetryRegionException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
|
|
@ -1628,9 +1628,9 @@ public class AssignmentManager {
|
|||
regionStateStore.visitMetaForRegion(regionEncodedName, visitor);
|
||||
return regionStates.getRegionState(regionEncodedName) == null ? null :
|
||||
regionStates.getRegionState(regionEncodedName).getRegion();
|
||||
} catch(IOException e) {
|
||||
LOG.error("Error trying to load region {} from META", regionEncodedName, e);
|
||||
throw new UnknownRegionException("Error while trying load region from meta");
|
||||
} catch (IOException e) {
|
||||
throw new UnknownRegionException(
|
||||
"Error trying to load region " + regionEncodedName + " from META", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue