hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkris...@apache.org
Subject svn commit: r1234554 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
Date Sun, 22 Jan 2012 17:27:32 GMT
Author: ramkrishna
Date: Sun Jan 22 17:27:31 2012
New Revision: 1234554

URL: http://svn.apache.org/viewvc?rev=1234554&view=rev
Log:
HBASE-5243 LogSyncerThread not getting shutdown waiting for the interrupted flag(Ram)

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1234554&r1=1234553&r2=1234554&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Sun Jan 22 17:27:31 2012
@@ -39,6 +39,7 @@ Release 0.90.6 - Unreleased
    HBASE-5237  Addendum for HBASE-5160 and HBASE-4397 (Ram)
    HBASE-5235  HLogSplitter writer thread's streams not getting closed when any of the writer

                threads has exceptions. (Ram)
+   HBASE-5243  LogSyncerThread not getting shutdown waiting for the interrupted flag (Ram)
 
   IMPROVEMENT
    HBASE-5102  Change the default value of the property "hbase.connection.per.config" to
false in

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java?rev=1234554&r1=1234553&r2=1234554&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Sun
Jan 22 17:27:31 2012
@@ -874,6 +874,7 @@ public class HLog implements Syncable {
   public void close() throws IOException {
     try {
       logSyncerThread.interrupt();
+      logSyncerThread.close();
       // Make sure we synced everything
       logSyncerThread.join(this.optionalFlushInterval*2);
     } catch (InterruptedException e) {
@@ -1031,6 +1032,7 @@ public class HLog implements Syncable {
 
     private final long optionalFlushInterval;
 
+    private boolean closeLogSyncer = false;
     LogSyncer(long optionalFlushInterval) {
       this.optionalFlushInterval = optionalFlushInterval;
     }
@@ -1040,7 +1042,7 @@ public class HLog implements Syncable {
       try {
         // awaiting with a timeout doesn't always
         // throw exceptions on interrupt
-        while(!this.isInterrupted()) {
+        while(!this.isInterrupted() && !closeLogSyncer) {
 
           try {
             Thread.sleep(this.optionalFlushInterval);
@@ -1056,6 +1058,10 @@ public class HLog implements Syncable {
         LOG.info(getName() + " exiting");
       }
     }
+    
+    void close() {
+      closeLogSyncer = true;
+    }
   }
 
   @Override



Mime
View raw message