HBASE-2830 NotServingRegionException shouldn't log a stack trace
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@978796 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
13cd010140
commit
237fbbc817
|
@ -798,6 +798,7 @@ Release 0.21.0 - Unreleased
|
|||
other times its sequence id, etc.
|
||||
HBASE-2873 Minor clean up in basescanner; fix a log and make deletes of
|
||||
region processing run in order
|
||||
HBASE-2830 NotServingRegionException shouldn't log a stack trace
|
||||
|
||||
NEW FEATURES
|
||||
HBASE-1961 HBase EC2 scripts
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.apache.hadoop.hbase.HServerAddress;
|
|||
import org.apache.hadoop.hbase.HTableDescriptor;
|
||||
import org.apache.hadoop.hbase.KeyValue;
|
||||
import org.apache.hadoop.hbase.MasterNotRunningException;
|
||||
import org.apache.hadoop.hbase.NotServingRegionException;
|
||||
import org.apache.hadoop.hbase.RemoteExceptionHandler;
|
||||
import org.apache.hadoop.hbase.TableNotFoundException;
|
||||
import org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor;
|
||||
|
@ -1474,8 +1475,21 @@ public class HConnectionManager {
|
|||
LOG.debug("Failed all from " + request.address, e);
|
||||
failed.addAll(request.allPuts());
|
||||
} catch (ExecutionException e) {
|
||||
// all go into the failed list.
|
||||
LOG.debug("Failed all from " + request.address, e);
|
||||
Throwable cause = e.getCause();
|
||||
// Don't print stack trace if NSRE; NSRE is 'normal' operation.
|
||||
if (cause instanceof NotServingRegionException) {
|
||||
String msg = cause.getMessage();
|
||||
if (msg != null && msg.length() > 0) {
|
||||
// msg is the exception as a String... we just want first line.
|
||||
msg = msg.split("[\\n\\r]+\\s*at")[0];
|
||||
}
|
||||
LOG.debug("Failed execution of all on " + request.address +
|
||||
" because: " + msg);
|
||||
} else {
|
||||
// all go into the failed list.
|
||||
LOG.debug("Failed execution of all on " + request.address,
|
||||
e.getCause());
|
||||
}
|
||||
failed.addAll(request.allPuts());
|
||||
|
||||
// Just give up, leaving the batch put list in an untouched/semi-committed state
|
||||
|
|
|
@ -918,7 +918,7 @@ public abstract class HBaseServer {
|
|||
try {
|
||||
value = call(call.param, call.timestamp); // make the call
|
||||
} catch (Throwable e) {
|
||||
LOG.info(getName()+", call "+call+": error: " + e, e);
|
||||
LOG.debug(getName()+", call "+call+": error: " + e, e);
|
||||
errorClass = e.getClass().getName();
|
||||
error = StringUtils.stringifyException(e);
|
||||
}
|
||||
|
|
|
@ -811,6 +811,11 @@ public class HRegionServer implements HRegionInterface,
|
|||
* @return Throwable converted to an IOE; methods can only let out IOEs.
|
||||
*/
|
||||
private Throwable cleanup(final Throwable t, final String msg) {
|
||||
// Don't log as error if NSRE; NSRE is 'normal' operation.
|
||||
if (t instanceof NotServingRegionException) {
|
||||
LOG.debug("NotServingRegionException; " + t.getMessage());
|
||||
return t;
|
||||
}
|
||||
if (msg == null) {
|
||||
LOG.error("", RemoteExceptionHandler.checkThrowable(t));
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue