You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2017/07/26 23:39:18 UTC

[1/3] hbase git commit: HBASE-18402 Thrift2 should support DeleteFamilyVersion - revert due to missing JIRA number

Repository: hbase
Updated Branches:
  refs/heads/branch-2 164df6bdd -> 10573c6c9


HBASE-18402 Thrift2 should support DeleteFamilyVersion - revert due to missing JIRA number


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b7045d4f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b7045d4f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b7045d4f

Branch: refs/heads/branch-2
Commit: b7045d4fcfc89551dd6a02de65747fbe440f8107
Parents: 164df6b
Author: tedyu <yu...@gmail.com>
Authored: Tue Jul 25 17:38:54 2017 -0700
Committer: Sean Busbey <bu...@apache.org>
Committed: Wed Jul 26 15:49:16 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/thrift2/ThriftUtilities.java   | 47 ++++------
 .../hbase/thrift2/generated/TDeleteType.java    |  8 +-
 .../apache/hadoop/hbase/thrift2/hbase.thrift    |  4 +-
 .../thrift2/TestThriftHBaseServiceHandler.java  | 91 +-------------------
 4 files changed, 21 insertions(+), 129 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b7045d4f/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
index f318f8e..3807bec 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
@@ -268,40 +268,27 @@ public class ThriftUtilities {
     if (in.isSetColumns()) {
       out = new Delete(in.getRow());
       for (TColumn column : in.getColumns()) {
-        if (in.isSetDeleteType()) {
-          switch (in.getDeleteType()) {
-          case DELETE_COLUMN:
-            if (column.isSetTimestamp()) {
-              out.addColumn(column.getFamily(), column.getQualifier(), column.getTimestamp());
-            } else {
-              out.addColumn(column.getFamily(), column.getQualifier());
-            }
-            break;
-          case DELETE_COLUMNS:
-            if (column.isSetTimestamp()) {
+        if (column.isSetQualifier()) {
+          if (column.isSetTimestamp()) {
+            if (in.isSetDeleteType() &&
+                in.getDeleteType().equals(TDeleteType.DELETE_COLUMNS))
               out.addColumns(column.getFamily(), column.getQualifier(), column.getTimestamp());
-            } else {
+            else
+              out.addColumn(column.getFamily(), column.getQualifier(), column.getTimestamp());
+          } else {
+            if (in.isSetDeleteType() &&
+                in.getDeleteType().equals(TDeleteType.DELETE_COLUMNS))
               out.addColumns(column.getFamily(), column.getQualifier());
-            }
-            break;
-          case DELETE_FAMILY:
-            if (column.isSetTimestamp()) {
-              out.addFamily(column.getFamily(), column.getTimestamp());
-            } else {
-              out.addFamily(column.getFamily());
-            }
-            break;
-          case DELETE_FAMILY_VERSION:
-            if (column.isSetTimestamp()) {
-              out.addFamilyVersion(column.getFamily(), column.getTimestamp());
-            } else {
-              throw new IllegalArgumentException(
-                  "Timestamp is required for TDelete with DeleteFamilyVersion type");
-            }
-            break;
+            else
+              out.addColumn(column.getFamily(), column.getQualifier());
           }
+
         } else {
-          throw new IllegalArgumentException("DeleteType is required for TDelete");
+          if (column.isSetTimestamp()) {
+            out.addFamily(column.getFamily(), column.getTimestamp());
+          } else {
+            out.addFamily(column.getFamily());
+          }
         }
       }
     } else {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b7045d4f/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
index 8c9aa39..5d47508 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
@@ -18,9 +18,7 @@ import org.apache.thrift.TEnum;
  */
 public enum TDeleteType implements org.apache.thrift.TEnum {
   DELETE_COLUMN(0),
-  DELETE_COLUMNS(1),
-  DELETE_FAMILY(2),
-  DELETE_FAMILY_VERSION(3);
+  DELETE_COLUMNS(1);
 
   private final int value;
 
@@ -45,10 +43,6 @@ public enum TDeleteType implements org.apache.thrift.TEnum {
         return DELETE_COLUMN;
       case 1:
         return DELETE_COLUMNS;
-      case 2:
-        return DELETE_FAMILY;
-      case 3:
-        return DELETE_FAMILY_VERSION;
       default:
         return null;
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b7045d4f/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
index 8c5ef59..e2e5b29 100644
--- a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
+++ b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
@@ -75,9 +75,7 @@ struct TResult {
  */
 enum TDeleteType {
   DELETE_COLUMN = 0,
-  DELETE_COLUMNS = 1,
-  DELETE_FAMILY = 2,
-  DELETE_FAMILY_VERSION = 3
+  DELETE_COLUMNS = 1
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/b7045d4f/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
index 7a35d29..3f5c388 100644
--- a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
+++ b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
@@ -31,11 +31,8 @@ import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Admin;
-import org.apache.hadoop.hbase.client.Connection;
-import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.Put;
-import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.Increment;
 import org.apache.hadoop.hbase.client.Delete;
@@ -78,8 +75,10 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.Rule;
 import org.junit.rules.TestName;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
@@ -442,92 +441,6 @@ public class TestThriftHBaseServiceHandler {
   }
 
   @Test
-  public void testDeleteFamily() throws Exception {
-    ThriftHBaseServiceHandler handler = createHandler();
-    byte[] rowName = "testDeleteFamily".getBytes();
-    ByteBuffer table = wrap(tableAname);
-
-    long timestamp1 = System.currentTimeMillis() - 10;
-    long timestamp2 = System.currentTimeMillis();
-
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>();
-    TColumnValue columnValueA =
-        new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname));
-    columnValueA.setTimestamp(timestamp1);
-    columnValues.add(columnValueA);
-    TPut put = new TPut(wrap(rowName), columnValues);
-
-    put.setColumnValues(columnValues);
-
-    handler.put(table, put);
-    columnValueA.setTimestamp(timestamp2);
-    handler.put(table, put);
-
-    TGet get = new TGet(wrap(rowName));
-    get.setMaxVersions(2);
-    TResult result = handler.get(table, get);
-    assertEquals(2, result.getColumnValuesSize());
-
-    TDelete delete = new TDelete(wrap(rowName));
-    List<TColumn> deleteColumns = new ArrayList<TColumn>();
-    TColumn deleteColumn = new TColumn(wrap(familyAname));
-    deleteColumns.add(deleteColumn);
-    delete.setColumns(deleteColumns);
-    delete.setDeleteType(TDeleteType.DELETE_FAMILY);
-
-    handler.deleteSingle(table, delete);
-
-    get = new TGet(wrap(rowName));
-    result = handler.get(table, get);
-    assertArrayEquals(null, result.getRow());
-    assertEquals(0, result.getColumnValuesSize());
-  }
-
-  @Test
-  public void testDeleteFamilyVersion() throws Exception {
-    ThriftHBaseServiceHandler handler = createHandler();
-    byte[] rowName = "testDeleteFamilyVersion".getBytes();
-    ByteBuffer table = wrap(tableAname);
-
-    long timestamp1 = System.currentTimeMillis() - 10;
-    long timestamp2 = System.currentTimeMillis();
-
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>();
-    TColumnValue columnValueA =
-        new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname));
-    columnValueA.setTimestamp(timestamp1);
-    columnValues.add(columnValueA);
-    TPut put = new TPut(wrap(rowName), columnValues);
-
-    put.setColumnValues(columnValues);
-
-    handler.put(table, put);
-    columnValueA.setTimestamp(timestamp2);
-    handler.put(table, put);
-
-    TGet get = new TGet(wrap(rowName));
-    get.setMaxVersions(2);
-    TResult result = handler.get(table, get);
-    assertEquals(2, result.getColumnValuesSize());
-
-    TDelete delete = new TDelete(wrap(rowName));
-    List<TColumn> deleteColumns = new ArrayList<TColumn>();
-    TColumn deleteColumn = new TColumn(wrap(familyAname));
-    deleteColumn.setTimestamp(timestamp1);
-    deleteColumns.add(deleteColumn);
-    delete.setColumns(deleteColumns);
-    delete.setDeleteType(TDeleteType.DELETE_FAMILY_VERSION);
-
-    handler.deleteSingle(table, delete);
-
-    get = new TGet(wrap(rowName));
-    result = handler.get(table, get);
-    assertArrayEquals(rowName, result.getRow());
-    assertEquals(1, result.getColumnValuesSize());
-    assertEquals(timestamp2, result.getColumnValues().get(0).getTimestamp());
-  }
-
-  @Test
   public void testIncrement() throws Exception {
     ThriftHBaseServiceHandler handler = createHandler();
     byte[] rowName = "testIncrement".getBytes();


[3/3] hbase git commit: HBASE-18445 exclude guava from hadoop-auth

Posted by bu...@apache.org.
HBASE-18445 exclude guava from hadoop-auth

Signed-off-by: Sean Busbey <bu...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/10573c6c
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/10573c6c
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/10573c6c

Branch: refs/heads/branch-2
Commit: 10573c6c99c6df77117da3dc9539d90b2678b7c3
Parents: 311ca34
Author: Mike Drob <md...@apache.org>
Authored: Mon Jul 24 20:25:08 2017 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Wed Jul 26 15:49:17 2017 -0700

----------------------------------------------------------------------
 pom.xml | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/10573c6c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f917374..6e05ac6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2567,6 +2567,12 @@
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-auth</artifactId>
            <version>${hadoop-three.version}</version>
+           <exclusions>
+             <exclusion>
+               <groupId>com.google.guava</groupId>
+               <artifactId>guava</artifactId>
+             </exclusion>
+           </exclusions>
          </dependency>
          <dependency>
            <groupId>org.apache.hadoop</groupId>


[2/3] hbase git commit: HBASE-18402 Thrift2 should support DeleteFamilyVersion type

Posted by bu...@apache.org.
HBASE-18402 Thrift2 should support DeleteFamilyVersion type

Signed-off-by: tedyu <yu...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/311ca34a
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/311ca34a
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/311ca34a

Branch: refs/heads/branch-2
Commit: 311ca34aec53147f1d62b70679321573830614e1
Parents: b7045d4
Author: huzheng <op...@gmail.com>
Authored: Wed Jul 19 18:00:11 2017 +0800
Committer: Sean Busbey <bu...@apache.org>
Committed: Wed Jul 26 15:49:17 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/thrift2/ThriftUtilities.java   | 47 ++++++----
 .../hbase/thrift2/generated/TDeleteType.java    |  8 +-
 .../apache/hadoop/hbase/thrift2/hbase.thrift    |  4 +-
 .../thrift2/TestThriftHBaseServiceHandler.java  | 91 +++++++++++++++++++-
 4 files changed, 129 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/311ca34a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
index 3807bec..f318f8e 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java
@@ -268,27 +268,40 @@ public class ThriftUtilities {
     if (in.isSetColumns()) {
       out = new Delete(in.getRow());
       for (TColumn column : in.getColumns()) {
-        if (column.isSetQualifier()) {
-          if (column.isSetTimestamp()) {
-            if (in.isSetDeleteType() &&
-                in.getDeleteType().equals(TDeleteType.DELETE_COLUMNS))
-              out.addColumns(column.getFamily(), column.getQualifier(), column.getTimestamp());
-            else
+        if (in.isSetDeleteType()) {
+          switch (in.getDeleteType()) {
+          case DELETE_COLUMN:
+            if (column.isSetTimestamp()) {
               out.addColumn(column.getFamily(), column.getQualifier(), column.getTimestamp());
-          } else {
-            if (in.isSetDeleteType() &&
-                in.getDeleteType().equals(TDeleteType.DELETE_COLUMNS))
-              out.addColumns(column.getFamily(), column.getQualifier());
-            else
+            } else {
               out.addColumn(column.getFamily(), column.getQualifier());
+            }
+            break;
+          case DELETE_COLUMNS:
+            if (column.isSetTimestamp()) {
+              out.addColumns(column.getFamily(), column.getQualifier(), column.getTimestamp());
+            } else {
+              out.addColumns(column.getFamily(), column.getQualifier());
+            }
+            break;
+          case DELETE_FAMILY:
+            if (column.isSetTimestamp()) {
+              out.addFamily(column.getFamily(), column.getTimestamp());
+            } else {
+              out.addFamily(column.getFamily());
+            }
+            break;
+          case DELETE_FAMILY_VERSION:
+            if (column.isSetTimestamp()) {
+              out.addFamilyVersion(column.getFamily(), column.getTimestamp());
+            } else {
+              throw new IllegalArgumentException(
+                  "Timestamp is required for TDelete with DeleteFamilyVersion type");
+            }
+            break;
           }
-
         } else {
-          if (column.isSetTimestamp()) {
-            out.addFamily(column.getFamily(), column.getTimestamp());
-          } else {
-            out.addFamily(column.getFamily());
-          }
+          throw new IllegalArgumentException("DeleteType is required for TDelete");
         }
       }
     } else {

http://git-wip-us.apache.org/repos/asf/hbase/blob/311ca34a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
index 5d47508..8c9aa39 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java
@@ -18,7 +18,9 @@ import org.apache.thrift.TEnum;
  */
 public enum TDeleteType implements org.apache.thrift.TEnum {
   DELETE_COLUMN(0),
-  DELETE_COLUMNS(1);
+  DELETE_COLUMNS(1),
+  DELETE_FAMILY(2),
+  DELETE_FAMILY_VERSION(3);
 
   private final int value;
 
@@ -43,6 +45,10 @@ public enum TDeleteType implements org.apache.thrift.TEnum {
         return DELETE_COLUMN;
       case 1:
         return DELETE_COLUMNS;
+      case 2:
+        return DELETE_FAMILY;
+      case 3:
+        return DELETE_FAMILY_VERSION;
       default:
         return null;
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/311ca34a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
index e2e5b29..8c5ef59 100644
--- a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
+++ b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
@@ -75,7 +75,9 @@ struct TResult {
  */
 enum TDeleteType {
   DELETE_COLUMN = 0,
-  DELETE_COLUMNS = 1
+  DELETE_COLUMNS = 1,
+  DELETE_FAMILY = 2,
+  DELETE_FAMILY_VERSION = 3
 }
 
 /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/311ca34a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
index 3f5c388..7a35d29 100644
--- a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
+++ b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
@@ -31,8 +31,11 @@ import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.Increment;
 import org.apache.hadoop.hbase.client.Delete;
@@ -75,10 +78,8 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
-import org.junit.Rule;
 import org.junit.rules.TestName;
 import org.junit.experimental.categories.Category;
-import org.junit.rules.TestName;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
@@ -441,6 +442,92 @@ public class TestThriftHBaseServiceHandler {
   }
 
   @Test
+  public void testDeleteFamily() throws Exception {
+    ThriftHBaseServiceHandler handler = createHandler();
+    byte[] rowName = "testDeleteFamily".getBytes();
+    ByteBuffer table = wrap(tableAname);
+
+    long timestamp1 = System.currentTimeMillis() - 10;
+    long timestamp2 = System.currentTimeMillis();
+
+    List<TColumnValue> columnValues = new ArrayList<TColumnValue>();
+    TColumnValue columnValueA =
+        new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname));
+    columnValueA.setTimestamp(timestamp1);
+    columnValues.add(columnValueA);
+    TPut put = new TPut(wrap(rowName), columnValues);
+
+    put.setColumnValues(columnValues);
+
+    handler.put(table, put);
+    columnValueA.setTimestamp(timestamp2);
+    handler.put(table, put);
+
+    TGet get = new TGet(wrap(rowName));
+    get.setMaxVersions(2);
+    TResult result = handler.get(table, get);
+    assertEquals(2, result.getColumnValuesSize());
+
+    TDelete delete = new TDelete(wrap(rowName));
+    List<TColumn> deleteColumns = new ArrayList<TColumn>();
+    TColumn deleteColumn = new TColumn(wrap(familyAname));
+    deleteColumns.add(deleteColumn);
+    delete.setColumns(deleteColumns);
+    delete.setDeleteType(TDeleteType.DELETE_FAMILY);
+
+    handler.deleteSingle(table, delete);
+
+    get = new TGet(wrap(rowName));
+    result = handler.get(table, get);
+    assertArrayEquals(null, result.getRow());
+    assertEquals(0, result.getColumnValuesSize());
+  }
+
+  @Test
+  public void testDeleteFamilyVersion() throws Exception {
+    ThriftHBaseServiceHandler handler = createHandler();
+    byte[] rowName = "testDeleteFamilyVersion".getBytes();
+    ByteBuffer table = wrap(tableAname);
+
+    long timestamp1 = System.currentTimeMillis() - 10;
+    long timestamp2 = System.currentTimeMillis();
+
+    List<TColumnValue> columnValues = new ArrayList<TColumnValue>();
+    TColumnValue columnValueA =
+        new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname));
+    columnValueA.setTimestamp(timestamp1);
+    columnValues.add(columnValueA);
+    TPut put = new TPut(wrap(rowName), columnValues);
+
+    put.setColumnValues(columnValues);
+
+    handler.put(table, put);
+    columnValueA.setTimestamp(timestamp2);
+    handler.put(table, put);
+
+    TGet get = new TGet(wrap(rowName));
+    get.setMaxVersions(2);
+    TResult result = handler.get(table, get);
+    assertEquals(2, result.getColumnValuesSize());
+
+    TDelete delete = new TDelete(wrap(rowName));
+    List<TColumn> deleteColumns = new ArrayList<TColumn>();
+    TColumn deleteColumn = new TColumn(wrap(familyAname));
+    deleteColumn.setTimestamp(timestamp1);
+    deleteColumns.add(deleteColumn);
+    delete.setColumns(deleteColumns);
+    delete.setDeleteType(TDeleteType.DELETE_FAMILY_VERSION);
+
+    handler.deleteSingle(table, delete);
+
+    get = new TGet(wrap(rowName));
+    result = handler.get(table, get);
+    assertArrayEquals(rowName, result.getRow());
+    assertEquals(1, result.getColumnValuesSize());
+    assertEquals(timestamp2, result.getColumnValues().get(0).getTimestamp());
+  }
+
+  @Test
   public void testIncrement() throws Exception {
     ThriftHBaseServiceHandler handler = createHandler();
     byte[] rowName = "testIncrement".getBytes();