hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1433830 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Date Wed, 16 Jan 2013 05:45:14 GMT
Author: tedyu
Date: Wed Jan 16 05:45:13 2013
New Revision: 1433830

URL: http://svn.apache.org/viewvc?rev=1433830&view=rev
Log:
HBASE-7213 Addendum tries to fix premature LogRoller exit (Chunhui)


Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1433830&r1=1433829&r2=1433830&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Wed Jan 16 05:45:13 2013
@@ -1473,11 +1473,14 @@ public class  HRegionServer implements C
 
   protected List<WALActionsListener> getMetaWALActionListeners() {
     List<WALActionsListener> listeners = new ArrayList<WALActionsListener>();
-    // Log roller.
-    this.metaHLogRoller = new MetaLogRoller(this, this);
+    // Using a tmp log roller to ensure metaLogRoller is alive once it is not
+    // null
+    MetaLogRoller tmpLogRoller = new MetaLogRoller(this, this);
     String n = Thread.currentThread().getName();
-    Threads.setDaemonThreadRunning(this.metaHLogRoller.getThread(), 
+    Threads.setDaemonThreadRunning(tmpLogRoller.getThread(),
         n + "MetaLogRoller", uncaughtExceptionHandler);
+    this.metaHLogRoller = tmpLogRoller;
+    tmpLogRoller = null;
     listeners.add(this.metaHLogRoller);
     return listeners;
   }



Mime
View raw message