hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject svn commit: r1535150 - in /hbase/branches/0.96: hbase-client/src/main/java/org/apache/hadoop/hbase/client/ hbase-common/src/main/java/org/apache/hadoop/hbase/ hbase-common/src/main/resources/
Date Wed, 23 Oct 2013 20:15:55 GMT
Author: ndimiduk
Date: Wed Oct 23 20:15:55 2013
New Revision: 1535150

URL: http://svn.apache.org/r1535150
Log:
HBASE-9772 Normalize new client default values

Modified:
    hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
    hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
    hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java?rev=1535150&r1=1535149&r2=1535150&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
(original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
Wed Oct 23 20:15:55 2013
@@ -19,7 +19,6 @@
 
 package org.apache.hadoop.hbase.client;
 
-
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.util.ArrayList;
@@ -211,9 +210,12 @@ class AsyncProcess<CResult> {
     this.numTries = conf.getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER,
         HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER);
 
-    this.maxTotalConcurrentTasks = conf.getInt("hbase.client.max.total.tasks", 100);
-    this.maxConcurrentTasksPerServer = conf.getInt("hbase.client.max.perserver.tasks", 5);
-    this.maxConcurrentTasksPerRegion = conf.getInt("hbase.client.max.perregion.tasks", 1);
+    this.maxTotalConcurrentTasks = conf.getInt(HConstants.HBASE_CLIENT_MAX_TOTAL_TASKS,
+      HConstants.DEFAULT_HBASE_CLIENT_MAX_TOTAL_TASKS);
+    this.maxConcurrentTasksPerServer = conf.getInt(HConstants.HBASE_CLIENT_MAX_PERSERVER_TASKS,
+          HConstants.DEFAULT_HBASE_CLIENT_MAX_PERSERVER_TASKS);
+    this.maxConcurrentTasksPerRegion = conf.getInt(HConstants.HBASE_CLIENT_MAX_PERREGION_TASKS,
+          HConstants.DEFAULT_HBASE_CLIENT_MAX_PERREGION_TASKS);
 
     if (this.maxTotalConcurrentTasks <= 0) {
       throw new IllegalArgumentException("maxTotalConcurrentTasks=" + maxTotalConcurrentTasks);

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1535150&r1=1535149&r2=1535150&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
(original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Wed Oct 23 20:15:55 2013
@@ -718,8 +718,9 @@ public class HConnectionManager {
             long keepAliveTime = conf.getLong(
                 "hbase.hconnection.threads.keepalivetime", 60);
             LinkedBlockingQueue<Runnable> workQueue =
-                new LinkedBlockingQueue<Runnable>(128 *
-                    conf.getInt("hbase.client.max.total.tasks", 200));
+                new LinkedBlockingQueue<Runnable>(256 *
+                    conf.getInt(HConstants.HBASE_CLIENT_MAX_TOTAL_TASKS,
+                    HConstants.DEFAULT_HBASE_CLIENT_MAX_TOTAL_TASKS));
             this.batchPool = new ThreadPoolExecutor(
                 maxThreads,
                 maxThreads,

Modified: hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java?rev=1535150&r1=1535149&r2=1535150&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
(original)
+++ hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
Wed Oct 23 20:15:55 2013
@@ -571,6 +571,38 @@ public final class HConstants {
   public static long DEFAULT_HBASE_CLIENT_PAUSE = 100;
 
   /**
+   * The maximum number of concurrent connections the client will maintain.
+   */
+  public static final String HBASE_CLIENT_MAX_TOTAL_TASKS = "hbase.client.max.total.tasks";
+
+  /**
+   * Default value of {@link #HBASE_CLIENT_MAX_TOTAL_TASKS}.
+   */
+  public static final int DEFAULT_HBASE_CLIENT_MAX_TOTAL_TASKS = 100;
+
+  /**
+   * The maximum number of concurrent connections the client will maintain to a single
+   * RegionServer.
+   */
+  public static final String HBASE_CLIENT_MAX_PERSERVER_TASKS = "hbase.client.max.perserver.tasks";
+
+  /**
+   * Default value of {@link #HBASE_CLIENT_MAX_PERSERVER_TASKS}.
+   */
+  public static final int DEFAULT_HBASE_CLIENT_MAX_PERSERVER_TASKS = 5;
+
+  /**
+   * The maximum number of concurrent connections the client will maintain to a single
+   * Region.
+   */
+  public static final String HBASE_CLIENT_MAX_PERREGION_TASKS = "hbase.client.max.perregion.tasks";
+
+  /**
+   * Default value of {@link #HBASE_CLIENT_MAX_PERREGION_TASKS}.
+   */
+  public static final int DEFAULT_HBASE_CLIENT_MAX_PERREGION_TASKS = 1;
+
+  /**
    * Parameter name for server pause value, used mostly as value to wait before
    * running a retry of a failed operation.
    */

Modified: hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml?rev=1535150&r1=1535149&r2=1535150&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml (original)
+++ hbase/branches/0.96/hbase-common/src/main/resources/hbase-default.xml Wed Oct 23 20:15:55
2013
@@ -448,6 +448,26 @@ possible configurations would overwhelm 
     ramps up.  Change this setting and hbase.client.pause to suit your workload.</description>
   </property>
   <property>
+    <name>hbase.client.max.total.tasks</name>
+    <value>100</value>
+    <description>The maximum number of concurrent tasks a single HTable instance will
+    send to the cluster.</description>
+  </property>
+  <property>
+    <name>hbase.client.max.perserver.tasks</name>
+    <value>5</value>
+    <description>The maximum number of concurrent tasks a single HTable instance will
+    send to a single region server.</description>
+  </property>
+  <property>
+    <name>hbase.client.max.perregion.tasks</name>
+    <value>1</value>
+    <description>The maximum number of concurrent connections the client will
+    maintain to a single Region. That is, if there is already
+    hbase.client.max.perregion.tasks writes in progress for this region, new puts
+    won't be sent to this region until some writes finishes.</description>
+  </property>
+  <property>
     <name>hbase.client.scanner.caching</name>
     <value>100</value>
     <description>Number of rows that will be fetched when calling next



Mime
View raw message