HBASE-10813 Possible over-catch of exceptions (Ding Yuan)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1586006 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e17ef0d87b
commit
c908da44d0
|
@ -152,13 +152,17 @@ public class CloseRegionHandler extends EventHandler {
|
||||||
regionInfo.getRegionNameAsString());
|
regionInfo.getRegionNameAsString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (KeeperException ke) {
|
||||||
// A throwable here indicates that we couldn't successfully flush the
|
server.abort("Unrecoverable exception while checking state with zk " +
|
||||||
|
regionInfo.getRegionNameAsString() + ", still finishing close", ke);
|
||||||
|
throw new RuntimeException(ke);
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
// An IOException here indicates that we couldn't successfully flush the
|
||||||
// memstore before closing. So, we need to abort the server and allow
|
// memstore before closing. So, we need to abort the server and allow
|
||||||
// the master to split our logs in order to recover the data.
|
// the master to split our logs in order to recover the data.
|
||||||
server.abort("Unrecoverable exception while closing region " +
|
server.abort("Unrecoverable exception while closing region " +
|
||||||
regionInfo.getRegionNameAsString() + ", still finishing close", t);
|
regionInfo.getRegionNameAsString() + ", still finishing close", ioe);
|
||||||
throw new RuntimeException(t);
|
throw new RuntimeException(ioe);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.rsServices.removeFromOnlineRegions(region, destination);
|
this.rsServices.removeFromOnlineRegions(region, destination);
|
||||||
|
|
|
@ -1979,7 +1979,7 @@ class FSHLog implements HLog, Syncable {
|
||||||
Path logPath = new Path(args[i]);
|
Path logPath = new Path(args[i]);
|
||||||
FSUtils.setFsDefault(conf, logPath);
|
FSUtils.setFsDefault(conf, logPath);
|
||||||
split(conf, logPath);
|
split(conf, logPath);
|
||||||
} catch (Throwable t) {
|
} catch (IOException t) {
|
||||||
t.printStackTrace(System.err);
|
t.printStackTrace(System.err);
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class Merge extends Configured implements Tool {
|
||||||
try {
|
try {
|
||||||
mergeTwoRegions();
|
mergeTwoRegions();
|
||||||
return 0;
|
return 0;
|
||||||
} catch (Exception e) {
|
} catch (IOException e) {
|
||||||
LOG.fatal("Merge failed", e);
|
LOG.fatal("Merge failed", e);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue