hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r950813 - /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Wed, 02 Jun 2010 23:03:40 GMT
Author: stack
Date: Wed Jun  2 23:03:39 2010
New Revision: 950813

URL: http://svn.apache.org/viewvc?rev=950813&view=rev
Log:
HBASE-2579 Add atomic checkAndDelete support; fix broke build -- i forgot to change one of
the prepareDelete calls

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=950813&r1=950812&r2=950813&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Wed Jun  2
23:03:39 2010
@@ -1495,10 +1495,13 @@ public class HRegion implements HConstan
         //If matches put the new put or delete the new delete
         if (matches) {
           // All edits for the given row (across all column families) must happen atomically.
-          if (isPut)
+          if (isPut) {
             put(((Put)w).getFamilyMap(), writeToWAL);
-          else 
-            delete(prepareDelete((Delete)w).getFamilyMap(), writeToWAL);
+          } else {
+            Delete d = (Delete)w;
+            prepareDelete(d);
+            delete(d.getFamilyMap(), writeToWAL);
+          }
           return true;
         }
         return false;



Mime
View raw message