Author: jdcryans
Date: Wed Nov 24 18:35:05 2010
New Revision: 1038756
URL: http://svn.apache.org/viewvc?rev=1038756&view=rev
Log:
HBASE-3261 NPE out of HRS.run at startup when clock is out of sync
Modified:
hbase/trunk/CHANGES.txt
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Modified: hbase/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1038756&r1=1038755&r2=1038756&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Wed Nov 24 18:35:05 2010
@@ -711,6 +711,7 @@ Release 0.90.0 - Unreleased
HBASE-3269 HBase table truncate semantics seems broken as "disable" table
is now async by default
HBASE-3275 [rest] No gzip/deflate content encoding support
+ HBASE-3261 NPE out of HRS.run at startup when clock is out of sync
IMPROVEMENTS
Modified:
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL:
http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1038756&r1=1038755&r2=1038756&view=diff
==============================================================================
---
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Wed Nov 24 18:35:05 2010
@@ -613,12 +613,12 @@ public class HRegionServer implements HR
// Send interrupts to wake up threads if sleeping so they notice shutdown.
// TODO: Should we check they are alive? If OOME could have exited already
- cacheFlusher.interruptIfNecessary();
- compactSplitThread.interruptIfNecessary();
- hlogRoller.interruptIfNecessary();
- this.majorCompactionChecker.interrupt();
+ if (this.cacheFlusher != null) this.cacheFlusher.interruptIfNecessary();
+ if (this.compactSplitThread != null)
this.compactSplitThread.interruptIfNecessary();
+ if (this.hlogRoller != null) this.hlogRoller.interruptIfNecessary();
+ if (this.majorCompactionChecker != null)
this.majorCompactionChecker.interrupt();
- if (killed) {
+ if (this.killed) {
// Just skip out w/o closing regions.
} else if (abortRequested) {
if (this.fsOk) {
@@ -634,7 +634,7 @@ public class HRegionServer implements HR
}
// Interrupt catalog tracker here in case any regions being opened out in
// handlers are stuck waiting on meta or root.
- this.catalogTracker.stop();
+ if (this.catalogTracker != null) this.catalogTracker.stop();
waitOnAllRegionsToClose();
// Make sure the proxy is down.