hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-13361 Remove or undeprecate {get|set}ScannerCaching in HTable (Lars Francke)
Date Mon, 30 Mar 2015 15:15:03 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 7f8745453 -> 3815a33e3


HBASE-13361 Remove or undeprecate {get|set}ScannerCaching in HTable (Lars Francke)


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

Branch: refs/heads/master
Commit: 3815a33e3400cee73f63e205afac8f1a2d9c174f
Parents: 7f87454
Author: stack <stack@apache.org>
Authored: Mon Mar 30 08:16:23 2015 -0700
Committer: stack <stack@apache.org>
Committed: Mon Mar 30 08:16:23 2015 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/client/HTable.java  | 29 +-------------------
 .../hadoop/hbase/client/TestFromClientSide.java |  5 ----
 2 files changed, 1 insertion(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3815a33e/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
index c77e2ae..454b4e1 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java
@@ -385,17 +385,6 @@ public class HTable implements HTableInterface {
   }
 
   /**
-   * Gets the number of rows that a scanner will fetch at once.
-   * <p>
-   * The default value comes from {@code hbase.client.scanner.caching}.
-   * @deprecated Use {@link Scan#setCaching(int)} and {@link Scan#getCaching()}
-   */
-  @Deprecated
-  public int getScannerCaching() {
-    return scannerCaching;
-  }
-
-  /**
    * Kept in 0.96 for backward compatibility
    * @deprecated  since 0.96. This is an internal buffer that should not be read nor write.
    */
@@ -405,22 +394,6 @@ public class HTable implements HTableInterface {
   }
 
   /**
-   * Sets the number of rows that a scanner will fetch at once.
-   * <p>
-   * This will override the value specified by
-   * {@code hbase.client.scanner.caching}.
-   * Increasing this value will reduce the amount of work needed each time
-   * {@code next()} is called on a scanner, at the expense of memory use
-   * (since more rows will need to be maintained in memory by the scanners).
-   * @param scannerCaching the number of rows a scanner will fetch at once.
-   * @deprecated Use {@link Scan#setCaching(int)}
-   */
-  @Deprecated
-  public void setScannerCaching(int scannerCaching) {
-    this.scannerCaching = scannerCaching;
-  }
-
-  /**
    * {@inheritDoc}
    */
   @Override
@@ -643,7 +616,7 @@ public class HTable implements HTableInterface {
       throw new IllegalArgumentException("Small scan should not be used with batching");
     }
     if (scan.getCaching() <= 0) {
-      scan.setCaching(getScannerCaching());
+      scan.setCaching(scannerCaching);
     }
 
     if (scan.isReversed()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/3815a33e/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
index a4ceaa8..f58bae1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
@@ -343,11 +343,6 @@ public class TestFromClientSide {
       0, getNumberOfRows(keyPrefix2, value2, table));
     assertEquals("Got back incorrect number of rows from scan: " + keyPrefix3,
       0, getNumberOfRows(keyPrefix3, value2, table));
-    ht.setScannerCaching(0);
-    assertEquals("Got back incorrect number of rows from scan", 0,
-      getNumberOfRows(keyPrefix1, value2, table)); ht.setScannerCaching(100);
-    assertEquals("Got back incorrect number of rows from scan", 0,
-      getNumberOfRows(keyPrefix2, value2, table));
   }
 
   private void deleteColumns(Table ht, String value, String keyPrefix)


Mime
View raw message