hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r569589 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/java/org/apache/hadoop/hbase/HMaster.java src/java/org/apache/hadoop/hbase/HStore.java src/java/org/apache/hadoop/hbase/HStoreFile.java
Date Sat, 25 Aug 2007 00:42:45 GMT
Author: stack
Date: Fri Aug 24 17:42:45 2007
New Revision: 569589

URL: http://svn.apache.org/viewvc?rev=569589&view=rev
Log:
HADOOP-1780 Regions are still being doubly assigned

M src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
    Fix outputing fail message on each compaction though there was none.
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
    (rename): Refactor so return only happens on end..
M  src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    (assignRegions): Make synchronized.  In presence of concurrent visits
    by regionservers, both visiting threads could grab same set of regions
    for assignment.


Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=569589&r1=569588&r2=569589&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Fri Aug 24 17:42:45 2007
@@ -20,6 +20,7 @@
     HADOOP-1747 On a cluster, on restart, regions multiply assigned
     HADOOP-1776 Fix for sporadic compaction failures closing and moving
     compaction result
+    HADOOP-1780 Regions are still being doubly assigned
 
   IMPROVEMENTS
     HADOOP-1737 Make HColumnDescriptor data publically members settable

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java?rev=569589&r1=569588&r2=569589&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java Fri
Aug 24 17:42:45 2007
@@ -1468,7 +1468,7 @@
    * @param serverName
    * @param returnMsgs
    */
-  private void assignRegions(HServerInfo info, String serverName,
+  private synchronized void assignRegions(HServerInfo info, String serverName,
       ArrayList<HMsg> returnMsgs) {
     
     TreeSet<Text> regionsToAssign = getRegionsToAssign();

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java?rev=569589&r1=569588&r2=569589&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStore.java Fri
Aug 24 17:42:45 2007
@@ -923,7 +923,7 @@
       if (!fs.exists(doneFile)) {
         // The last execution didn't finish the compaction, so there's nothing 
         // we can do.  We'll just have to redo it. Abandon it and return.
-        LOG.warn("Redoing a failed compaction");
+        LOG.warn("Redo failed compaction (missing 'done' file)");
         return;
       }
 
@@ -986,10 +986,11 @@
         this.readers.put(orderVal,
             finalCompactedFile.getReader(this.fs, this.bloomFilter));
         this.storefiles.put(orderVal, finalCompactedFile);
-      } finally {
-        LOG.warn("Failed replacing compacted files.  Compacted fle is " +
+      } catch (IOException e) {
+        LOG.error("Failed replacing compacted files. Compacted file is " +
           finalCompactedFile.toString() + ".  Files replaced are " +
-          toCompactFiles.toString() + " some of which may have been removed");
+          toCompactFiles.toString() +
+          " some of which may have been already removed", e);
       }
     } finally {
       // 7. Releasing the write-lock

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java?rev=569589&r1=569588&r2=569589&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HStoreFile.java
Fri Aug 24 17:42:45 2007
@@ -644,15 +644,15 @@
     boolean success = fs.rename(src, hsf.getMapFilePath());
     if (!success) {
       LOG.warn("Failed rename of " + src + " to " + hsf.getMapFilePath());
-      return success;
-    }
-    src = getInfoFilePath();
-    if (!fs.exists(src)) {
-      throw new FileNotFoundException(src.toString());
-    }
-    success = fs.rename(src, hsf.getInfoFilePath());
-    if (!success) {
-      LOG.warn("Failed rename of " + src + " to " + hsf.getInfoFilePath());
+    } else {
+      src = getInfoFilePath();
+      if (!fs.exists(src)) {
+        throw new FileNotFoundException(src.toString());
+      }
+      success = fs.rename(src, hsf.getInfoFilePath());
+      if (!success) {
+        LOG.warn("Failed rename of " + src + " to " + hsf.getInfoFilePath());
+      }
     }
     return success;
   }



Mime
View raw message