You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2009/12/05 22:31:05 UTC

svn commit: r887589 - /hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTableInterface.java

Author: stack
Date: Sat Dec  5 21:31:04 2009
New Revision: 887589

URL: http://svn.apache.org/viewvc?rev=887589&view=rev
Log:
HBASE-1758 Extract interface out of HTable; more additions made by Lars Francke

Modified:
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTableInterface.java

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTableInterface.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTableInterface.java?rev=887589&r1=887588&r2=887589&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTableInterface.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTableInterface.java Sat Dec  5 21:31:04 2009
@@ -63,6 +63,8 @@
 
   /**
    * Method for getting data from a row.
+   * If the row cannot be found an empty Result is returned.
+   * This can be checked by calling {@link Result#isEmpty()}
    *
    * @param get the Get to fetch
    * @return the result
@@ -153,8 +155,18 @@
   void delete(Delete delete) throws IOException;
 
   /**
+   * Bulk commit a List of Deletes to the table.
+   * @param deletes List of deletes. List is modified by this method.
+   * On exception holds deletes that were NOT applied.
+   * @throws IOException
+   */
+  void delete(List<Delete> deletes) throws IOException;
+
+  /**
    * Atomically increments a column value. If the column value already exists
-   * and is not a big-endian long, this could throw an exception.
+   * and is not a big-endian long, this could throw an exception. If the column
+   * value does not yet exist it is initialized to <code>amount</code> and
+   * written to the specified column.
    *
    * @param row
    * @param family
@@ -167,6 +179,25 @@
       long amount) throws IOException;
 
   /**
+   * Atomically increments a column value. If the column value already exists
+   * and is not a big-endian long, this could throw an exception. If the column
+   * value does not yet exist it is initialized to <code>amount</code> and
+   * written to the specified column.
+   *
+   * <p>Setting writeToWAL to false means that in a fail scenario, you will lose
+   * any increments that have not been flushed.
+   * @param row
+   * @param family
+   * @param qualifier
+   * @param amount
+   * @param writeToWAL true if increment should be applied to WAL, false if not
+   * @return The new value.
+   * @throws IOException
+   */
+  long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier,
+      long amount, boolean writeToWAL) throws IOException; 
+
+  /**
    * Get the value of autoFlush. If true, updates will not be buffered.
    *
    * @return true if autoFlush is enabled for this table