[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexander Shraer resolved ZOOKEEPER-2472.
-----------------------------------------
    Resolution: Duplicate

Duplicate for ZOOKEEPER-2470 which I opened after seeing the email from 
ykgarfield. i posted a patch there.

> ServerConfig#parse(String[]) parse params has problems
> ------------------------------------------------------
>
>                 Key: ZOOKEEPER-2472
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2472
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: yangkun
>            Priority: Minor
>
> When debug zookeeper, run ZooKeeperServerMain then pass 4 args, e.g: 2181 
> F:\\zk\\data 2000 30, that is:
> clientPort = 2181
> dataDir = F:\\zk\\data
> tickTime = 2000
> maxClientCnxns = 30
> But ServerConfig#parse(String[]) method has a little problem:
> public void parse(String[] args) {
>     ...
>     if (args.length == 3) {
>         tickTime = Integer.parseInt(args[2]);
>     }
>     if (args.length == 4) {
>         maxClientCnxns = Integer.parseInt(args[3]);
>     }
> }
> The problem is:
>     if (args.length == 4) {
>         maxClientCnxns = Integer.parseInt(args[3]);
>     }
> It can't parse tickTime, igone the tickTime.This coe snippet should be:
>     if (args.length == 4) {
>         tickTime = Integer.parseInt(args[2]);
>         maxClientCnxns = Integer.parseInt(args[3]);
>     }



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

Reply via email to