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

This commit is contained in:
stack 2015-03-30 08:16:23 -07:00
parent 7f8745453e
commit 3815a33e34
2 changed files with 1 additions and 33 deletions

View File

@ -384,17 +384,6 @@ public class HTable implements HTableInterface {
return this.connection;
}
/**
* 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.
@ -404,22 +393,6 @@ public class HTable implements HTableInterface {
return mutator == null ? null : mutator.getWriteBuffer();
}
/**
* 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}
*/
@ -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()) {

View File

@ -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)