hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbau...@apache.org
Subject svn commit: r1383697 [1/3] - in /hbase/branches/0.89-fb: ./ src/main/java/org/apache/hadoop/hbase/thrift/ src/main/java/org/apache/hadoop/hbase/thrift/generated/ src/main/resources/org/apache/hadoop/hbase/thrift/ src/test/java/org/apache/hadoop/hbase/t...
Date Wed, 12 Sep 2012 00:34:09 GMT
Author: mbautin
Date: Wed Sep 12 00:34:08 2012
New Revision: 1383697

URL: http://svn.apache.org/viewvc?rev=1383697&view=rev
Log:
[jira] [HBASE-6764] [89-fb] Organize Thrift API methods, make more consistent across repositories

Author: mbautin

Summary: Sorting all Thrift method definitions in Hbase.thrift alphabetically to make diffing
easier. We have a very different copy of hbase.thrift in fbcode, and this a step towards reconciling
the two. Also adding the attributes argument, which currently does nothing.

Test Plan: Unit tests

Reviewers: kranganathan, aaiyer

Reviewed By: kranganathan

CC: hbase-eng@, davejwatson

Differential Revision: https://phabricator.fb.com/D571612

Added:
    hbase/branches/0.89-fb/src/main/resources/org/apache/hadoop/hbase/thrift/sort_hbase_thrift_functions.py
Modified:
    hbase/branches/0.89-fb/gen_thrift_code.sh
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java.new
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
    hbase/branches/0.89-fb/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
    hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/thrift/TestMutationWriteToWAL.java
    hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftMutationAPI.java
    hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java
    hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServerLegacy.java

Modified: hbase/branches/0.89-fb/gen_thrift_code.sh
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/gen_thrift_code.sh?rev=1383697&r1=1383696&r2=1383697&view=diff
==============================================================================
--- hbase/branches/0.89-fb/gen_thrift_code.sh (original)
+++ hbase/branches/0.89-fb/gen_thrift_code.sh Wed Sep 12 00:34:08 2012
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-set -e -u -o pipefail
+set -e -u -o pipefail -x
 
 if [ ! -f pom.xml ]; then
   echo "Have to run from HBase directory" >&2
@@ -11,7 +11,10 @@ THRIFT=thrift
 
 IF=src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
 
+set +e
 THRIFT_VERSION=`$THRIFT -version`
+set -e
+
 EXPECTED_THRIFT_VERSION="Thrift version 0.8.0"
 if [ "$THRIFT_VERSION" != "$EXPECTED_THRIFT_VERSION" ]; then
   echo "Expected $EXPECTED_THRIFT_VERSION, got $THRIFT_VERSION" >&2
@@ -28,7 +31,7 @@ awk '{ sub(/extends Exception/, "extends
   >$F.new
 set +e
 diff $F $F.new
-if [ $# -eq 0 ]; then
+if [ $? -eq 0 ]; then
   echo "Failed to replace 'extends Exception'" >&2
   exit 1
 fi

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java?rev=1383697&r1=1383696&r2=1383697&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
(original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServerRunner.java
Wed Sep 12 00:34:08 2012
@@ -862,7 +862,8 @@ public class ThriftServerRunner implemen
     }
 
     @Override
-    public void deleteAllRow(ByteBuffer tableName, ByteBuffer row) throws IOError {
+    public void deleteAllRow(ByteBuffer tableName, ByteBuffer row,
+        Map<ByteBuffer, ByteBuffer> attributes) throws IOError {
       deleteAllRowTs(tableName, row, HConstants.LATEST_TIMESTAMP);
     }
 
@@ -916,14 +917,15 @@ public class ThriftServerRunner implemen
     }
 
     @Override
-    public void mutateRow(ByteBuffer tableName, ByteBuffer row,
-        List<Mutation> mutations) throws IOError, IllegalArgument {
-      mutateRowTs(tableName, row, mutations, HConstants.LATEST_TIMESTAMP);
+    public void mutateRow(ByteBuffer tableName, ByteBuffer row, List<Mutation> mutations,
+        Map<ByteBuffer, ByteBuffer> attributes) throws IOError, IllegalArgument {
+      mutateRowTs(tableName, row, mutations, HConstants.LATEST_TIMESTAMP, attributes);
     }
 
     @Override
     public void mutateRowTs(ByteBuffer tableName, ByteBuffer row,
-        List<Mutation> mutations, long timestamp) throws IOError, IllegalArgument {
+        List<Mutation> mutations, long timestamp,
+        Map<ByteBuffer, ByteBuffer> attributes) throws IOError, IllegalArgument {
       HTable table = null;
       try {
         table = getTable(getBytes(tableName));
@@ -979,14 +981,16 @@ public class ThriftServerRunner implemen
     }
 
     @Override
-    public void mutateRows(ByteBuffer tableName, List<BatchMutation> rowBatches)
+    public void mutateRows(ByteBuffer tableName, List<BatchMutation> rowBatches,
+        Map<ByteBuffer, ByteBuffer> attributes)
         throws IOError, IllegalArgument, TException {
-      mutateRowsTs(tableName, rowBatches, HConstants.LATEST_TIMESTAMP);
+      mutateRowsTs(tableName, rowBatches, HConstants.LATEST_TIMESTAMP, attributes);
     }
 
     @Override
     public void mutateRowsTs(
-        ByteBuffer tableName, List<BatchMutation> rowBatches, long timestamp)
+        ByteBuffer tableName, List<BatchMutation> rowBatches, long timestamp,
+        Map<ByteBuffer, ByteBuffer> attributes)
         throws IOError, IllegalArgument, TException {
       List<Put> puts = null;
       List<Delete> deletes = null;
@@ -1081,17 +1085,18 @@ public class ThriftServerRunner implemen
      */
     @Override
     public boolean checkAndMutateRow(ByteBuffer tableName, ByteBuffer row,
-        ByteBuffer columnCheck, ByteBuffer valueCheck, List<Mutation> mutations)
+        ByteBuffer columnCheck, ByteBuffer valueCheck, List<Mutation> mutations,
+        Map<ByteBuffer, ByteBuffer> attributes)
         throws IOError, IllegalArgument {
       return checkAndMutateRowTs(tableName, row, columnCheck, valueCheck,
-          mutations, HConstants.LATEST_TIMESTAMP);
+          mutations, HConstants.LATEST_TIMESTAMP, attributes);
     }
 
     @Override
     public boolean checkAndMutateRowTs(ByteBuffer tableName, ByteBuffer row,
         ByteBuffer columnCheck, ByteBuffer valueCheck,
         List<Mutation> mutations,
-        long timestamp) throws IOError, IllegalArgument {
+        long timestamp, Map<ByteBuffer, ByteBuffer> attributes) throws IOError, IllegalArgument
{
       HTable table;
       try {
         table = getTable(tableName);
@@ -1469,6 +1474,17 @@ public class ThriftServerRunner implemen
       this.metrics = metrics;
     }
 
+    @Override
+    public void mutateRowsAsync(ByteBuffer tableName, List<BatchMutation> rowBatches)
+        throws TException {
+      throw new TException("Not implemented");
+    }
+
+    @Override
+    public void mutateRowsTsAsync(ByteBuffer tableName, List<BatchMutation> rowBatches,
+        long timestamp) throws TException {
+      throw new TException("Not implemented");
+    }
   }
 
   public static void registerFilters(Configuration conf) {



Mime
View raw message