You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ra...@apache.org on 2012/01/23 18:52:38 UTC
svn commit: r1234921 - in /hbase/branches/0.92: CHANGES.txt
src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
Author: ramkrishna
Date: Mon Jan 23 17:52:37 2012
New Revision: 1234921
URL: http://svn.apache.org/viewvc?rev=1234921&view=rev
Log:
HBASE-5243 LogSyncerThread not getting shutdown waiting for the interrupted flag(Ram).
Modified:
hbase/branches/0.92/CHANGES.txt
hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1234921&r1=1234920&r2=1234921&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Mon Jan 23 17:52:37 2012
@@ -6,8 +6,6 @@ Release 0.92.1 - Unreleased
BUG FIXES
HBASE-5176 AssignmentManager#getRegion: logging nit adds a redundant '+' (Karthik K)
- 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)
TESTS
HBASE-5223 TestMetaReaderEditor is missing call to CatalogTracker.stop()
@@ -534,6 +532,9 @@ Release 0.92.0 - 01/23/2012
HBASE-5143 Fix config typo in pluggable load balancer factory (Harsh J)
HBASE-5196 Failure in region split after PONR could cause region hole (Jimmy Xiang)
HBASE-5204 Backward compatibility fixes for 0.92 (Benoît Sigoure)
+ 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)
TESTS
HBASE-4492 TestRollingRestart fails intermittently
Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java?rev=1234921&r1=1234920&r2=1234921&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Mon Jan 23 17:52:37 2012
@@ -879,6 +879,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) {
@@ -1040,6 +1041,8 @@ public class HLog implements Syncable {
class LogSyncer extends HasThread {
private final long optionalFlushInterval;
+
+ private boolean closeLogSyncer = false;
LogSyncer(long optionalFlushInterval) {
this.optionalFlushInterval = optionalFlushInterval;
@@ -1050,7 +1053,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);
@@ -1201,6 +1204,10 @@ public class HLog implements Syncable {
i.logRollRequested();
}
}
+
+ void close(){
+ closeLogSyncer = true;
+ }
}
protected void doWrite(HRegionInfo info, HLogKey logKey, WALEdit logEdit,