Amend HBASE-10338 Fix NPE if the server is terminated before the RegionServerCoprocessorHost is initialized (Vandana Ayyalasomayajula)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1560494 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2014-01-22 20:17:43 +00:00
parent ca59922702
commit 6cc0c86133
1 changed files with 3 additions and 1 deletions

View File

@ -1734,7 +1734,9 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa
@Override
public void stop(final String msg) {
try {
this.rsHost.preStop(msg);
if (this.rsHost != null) {
this.rsHost.preStop(msg);
}
this.stopped = true;
LOG.info("STOPPED: " + msg);
// Wakes run() if it is sleeping