hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From larsgeo...@apache.org
Subject svn commit: r1501430 - in /hbase/trunk/hbase-server/src: main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java
Date Tue, 09 Jul 2013 18:25:11 GMT
Author: larsgeorge
Date: Tue Jul  9 18:25:11 2013
New Revision: 1501430

URL: http://svn.apache.org/r1501430
Log:
HBASE-8678 Wrongly delete cells in some case which can not be deleted (Jean-Marc Spaggiari)

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java?rev=1501430&r1=1501429&r2=1501430&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
Tue Jul  9 18:25:11 2013
@@ -92,9 +92,7 @@ public class RemoteHTable implements HTa
     Set families = familyMap.entrySet();
     if (families != null) {
       Iterator i = familyMap.entrySet().iterator();
-      if (i.hasNext()) {
-        sb.append('/');
-      }
+      sb.append('/');
       while (i.hasNext()) {
         Map.Entry e = (Map.Entry)i.next();
         Collection quals = (Collection)e.getValue();

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java?rev=1501430&r1=1501429&r2=1501430&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/rest/client/TestRemoteTable.java
Tue Jul  9 18:25:11 2013
@@ -298,6 +298,7 @@ public class TestRemoteTable {
     assertTrue(Bytes.equals(VALUE_2, value));
   }
 
+  @Test
   public void testDelete() throws IOException {
     Put put = new Put(ROW_3);
     put.add(COLUMN_1, QUALIFIER_1, VALUE_1);
@@ -330,6 +331,7 @@ public class TestRemoteTable {
     assertNull(value2);
 
     delete = new Delete(ROW_3);
+    delete.setTimestamp(1L);
     remoteTable.delete(delete);
 
     get = new Get(ROW_3);
@@ -338,8 +340,21 @@ public class TestRemoteTable {
     result = remoteTable.get(get);
     value1 = result.getValue(COLUMN_1, QUALIFIER_1);
     value2 = result.getValue(COLUMN_2, QUALIFIER_2);
-    assertNull(value1);
+    assertNotNull(value1);
+    assertTrue(Bytes.equals(VALUE_1, value1));
     assertNull(value2);
+    
+    delete = new Delete(ROW_3);
+    remoteTable.delete(delete);
+
+    get = new Get(ROW_3);
+    get.addFamily(COLUMN_1);
+    get.addFamily(COLUMN_2);
+    result = remoteTable.get(get);
+    value1 = result.getValue(COLUMN_1, QUALIFIER_1);
+    value2 = result.getValue(COLUMN_2, QUALIFIER_2);
+    assertNull(value1);
+    assertNull(value2);            
   }
 
   public void testScanner() throws IOException {



Mime
View raw message