Author: liyin
Date: Sat Apr  5 18:18:18 2014
New Revision: 1585153

URL: http://svn.apache.org/r1585153
Log:
[HBASE-10910] Make sure we do most optimal multiGets

Author: adela

Summary:
changing the internal implementation of
public Result[] get(List<Get> gets) throws IOException is same as
public Result[] batchGet(final List<Get> actions)
Doing it like this since it will require no client-side code change

Test Plan: not tested

Reviewers: gauravm, liyintang, aaiyer, fan

Reviewed By: fan

CC: hbase-eng@, fan

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

Task ID: 2755963

Modified:
    
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HTable.java
    
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java

Modified: 
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HTable.java
URL: 
http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HTable.java?rev=1585153&r1=1585152&r2=1585153&view=diff
==============================================================================
--- 
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HTable.java 
(original)
+++ 
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HTable.java 
Sat Apr  5 18:18:18 2014
@@ -777,7 +777,7 @@ public class HTable implements HTableInt
 
   @Override
   public Result[] get(List<Get> gets) throws IOException {
-    return 
this.getConnectionAndResetOperationContext().processBatchOfGets(gets, 
tableName, this.options);
+    return batchGet(gets);
   }
 
   /**

Modified: 
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
URL: 
http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java?rev=1585153&r1=1585152&r2=1585153&view=diff
==============================================================================
--- 
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
 (original)
+++ 
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
 Sat Apr  5 18:18:18 2014
@@ -82,20 +82,26 @@ public interface HTableInterface {
    */
   Result get(Get get) throws IOException;
 
-   /**
-   * Extracts certain cells from the given rows, in batch.
+  /**
+   * Extracts certain cells from the given rows, in batch. It does completely
+   * the same thing as {@link #batchGet(List)}, so we are planning to get rid 
of
+   * this one soon in favor of {@link #batchGet(List)}
    *
-   * @param gets The objects that specify what data to fetch and from which 
rows.
+   * @param gets
+   *          The objects that specify what data to fetch and from which rows.
    *
-   * @return The data coming from the specified rows, if it exists.  If the row
+   * @return The data coming from the specified rows, if it exists. If the row
    *         specified doesn't exist, the {@link Result} instance returned 
won't
-   *         contain any {@link KeyValue}, as indicated by {@link 
Result#isEmpty()}.
-   *         If there are any failures even after retries, there will be a 
null in
-   *         the results array for those Gets, AND an exception will be thrown.
-   * @throws IOException if a remote or network exception occurs.
+   *         contain any {@link KeyValue}, as indicated by
+   *         {@link Result#isEmpty()}. If there are any failures even after
+   *         retries, there will be a null in the results array for those Gets,
+   *         AND an exception will be thrown.
+   * @throws IOException
+   *           if a remote or network exception occurs.
    *
    * @since 0.20.0
    */
+  @Deprecated
   public Result[] get(List<Get> gets) throws IOException;
 
   /**


Reply via email to