hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jg...@apache.org
Subject svn commit: r1190610 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Fri, 28 Oct 2011 21:54:30 GMT
Author: jgray
Date: Fri Oct 28 21:54:30 2011
New Revision: 1190610

URL: http://svn.apache.org/viewvc?rev=1190610&view=rev
Log:
HBASE-4687  regionserver may miss zk-heartbeats to master when replaying edits at region open
(prakash via jgray)

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1190610&r1=1190609&r2=1190610&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Fri Oct 28 21:54:30 2011
@@ -422,6 +422,8 @@ Release 0.92.0 - Unreleased
    HBASE-4680  FSUtils.isInSafeMode() checks should operate on HBase root dir,
                where we have permissions
    HBASE-4641  Block cache can be mistakenly instantiated on Master (jgray)
+   HBASE-4687  regionserver may miss zk-heartbeats to master when replaying
+               edits at region open (prakash via jgray)
 
   TESTS
    HBASE-4450  test for number of blocks read: to serve as baseline for expected

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1190610&r1=1190609&r2=1190610&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Fri Oct 28
21:54:30 2011
@@ -2431,7 +2431,8 @@ public class HRegion implements HeapSize
   private long replayRecoveredEdits(final Path edits,
       final long minSeqId, final CancelableProgressable reporter)
     throws IOException {
-    String msg = "Replaying edits from " + edits + "; minSequenceid=" + minSeqId;
+    String msg = "Replaying edits from " + edits + "; minSequenceid=" +
+      minSeqId + "; path=" + edits;
     LOG.info(msg);
     MonitoredTask status = TaskMonitor.get().createStatus(msg);
     
@@ -2445,6 +2446,7 @@ public class HRegion implements HeapSize
     long intervalEdits = 0;
     HLog.Entry entry;
     Store store = null;
+    boolean reported_once = false;
 
     try {
       // How many edits seen before we check elapsed time
@@ -2477,6 +2479,7 @@ public class HRegion implements HeapSize
                 status.abort(msg);
                 throw new IOException(msg);
               }
+              reported_once = true;
               lastReport = cur;
             }
           }
@@ -2556,14 +2559,14 @@ public class HRegion implements HeapSize
         throw ioe;
       }
     }
-    
+    if (reporter != null && !reported_once) {
+      reporter.progress();
+    }
     msg = "Applied " + editsCount + ", skipped " + skippedEdits +
     ", firstSequenceidInLog=" + firstSeqIdInLog +
-    ", maxSequenceidInLog=" + currentEditSeqId;
+    ", maxSequenceidInLog=" + currentEditSeqId + ", path=" + edits;
     status.markComplete(msg);
-    if (LOG.isDebugEnabled()) {
-      LOG.debug(msg);
-    }
+    LOG.debug(msg);
     return currentEditSeqId;
     } finally {
       reader.close();



Mime
View raw message