hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1450901 - in /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver: ReplicationHLogReaderManager.java ReplicationSource.java
Date Wed, 27 Feb 2013 18:29:02 GMT
Author: tedyu
Date: Wed Feb 27 18:29:01 2013
New Revision: 1450901

URL: http://svn.apache.org/r1450901
Log:
HBASE-7944 Replication leaks file reader resource & not reset currentNbOperations (Jeffrey
Zhong)


Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationHLogReaderManager.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationHLogReaderManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationHLogReaderManager.java?rev=1450901&r1=1450900&r2=1450901&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationHLogReaderManager.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationHLogReaderManager.java
Wed Feb 27 18:29:01 2013
@@ -123,15 +123,20 @@ public class ReplicationHLogReaderManage
   public void closeReader() throws IOException {
     if (this.reader != null) {
       this.reader.close();
+      this.reader = null;
     }
   }
 
   /**
    * Tell the helper to reset internal state
    */
-  public void finishCurrentFile() {
+  void finishCurrentFile() {
     this.position = 0;
-    this.reader = null;
+    try {
+      this.closeReader();
+    } catch (IOException e) {
+      LOG.warn("Unable to close reader", e);
+    }
   }
 
 }

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java?rev=1450901&r1=1450900&r2=1450901&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
Wed Feb 27 18:29:01 2013
@@ -327,6 +327,7 @@ public class ReplicationSource extends T
       }
 
       boolean gotIOE = false;
+      currentNbOperations = 0;
       currentNbEntries = 0;
       currentSize = 0;
       try {



Mime
View raw message