HBASE-21740 Fix NPE while shutting down RS

This commit is contained in:
lujie 2019-02-18 02:53:19 -08:00 committed by Xu Cang
parent afba39399a
commit 322ea5456f
No known key found for this signature in database
GPG Key ID: 8E6C8FEDCA866394
1 changed files with 3 additions and 1 deletions

View File

@ -1844,7 +1844,9 @@ public class HRegionServer extends HasThread implements
Threads.setDaemonThreadRunning(this.walRoller.getThread(), getName() + ".logRoller",
uncaughtExceptionHandler);
this.cacheFlusher.start(uncaughtExceptionHandler);
if (this.cacheFlusher != null) {
this.cacheFlusher.start(uncaughtExceptionHandler);
}
if (this.compactionChecker != null) choreService.scheduleChore(compactionChecker);
if (this.periodicFlusher != null) choreService.scheduleChore(periodicFlusher);