Index: hbase-server/src/main/java/org/apache/hadoop/hbase/security/AccessDeniedException.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/security/AccessDeniedException.java (revision 1405168) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/security/AccessDeniedException.java (working copy) @@ -17,12 +17,12 @@ */ package org.apache.hadoop.hbase.security; -import org.apache.hadoop.hbase.DoNotRetryIOException; +import org.apache.hadoop.hbase.CannotIgnoreIOException; /** * Exception thrown by access-related methods. */ -public class AccessDeniedException extends DoNotRetryIOException { +public class AccessDeniedException extends CannotIgnoreIOException { private static final long serialVersionUID = 1913879564363001780L; public AccessDeniedException() { Index: hbase-server/src/main/java/org/apache/hadoop/hbase/CannotIgnoreIOException.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/CannotIgnoreIOException.java (revision 0) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/CannotIgnoreIOException.java (revision 0) @@ -0,0 +1,55 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase; + +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; + +/** + * Subclass if exception cannot be ignored, e.g. + * {@link AccessDeniedException} + */ +@InterfaceAudience.Public +@InterfaceStability.Stable +public class CannotIgnoreIOException extends DoNotRetryIOException { + + private static final long serialVersionUID = 119744654511704139L; + + /** + * default constructor + */ + public CannotIgnoreIOException() { + super(); + } + + /** + * @param message + */ + public CannotIgnoreIOException(String message) { + super(message); + } + + /** + * @param message + * @param cause + */ + public CannotIgnoreIOException(String message, Throwable cause) { + super(message, cause); + } +} Index: hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java =================================================================== --- hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (revision 1405168) +++ hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (working copy) @@ -46,6 +46,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Abortable; +import org.apache.hadoop.hbase.CannotIgnoreIOException; import org.apache.hadoop.hbase.Chore; import org.apache.hadoop.hbase.ClusterStatus; import org.apache.hadoop.hbase.DeserializationException; @@ -2002,7 +2003,12 @@ public void shutdown() throws IOException { spanReceiverHost.closeReceivers(); if (cpHost != null) { - cpHost.preShutdown(); + try { + cpHost.preShutdown(); + } catch (IOException ioe) { + if (ioe instanceof CannotIgnoreIOException) throw ioe; + LOG.error("Error calling master coprocessor preShutdown()", ioe); + } } if (mxBean != null) { MBeanUtil.unregisterMBean(mxBean);