You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2010/05/25 22:50:05 UTC

svn commit: r948203 - /hbase/trunk/bin/check_meta.rb

Author: stack
Date: Tue May 25 20:50:04 2010
New Revision: 948203

URL: http://svn.apache.org/viewvc?rev=948203&view=rev
Log:
HBASE-7 Provide a HBase checker and repair tool similar to fsck; add handling of disable parents

Modified:
    hbase/trunk/bin/check_meta.rb

Modified: hbase/trunk/bin/check_meta.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/bin/check_meta.rb?rev=948203&r1=948202&r2=948203&view=diff
==============================================================================
--- hbase/trunk/bin/check_meta.rb (original)
+++ hbase/trunk/bin/check_meta.rb Tue May 25 20:50:04 2010
@@ -134,15 +134,19 @@ while (result = scanner.next())
   bytes = result.getValue(HConstants::CATALOG_FAMILY, HConstants::REGIONINFO_QUALIFIER)
   hri = Writables.getHRegionInfo(bytes)
   if oldHRI
-    unless Bytes.equals(oldHRI.getEndKey(), hri.getStartKey())
-      LOG.warn("hole after " + hri.toString())
+    if oldHRI.isOffline() && Bytes.equals(oldHRI.getStartKey(), hri.getStartKey())
+      # Presume offlined parent
+    elsif Bytes.equals(oldHRI.getEndKey(), hri.getStartKey())
+      # Start key of next matches end key of previous
+    else
+      LOG.warn("hole after " + oldHRI.toString())
       if fixup
         bad = 1 unless fixup(oldHRI, hri, metatable, fs, rootdir)
       else
         bad = 1
       end
     end
-  end
+  end 
   oldHRI = hri
 end
 scanner.close()