hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syuanji...@apache.org
Subject [42/43] hbase git commit: HBASE-14800 Expose checkAndMutate via Thrift2 (Josh Elser)
Date Sat, 26 Dec 2015 17:08:15 GMT
HBASE-14800 Expose checkAndMutate via Thrift2 (Josh Elser)


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

Branch: refs/heads/hbase-12439
Commit: b8e2e4a1e7c275752177baf64d6bf01e0da8228c
Parents: f53542c
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Dec 25 17:41:37 2015 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Dec 25 17:41:37 2015 -0800

----------------------------------------------------------------------
 .../hbase/thrift/generated/AlreadyExists.java   |    2 +-
 .../hbase/thrift/generated/BatchMutation.java   |    2 +-
 .../thrift/generated/ColumnDescriptor.java      |    2 +-
 .../hadoop/hbase/thrift/generated/Hbase.java    |    2 +-
 .../hadoop/hbase/thrift/generated/IOError.java  |    2 +-
 .../hbase/thrift/generated/IllegalArgument.java |    2 +-
 .../hadoop/hbase/thrift/generated/Mutation.java |    2 +-
 .../hadoop/hbase/thrift/generated/TAppend.java  |    2 +-
 .../hadoop/hbase/thrift/generated/TCell.java    |    2 +-
 .../hadoop/hbase/thrift/generated/TColumn.java  |    2 +-
 .../hbase/thrift/generated/TIncrement.java      |    2 +-
 .../hbase/thrift/generated/TRegionInfo.java     |    2 +-
 .../hbase/thrift/generated/TRowResult.java      |    2 +-
 .../hadoop/hbase/thrift/generated/TScan.java    |    2 +-
 .../thrift2/ThriftHBaseServiceHandler.java      |   15 +
 .../hadoop/hbase/thrift2/ThriftUtilities.java   |   15 +
 .../hadoop/hbase/thrift2/generated/TAppend.java |    2 +-
 .../hbase/thrift2/generated/TAuthorization.java |    2 +-
 .../thrift2/generated/TCellVisibility.java      |    2 +-
 .../hadoop/hbase/thrift2/generated/TColumn.java |    2 +-
 .../thrift2/generated/TColumnIncrement.java     |    2 +-
 .../hbase/thrift2/generated/TColumnValue.java   |    2 +-
 .../hadoop/hbase/thrift2/generated/TDelete.java |    2 +-
 .../hadoop/hbase/thrift2/generated/TGet.java    |    2 +-
 .../hbase/thrift2/generated/THBaseService.java  | 1780 +++++++++++++++++-
 .../hbase/thrift2/generated/THRegionInfo.java   |    2 +-
 .../thrift2/generated/THRegionLocation.java     |    2 +-
 .../hbase/thrift2/generated/TIOError.java       |    2 +-
 .../thrift2/generated/TIllegalArgument.java     |    2 +-
 .../hbase/thrift2/generated/TIncrement.java     |    2 +-
 .../hadoop/hbase/thrift2/generated/TPut.java    |    2 +-
 .../hadoop/hbase/thrift2/generated/TResult.java |    2 +-
 .../hbase/thrift2/generated/TRowMutations.java  |    2 +-
 .../hadoop/hbase/thrift2/generated/TScan.java   |    2 +-
 .../hbase/thrift2/generated/TServerName.java    |    2 +-
 .../hbase/thrift2/generated/TTimeRange.java     |    2 +-
 .../apache/hadoop/hbase/thrift2/hbase.thrift    |   45 +
 .../thrift2/TestThriftHBaseServiceHandler.java  |   63 +-
 38 files changed, 1947 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
