You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Yubao Liu (JIRA)" <ji...@apache.org> on 2016/01/25 11:30:40 UTC

[jira] [Commented] (HBASE-14252) RegionServers fail to start when setting hbase.ipc.server.callqueue.scan.ratio=0.

    [ https://issues.apache.org/jira/browse/HBASE-14252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15115008#comment-15115008 ] 

Yubao Liu commented on HBASE-14252:
-----------------------------------

Patch against v1.0.2:

{code}
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
index 7b28e74..bf3effd 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java
@@ -133,7 +133,7 @@ public class RWQueueRpcExecutor extends RpcExecutor {
     this.numScanQueues = numScanQueues;
     this.writeBalancer = getBalancer(numWriteQueues);
     this.readBalancer = getBalancer(numReadQueues);
-    this.scanBalancer = getBalancer(numScanQueues);
+    this.scanBalancer = numScanQueues > 0 ? getBalancer(numScanQueues) : null;
 
     queues = new ArrayList<BlockingQueue<CallRunner>>(writeHandlersCount + readHandlersCount);
     LOG.debug(name + " writeQueues=" + numWriteQueues + " writeHandlers=" + writeHandlersCount +
{code}

> RegionServers fail to start when setting hbase.ipc.server.callqueue.scan.ratio=0.
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-14252
>                 URL: https://issues.apache.org/jira/browse/HBASE-14252
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>         Environment: hbase-0.98.6-cdh5.3.1
>            Reporter: Toshihiro Suzuki
>
> I set the following configuration in hbase-site.xml.
> {code}
> <property>
>   <name>hbase.ipc.server.callqueue.read.ratio</name>
>   <value>0.5</value>
> </property>
> <property>
>   <name>hbase.ipc.server.callqueue.scan.ratio</name>
>   <value>0</value>
> <property>
> {code}
> Then, the RegionServer failed to start and I saw the following log:
> {code}
> 2015-08-19 14:30:19,561 ERROR org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine: Region server exiting
> java.lang.RuntimeException: Failed construction of Regionserver: class org.apache.hadoop.hbase.regionserver.HRegionServer
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:2457)
>         at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.start(HRegionServerCommandLine.java:61)
>         at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.run(HRegionServerCommandLine.java:85)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>         at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126)
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.main(HRegionServer.java:2472)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:2455)
>         ... 5 more
> Caused by: java.lang.IllegalArgumentException: Queue size is <= 0, must be at least 1
>         at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
>         at org.apache.hadoop.hbase.ipc.RpcExecutor.getBalancer(RpcExecutor.java:139)
>         at org.apache.hadoop.hbase.ipc.RWQueueRpcExecutor.<init>(RWQueueRpcExecutor.java:121)
>         at org.apache.hadoop.hbase.ipc.RWQueueRpcExecutor.<init>(RWQueueRpcExecutor.java:83)
>         at org.apache.hadoop.hbase.ipc.SimpleRpcScheduler.<init>(SimpleRpcScheduler.java:129)
>         at org.apache.hadoop.hbase.regionserver.SimpleRpcSchedulerFactory.create(SimpleRpcSchedulerFactory.java:36)
>         at org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:610)
>         ... 10 more
> {code}
> The doc of "hbase.ipc.server.callqueue.scan.ratio" says "A value of 0 or 1 indicate to use the same set of queues for gets and scans.".
> I think that there is a bug in validation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)