hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r926356 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/Store.java
Date Mon, 22 Mar 2010 21:39:12 GMT
Author: stack
Date: Mon Mar 22 21:39:12 2010
New Revision: 926356

URL: http://svn.apache.org/viewvc?rev=926356&view=rev
Log:
HBASE-2358 Store doReconstructionLog will fail if oldlogfile.log is empty and won't load region

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/Store.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=926356&r1=926355&r2=926356&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Mon Mar 22 21:39:12 2010
@@ -52,6 +52,8 @@ Release 0.20.4 - Unreleased
                have HADOOP-6151 patch (Kannan Muthukkaruppan via Stack)
    HBASE-2355  Unsynchronized logWriters map is mutated from several threads in
                HLog splitting (Todd Lipcon via Andrew Purtell)
+   HBASE-2358  Store doReconstructionLog will fail if oldlogfile.log is
+               empty and won't load region (Cosmin Lehene via Stack)
 
   IMPROVEMENTS
    HBASE-2180  Bad read performance from synchronizing hfile.fddatainputstream

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=926356&r1=926355&r2=926356&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/regionserver/Store.java Mon
Mar 22 21:39:12 2010
@@ -302,13 +302,14 @@ public class Store implements HConstants
       // Nothing to do.
       return -1;
     }
-    // Check its not empty.
-    FileStatus [] stats = this.fs.listStatus(reconstructionLog);
-    if (stats == null || stats.length == 0) {
+    FileStatus stat = this.fs.getFileStatus(reconstructionLog);
+    if (stat.getLen() <= 0) {
       LOG.warn("Passed reconstruction log " + reconstructionLog +
-        " is zero-length");
+        " is zero-length. Deleting existing file");
+       fs.delete(reconstructionLog, false);
       return -1;
     }
+
     // TODO: This could grow large and blow heap out.  Need to get it into
     // general memory usage accounting.
     long maxSeqIdInLog = -1;



Mime
View raw message