index 9f11463..6db142e 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * An AlreadyExists exceptions signals that a table with the specified
  * name already exists
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class AlreadyExists extends TException implements org.apache.thrift.TBase<AlreadyExists,
AlreadyExists._Fields>, java.io.Serializable, Cloneable, Comparable<AlreadyExists>
{
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyExists");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
index d89944a..de5dbbc 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * A BatchMutation object is used to apply a number of Mutations to a single row.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, BatchMutation._Fields>,
java.io.Serializable, Cloneable, Comparable<BatchMutation> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchMutation");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
index eaedd61..b8c7b63 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
@@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory;
  * such as the number of versions, compression settings, etc. It is
  * used as input when creating a table or adding a column.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescriptor, ColumnDescriptor._Fields>,
java.io.Serializable, Cloneable, Comparable<ColumnDescriptor> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnDescriptor");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
index dfb49cc..99623af 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class Hbase {
 
   public interface Iface {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java
index 3624f6c..1cf37bb 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java
@@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory;
  * to the Hbase master or an Hbase region server.  Also used to return
  * more general Hbase error conditions.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class IOError extends TException implements org.apache.thrift.TBase<IOError, IOError._Fields>,
java.io.Serializable, Cloneable, Comparable<IOError> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IOError");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java
index 099098e..8dd58c0 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * An IllegalArgument exception indicates an illegal or invalid
  * argument was passed into a procedure.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class IllegalArgument extends TException implements org.apache.thrift.TBase<IllegalArgument,
IllegalArgument._Fields>, java.io.Serializable, Cloneable, Comparable<IllegalArgument>
{
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IllegalArgument");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java
index 5e91281..27f2560 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * A Mutation object is used to either update or delete a column-value.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fields>,
java.io.Serializable, Cloneable, Comparable<Mutation> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Mutation");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java
index 92a6e2b..fc95104 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * An Append object is used to specify the parameters for performing the append operation.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields>,
java.io.Serializable, Cloneable, Comparable<TAppend> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAppend");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java
index c63939e..eb1448b 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java
@@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
  * the timestamp of a cell to a first-class value, making it easy to take
  * note of temporal data. Cell is used all the way from HStore up to HTable.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, java.io.Serializable,
Cloneable, Comparable<TCell> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCell");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java
index 4e92dc6..2d43593 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Holds column name and the cell.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields>,
java.io.Serializable, Cloneable, Comparable<TColumn> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java
index 10ef656..10c143a 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * For increments that are not incrementColumnValue
  * equivalents.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncrement._Fields>,
java.io.Serializable, Cloneable, Comparable<TIncrement> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIncrement");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java
index 760908c..6f2d048 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * A TRegionInfo contains information about an HTable region.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegionInfo._Fields>,
java.io.Serializable, Cloneable, Comparable<TRegionInfo> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRegionInfo");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
index 842e803..9d876a7 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Holds row name and then a map of columns to cells.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResult._Fields>,
java.io.Serializable, Cloneable, Comparable<TRowResult> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowResult");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
index 1262df0..4e13005 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * A Scan object is used to specify scanner parameters when opening a scanner.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, java.io.Serializable,
Cloneable, Comparable<TScan> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java
index 1343149..9f60d61 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java
@@ -19,6 +19,7 @@
 package org.apache.hadoop.hbase.thrift2;
 
 import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.appendFromThrift;
+import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.compareOpFromThrift;
 import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.deleteFromThrift;
 import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.deletesFromThrift;
 import static org.apache.hadoop.hbase.thrift2.ThriftUtilities.getFromThrift;
@@ -55,6 +56,7 @@ import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.security.UserProvider;
 import org.apache.hadoop.hbase.thrift.ThriftMetrics;
 import org.apache.hadoop.hbase.thrift2.generated.TAppend;
+import org.apache.hadoop.hbase.thrift2.generated.TCompareOp;
 import org.apache.hadoop.hbase.thrift2.generated.TDelete;
 import org.apache.hadoop.hbase.thrift2.generated.TGet;
 import org.apache.hadoop.hbase.thrift2.generated.THBaseService;
@@ -299,6 +301,19 @@ public class ThriftHBaseServiceHandler implements THBaseService.Iface
{
     }
     return Collections.emptyList();
   }
+  
+  @Override
+  public boolean checkAndMutate(ByteBuffer table, ByteBuffer row, ByteBuffer family,
+      ByteBuffer qualifier, TCompareOp compareOp, ByteBuffer value, TRowMutations rowMutations)
+          throws TIOError, TException {
+    try (final Table htable = getTable(table)) {
+      return htable.checkAndMutate(byteBufferToByteArray(row), byteBufferToByteArray(family),
+          byteBufferToByteArray(qualifier), compareOpFromThrift(compareOp),
+          byteBufferToByteArray(value), rowMutationsFromThrift(rowMutations));
+    } catch (IOException e) {
+      throw getTIOError(e);
+    }
+  }
 
   @Override
   public boolean checkAndDelete(ByteBuffer table, ByteBuffer row, ByteBuffer family,

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/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 8811e6d..d5cf287 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
@@ -43,6 +43,7 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.RowMutations;
 import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
 import org.apache.hadoop.hbase.filter.ParseFilter;
 import org.apache.hadoop.hbase.security.visibility.Authorizations;
 import org.apache.hadoop.hbase.security.visibility.CellVisibility;
@@ -50,6 +51,7 @@ import org.apache.hadoop.hbase.thrift2.generated.TAppend;
 import org.apache.hadoop.hbase.thrift2.generated.TColumn;
 import org.apache.hadoop.hbase.thrift2.generated.TColumnIncrement;
 import org.apache.hadoop.hbase.thrift2.generated.TColumnValue;
+import org.apache.hadoop.hbase.thrift2.generated.TCompareOp;
 import org.apache.hadoop.hbase.thrift2.generated.TDelete;
 import org.apache.hadoop.hbase.thrift2.generated.TDeleteType;
 import org.apache.hadoop.hbase.thrift2.generated.TDurability;
@@ -530,4 +532,17 @@ public class ThriftUtilities {
       default: return null;
     }
   }
+
+  public static CompareOp compareOpFromThrift(TCompareOp tCompareOp) {
+    switch (tCompareOp.getValue()) {
+      case 0: return CompareOp.LESS;
+      case 1: return CompareOp.LESS_OR_EQUAL;
+      case 2: return CompareOp.EQUAL;
+      case 3: return CompareOp.NOT_EQUAL;
+      case 4: return CompareOp.GREATER_OR_EQUAL;
+      case 5: return CompareOp.GREATER;
+      case 6: return CompareOp.NO_OP;
+      default: return null;
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java
index ad631ce..17ad5d5 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TAppend implements org.apache.thrift.TBase<TAppend, TAppend._Fields>,
java.io.Serializable, Cloneable, Comparable<TAppend> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAppend");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java
index d448cdd..a315ab5 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TAuthorization implements org.apache.thrift.TBase<TAuthorization, TAuthorization._Fields>,
java.io.Serializable, Cloneable, Comparable<TAuthorization> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthorization");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java
index 3ad4f6a..60362bb 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TCellVisibility implements org.apache.thrift.TBase<TCellVisibility, TCellVisibility._Fields>,
java.io.Serializable, Cloneable, Comparable<TCellVisibility> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCellVisibility");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java
index 0fe7791..f1d95e5 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java
@@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory;
  * in a HBase table by column family and optionally
  * a column qualifier and timestamp
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TColumn implements org.apache.thrift.TBase<TColumn, TColumn._Fields>,
java.io.Serializable, Cloneable, Comparable<TColumn> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
index 9bdbf97..8ce3af6 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Represents a single cell and the amount to increment it by
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TColumnIncrement implements org.apache.thrift.TBase<TColumnIncrement, TColumnIncrement._Fields>,
java.io.Serializable, Cloneable, Comparable<TColumnIncrement> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnIncrement");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
index e5cbe56..3ac829d 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Represents a single cell and its value.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TColumnValue implements org.apache.thrift.TBase<TColumnValue, TColumnValue._Fields>,
java.io.Serializable, Cloneable, Comparable<TColumnValue> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnValue");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
index 5a42d8a..a0efa8e 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
  * by changing the durability. If you don't provide durability, it defaults to
  * column family's default setting for durability.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields>,
java.io.Serializable, Cloneable, Comparable<TDelete> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDelete");
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b8e2e4a1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
index 9fa157c..95c1bce 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java
@@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
  * If you specify a time range and a timestamp the range is ignored.
  * Timestamps on TColumns are ignored.
  */
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-11-17")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-13")
 public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.io.Serializable,
Cloneable, Comparable<TGet> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGet");
 


Mime
View raw message