{"action":"created","issue":{"url":"https://api.github.com/repos/apache/zookeeper/issues/74","repository_url":"https://api.github.com/repos/apache/zookeeper","labels_url":"https://api.github.com/repos/apache/zookeeper/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/apache/zookeeper/issues/74/comments","events_url":"https://api.github.com/repos/apache/zookeeper/issues/74/events","html_url":"https://github.com/apache/zookeeper/pull/74","id":164448590,"number":74,"title":"ServerConfig#parse(String[]) parse params has problems","user":{"login":"ykgarfield","id":1425308,"avatar_url":"https://avatars.githubusercontent.com/u/1425308?v=3","gravatar_id":"","url":"https://api.github.com/users/ykgarfield","html_url":"https://github.com/ykgarfield","followers_url":"https://api.github.com/users/ykgarfield/followers","following_url":"https://api.github.com/users/ykgarfield/following{/other_user}","gists_url":"https://api.github.com/users/ykgarfield/gists{/gist_id}","starred_url":"https://api.github.com/users/ykgarfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ykgarfield/subscriptions","organizations_url":"https://api.github.com/users/ykgarfield/orgs","repos_url":"https://api.github.com/users/ykgarfield/repos","events_url":"https://api.github.com/users/ykgarfield/events{/privacy}","received_events_url":"https://api.github.com/users/ykgarfield/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-08T02:42:09Z","updated_at":"2016-12-31T12:10:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/zookeeper/pulls/74","html_url":"https://github.com/apache/zookeeper/pull/74","diff_url":"https://github.com/apache/zookeeper/pull/74.diff","patch_url":"https://github.com/apache/zookeeper/pull/74.patch"},"body":"When debug zookeeper, run `ZooKeeperServerMain` then pass 4 args, e.g: `2181 F:\\\\zk\\\\data 2000 30`, that is:\n\n```\nclientPort = 2181\ndataDir = F:\\\\zk\\\\data\ntickTime = 2000\nmaxClientCnxns = 30\n```\n\nBut ServerConfig#parse(String[]) method has a little problem：\n\n``` java\npublic void parse(String[] args) {\n    ...\n    if (args.length == 3) {\n        tickTime = Integer.parseInt(args[2]);\n    }\n    if (args.length == 4) {\n        maxClientCnxns = Integer.parseInt(args[3]);\n    }\n}\n```\n\nThe problem is:\n\n``` java\n    if (args.length == 4) {\n        maxClientCnxns = Integer.parseInt(args[3]);\n    }\n```\n\nIt can't parse `tickTime`, igone the `tickTime`.This coe snippet should be:\n\n``` java\n    if (args.length == 4) {\n        tickTime = Integer.parseInt(args[2]);\n        maxClientCnxns = Integer.parseInt(args[3]);\n    }\n```\n"},"comment":{"url":"https://api.github.com/repos/apache/zookeeper/issues/comments/269862326","html_url":"https://github.com/apache/zookeeper/pull/74#issuecomment-269862326","issue_url":"https://api.github.com/repos/apache/zookeeper/issues/74","id":269862326,"user":{"login":"eribeiro","id":116156,"avatar_url":"https://avatars.githubusercontent.com/u/116156?v=3","gravatar_id":"","url":"https://api.github.com/users/eribeiro","html_url":"https://github.com/eribeiro","followers_url":"https://api.github.com/users/eribeiro/followers","following_url":"https://api.github.com/users/eribeiro/following{/other_user}","gists_url":"https://api.github.com/users/eribeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/eribeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eribeiro/subscriptions","organizations_url":"https://api.github.com/users/eribeiro/orgs","repos_url":"https://api.github.com/users/eribeiro/repos","events_url":"https://api.github.com/users/eribeiro/events{/privacy}","received_events_url":"https://api.github.com/users/eribeiro/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T12:10:28Z","updated_at":"2016-12-31T12:10:28Z","body":"@hanm I didn't tested on a git repo.\r\n\r\nThe guy who told me about this trick mentioned the Spark project guys use it (even though they don't use it on the Kafka project)."}}
{"actor":{"display_login":"eribeiro"}}