Index: src/main/java/org/apache/hadoop/hbase/HConstants.java
===================================================================
--- src/main/java/org/apache/hadoop/hbase/HConstants.java (revision 1402731)
+++ src/main/java/org/apache/hadoop/hbase/HConstants.java (working copy)
@@ -505,6 +505,16 @@
public static int DEFAULT_HBASE_CLIENT_PREFETCH_LIMIT = 10;
/**
+ * Parameter name to set the default scanner caching for all clients.
+ */
+ public static String HBASE_CLIENT_SCANNER_CACHING = "hbase.client.scanner.caching";
+
+ /**
+ * Default value for {@link #HBASE_CLIENT_SCANNER_CACHING}
+ */
+ public static int DEFAULT_HBASE_CLIENT_SCANNER_CACHING = 100;
+
+ /**
* Parameter name for number of rows that will be fetched when calling next on
* a scanner if it is not served from memory. Higher caching values will
* enable faster scanners but will eat up more memory and some calls of next
Index: src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
===================================================================
--- src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java (revision 1402731)
+++ src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java (working copy)
@@ -113,7 +113,9 @@
if (this.scan.getCaching() > 0) {
this.caching = this.scan.getCaching();
} else {
- this.caching = conf.getInt("hbase.client.scanner.caching", 1);
+ this.caching = conf.getInt(
+ HConstants.HBASE_CLIENT_SCANNER_CACHING,
+ HConstants.DEFAULT_HBASE_CLIENT_SCANNER_CACHING);
}
// initialize the scanner
Index: src/main/java/org/apache/hadoop/hbase/client/HTable.java
===================================================================
--- src/main/java/org/apache/hadoop/hbase/client/HTable.java (revision 1402731)
+++ src/main/java/org/apache/hadoop/hbase/client/HTable.java (working copy)
@@ -241,7 +241,8 @@
this.autoFlush = true;
this.currentWriteBufferSize = 0;
this.scannerCaching = this.configuration.getInt(
- "hbase.client.scanner.caching", 1);
+ HConstants.HBASE_CLIENT_SCANNER_CACHING,
+ HConstants.DEFAULT_HBASE_CLIENT_SCANNER_CACHING);
this.maxKeyValueSize = this.configuration.getInt(
"hbase.client.keyvalue.maxsize", -1);
Index: src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
===================================================================
--- src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java (revision 1402731)
+++ src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java (working copy)
@@ -879,7 +879,7 @@
conf.getInt("hbase.ipc.client.connection.maxidletime", 10000); //10s
this.maxRetries = conf.getInt("hbase.ipc.client.connect.max.retries", 0);
this.failureSleep = conf.getInt("hbase.client.pause", 1000);
- this.tcpNoDelay = conf.getBoolean("hbase.ipc.client.tcpnodelay", false);
+ this.tcpNoDelay = conf.getBoolean("hbase.ipc.client.tcpnodelay", true);
this.tcpKeepAlive = conf.getBoolean("hbase.ipc.client.tcpkeepalive", true);
this.pingInterval = getPingInterval(conf);
if (LOG.isDebugEnabled()) {
Index: src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
===================================================================
--- src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java (revision 1402731)
+++ src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java (working copy)
@@ -1560,7 +1560,7 @@
this.port = listener.getAddress().getPort();
this.rpcMetrics = new HBaseRpcMetrics(
serverName, Integer.toString(this.port));
- this.tcpNoDelay = conf.getBoolean("ipc.server.tcpnodelay", false);
+ this.tcpNoDelay = conf.getBoolean("ipc.server.tcpnodelay", true);
this.tcpKeepAlive = conf.getBoolean("ipc.server.tcpkeepalive", true);
this.warnDelayedCalls = conf.getInt(WARN_DELAYED_CALLS,
Index: src/main/resources/hbase-default.xml
===================================================================
--- src/main/resources/hbase-default.xml (revision 1402731)
+++ src/main/resources/hbase-default.xml (working copy)
@@ -140,7 +140,7 @@
hbase.client.scanner.caching
- 1
+ 100
Number of rows that will be fetched when calling next
on a scanner if it is not served from (local, client) memory. Higher
caching values will enable faster scanners but will eat up more memory
@@ -528,6 +528,13 @@
used for client / server RPC call marshalling.
+
+ hbase.ipc.client.tcpnodelay
+ true
+ Set no delay on rpc socket connections. See
+ http://docs.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html#getTcpNoDelay()
+
+