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:52:45 UTC

svn commit: r1342937 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java

Author: ramkrishna
Date: Sat May 26 17:52:44 2012
New Revision: 1342937

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

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java?rev=1342937&r1=1342936&r2=1342937&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogSplitter.java Sat May 26 17:52:44 2012
@@ -580,6 +580,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);