[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15788480#comment-15788480 ] Hudson commented on ZOOKEEPER-2517: --- SUCCESS: Integrated in Jenkins build ZooKeeper-trunk #3217 (See [https://builds.apache.org/job/ZooKeeper-trunk/3217/]) ZOOKEEPER-2517: jute.maxbuffer is ignored (hanm: rev de5c0e9abeb87721f4157662210dfcd38a7c15ea) * (edit) src/java/main/org/apache/zookeeper/common/ZKConfig.java * (edit) src/java/test/org/apache/zookeeper/client/ZKClientConfigTest.java * (add) src/java/test/org/apache/zookeeper/ClientCnxnSocketTest.java * (edit) src/java/main/org/apache/zookeeper/ClientCnxnSocket.java * (edit) src/java/main/org/apache/zookeeper/ClientCnxnSocketNetty.java > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517-04.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15772526#comment-15772526 ] ASF GitHub Bot commented on ZOOKEEPER-2517: --- Github user rakeshadr commented on the issue: https://github.com/apache/zookeeper/pull/113 +1, LGTM. Thanks @arshadmohammad for the patch. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517-04.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15733566#comment-15733566 ] ASF GitHub Bot commented on ZOOKEEPER-2517: --- Github user hanm commented on the issue: https://github.com/apache/zookeeper/pull/113 @rgs1 this is the blocker issue we were talking about, please take a look at it. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517-04.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15712611#comment-15712611 ] Hadoop QA commented on ZOOKEEPER-2517: -- +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12829061/ZOOKEEPER-2517-04.patch against trunk revision d72f27279a13986ee0c011e1e5b34edf3a310da9. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 5 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 3.0.1) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3537//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3537//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3537//console This message is automatically generated. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517-04.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15712555#comment-15712555 ] ASF GitHub Bot commented on ZOOKEEPER-2517: --- Github user hanm commented on the issue: https://github.com/apache/zookeeper/pull/113 +1, looks good. We should definitely get this in before cutting RC build for 3.5.3. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517-04.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15684504#comment-15684504 ] Hadoop QA commented on ZOOKEEPER-2517: -- -1 overall. GitHub Pull Request Build +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 5 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 20 new Findbugs (version 3.0.1) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/84//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/84//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/84//console This message is automatically generated. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517-04.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15684450#comment-15684450 ] ASF GitHub Bot commented on ZOOKEEPER-2517: --- GitHub user arshadmohammad opened a pull request: https://github.com/apache/zookeeper/pull/113 ZOOKEEPER-2517:jute.maxbuffer is ignored ZOOKEEPER-2517:jute.maxbuffer is ignored You can merge this pull request into a Git repository by running: $ git pull https://github.com/arshadmohammad/zookeeper ZOOKEEPER-2517 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zookeeper/pull/113.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #113 commit d722cacd247cee4352ce4012db92cb604f8fa57b Author: arshadmohammadDate: 2016-11-21T19:09:41Z jute.maxbuffer is ignored > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517-04.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15499448#comment-15499448 ] Hadoop QA commented on ZOOKEEPER-2517: -- +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12829061/ZOOKEEPER-2517-04.patch against trunk revision b2a484cfe743116d2531fe5d1e1d78b3960c511e. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 5 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3439//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3439//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3439//console This message is automatically generated. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517-04.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15492392#comment-15492392 ] Michael Han commented on ZOOKEEPER-2517: bq. can we log the warning here and use the default value? This sounds good as it will be consistent with old client side behavior, where we don't bail out on bogus just.maxbuffer {code} public static final int packetLen = Integer.getInteger("jute.maxbuffer",4096 * 1024); {code} On server side, I think the behavior is different, that the server is less tolerant with bogus configuration value. In most if not all cases server will not start with bogus value which makes sense as it's better to bail out early than running into unknown states with bogus configuration. We could make client behavior consistent with server, so when client has a bogus maxbuffer config value client will abort? > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15491331#comment-15491331 ] Hadoop QA commented on ZOOKEEPER-2517: -- +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12828521/ZOOKEEPER-2517-03.patch against trunk revision b2a484cfe743116d2531fe5d1e1d78b3960c511e. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3430//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3430//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3430//console This message is automatically generated. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15491284#comment-15491284 ] Arshad Mohammad commented on ZOOKEEPER-2517: Thanks [~fpj] for reviews. # I was using maximum line width 120 in eclipse. now changed to 80 and formatted the modified code. is this OK? or is there any other zookeeper guideline for this. # Throwing NumberFormatException from ZKConfig.getInt(String, int). # bq. If we propagate the exception, then it should end up caught in zookeeper.getClientCnxnSocket and transformed into an IOException can we log the warning here and use the default value? > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517-03.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15491065#comment-15491065 ] Flavio Junqueira commented on ZOOKEEPER-2517: - Just to complement what I said before, if we propagate the exception, then it should end up caught in {{zookeeper.getClientCnxnSocket}} and transformed into an {{IOException}}. I think this is a better course of action compared to swallowing the exception, but feel free to disagree. cc [~arshad.mohammad] > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15478383#comment-15478383 ] Flavio Junqueira commented on ZOOKEEPER-2517: - It looks mostly good. There are a couple of long lines that I would appreciate if we could break into multiple. I'm wondering about the warning on number format exception. If I make a mistake, then I'll get a warning in my log, but the server will keep going. I might get an undesired behavior that I'll only realize after a while. Is it better to propagate the exception rather than just writing the warning? > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15474512#comment-15474512 ] Edward Ribeiro commented on ZOOKEEPER-2517: --- Nice points, Arshad. LGTM. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15474508#comment-15474508 ] Edward Ribeiro commented on ZOOKEEPER-2517: --- It has been updated. LGTM. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15474509#comment-15474509 ] Edward Ribeiro commented on ZOOKEEPER-2517: --- It has been updated. LGTM. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15474489#comment-15474489 ] Patrick Hunt commented on ZOOKEEPER-2517: - [~fpj] - could you help with this one (review/commit), given you had participated in ZOOKEEPER-2139 ? > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15473196#comment-15473196 ] Hadoop QA commented on ZOOKEEPER-2517: -- +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12827512/ZOOKEEPER-2517-02.patch against trunk revision 1759739. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3402//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3402//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3402//console This message is automatically generated. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517-02.patch, > ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15473148#comment-15473148 ] Arshad Mohammad commented on ZOOKEEPER-2517: Thanks [~eribeiro], Handled review comments, please have a look # instead of just checking trimmed value length, we should use the trimmed value. Not checking length after trim to log the warning # getInt is a common class. The classes using it will log the returned value. If it was a method meant to be used in specific class, no doubt it would have been a WARN. no problem, changing to WARN # Because getInt is a small method and I was testing the complete getInt method but it can be renamed to testIntegerRetrievalFromProperty]Handled review comments, please have a look. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Blocker > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15471957#comment-15471957 ] Patrick Hunt commented on ZOOKEEPER-2517: - [~arshad.mohammad] - do you want to update the patch with Edward's comments? > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Critical > Fix For: 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15459520#comment-15459520 ] Edward Ribeiro commented on ZOOKEEPER-2517: --- Hi [~arshad.mohammad], A few comments: {code} String value = getProperty(key); if (value == null) { return defaultValue; } else { try { return Integer.parseInt(value); } catch (NumberFormatException e) { if (LOG.isDebugEnabled()) { LOG.debug("Configured value {} for property {} can not be parsed to int. Using default value {}.", value, key, defaultValue); } } } return defaultValue; {code} can be rewritten as: {code} String value = getProperty(key); if (value != null) { try { return Integer.parseInt(value); } catch (NumberFormatException e) { if (LOG.isDebugEnabled()) { LOG.debug("Configured value {} for property {} can not be parsed to int. Using default value {}.", value, key, defaultValue); } } } return defaultValue; {code} Also, I think a parser error of a parameter can be more insidious and dangerous bug to relegate it to debug only logging. I think it should be at least {{LOG.WARN}}. wdyt? Finally, I don't like the name of the unit test: {{testGetInt}}. I think it's a bit vague so a more verbose, but clear name would be nice. Maybe {{testIntegerRetrievalFromProperty}} or something else... I no good with naming, btw. Best regards! > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Critical > Fix For: 3.5.3 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15459459#comment-15459459 ] Hadoop QA commented on ZOOKEEPER-2517: -- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12826918/ZOOKEEPER-2517-01.patch against trunk revision 1757584. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3387//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3387//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3387//console This message is automatically generated. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Critical > Fix For: 3.5.3 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15459426#comment-15459426 ] Arshad Mohammad commented on ZOOKEEPER-2517: # I am submitting new patch ZOOKEEPER-2517-01.patch for this issue, I feel this is very important bug and it should be fixed ASAP. Hope [~benjamin.jaton] you wont mind it. # Thanks [~hanm] for your suggestion, I made it testable > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Arshad Mohammad >Priority: Critical > Fix For: 3.5.3 > > Attachments: ZOOKEEPER-2517-01.patch, ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15434993#comment-15434993 ] Arshad Mohammad commented on ZOOKEEPER-2517: sorry [~benjamin.jaton], I assigned the issue without asking you. Please feel free to unassign form your or assign me if you don't have cycle to work on it. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Benjamin Jaton >Priority: Critical > Attachments: ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15428420#comment-15428420 ] Michael Han commented on ZOOKEEPER-2517: The issue is introduced in ZOOKEEPER-2139. Should we make packetLen testable and write a test case for this? > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Assignee: Benjamin Jaton >Priority: Critical > Attachments: ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ZOOKEEPER-2517) jute.maxbuffer is ignored
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15427669#comment-15427669 ] Arshad Mohammad commented on ZOOKEEPER-2517: Thanks [~benjamin.jaton] for reporting and submitting a patch. One review comment on the patch. Can we handled NumberFormatException and use default in case of NumberFormatException. > jute.maxbuffer is ignored > - > > Key: ZOOKEEPER-2517 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2517 > Project: ZooKeeper > Issue Type: Bug >Affects Versions: 3.5.2 >Reporter: Benjamin Jaton >Priority: Critical > Attachments: ZOOKEEPER-2517.patch > > > In ClientCnxnSocket.java the parsing of the system property is erroneous: > {code}packetLen = Integer.getInteger( > clientConfig.getProperty(ZKConfig.JUTE_MAXBUFFER), > ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT > );{code} > Javadoc of Integer.getInteger states "The first argument is treated as the > name of a system property", whereas here the value of the property is passed. > Instead I believe the author meant to write something like: > {code}packetLen = Integer.parseInt( > clientConfig.getProperty( > ZKConfig.JUTE_MAXBUFFER, > String.valueOf(ZKClientConfig.CLIENT_MAX_PACKET_LENGTH_DEFAULT) > ) > );{code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)