You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2018/05/07 06:45:40 UTC
[04/29] hbase git commit: HBASE-20531 RS may throw NPE when close
meta regions in shutdown procedure.
HBASE-20531 RS may throw NPE when close meta regions in shutdown procedure.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/971f5350
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/971f5350
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/971f5350
Branch: refs/heads/HBASE-19064
Commit: 971f5350e81591e9360677f3617a399f453b6b96
Parents: acd0d1e
Author: huzheng <op...@gmail.com>
Authored: Fri May 4 19:44:10 2018 +0800
Committer: huzheng <op...@gmail.com>
Committed: Sun May 6 11:18:23 2018 +0800
----------------------------------------------------------------------
.../hbase/regionserver/HRegionServer.java | 22 ++++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/971f5350/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index 240de85..188aef6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -1052,15 +1052,6 @@ public class HRegionServer extends HasThread implements
if (this.storefileRefresher != null) this.storefileRefresher.cancel(true);
sendShutdownInterrupt();
- // Stop the quota manager
- if (rsQuotaManager != null) {
- rsQuotaManager.stop();
- }
- if (rsSpaceQuotaManager != null) {
- rsSpaceQuotaManager.stop();
- rsSpaceQuotaManager = null;
- }
-
// Stop the snapshot and other procedure handlers, forcefully killing all running tasks
if (rspmHost != null) {
rspmHost.stop(this.abortRequested || this.killed);
@@ -1106,6 +1097,15 @@ public class HRegionServer extends HasThread implements
LOG.info("stopping server " + this.serverName + "; all regions closed.");
}
+ // Stop the quota manager
+ if (rsQuotaManager != null) {
+ rsQuotaManager.stop();
+ }
+ if (rsSpaceQuotaManager != null) {
+ rsSpaceQuotaManager.stop();
+ rsSpaceQuotaManager = null;
+ }
+
//fsOk flag may be changed when closing regions throws exception.
if (this.fsOk) {
shutdownWAL(!abortRequested);
@@ -3697,9 +3697,9 @@ public class HRegionServer extends HasThread implements
@Override
public boolean reportFileArchivalForQuotas(TableName tableName,
- Collection<Entry<String,Long>> archivedFiles) {
+ Collection<Entry<String, Long>> archivedFiles) {
RegionServerStatusService.BlockingInterface rss = rssStub;
- if (rss == null) {
+ if (rss == null || rsSpaceQuotaManager == null) {
// the current server could be stopping.
LOG.trace("Skipping file archival reporting to HMaster as stub is null");
return false;