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/05/26 19:33:33 UTC

svn commit: r1342935 - /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java

Author: ramkrishna
Date: Sat May 26 17:33:32 2012
New Revision: 1342935

URL: http://svn.apache.org/viewvc?rev=1342935&view=rev
Log:
HBASE-6050 HLogSplitter renaming recovered.edits and CJ removing the parent directory races, making the HBCK to think cluster is inconsistent. and a small addendum for HBASE-6002 (Ram)

Modified:
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java?rev=1342935&r1=1342934&r2=1342935&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java Sat May 26 17:33:32 2012
@@ -469,6 +469,7 @@ public class HLogSplitter {
           }
           n++;
           WriterAndPath wap = (WriterAndPath) o;
+          wap.writerClosed = true;
           wap.w.close();
           LOG.debug("Closed " + wap.p);
           Path dst = getCompletedRecoveredEditsFilePath(wap.p);
@@ -567,6 +568,13 @@ public class HLogSplitter {
         if (fs.exists(dst)) {
           fs.delete(dst, false);
         } else {
+          Path regionDir = dst.getParent().getParent();
+          if (!fs.exists(regionDir)) {
+            // See HBASE-6050.
+            LOG.warn("Could not move recovered edits from " + src
+                + " to destination " + regionDir + " as it doesn't exist.");
+            continue;
+          }
           Path dstdir = dst.getParent();
           if (!fs.exists(dstdir)) {
             if (!fs.mkdirs(dstdir)) LOG.warn("mkdir failed on " + dstdir);