HBASE-13361 Remove or undeprecate {get|set}ScannerCaching in HTable (Lars Francke)
This commit is contained in:
parent
7f8745453e
commit
3815a33e34
|
@ -384,17 +384,6 @@ public class HTable implements HTableInterface {
|
||||||
return this.connection;
|
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
|
* Kept in 0.96 for backward compatibility
|
||||||
* @deprecated since 0.96. This is an internal buffer that should not be read nor write.
|
* @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();
|
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}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@ -643,7 +616,7 @@ public class HTable implements HTableInterface {
|
||||||
throw new IllegalArgumentException("Small scan should not be used with batching");
|
throw new IllegalArgumentException("Small scan should not be used with batching");
|
||||||
}
|
}
|
||||||
if (scan.getCaching() <= 0) {
|
if (scan.getCaching() <= 0) {
|
||||||
scan.setCaching(getScannerCaching());
|
scan.setCaching(scannerCaching);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scan.isReversed()) {
|
if (scan.isReversed()) {
|
||||||
|
|
|
@ -343,11 +343,6 @@ public class TestFromClientSide {
|
||||||
0, getNumberOfRows(keyPrefix2, value2, table));
|
0, getNumberOfRows(keyPrefix2, value2, table));
|
||||||
assertEquals("Got back incorrect number of rows from scan: " + keyPrefix3,
|
assertEquals("Got back incorrect number of rows from scan: " + keyPrefix3,
|
||||||
0, getNumberOfRows(keyPrefix3, value2, table));
|
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)
|
private void deleteColumns(Table ht, String value, String keyPrefix)
|
||||||
|
|
Loading…
Reference in New Issue