HBASE-13362 Set max result size from client only (like scanner caching).
This commit is contained in:
parent
e2a90a7114
commit
80dbf06651
|
@ -613,12 +613,19 @@ public final class HConstants {
|
|||
public static final UUID DEFAULT_CLUSTER_ID = new UUID(0L,0L);
|
||||
|
||||
/**
|
||||
* Parameter name for maximum number of bytes returned when calling a
|
||||
* scanner's next method.
|
||||
* Parameter name for maximum number of bytes returned when calling a scanner's next method.
|
||||
* Controlled by the client.
|
||||
*/
|
||||
public static final String HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE_KEY =
|
||||
"hbase.client.scanner.max.result.size";
|
||||
|
||||
/**
|
||||
* Parameter name for maximum number of bytes returned when calling a scanner's next method.
|
||||
* Controlled by the server.
|
||||
*/
|
||||
public static final String HBASE_SERVER_SCANNER_MAX_RESULT_SIZE_KEY =
|
||||
"hbase.server.scanner.max.result.size";
|
||||
|
||||
/**
|
||||
* Maximum number of bytes returned when calling a scanner's next method.
|
||||
* Note that when a single row is larger than this limit the row is still
|
||||
|
@ -628,6 +635,16 @@ public final class HConstants {
|
|||
*/
|
||||
public static final long DEFAULT_HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE = 2 * 1024 * 1024;
|
||||
|
||||
/**
|
||||
* Maximum number of bytes returned when calling a scanner's next method.
|
||||
* Note that when a single row is larger than this limit the row is still
|
||||
* returned completely.
|
||||
* Safety setting to protect the region server.
|
||||
*
|
||||
* The default value is 100MB. (a client would rarely request larger chunks on purpose)
|
||||
*/
|
||||
public static final long DEFAULT_HBASE_SERVER_SCANNER_MAX_RESULT_SIZE = 100 * 1024 * 1024;
|
||||
|
||||
/**
|
||||
* Parameter name for client pause value, used mostly as value to wait
|
||||
* before running a retry of a failed get, region lookup, etc.
|
||||
|
|
|
@ -1306,6 +1306,16 @@ possible configurations would overwhelm and obscure the important.
|
|||
</description>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>hbase.server.scanner.max.result.size</name>
|
||||
<value>104857600</value>
|
||||
<description>Maximum number of bytes returned when calling a scanner's next method.
|
||||
Note that when a single row is larger than this limit the row is still returned completely.
|
||||
The default value is 100MB.
|
||||
This is a safety setting to protect the server from OOM situations.
|
||||
</description>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>hbase.status.published</name>
|
||||
<value>false</value>
|
||||
|
|
|
@ -820,8 +820,8 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
|||
HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD,
|
||||
HConstants.DEFAULT_HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD);
|
||||
maxScannerResultSize = rs.conf.getLong(
|
||||
HConstants.HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE_KEY,
|
||||
HConstants.DEFAULT_HBASE_CLIENT_SCANNER_MAX_RESULT_SIZE);
|
||||
HConstants.HBASE_SERVER_SCANNER_MAX_RESULT_SIZE_KEY,
|
||||
HConstants.DEFAULT_HBASE_SERVER_SCANNER_MAX_RESULT_SIZE);
|
||||
|
||||
// Set our address, however we need the final port that was given to rpcServer
|
||||
isa = new InetSocketAddress(initialIsa.getHostName(), rpcServer.getListenerAddress().getPort());
|
||||
|
|
Loading…
Reference in New Issue