You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@omid.apache.org by yo...@apache.org on 2018/12/03 13:46:03 UTC

[08/50] [abbrv] incubator-omid git commit: OMID-112 Make batch method signature compatible with Table.batch signature

OMID-112 Make batch method signature compatible with Table.batch signature


Project: http://git-wip-us.apache.org/repos/asf/incubator-omid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-omid/commit/1946031f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-omid/tree/1946031f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-omid/diff/1946031f

Branch: refs/heads/master
Commit: 1946031fc4602d749aa733d08aea0a28d7b4f1df
Parents: e36ef36
Author: James Taylor <ja...@apache.org>
Authored: Thu Sep 27 10:12:42 2018 -0700
Committer: Yonatan Gottesman <yo...@gmail.com>
Committed: Tue Nov 13 10:07:53 2018 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/omid/transaction/TTable.java   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-omid/blob/1946031f/hbase-client/src/main/java/org/apache/omid/transaction/TTable.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/omid/transaction/TTable.java b/hbase-client/src/main/java/org/apache/omid/transaction/TTable.java
index 16400b8..e2e0535 100644
--- a/hbase-client/src/main/java/org/apache/omid/transaction/TTable.java
+++ b/hbase-client/src/main/java/org/apache/omid/transaction/TTable.java
@@ -43,6 +43,7 @@ import org.apache.hadoop.hbase.client.OperationWithAttributes;
 import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.ResultScanner;
+import org.apache.hadoop.hbase.client.Row;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.io.TimeRange;
@@ -553,14 +554,14 @@ public class TTable implements Closeable {
     }
 
     /**
-     * Transactional version of {@link Table#put(List puts)}
+     * Transactional version of {@link Table#batch(List<? extends Row> mutations)}
      *
      * @param transaction an instance of transaction to be used
-     * @param puts        List of puts
+     * @param mutations        List of rows that must be instances of Put or Delete
      * @throws IOException if a remote or network exception occurs
      */
-    public void batch(Transaction transaction, List<Mutation> mutations) throws IOException {
-        for (Mutation mutation : mutations) {
+    public void batch(Transaction transaction, List<? extends Row> mutations) throws IOException {
+        for (Row mutation : mutations) {
             if (mutation instanceof Put) {
                 put(transaction, (Put)mutation);
             } else if (mutation instanceof Delete) {