[jira] [Commented] (ZOOKEEPER-2757) Incorrect path crashes zkCli

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016929#comment-16016929
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2757:
---

Github user afine commented on the issue:

https://github.com/apache/zookeeper/pull/240
  
@hanm I'm not sure that we should always assume that an 
IllegalArgumentException will only be thrown when a path is invalid. Since 
IllegalArgumentException does not need to be caught, it will be difficult for 
us to tell if we are masking IllegalArgumentExceptions thrown for other 
reasons. So we should minimize the code surrounded by `try { } 
catch(IllegalArgumentException e) {}` We cannot catch them within the methods 
of ZooKeeper.java so I think catching them at the "Command" level is the best 
we can do.

IllegalArgumentException is a RuntimeException, which should represent a 
"programming problem" 
(http://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html). 
>Runtime exceptions represent problems that are the result of a programming 
problem, and as such, the API client code cannot reasonably be expected to 
recover from them or to handle them in any way. 

So if it does pop up for reasons other than a bad path, we should certainly 
bubble it up and kill the CLI.

We abuse IllegalArgumentException all over ZK, I believe we should change 
this exception type in 3.6.

 


> Incorrect path crashes zkCli
> 
>
> Key: ZOOKEEPER-2757
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2757
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.5.3
>Reporter: Flavio Junqueira
>Assignee: Abraham Fine
>Priority: Minor
> Fix For: 3.5.4
>
>
> If I try {{delete test}} without the leading /, then the CLI crashes with 
> this exception:
> {noformat}
> Exception in thread "main" java.lang.IllegalArgumentException: Path must 
> start with / character
>   at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:51)
>   at org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:1659)
>   at org.apache.zookeeper.cli.DeleteCommand.exec(DeleteCommand.java:83)
>   at 
> org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:655)
>   at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:586)
>   at 
> org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:370)
>   at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:330)
>   at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:292)
> {noformat}
> It should really fail the operation rather than crash the CLI.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper issue #240: ZOOKEEPER-2757: Incorrect path crashes zkCli

2017-05-18 Thread afine
Github user afine commented on the issue:

https://github.com/apache/zookeeper/pull/240
  
@hanm I'm not sure that we should always assume that an 
IllegalArgumentException will only be thrown when a path is invalid. Since 
IllegalArgumentException does not need to be caught, it will be difficult for 
us to tell if we are masking IllegalArgumentExceptions thrown for other 
reasons. So we should minimize the code surrounded by `try { } 
catch(IllegalArgumentException e) {}` We cannot catch them within the methods 
of ZooKeeper.java so I think catching them at the "Command" level is the best 
we can do.

IllegalArgumentException is a RuntimeException, which should represent a 
"programming problem" 
(http://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html). 
>Runtime exceptions represent problems that are the result of a programming 
problem, and as such, the API client code cannot reasonably be expected to 
recover from them or to handle them in any way. 

So if it does pop up for reasons other than a bad path, we should certainly 
bubble it up and kill the CLI.

We abuse IllegalArgumentException all over ZK, I believe we should change 
this exception type in 3.6.

 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Success: ZOOKEEPER- PreCommit Build #718

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/718/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 68.23 MB...]
 [exec] 
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +1 tests included.  The patch appears to include 6 new or 
modified tests.
 [exec] 
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/718//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/718//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/718//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] b1e2446c28589ac2b296b31c503d7781be4b7929 logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD SUCCESSFUL
Total time: 17 minutes 56 seconds
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2784
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Success
Sending email for trigger: Success
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
All tests passed

[jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016924#comment-16016924
 ] 

Hadoop QA commented on ZOOKEEPER-2784:
--

+1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 6 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-github-pr-build/718//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/718//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/718//console

This message is automatically generated.

> Add some limitations on code level for `SID` to avoid configuration problem
> ---
>
> Key: ZOOKEEPER-2784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: quorum
>Affects Versions: 3.5.2
>Reporter: Benedict Jin
> Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same 
> `SID` problem, then the Zookeeper cluster will start successfully. But the 
> cluster is not health, and it will throw some problem like `not 
> synchronized`. So, i thought we should add some limitations on code level for 
> `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016915#comment-16016915
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2784:
---

Github user asdf2014 commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/257#discussion_r117406260
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ---
@@ -660,6 +665,9 @@ public void run() {
 "Ignoring exception", ie);
 }
 closeSocket(client);
+} catch (ConfigException ce) {
+LOG.error(ce.getMessage());
+throw new RuntimeException(ce);
--- End diff --

You are right. Throwing 'RuntimeException' does skip the closing 
`ServerSocket` part, so I moved it to the end of the` run` method.


> Add some limitations on code level for `SID` to avoid configuration problem
> ---
>
> Key: ZOOKEEPER-2784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: quorum
>Affects Versions: 3.5.2
>Reporter: Benedict Jin
> Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same 
> `SID` problem, then the Zookeeper cluster will start successfully. But the 
> cluster is not health, and it will throw some problem like `not 
> synchronized`. So, i thought we should add some limitations on code level for 
> `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #257: ZOOKEEPER-2784: Add same `sid` config problem c...

2017-05-18 Thread asdf2014
Github user asdf2014 commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/257#discussion_r117406260
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ---
@@ -660,6 +665,9 @@ public void run() {
 "Ignoring exception", ie);
 }
 closeSocket(client);
+} catch (ConfigException ce) {
+LOG.error(ce.getMessage());
+throw new RuntimeException(ce);
--- End diff --

You are right. Throwing 'RuntimeException' does skip the closing 
`ServerSocket` part, so I moved it to the end of the` run` method.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2775) ZK Client not able to connect with Xid out of order error

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016903#comment-16016903
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2775:
---

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/254
  
>> Will this results in any consistency issues later?

I guess the previous behavior was problematic and the fact 
tunnelAuthInProgress always return false once a login failed (even after a new 
connection retry attempt) is a bug that this JIRA trying to fix, right? If we 
keep the old semantic then the bug will not be fixed because of the details 
described in the JIRA - basically if we keep the old semantic and always return 
false upon a failed login then the future SASL packet will be treated as normal 
packet and got ignored - thus SASL login will never succeed..

>> so multiple threads are accessing the flag. 

Yeah this looks like the case - so should we set the flag as volatile?


> ZK Client not able to connect with Xid out of order error 
> --
>
> Key: ZOOKEEPER-2775
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2775
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.10, 3.5.3, 3.6.0
>Reporter: Bhupendra Kumar Jain
>Assignee: Mohammad Arshad
>Priority: Critical
> Attachments: ZOOKEEPER-2775-01.patch
>
>
> During Network unreachable scenario in one of the cluster, we observed Xid 
> out of order and Nothing in the queue error continously. And ZK client it 
> finally not able to connect successully to ZK server. 
> *Logs:*
> unexpected error, closing socket connection and attempting reconnect | 
> org.apache.zookeeper.ClientCnxn (ClientCnxn.java:1447) 
> java.io.IOException: Xid out of order. Got Xid 52 with err 0 expected Xid 53 
> for a packet with details: clientPath:null serverPath:null finished:false 
> header:: 53,101  replyHeader:: 0,0,-4  request:: 
> 12885502275,v{'/app1/controller,'/app1/config/changes},v{},v{'/app1/config/changes}
>   response:: null
>   at 
> org.apache.zookeeper.ClientCnxn$SendThread.readResponse(ClientCnxn.java:996)
>   at 
> org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:101)
>   at 
> org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:370)
>   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1426)
> unexpected error, closing socket connection and attempting reconnect 
> java.io.IOException: Nothing in the queue, but got 1
>   at 
> org.apache.zookeeper.ClientCnxn$SendThread.readResponse(ClientCnxn.java:983)
>   at 
> org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:101)
>   at 
> org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:370)
>   at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1426)
>   
> *Analysis:* 
> 1) First time Client fails to do SASL login due to network unreachable 
> problem.
> 2017-03-29 10:03:59,377 | WARN  | [main-SendThread(192.168.130.8:24002)] | 
> SASL configuration failed: javax.security.auth.login.LoginException: Network 
> is unreachable (sendto failed) Will continue connection to Zookeeper server 
> without SASL authentication, if Zookeeper server allows it. | 
> org.apache.zookeeper.ClientCnxn (ClientCnxn.java:1307) 
>   Here the boolean saslLoginFailed becomes true.
> 2) After some time network connection is recovered and client is successully 
> able to login but still the boolean saslLoginFailed is not reset to false. 
> 3) Now SASL negotiation between client and server start happening and during 
> this time no user request will be sent. ( As the socket channel will be 
> closed for write till sasl negotiation complets)
> 4) Now response from server for SASL packet will be processed by the client 
> and client assumes that tunnelAuthInProgress() is finished ( method checks 
> for saslLoginFailed boolean Since the boolean is true it assumes its done.) 
> and tries to process the packet as a other packet and will result in above 
> errors. 
> *Solution:*  Reset the saslLoginFailed boolean every time before client login



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper issue #254: ZOOKEEPER-2775: ZK Client not able to connect with Xid...

2017-05-18 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/254
  
>> Will this results in any consistency issues later?

I guess the previous behavior was problematic and the fact 
tunnelAuthInProgress always return false once a login failed (even after a new 
connection retry attempt) is a bug that this JIRA trying to fix, right? If we 
keep the old semantic then the bug will not be fixed because of the details 
described in the JIRA - basically if we keep the old semantic and always return 
false upon a failed login then the future SASL packet will be treated as normal 
packet and got ignored - thus SASL login will never succeed..

>> so multiple threads are accessing the flag. 

Yeah this looks like the case - so should we set the flag as volatile?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016899#comment-16016899
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2784:
---

Github user eribeiro commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/257#discussion_r117403350
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ---
@@ -660,6 +665,9 @@ public void run() {
 "Ignoring exception", ie);
 }
 closeSocket(client);
+} catch (ConfigException ce) {
+LOG.error(ce.getMessage());
+throw new RuntimeException(ce);
--- End diff --

Don't we have to call `closeSocket(client)` here before throwing the 
`RuntimeException`? Relying on OS/JVM to close a socket can be too much 
optimistic and leak resources. If I am right (please double check) then line 
667 can be moved to a finally block just below this catch clause.

Also, as the program flow is interrupted if a `ConfigException` is thrown 
lines 679-687 wouldn't be called and then `ServerSocket` also is not properly 
closed, right?

PS: I am not sure, would have to look carefully later and don't have time 
now, so excuse me if I am misunderstood it.



> Add some limitations on code level for `SID` to avoid configuration problem
> ---
>
> Key: ZOOKEEPER-2784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: quorum
>Affects Versions: 3.5.2
>Reporter: Benedict Jin
> Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same 
> `SID` problem, then the Zookeeper cluster will start successfully. But the 
> cluster is not health, and it will throw some problem like `not 
> synchronized`. So, i thought we should add some limitations on code level for 
> `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #257: ZOOKEEPER-2784: Add same `sid` config problem c...

2017-05-18 Thread eribeiro
Github user eribeiro commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/257#discussion_r117403350
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ---
@@ -660,6 +665,9 @@ public void run() {
 "Ignoring exception", ie);
 }
 closeSocket(client);
+} catch (ConfigException ce) {
+LOG.error(ce.getMessage());
+throw new RuntimeException(ce);
--- End diff --

Don't we have to call `closeSocket(client)` here before throwing the 
`RuntimeException`? Relying on OS/JVM to close a socket can be too much 
optimistic and leak resources. If I am right (please double check) then line 
667 can be moved to a finally block just below this catch clause.

Also, as the program flow is interrupted if a `ConfigException` is thrown 
lines 679-687 wouldn't be called and then `ServerSocket` also is not properly 
closed, right?

PS: I am not sure, would have to look carefully later and don't have time 
now, so excuse me if I am misunderstood it.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016883#comment-16016883
 ] 

Hadoop QA commented on ZOOKEEPER-2784:
--

+1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 6 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-github-pr-build/717//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/717//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/717//console

This message is automatically generated.

> Add some limitations on code level for `SID` to avoid configuration problem
> ---
>
> Key: ZOOKEEPER-2784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: quorum
>Affects Versions: 3.5.2
>Reporter: Benedict Jin
> Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same 
> `SID` problem, then the Zookeeper cluster will start successfully. But the 
> cluster is not health, and it will throw some problem like `not 
> synchronized`. So, i thought we should add some limitations on code level for 
> `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Success: ZOOKEEPER- PreCommit Build #717

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/717/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 68.31 MB...]
 [exec] 
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +1 tests included.  The patch appears to include 6 new or 
modified tests.
 [exec] 
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/717//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/717//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/717//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] 0dad5771635fea7f97be04f93bd59798615cc1ec logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD SUCCESSFUL
Total time: 18 minutes 4 seconds
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2784
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Success
Sending email for trigger: Success
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
All tests passed

[jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016879#comment-16016879
 ] 

Hadoop QA commented on ZOOKEEPER-2784:
--

+1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 6 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-github-pr-build/716//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/716//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/716//console

This message is automatically generated.

> Add some limitations on code level for `SID` to avoid configuration problem
> ---
>
> Key: ZOOKEEPER-2784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: quorum
>Affects Versions: 3.5.2
>Reporter: Benedict Jin
> Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same 
> `SID` problem, then the Zookeeper cluster will start successfully. But the 
> cluster is not health, and it will throw some problem like `not 
> synchronized`. So, i thought we should add some limitations on code level for 
> `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Success: ZOOKEEPER- PreCommit Build #716

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/716/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 68.30 MB...]
 [exec] 
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +1 tests included.  The patch appears to include 6 new or 
modified tests.
 [exec] 
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/716//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/716//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/716//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] 2566c1746200732f3552923a2a48900c038c9a8a logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD SUCCESSFUL
Total time: 18 minutes 41 seconds
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2784
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Success
Sending email for trigger: Success
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
All tests passed

[GitHub] zookeeper pull request #257: ZOOKEEPER-2784: Add same `sid` config problem c...

2017-05-18 Thread asdf2014
Github user asdf2014 commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/257#discussion_r117400479
  
--- Diff: src/java/test/org/apache/zookeeper/test/CnxManagerTest.java ---
@@ -18,36 +18,32 @@
 
 package org.apache.zookeeper.test;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.net.InetSocketAddress;
-import java.nio.ByteBuffer;
-import java.nio.channels.SocketChannel;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Random;
-import java.util.concurrent.TimeUnit;
-import java.net.Socket;
-
-import org.apache.zookeeper.common.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.zookeeper.PortAssignment;
 import org.apache.zookeeper.ZKTestCase;
+import org.apache.zookeeper.common.Time;
 import org.apache.zookeeper.server.quorum.QuorumCnxManager;
-import org.apache.zookeeper.server.quorum.QuorumCnxManager.Message;
 import org.apache.zookeeper.server.quorum.QuorumCnxManager.InitialMessage;
+import org.apache.zookeeper.server.quorum.QuorumCnxManager.Message;
 import org.apache.zookeeper.server.quorum.QuorumPeer;
 import org.apache.zookeeper.server.quorum.QuorumPeer.LearnerType;
 import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
 import org.apache.zookeeper.server.quorum.QuorumPeer.ServerState;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
--- End diff --

I see. I will roll it back.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016869#comment-16016869
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2784:
---

Github user asdf2014 commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/257#discussion_r117400479
  
--- Diff: src/java/test/org/apache/zookeeper/test/CnxManagerTest.java ---
@@ -18,36 +18,32 @@
 
 package org.apache.zookeeper.test;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.net.InetSocketAddress;
-import java.nio.ByteBuffer;
-import java.nio.channels.SocketChannel;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Random;
-import java.util.concurrent.TimeUnit;
-import java.net.Socket;
-
-import org.apache.zookeeper.common.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.zookeeper.PortAssignment;
 import org.apache.zookeeper.ZKTestCase;
+import org.apache.zookeeper.common.Time;
 import org.apache.zookeeper.server.quorum.QuorumCnxManager;
-import org.apache.zookeeper.server.quorum.QuorumCnxManager.Message;
 import org.apache.zookeeper.server.quorum.QuorumCnxManager.InitialMessage;
+import org.apache.zookeeper.server.quorum.QuorumCnxManager.Message;
 import org.apache.zookeeper.server.quorum.QuorumPeer;
 import org.apache.zookeeper.server.quorum.QuorumPeer.LearnerType;
 import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
 import org.apache.zookeeper.server.quorum.QuorumPeer.ServerState;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
--- End diff --

I see. I will roll it back.


> Add some limitations on code level for `SID` to avoid configuration problem
> ---
>
> Key: ZOOKEEPER-2784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: quorum
>Affects Versions: 3.5.2
>Reporter: Benedict Jin
> Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same 
> `SID` problem, then the Zookeeper cluster will start successfully. But the 
> cluster is not health, and it will throw some problem like `not 
> synchronized`. So, i thought we should add some limitations on code level for 
> `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016867#comment-16016867
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2784:
---

Github user eribeiro commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/257#discussion_r117400348
  
--- Diff: src/java/test/org/apache/zookeeper/test/CnxManagerTest.java ---
@@ -18,36 +18,32 @@
 
 package org.apache.zookeeper.test;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.net.InetSocketAddress;
-import java.nio.ByteBuffer;
-import java.nio.channels.SocketChannel;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Random;
-import java.util.concurrent.TimeUnit;
-import java.net.Socket;
-
-import org.apache.zookeeper.common.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.zookeeper.PortAssignment;
 import org.apache.zookeeper.ZKTestCase;
+import org.apache.zookeeper.common.Time;
 import org.apache.zookeeper.server.quorum.QuorumCnxManager;
-import org.apache.zookeeper.server.quorum.QuorumCnxManager.Message;
 import org.apache.zookeeper.server.quorum.QuorumCnxManager.InitialMessage;
+import org.apache.zookeeper.server.quorum.QuorumCnxManager.Message;
 import org.apache.zookeeper.server.quorum.QuorumPeer;
 import org.apache.zookeeper.server.quorum.QuorumPeer.LearnerType;
 import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
 import org.apache.zookeeper.server.quorum.QuorumPeer.ServerState;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
--- End diff --

@asdf2014 FYI, ZK codebase gives preference to explicit imports instead of 
using wildcards.


> Add some limitations on code level for `SID` to avoid configuration problem
> ---
>
> Key: ZOOKEEPER-2784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: quorum
>Affects Versions: 3.5.2
>Reporter: Benedict Jin
> Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same 
> `SID` problem, then the Zookeeper cluster will start successfully. But the 
> cluster is not health, and it will throw some problem like `not 
> synchronized`. So, i thought we should add some limitations on code level for 
> `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #257: ZOOKEEPER-2784: Add same `sid` config problem c...

2017-05-18 Thread eribeiro
Github user eribeiro commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/257#discussion_r117400348
  
--- Diff: src/java/test/org/apache/zookeeper/test/CnxManagerTest.java ---
@@ -18,36 +18,32 @@
 
 package org.apache.zookeeper.test;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.net.InetSocketAddress;
-import java.nio.ByteBuffer;
-import java.nio.channels.SocketChannel;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Random;
-import java.util.concurrent.TimeUnit;
-import java.net.Socket;
-
-import org.apache.zookeeper.common.Time;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.zookeeper.PortAssignment;
 import org.apache.zookeeper.ZKTestCase;
+import org.apache.zookeeper.common.Time;
 import org.apache.zookeeper.server.quorum.QuorumCnxManager;
-import org.apache.zookeeper.server.quorum.QuorumCnxManager.Message;
 import org.apache.zookeeper.server.quorum.QuorumCnxManager.InitialMessage;
+import org.apache.zookeeper.server.quorum.QuorumCnxManager.Message;
 import org.apache.zookeeper.server.quorum.QuorumPeer;
 import org.apache.zookeeper.server.quorum.QuorumPeer.LearnerType;
 import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
 import org.apache.zookeeper.server.quorum.QuorumPeer.ServerState;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
--- End diff --

@asdf2014 FYI, ZK codebase gives preference to explicit imports instead of 
using wildcards.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Failed: ZOOKEEPER- PreCommit Build #715

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/715/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 68.88 MB...]
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] -1 core tests.  The patch failed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/715//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/715//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/715//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Unable to log in to server: 
https://issues.apache.org/jira/rpc/soap/jirasoapservice-v2 with user: hadoopqa.
 [exec]  Cause: (0)null
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1642:
 exec returned: 1

Total time: 18 minutes 16 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Compressed 576.65 KB of artifacts by 38.8% relative to #712
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2784
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
1 tests failed.
FAILED:  
org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testInconsistentPeerType

Error Message:
Should warn about inconsistent peer type

Stack Trace:
junit.framework.AssertionFailedError: Should warn about inconsistent peer type
at 
org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testInconsistentPeerType(QuorumPeerMainTest.java:551)
at 
org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:79)

[jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016854#comment-16016854
 ] 

Hadoop QA commented on ZOOKEEPER-2784:
--

-1 overall.  GitHub Pull Request  Build
  

+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 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 failed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/715//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/715//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/715//console

This message is automatically generated.

> Add some limitations on code level for `SID` to avoid configuration problem
> ---
>
> Key: ZOOKEEPER-2784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: quorum
>Affects Versions: 3.5.2
>Reporter: Benedict Jin
> Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same 
> `SID` problem, then the Zookeeper cluster will start successfully. But the 
> cluster is not health, and it will throw some problem like `not 
> synchronized`. So, i thought we should add some limitations on code level for 
> `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Failed: ZOOKEEPER- PreCommit Build #714

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/714/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 67.03 MB...]
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] -1 core tests.  The patch failed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/714//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/714//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/714//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec] Remote error: (0)null
 [exec] 95aec12fe5c7b0f705f00ff4896baf824d6ad80d logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1642:
 exec returned: 1

Total time: 21 minutes 50 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Compressed 576.65 KB of artifacts by 38.8% relative to #712
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2784
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
1 tests failed.
FAILED:  org.apache.zookeeper.test.CnxManagerTest.testSameSID

Error Message:
Connection refused

Stack Trace:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at 
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at 
org.apache.zookeeper.test.CnxManagerTest.testSameSID(CnxManagerTest.java:392)
at 
org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:79)

[jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016825#comment-16016825
 ] 

Hadoop QA commented on ZOOKEEPER-2784:
--

-1 overall.  GitHub Pull Request  Build
  

+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 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 failed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/713//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/713//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/713//console

This message is automatically generated.

> Add some limitations on code level for `SID` to avoid configuration problem
> ---
>
> Key: ZOOKEEPER-2784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: quorum
>Affects Versions: 3.5.2
>Reporter: Benedict Jin
> Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same 
> `SID` problem, then the Zookeeper cluster will start successfully. But the 
> cluster is not health, and it will throw some problem like `not 
> synchronized`. So, i thought we should add some limitations on code level for 
> `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Failed: ZOOKEEPER- PreCommit Build #713

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/713/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 61.37 MB...]
 [exec] 
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] -1 core tests.  The patch failed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/713//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/713//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/713//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] ba93373c6be5d14fccab15e6f2bad619722c9355 logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1642:
 exec returned: 1

Total time: 18 minutes 13 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Compressed 576.66 KB of artifacts by 38.8% relative to #712
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2784
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
1 tests failed.
FAILED:  
org.apache.zookeeper.server.quorum.ReconfigFailureCasesTest.testLeaderTimesoutOnNewQuorum

Error Message:
expected:<[leaderelection]> but was:<[following]>

Stack Trace:
junit.framework.AssertionFailedError: expected:<[leaderelection]> but 
was:<[following]>
at 
org.apache.zookeeper.server.quorum.ReconfigFailureCasesTest.testLeaderTimesoutOnNewQuorum(ReconfigFailureCasesTest.java:197)
at 
org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:79)

[jira] [Commented] (ZOOKEEPER-2774) Ephemeral znode will not be removed when sesstion timeout, if the system time of ZooKeeper node changes unexpectedly.

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016756#comment-16016756
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2774:
---

Github user JiangJiafu commented on the issue:

https://github.com/apache/zookeeper/pull/253
  
Thanks for your work @hanm @afine .


> Ephemeral znode will not be removed when sesstion timeout, if the system time 
> of ZooKeeper node changes unexpectedly.
> -
>
> Key: ZOOKEEPER-2774
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2774
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.8, 3.4.9, 3.4.10
> Environment: Centos6.5
>Reporter: JiangJiafu
> Fix For: 3.4.11
>
>
> 1. Deploy a ZooKeeper cluster with one node.
> 2. Create a Ephemeral znode.
> 3. Change the system time of the ZooKeeper node to a earlier point.
> 4. Disconnect the client with the ZooKeeper server.
> Then the ephemeral znode will exist for a long time even when session timeout.
> I have read the ZooKeeper source code and I find the code int 
> SessionTrackerImpl.java,
> {code:title=SessionTrackerImpl.java|borderStyle=solid}
> @Override
> synchronized public void run() {
> try {
> while (running) {
> currentTime = System.currentTimeMillis();
> if (nextExpirationTime > currentTime) {
> this.wait(nextExpirationTime - currentTime);
> continue;
> }
> SessionSet set;
> set = sessionSets.remove(nextExpirationTime);
> if (set != null) {
> for (SessionImpl s : set.sessions) {
> setSessionClosing(s.sessionId);
> expirer.expire(s);
> }
> }
> nextExpirationTime += expirationInterval;
> }
> } catch (InterruptedException e) {
> handleException(this.getName(), e);
> }
> LOG.info("SessionTrackerImpl exited loop!");
> }
> {code}
> I think it may be better to use System.nanoTime(), not 
> System.currentTimeMillis, because the later can be changed manually or 
> automatically by a NTP client. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2774) Ephemeral znode will not be removed when sesstion timeout, if the system time of ZooKeeper node changes unexpectedly.

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016757#comment-16016757
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2774:
---

Github user JiangJiafu closed the pull request at:

https://github.com/apache/zookeeper/pull/253


> Ephemeral znode will not be removed when sesstion timeout, if the system time 
> of ZooKeeper node changes unexpectedly.
> -
>
> Key: ZOOKEEPER-2774
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2774
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.8, 3.4.9, 3.4.10
> Environment: Centos6.5
>Reporter: JiangJiafu
> Fix For: 3.4.11
>
>
> 1. Deploy a ZooKeeper cluster with one node.
> 2. Create a Ephemeral znode.
> 3. Change the system time of the ZooKeeper node to a earlier point.
> 4. Disconnect the client with the ZooKeeper server.
> Then the ephemeral znode will exist for a long time even when session timeout.
> I have read the ZooKeeper source code and I find the code int 
> SessionTrackerImpl.java,
> {code:title=SessionTrackerImpl.java|borderStyle=solid}
> @Override
> synchronized public void run() {
> try {
> while (running) {
> currentTime = System.currentTimeMillis();
> if (nextExpirationTime > currentTime) {
> this.wait(nextExpirationTime - currentTime);
> continue;
> }
> SessionSet set;
> set = sessionSets.remove(nextExpirationTime);
> if (set != null) {
> for (SessionImpl s : set.sessions) {
> setSessionClosing(s.sessionId);
> expirer.expire(s);
> }
> }
> nextExpirationTime += expirationInterval;
> }
> } catch (InterruptedException e) {
> handleException(this.getName(), e);
> }
> LOG.info("SessionTrackerImpl exited loop!");
> }
> {code}
> I think it may be better to use System.nanoTime(), not 
> System.currentTimeMillis, because the later can be changed manually or 
> automatically by a NTP client. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper issue #253: ZOOKEEPER-2774

2017-05-18 Thread JiangJiafu
Github user JiangJiafu commented on the issue:

https://github.com/apache/zookeeper/pull/253
  
Thanks for your work @hanm @afine .


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #253: ZOOKEEPER-2774

2017-05-18 Thread JiangJiafu
Github user JiangJiafu closed the pull request at:

https://github.com/apache/zookeeper/pull/253


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


ZooKeeper_branch35_openjdk7 - Build # 528 - Failure

2017-05-18 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_openjdk7/528/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 48.13 MB...]
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2017-05-18 23:40:44,747 [myid:] - WARN  [New I/O worker 
#5214:NettyServerCnxn@418] - Closing connection to /127.0.0.1:38634
[junit] java.io.IOException: ZK down
[junit] at 
org.apache.zookeeper.server.NettyServerCnxn.receiveMessage(NettyServerCnxn.java:355)
[junit] at 
org.apache.zookeeper.server.NettyServerCnxnFactory$CnxnChannelHandler.processMessage(NettyServerCnxnFactory.java:244)
[junit] at 
org.apache.zookeeper.server.NettyServerCnxnFactory$CnxnChannelHandler.messageReceived(NettyServerCnxnFactory.java:166)
[junit] at 
org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88)
[junit] at 
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
[junit] at 
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
[junit] at 
org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
[junit] at 
org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
[junit] at 
org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
[junit] at 
org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
[junit] at 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[junit] at 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2017-05-18 23:40:44,747 [myid:] - INFO  
[QuorumPeer[myid=5](plain=/127.0.0.1:22009)(secure=disabled):PrepRequestProcessor@1004]
 - Shutting down
[junit] 2017-05-18 23:40:44,824 [myid:] - INFO  
[HammerThread-76:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2017-05-18 23:40:44,824 [myid:] - INFO  [New I/O worker 
#5603:ClientCnxnSocketNetty$ZKClientHandler@384] - channel is disconnected: 
[id: 0x1cd5688a, /127.0.0.1:57150 :> 127.0.0.1/127.0.0.1:22023]
[junit] 2017-05-18 23:40:44,824 [myid:] - INFO  [New I/O worker 
#5407:ClientCnxnSocketNetty$ZKClientHandler@384] - channel is disconnected: 
[id: 0x47330a7f, /127.0.0.1:60074 :> 127.0.0.1/127.0.0.1:22024]
[junit] 2017-05-18 23:40:44,825 [myid:] - INFO  [New I/O worker 
#5407:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2017-05-18 23:40:44,744 [myid:] - INFO  
[ObserverRequestProcessor:5:ObserverRequestProcessor@119] - 
ObserverRequestProcessor exited loop!
[junit] 2017-05-18 23:40:44,824 [myid:] - INFO  [New I/O worker 
#5434:ClientCnxnSocketNetty$ZKClientHandler@384] - channel is disconnected: 
[id: 0xa8e88c0b, /127.0.0.1:60118 :> 127.0.0.1/127.0.0.1:22024]
[junit] 2017-05-18 23:40:44,826 [myid:] - INFO  [New I/O worker 
#5434:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2017-05-18 23:40:44,743 [myid:] - INFO  
[QuorumPeer[myid=4](plain=/127.0.0.1:22024)(secure=disabled):ObserverRequestProcessor@151]
 - Shutting down
[junit] 2017-05-18 23:40:44,754 [myid:] - INFO  
[HammerThread-93-EventThread:ClientCnxn$EventThread@513] - EventThread shut 
down for session: 0x0
[junit] 2017-05-18 23:40:44,754 [myid:] - INFO  
[HammerThread-93:ZooKeeper@1331] - Session: 0x0 closed
[junit] 2017-05-18 23:40:44,751 [myid:] - INFO  [New I/O worker 
#5402:ClientCnxnSocketNetty$ZKClientHandler@384] - channel is disconnected: 
[id: 0xfa491418, /127.0.0.1:44194 :> 127.0.0.1/127.0.0.1:22025]
[junit] 2017-05-18 23:40:44,750 [myid:] - INFO  
[SessionTracker:QuorumZooKeeperServer@157] - Submitting global closeSession 
request for session 0x40448fbe9eb0009
[junit] 2017-05-18 23:40:44,826 [myid:] - INFO  
[QuorumPeer[myid=4](plain=/127.0.0.1:22024)(secure=disabled):CommitProcessor@359]
 - Shutting down
[junit] 2017-05-18 23:40:44,826 [myid:] - INFO  
[HammerThread-76-EventThread:ClientCnxn$EventThread@513] - EventThread shut 
down for session: 0x0
[junit] 

[GitHub] zookeeper issue #257: ZOOKEEPER-2784: Add same `sid` config problem check

2017-05-18 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/257
  
@asdf2014 : There are lots of formatting changes in this patch, which makes 
review harder.  Can you please update the patch to avoid those formatting 
changes? See [How To 
Contribute](https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute):

## Please don't do in pull request:
reformat code unrelated to the bug being fixed: formatting changes should 
be separate patches/commits.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016660#comment-16016660
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2784:
---

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/257
  
@asdf2014 : There are lots of formatting changes in this patch, which makes 
review harder.  Can you please update the patch to avoid those formatting 
changes? See [How To 
Contribute](https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute):

## Please don't do in pull request:
reformat code unrelated to the bug being fixed: formatting changes should 
be separate patches/commits.


> Add some limitations on code level for `SID` to avoid configuration problem
> ---
>
> Key: ZOOKEEPER-2784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: quorum
>Affects Versions: 3.5.2
>Reporter: Benedict Jin
> Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same 
> `SID` problem, then the Zookeeper cluster will start successfully. But the 
> cluster is not health, and it will throw some problem like `not 
> synchronized`. So, i thought we should add some limitations on code level for 
> `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


ZooKeeper-trunk-openjdk7 - Build # 1474 - Failure

2017-05-18 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-openjdk7/1474/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 64.37 MB...]
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-18 23:30:44,802 [myid:127.0.0.1:24690] - INFO  
[main-SendThread(127.0.0.1:24690):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:24690. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 23:30:44,803 [myid:127.0.0.1:24690] - WARN  
[main-SendThread(127.0.0.1:24690):ClientCnxn$SendThread@1235] - Session 
0x10448cf95c70001 for server 127.0.0.1/127.0.0.1:24690, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-18 23:30:45,110 [myid:127.0.0.1:24690] - INFO  
[main-SendThread(127.0.0.1:24690):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:24690. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 23:30:45,111 [myid:127.0.0.1:24690] - WARN  
[main-SendThread(127.0.0.1:24690):ClientCnxn$SendThread@1235] - Session 
0x10448cf95c7 for server 127.0.0.1/127.0.0.1:24690, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-18 23:30:45,647 [myid:127.0.0.1:24687] - INFO  
[main-SendThread(127.0.0.1:24687):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:24687. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 23:30:45,647 [myid:127.0.0.1:24687] - WARN  
[main-SendThread(127.0.0.1:24687):ClientCnxn$SendThread@1235] - Session 
0x448cf94830001 for server 127.0.0.1/127.0.0.1:24687, unexpected error, closing 
socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-18 23:30:46,197 [myid:127.0.0.1:24690] - INFO  
[main-SendThread(127.0.0.1:24690):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:24690. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 23:30:46,198 [myid:127.0.0.1:24690] - WARN  
[main-SendThread(127.0.0.1:24690):ClientCnxn$SendThread@1235] - Session 
0x10448cf95c70001 for server 127.0.0.1/127.0.0.1:24690, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-18 23:30:46,272 [myid:127.0.0.1:24687] - INFO  
[main-SendThread(127.0.0.1:24687):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:24687. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 23:30:46,273 [myid:127.0.0.1:24687] - WARN  
[main-SendThread(127.0.0.1:24687):ClientCnxn$SendThread@1235] - Session 
0x448cf9483 for server 127.0.0.1/127.0.0.1:24687, unexpected error, closing 
socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
[junit] at 

[jira] [Commented] (ZOOKEEPER-2757) Incorrect path crashes zkCli

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016650#comment-16016650
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2757:
---

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/240
  
How about catch the IllegalArgumentException at ZooKeeperMain.processCmd 
and directly print the exception message? This way we don't need to make change 
to individual command.


> Incorrect path crashes zkCli
> 
>
> Key: ZOOKEEPER-2757
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2757
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.5.3
>Reporter: Flavio Junqueira
>Assignee: Abraham Fine
>Priority: Minor
> Fix For: 3.5.4
>
>
> If I try {{delete test}} without the leading /, then the CLI crashes with 
> this exception:
> {noformat}
> Exception in thread "main" java.lang.IllegalArgumentException: Path must 
> start with / character
>   at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:51)
>   at org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:1659)
>   at org.apache.zookeeper.cli.DeleteCommand.exec(DeleteCommand.java:83)
>   at 
> org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:655)
>   at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:586)
>   at 
> org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:370)
>   at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:330)
>   at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:292)
> {noformat}
> It should really fail the operation rather than crash the CLI.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper issue #240: ZOOKEEPER-2757: Incorrect path crashes zkCli

2017-05-18 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/240
  
How about catch the IllegalArgumentException at ZooKeeperMain.processCmd 
and directly print the exception message? This way we don't need to make change 
to individual command.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2730) Cleanup findbug warnings in branch-3.4: Internationalization Warnings

2017-05-18 Thread Michael Han (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016635#comment-16016635
 ] 

Michael Han commented on ZOOKEEPER-2730:


[~gosubpl] go for it. 

> Cleanup findbug warnings in branch-3.4: Internationalization Warnings
> -
>
> Key: ZOOKEEPER-2730
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2730
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DmFound reliance on default encoding in 
> org.apache.jute.compiler.CGenerator.genCode(): new java.io.FileWriter(File)
> DmFound reliance on default encoding in 
> org.apache.jute.compiler.CppGenerator.genCode(): new java.io.FileWriter(File)
> DmFound reliance on default encoding in 
> org.apache.jute.compiler.JRecord.genCsharpCode(File): new 
> java.io.FileWriter(File)
> DmFound reliance on default encoding in 
> org.apache.jute.compiler.JRecord.genJavaCode(File): new 
> java.io.FileWriter(File)
> DmFound reliance on default encoding in new 
> org.apache.jute.XmlOutputArchive(OutputStream): new 
> java.io.PrintStream(OutputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.client.FourLetterWordMain.send4LetterWord(String, int, 
> String, int): new java.io.InputStreamReader(InputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.client.FourLetterWordMain.send4LetterWord(String, int, 
> String, int): String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.ClientCnxn$SendThread.pingRwServer(): new 
> java.io.InputStreamReader(InputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.ClientCnxn$SendThread.pingRwServer(): String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.auth.DigestAuthenticationProvider.generateDigest(String):
>  String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.auth.DigestAuthenticationProvider.handleAuthentication(ServerCnxn,
>  byte[]): new String(byte[])
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.DataTree.updateBytes(String, long): new 
> String(byte[])
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.DataTree.updateBytes(String, long): 
> String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.DataTree.updateCount(String, int): new 
> String(byte[])
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.DataTree.updateCount(String, int): 
> String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.DataTree.updateQuotaForPath(String): 
> String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.NettyServerCnxn$SendBufferWriter.checkFlush(boolean):
>  String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.NIOServerCnxn$SendBufferWriter.checkFlush(boolean):
>  String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.persistence.FileSnap. FileSnap>(): String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.persistence.FileTxnLog. FileTxnLog>(): String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.quorum.QuorumPeer.readLongFromFile(String): new 
> java.io.FileReader(File)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.quorum.QuorumPeer.writeLongToFile(String, long): 
> new java.io.OutputStreamWriter(OutputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(Properties):
>  new java.io.FileReader(File)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.Request.toString(): new String(byte[])
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.ServerCnxn.(): 
> String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.TraceFormatter.main(String[]): new String(byte[])
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.util.OSMXBean.getMaxFileDescriptorCount(): new 
> java.io.InputStreamReader(InputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.util.OSMXBean.getOpenFileDescriptorCount(): new 
> java.io.InputStreamReader(InputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.ServerAdminClient.dump(String, int): new String(byte[])
> DmFound reliance on default encoding in 
> 

ZooKeeper_branch35_jdk8 - Build # 529 - Failure

2017-05-18 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_jdk8/529/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 63.71 MB...]
[junit] 2017-05-18 23:13:49,957 [myid:127.0.0.1:11234] - INFO  
[main-SendThread(127.0.0.1:11234):ClientCnxn$SendThread@948] - Socket 
connection established, initiating session, client: /127.0.0.1:41698, server: 
127.0.0.1/127.0.0.1:11234
[junit] 2017-05-18 23:13:49,957 [myid:4] - INFO  
[NIOServerCxnFactory.AcceptThread:localhost/127.0.0.1:11234:NIOServerCnxnFactory$AcceptThread@296]
 - Accepted socket connection from /127.0.0.1:41698
[junit] 2017-05-18 23:13:50,004 [myid:127.0.0.1:11225] - INFO  
[main-SendThread(127.0.0.1:11225):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:11225. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 23:13:50,005 [myid:127.0.0.1:11225] - WARN  
[main-SendThread(127.0.0.1:11225):ClientCnxn$SendThread@1235] - Session 
0x105639837b10001 for server 127.0.0.1/127.0.0.1:11225, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-18 23:13:50,572 [myid:127.0.0.1:11225] - INFO  
[main-SendThread(127.0.0.1:11225):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:11225. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 23:13:50,573 [myid:127.0.0.1:11225] - WARN  
[main-SendThread(127.0.0.1:11225):ClientCnxn$SendThread@1235] - Session 
0x105639837b1 for server 127.0.0.1/127.0.0.1:11225, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-18 23:13:51,188 [myid:127.0.0.1:11222] - INFO  
[main-SendThread(127.0.0.1:11222):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:11222. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 23:13:51,189 [myid:127.0.0.1:11222] - WARN  
[main-SendThread(127.0.0.1:11222):ClientCnxn$SendThread@1235] - Session 
0x5639835aa for server 127.0.0.1/127.0.0.1:11222, unexpected error, closing 
socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-18 23:13:51,321 [myid:127.0.0.1:11225] - INFO  
[main-SendThread(127.0.0.1:11225):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:11225. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 23:13:51,321 [myid:127.0.0.1:11225] - WARN  
[main-SendThread(127.0.0.1:11225):ClientCnxn$SendThread@1235] - Session 
0x105639837b10001 for server 127.0.0.1/127.0.0.1:11225, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)
[junit] 2017-05-18 23:13:51,420 [myid:127.0.0.1:11222] - INFO  
[main-SendThread(127.0.0.1:11222):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:11222. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 23:13:51,421 [myid:127.0.0.1:11222] - WARN  
[main-SendThread(127.0.0.1:11222):ClientCnxn$SendThread@1235] - Session 
0x5639835aa0001 for server 127.0.0.1/127.0.0.1:11222, unexpected error, closing 
socket connection and attempting reconnect

[jira] [Commented] (ZOOKEEPER-2684) Fix a crashing bug in the mixed workloads commit processor

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016632#comment-16016632
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2684:
---

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/167
  
@nerdyyatrice I don't see Jenkins pre-commit build is kicked off for your 
patch. I think a combination of these should kick the build bot:
* Put string "ZOOKEEPER-2684" in pull request title. The bot running a 
script that looks for JIRA number.
* And, after update title, close and reopen this pull request. This should 
again trigger a pre-commit build.
Do you mind do these so we can sign off this pull request from jenkins?


> Fix a crashing bug in the mixed workloads commit processor
> --
>
> Key: ZOOKEEPER-2684
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2684
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.6.0
> Environment: with pretty heavy load on a real cluster
>Reporter: Ryan Zhang
>Assignee: Ryan Zhang
>Priority: Blocker
> Attachments: ZOOKEEPER-2684.patch
>
>
> We deployed our build with ZOOKEEPER-2024 and it quickly started to crash 
> with the following error
> atla-buh-05-sr1.prod.twttr.net: 2017-01-18 22:24:42,305 - ERROR 
> [CommitProcessor:2] 
> -org.apache.zookeeper.server.quorum.CommitProcessor.run(CommitProcessor.java:268)
>  – Got cxid 0x119fa expected 0x11fc5 for client session id 1009079ba470055
> atla-buh-05-sr1.prod.twttr.net: 2017-01-18 22:32:04,746 - ERROR 
> [CommitProcessor:2] 
> -org.apache.zookeeper.server.quorum.CommitProcessor.run(CommitProcessor.java:268)
>  – Got cxid 0x698 expected 0x928 for client session id 4002eeb3fd0009d
> atla-buh-05-sr1.prod.twttr.net: 2017-01-18 22:34:46,648 - ERROR 
> [CommitProcessor:2] 
> -org.apache.zookeeper.server.quorum.CommitProcessor.run(CommitProcessor.java:268)
>  – Got cxid 0x8904 expected 0x8f34 for client session id 51b8905c90251
> atla-buh-05-sr1.prod.twttr.net: 2017-01-18 22:43:46,834 - ERROR 
> [CommitProcessor:2] 
> -org.apache.zookeeper.server.quorum.CommitProcessor.run(CommitProcessor.java:268)
>  – Got cxid 0x3a8d expected 0x3ebc for client session id 2051af11af900cc
> clearly something is not right in the new commit processor per session queue 
> implementation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper issue #167: commitProcessor does not crash when an unseen commit s...

2017-05-18 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/167
  
@nerdyyatrice I don't see Jenkins pre-commit build is kicked off for your 
patch. I think a combination of these should kick the build bot:
* Put string "ZOOKEEPER-2684" in pull request title. The bot running a 
script that looks for JIRA number.
* And, after update title, close and reopen this pull request. This should 
again trigger a pre-commit build.
Do you mind do these so we can sign off this pull request from jenkins?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Success: ZOOKEEPER- PreCommit Build #712

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/712/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 67.37 MB...]
 [exec] 
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +1 tests included.  The patch appears to include 4 new or 
modified tests.
 [exec] 
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/712//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/712//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/712//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] dbf6c9b4d00da8b9215614f6c1f0347175f56928 logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD SUCCESSFUL
Total time: 18 minutes 45 seconds
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2753
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Success
Sending email for trigger: Success
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
All tests passed

[jira] [Commented] (ZOOKEEPER-2753) Introduce a python script for generating flaky test report

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016622#comment-16016622
 ] 

Hadoop QA commented on ZOOKEEPER-2753:
--

+1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+1 tests included.  The patch appears to include 4 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-github-pr-build/712//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/712//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/712//console

This message is automatically generated.

> Introduce a python script for generating flaky test report
> --
>
> Key: ZOOKEEPER-2753
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2753
> Project: ZooKeeper
>  Issue Type: Sub-task
>  Components: tests
>Reporter: Michael Han
>Assignee: Michael Han
>  Labels: tools
>
> This python script uses Jenkins REST API to query Jenkins build, analyze test 
> results and generate reports of flaky tests over a range of builds across 
> specific time periods. 
> This is preview of what the dashboard it generates would look like:
> http://home.apache.org/~hanm/dashboard/report.html
> Pull Request: https://github.com/apache/zookeeper/pull/224



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Failed: ZOOKEEPER- PreCommit Build #711

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/711/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 34.29 MB...]
 [exec] +1 tests included.  The patch appears to include 3 new or 
modified tests.
 [exec] 
 [exec] -1 javadoc.  The javadoc tool appears to have generated 1 
warning messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] -1 findbugs.  The patch appears to introduce 83 new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/711//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/711//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/711//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] 37dc59c674cc33c5f664b0a09c5377b6dab5aa36 logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1703:
 exec returned: 2

Total time: 36 minutes 12 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2731
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
All tests passed

[jira] [Commented] (ZOOKEEPER-2731) Cleanup findbug warnings in branch-3.4: Malicious code vulnerability Warnings

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016612#comment-16016612
 ] 

Hadoop QA commented on ZOOKEEPER-2731:
--

-1 overall.  GitHub Pull Request  Build
  

+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 appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 83 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/711//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/711//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/711//console

This message is automatically generated.

> Cleanup findbug warnings in branch-3.4: Malicious code vulnerability Warnings
> -
>
> Key: ZOOKEEPER-2731
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2731
> Project: ZooKeeper
>  Issue Type: Sub-task
>Affects Versions: 3.4.9
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> MSorg.apache.zookeeper.Environment.JAAS_CONF_KEY isn't final but should be
> Bug type MS_SHOULD_BE_FINAL (click for details) 
> In class org.apache.zookeeper.Environment
> Field org.apache.zookeeper.Environment.JAAS_CONF_KEY
> At Environment.java:[line 34]
> MSorg.apache.zookeeper.server.ServerCnxn.cmd2String is a mutable 
> collection which should be package protected
> Bug type MS_MUTABLE_COLLECTION_PKGPROTECT (click for details) 
> In class org.apache.zookeeper.server.ServerCnxn
> Field org.apache.zookeeper.server.ServerCnxn.cmd2String
> At ServerCnxn.java:[line 230]
> MSorg.apache.zookeeper.ZooDefs$Ids.OPEN_ACL_UNSAFE is a mutable collection
> Bug type MS_MUTABLE_COLLECTION (click for details) 
> In class org.apache.zookeeper.ZooDefs$Ids
> Field org.apache.zookeeper.ZooDefs$Ids.OPEN_ACL_UNSAFE
> At ZooDefs.java:[line 100]
> MSorg.apache.zookeeper.ZooKeeperMain.commandMap is a mutable collection 
> which should be package protected
> Bug type MS_MUTABLE_COLLECTION_PKGPROTECT (click for details) 
> In class org.apache.zookeeper.ZooKeeperMain
> Field org.apache.zookeeper.ZooKeeperMain.commandMap
> At ZooKeeperMain.java:[line 53]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2684) Fix a crashing bug in the mixed workloads commit processor

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016601#comment-16016601
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2684:
---

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/167
  
ZOOKEEPER-2684 kick jenkins bot


> Fix a crashing bug in the mixed workloads commit processor
> --
>
> Key: ZOOKEEPER-2684
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2684
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.6.0
> Environment: with pretty heavy load on a real cluster
>Reporter: Ryan Zhang
>Assignee: Ryan Zhang
>Priority: Blocker
> Attachments: ZOOKEEPER-2684.patch
>
>
> We deployed our build with ZOOKEEPER-2024 and it quickly started to crash 
> with the following error
> atla-buh-05-sr1.prod.twttr.net: 2017-01-18 22:24:42,305 - ERROR 
> [CommitProcessor:2] 
> -org.apache.zookeeper.server.quorum.CommitProcessor.run(CommitProcessor.java:268)
>  – Got cxid 0x119fa expected 0x11fc5 for client session id 1009079ba470055
> atla-buh-05-sr1.prod.twttr.net: 2017-01-18 22:32:04,746 - ERROR 
> [CommitProcessor:2] 
> -org.apache.zookeeper.server.quorum.CommitProcessor.run(CommitProcessor.java:268)
>  – Got cxid 0x698 expected 0x928 for client session id 4002eeb3fd0009d
> atla-buh-05-sr1.prod.twttr.net: 2017-01-18 22:34:46,648 - ERROR 
> [CommitProcessor:2] 
> -org.apache.zookeeper.server.quorum.CommitProcessor.run(CommitProcessor.java:268)
>  – Got cxid 0x8904 expected 0x8f34 for client session id 51b8905c90251
> atla-buh-05-sr1.prod.twttr.net: 2017-01-18 22:43:46,834 - ERROR 
> [CommitProcessor:2] 
> -org.apache.zookeeper.server.quorum.CommitProcessor.run(CommitProcessor.java:268)
>  – Got cxid 0x3a8d expected 0x3ebc for client session id 2051af11af900cc
> clearly something is not right in the new commit processor per session queue 
> implementation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper issue #167: commitProcessor does not crash when an unseen commit s...

2017-05-18 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/167
  
ZOOKEEPER-2684 kick jenkins bot


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


ZooKeeper-trunk-jdk8 - Build # 1052 - Failure

2017-05-18 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-jdk8/1052/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 65.34 MB...]
[junit] at 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[junit] at 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2017-05-18 22:36:26,148 [myid:] - INFO  [New I/O boss 
#15092:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2017-05-18 22:36:26,148 [myid:127.0.0.1:22120] - INFO  
[main-SendThread(127.0.0.1:22120):ClientCnxn$SendThread@1231] - channel for 
sessionid 0x20448dca46b is lost, closing socket connection and attempting 
reconnect
[junit] 2017-05-18 22:36:26,346 [myid:127.0.0.1:21994] - INFO  
[main-SendThread(127.0.0.1:21994):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:21994. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 22:36:26,347 [myid:] - INFO  [New I/O boss 
#98:ClientCnxnSocketNetty$1@127] - future isn't success, cause: {}
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:21994
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
[junit] at 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[junit] at 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2017-05-18 22:36:26,347 [myid:] - WARN  [New I/O boss 
#98:ClientCnxnSocketNetty$ZKClientHandler@439] - Exception caught: [id: 
0x4e173ab5] EXCEPTION: java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:21994
[junit] java.net.ConnectException: Connection refused: 
127.0.0.1/127.0.0.1:21994
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
[junit] at 
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
[junit] at 
org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
[junit] at 
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
[junit] at 
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
[junit] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[junit] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[junit] at java.lang.Thread.run(Thread.java:745)
[junit] 2017-05-18 22:36:26,347 [myid:] - INFO  [New I/O boss 
#98:ClientCnxnSocketNetty@208] - channel is told closing
[junit] 2017-05-18 22:36:26,347 [myid:127.0.0.1:21994] - INFO  
[main-SendThread(127.0.0.1:21994):ClientCnxn$SendThread@1231] - channel for 
sessionid 0x10448d959dc is lost, closing socket connection and attempting 
reconnect
[junit] 2017-05-18 22:36:26,708 [myid:127.0.0.1:22169] - WARN  
[main-SendThread(127.0.0.1:22169):ClientCnxn$SendThread@1181] - Client session 
timed out, have not heard from server in 2ms for sessionid 0x10448de32eb0001
[junit] 2017-05-18 22:36:26,708 [myid:127.0.0.1:22169] - INFO  
[main-SendThread(127.0.0.1:22169):ClientCnxn$SendThread@1229] - Client session 
timed out, have not heard from server in 2ms for sessionid 
0x10448de32eb0001, 

[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016559#comment-16016559
 ] 

Hadoop QA commented on ZOOKEEPER-2733:
--

-1 overall.  GitHub Pull Request  Build
  

+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 appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 70 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/710//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/710//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/710//console

This message is automatically generated.

> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Failed: ZOOKEEPER- PreCommit Build #710

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/710/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 34.48 MB...]
 [exec] +1 tests included.  The patch appears to include 3 new or 
modified tests.
 [exec] 
 [exec] -1 javadoc.  The javadoc tool appears to have generated 1 
warning messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] -1 findbugs.  The patch appears to introduce 70 new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/710//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/710//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/710//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] ac57b998f785319f07723d7c9b45df7cff75240b logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1703:
 exec returned: 2

Total time: 35 minutes 32 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2733
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
All tests passed

ZooKeeper_branch34_openjdk7 - Build # 1501 - Still Failing

2017-05-18 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch34_openjdk7/1501/

###
## LAST 60 LINES OF THE CONSOLE 
###
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H15 (ubuntu xenial) in workspace 
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_openjdk7
Cloning the remote Git repository
Cloning repository git://git.apache.org/zookeeper.git
 > git init /home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_openjdk7 # 
 > timeout=10
Fetching upstream changes from git://git.apache.org/zookeeper.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.apache.org/zookeeper.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://git.apache.org/zookeeper.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://git.apache.org/zookeeper.git # timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
No valid HEAD. Skipping the resetting
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.apache.org/zookeeper.git
 > git fetch --tags --progress git://git.apache.org/zookeeper.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/branch-3.4^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/branch-3.4^{commit} # timeout=10
Checking out Revision 3c4f01f6450f55d2fcc605f66c6c6584ccff1584 
(refs/remotes/origin/branch-3.4)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 3c4f01f6450f55d2fcc605f66c6c6584ccff1584
 > git rev-list ad26e22dffc35af991d32bf95aa8ada9f99322ed # timeout=10
No emails were triggered.
[ZooKeeper_branch34_openjdk7] $ 
/home/jenkins/tools/ant/apache-ant-1.9.9/bin/ant -Dtest.output=yes 
-Dtest.junit.threads=8 -Dtest.junit.output.format=xml -Djavac.target=1.7 clean 
test-core-java
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-7-openjdk-amd64//bin/java
Build step 'Invoke Ant' marked build as failure
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



###
## FAILED TESTS (if any) 
##
No tests ran.

[jira] [Commented] (ZOOKEEPER-2762) Multithreaded correctness Warnings

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016548#comment-16016548
 ] 

Hadoop QA commented on ZOOKEEPER-2762:
--

-1 overall.  GitHub Pull Request  Build
  

+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 appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 82 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/709//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/709//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/709//console

This message is automatically generated.

> Multithreaded correctness Warnings
> --
>
> Key: ZOOKEEPER-2762
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2762
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Abraham Fine
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


ZooKeeper-trunk - Build # 3394 - Failure

2017-05-18 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk/3394/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 61.48 MB...]
[junit] 2017-05-18 22:05:48,714 [myid:] - INFO  [ProcessThread(sid:0 
cport:11468)::PrepRequestProcessor@617] - Processed session termination for 
sessionid: 0x10075079214
[junit] 2017-05-18 22:05:48,715 [myid:] - INFO  
[SyncThread:0:MBeanRegistry@128] - Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port11468,name1=Connections,name2=127.0.0.1,name3=0x10075079214]
[junit] 2017-05-18 22:05:48,715 [myid:] - INFO  [main:ZooKeeper@1329] - 
Session: 0x10075079214 closed
[junit] 2017-05-18 22:05:48,716 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@82] - Memory used 194145
[junit] 2017-05-18 22:05:48,716 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@87] - Number of threads 1644
[junit] 2017-05-18 22:05:48,716 [myid:] - INFO  
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@102] - FINISHED TEST METHOD 
testWatcherAutoResetWithLocal
[junit] 2017-05-18 22:05:48,716 [myid:] - INFO  [main:ClientBase@582] - 
tearDown starting
[junit] 2017-05-18 22:05:48,716 [myid:] - INFO  [main:ClientBase@552] - 
STOPPING server
[junit] 2017-05-18 22:05:48,716 [myid:] - INFO  
[main:NettyServerCnxnFactory@464] - shutdown called 0.0.0.0/0.0.0.0:11468
[junit] 2017-05-18 22:05:48,715 [myid:] - INFO  
[main-EventThread:ClientCnxn$EventThread@513] - EventThread shut down for 
session: 0x10075079214
[junit] 2017-05-18 22:05:48,720 [myid:] - INFO  [main:ZooKeeperServer@542] 
- shutting down
[junit] 2017-05-18 22:05:48,720 [myid:] - ERROR [main:ZooKeeperServer@506] 
- ZKShutdownHandler is not registered, so ZooKeeper server won't take any 
action on ERROR or SHUTDOWN server state changes
[junit] 2017-05-18 22:05:48,720 [myid:] - INFO  
[main:SessionTrackerImpl@232] - Shutting down
[junit] 2017-05-18 22:05:48,721 [myid:] - INFO  
[main:PrepRequestProcessor@1008] - Shutting down
[junit] 2017-05-18 22:05:48,721 [myid:] - INFO  
[main:SyncRequestProcessor@191] - Shutting down
[junit] 2017-05-18 22:05:48,721 [myid:] - INFO  [ProcessThread(sid:0 
cport:11468)::PrepRequestProcessor@157] - PrepRequestProcessor exited loop!
[junit] 2017-05-18 22:05:48,721 [myid:] - INFO  
[SyncThread:0:SyncRequestProcessor@169] - SyncRequestProcessor exited!
[junit] 2017-05-18 22:05:48,721 [myid:] - INFO  
[main:FinalRequestProcessor@481] - shutdown of request processor complete
[junit] 2017-05-18 22:05:48,721 [myid:] - INFO  [main:MBeanRegistry@128] - 
Unregister MBean 
[org.apache.ZooKeeperService:name0=StandaloneServer_port11468,name1=InMemoryDataTree]
[junit] 2017-05-18 22:05:48,722 [myid:] - INFO  [main:MBeanRegistry@128] - 
Unregister MBean [org.apache.ZooKeeperService:name0=StandaloneServer_port11468]
[junit] 2017-05-18 22:05:48,722 [myid:] - INFO  
[main:FourLetterWordMain@85] - connecting to 127.0.0.1 11468
[junit] 2017-05-18 22:05:48,722 [myid:] - INFO  [main:JMXEnv@146] - 
ensureOnly:[]
[junit] 2017-05-18 22:05:48,727 [myid:] - INFO  [main:ClientBase@607] - 
fdcount after test is: 4831 at start it was 4831
[junit] 2017-05-18 22:05:48,728 [myid:] - INFO  [main:ZKTestCase$1@68] - 
SUCCEEDED testWatcherAutoResetWithLocal
[junit] 2017-05-18 22:05:48,728 [myid:] - INFO  [main:ZKTestCase$1@63] - 
FINISHED testWatcherAutoResetWithLocal
[junit] Tests run: 103, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
488.547 sec, Thread: 1, Class: org.apache.zookeeper.test.NioNettySuiteTest
[junit] 2017-05-18 22:05:49,043 [myid:127.0.0.1:11348] - INFO  
[main-SendThread(127.0.0.1:11348):ClientCnxn$SendThread@1113] - Opening socket 
connection to server 127.0.0.1/127.0.0.1:11348. Will not attempt to 
authenticate using SASL (unknown error)
[junit] 2017-05-18 22:05:49,044 [myid:127.0.0.1:11348] - WARN  
[main-SendThread(127.0.0.1:11348):ClientCnxn$SendThread@1235] - Session 
0x200750448c0 for server 127.0.0.1/127.0.0.1:11348, unexpected error, 
closing socket connection and attempting reconnect
[junit] java.net.ConnectException: Connection refused
[junit] at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[junit] at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
[junit] at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:357)
[junit] at 
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1214)

fail.build.on.test.failure:

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/ZooKeeper-trunk/build.xml:1338: The 
following error occurred while executing this line:
/home/jenkins/jenkins-slave/workspace/ZooKeeper-trunk/build.xml:1219: The 
following error occurred while executing this line:

Failed: ZOOKEEPER- PreCommit Build #709

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/709/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 34.53 MB...]
 [exec] +1 tests included.  The patch appears to include 3 new or 
modified tests.
 [exec] 
 [exec] -1 javadoc.  The javadoc tool appears to have generated 1 
warning messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] -1 findbugs.  The patch appears to introduce 82 new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/709//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/709//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/709//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] 9951b765bfc166fe783192ba82a18c60c5ba logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1703:
 exec returned: 2

Total time: 35 minutes 23 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2762
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
All tests passed

[jira] [Commented] (ZOOKEEPER-2732) Cleanup findbug warnings in branch-3.4: Performance Warnings

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016546#comment-16016546
 ] 

Hadoop QA commented on ZOOKEEPER-2732:
--

-1 overall.  GitHub Pull Request  Build
  

+1 @author.  The patch does not contain any @author tags.

+0 tests included.  The patch appears to be a documentation patch that 
doesn't require tests.

-1 javadoc.  The javadoc tool appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 83 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/708//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/708//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/708//console

This message is automatically generated.

> Cleanup findbug warnings in branch-3.4: Performance Warnings
> 
>
> Key: ZOOKEEPER-2732
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2732
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> BxBoxing/unboxing to parse a primitive new 
> org.apache.zookeeper.server.quorum.QuorumCnxManager(long, Map, 
> QuorumAuthServer, QuorumAuthLearner, int, boolean, int, boolean)
> Bxnew org.apache.zookeeper.server.quorum.QuorumCnxManager(long, Map, 
> QuorumAuthServer, QuorumAuthLearner, int, boolean, int, boolean) invokes 
> inefficient new Integer(String) constructor; use Integer.valueOf(String) 
> instead
> Dm
> org.apache.zookeeper.server.quorum.FastLeaderElection$Notification.toString() 
> invokes inefficient new String(String) constructor
> WMI   org.apache.zookeeper.server.DataTree.dumpEphemerals(PrintWriter) makes 
> inefficient use of keySet iterator instead of entrySet iterator
> WMI   
> org.apache.zookeeper.server.quorum.flexible.QuorumHierarchical.computeGroupWeight()
>  makes inefficient use of keySet iterator instead of entrySet iterator
> WMI   
> org.apache.zookeeper.server.quorum.flexible.QuorumHierarchical.containsQuorum(HashSet)
>  makes inefficient use of keySet iterator instead of entrySet iterator
> WMI   org.apache.zookeeper.ZooKeeperMain.usage() makes inefficient use of 
> keySet iterator instead of entrySet iterator
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2785) Server inappropriately throttles connections under load before SASL completes

2017-05-18 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016549#comment-16016549
 ] 

Hudson commented on ZOOKEEPER-2785:
---

FAILURE: Integrated in Jenkins build ZooKeeper-trunk #3394 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/3394/])
ZOOKEEPER-2785: Server inappropriately throttles connections under loa… (hanm: 
rev 0a3e2d1d4bdbb96f41da7111db3913ef08068722)
* (edit) src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java


> Server inappropriately throttles connections under load before SASL completes
> -
>
> Key: ZOOKEEPER-2785
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2785
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.10
>Reporter: Abhishek Singh Chouhan
>Priority: Critical
>  Labels: sasl
> Fix For: 3.5.4, 3.6.0, 3.4.11
>
>
> When a zk server is running close to its outstanding requests limit, the 
> server incorrectly throttles the sasl request. This leads to the client 
> waiting for the final sasl packet (session is already established) and 
> deferring all non priming packets till then which also includes the ping 
> packets. The client then waits for the final packet but never gets it and 
> times out saying haven't heard from server. This is fatal for services such 
> as HBase which retry for finite attempts and exit post these attempts.
> Issue being that in ZooKeeperServer.processPacket(..) incase of sasl we send 
> the response and incorrectly also call cnxn.incrOutstandingRequests(h), which 
> throttles the connection if we're running over outstandingrequests limit, 
> which results in the server not processing the subsequent packet from the 
> client. Also we donot have any pending request to send for the connection and 
> hence never call enableRecv(). We should return after sending response to the 
> sasl request.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Failed: ZOOKEEPER- PreCommit Build #708

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/708/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 34.38 MB...]
 [exec] +0 tests included.  The patch appears to be a documentation 
patch that doesn't require tests.
 [exec] 
 [exec] -1 javadoc.  The javadoc tool appears to have generated 1 
warning messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] -1 findbugs.  The patch appears to introduce 83 new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/708//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/708//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/708//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] 520b869d0dfc65cd844f668481f61a70667fae40 logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1703:
 exec returned: 2

Total time: 35 minutes 57 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2732
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
All tests passed

[jira] [Commented] (ZOOKEEPER-2730) Cleanup findbug warnings in branch-3.4: Internationalization Warnings

2017-05-18 Thread Janek P (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016506#comment-16016506
 ] 

Janek P commented on ZOOKEEPER-2730:


Is anyone working on that or is it free for grabs?

> Cleanup findbug warnings in branch-3.4: Internationalization Warnings
> -
>
> Key: ZOOKEEPER-2730
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2730
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DmFound reliance on default encoding in 
> org.apache.jute.compiler.CGenerator.genCode(): new java.io.FileWriter(File)
> DmFound reliance on default encoding in 
> org.apache.jute.compiler.CppGenerator.genCode(): new java.io.FileWriter(File)
> DmFound reliance on default encoding in 
> org.apache.jute.compiler.JRecord.genCsharpCode(File): new 
> java.io.FileWriter(File)
> DmFound reliance on default encoding in 
> org.apache.jute.compiler.JRecord.genJavaCode(File): new 
> java.io.FileWriter(File)
> DmFound reliance on default encoding in new 
> org.apache.jute.XmlOutputArchive(OutputStream): new 
> java.io.PrintStream(OutputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.client.FourLetterWordMain.send4LetterWord(String, int, 
> String, int): new java.io.InputStreamReader(InputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.client.FourLetterWordMain.send4LetterWord(String, int, 
> String, int): String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.ClientCnxn$SendThread.pingRwServer(): new 
> java.io.InputStreamReader(InputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.ClientCnxn$SendThread.pingRwServer(): String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.auth.DigestAuthenticationProvider.generateDigest(String):
>  String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.auth.DigestAuthenticationProvider.handleAuthentication(ServerCnxn,
>  byte[]): new String(byte[])
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.DataTree.updateBytes(String, long): new 
> String(byte[])
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.DataTree.updateBytes(String, long): 
> String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.DataTree.updateCount(String, int): new 
> String(byte[])
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.DataTree.updateCount(String, int): 
> String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.DataTree.updateQuotaForPath(String): 
> String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.NettyServerCnxn$SendBufferWriter.checkFlush(boolean):
>  String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.NIOServerCnxn$SendBufferWriter.checkFlush(boolean):
>  String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.persistence.FileSnap. FileSnap>(): String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.persistence.FileTxnLog. FileTxnLog>(): String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.quorum.QuorumPeer.readLongFromFile(String): new 
> java.io.FileReader(File)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.quorum.QuorumPeer.writeLongToFile(String, long): 
> new java.io.OutputStreamWriter(OutputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(Properties):
>  new java.io.FileReader(File)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.Request.toString(): new String(byte[])
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.ServerCnxn.(): 
> String.getBytes()
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.TraceFormatter.main(String[]): new String(byte[])
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.util.OSMXBean.getMaxFileDescriptorCount(): new 
> java.io.InputStreamReader(InputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.server.util.OSMXBean.getOpenFileDescriptorCount(): new 
> java.io.InputStreamReader(InputStream)
> DmFound reliance on default encoding in 
> org.apache.zookeeper.ServerAdminClient.dump(String, int): new String(byte[])
> DmFound reliance on default encoding in 
> 

[jira] [Commented] (ZOOKEEPER-2774) Ephemeral znode will not be removed when sesstion timeout, if the system time of ZooKeeper node changes unexpectedly.

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016491#comment-16016491
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2774:
---

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/253
  
Merged to branch-3.4. Please close this pull request, @JiangJiafu.


> Ephemeral znode will not be removed when sesstion timeout, if the system time 
> of ZooKeeper node changes unexpectedly.
> -
>
> Key: ZOOKEEPER-2774
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2774
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.8, 3.4.9, 3.4.10
> Environment: Centos6.5
>Reporter: JiangJiafu
> Fix For: 3.4.11
>
>
> 1. Deploy a ZooKeeper cluster with one node.
> 2. Create a Ephemeral znode.
> 3. Change the system time of the ZooKeeper node to a earlier point.
> 4. Disconnect the client with the ZooKeeper server.
> Then the ephemeral znode will exist for a long time even when session timeout.
> I have read the ZooKeeper source code and I find the code int 
> SessionTrackerImpl.java,
> {code:title=SessionTrackerImpl.java|borderStyle=solid}
> @Override
> synchronized public void run() {
> try {
> while (running) {
> currentTime = System.currentTimeMillis();
> if (nextExpirationTime > currentTime) {
> this.wait(nextExpirationTime - currentTime);
> continue;
> }
> SessionSet set;
> set = sessionSets.remove(nextExpirationTime);
> if (set != null) {
> for (SessionImpl s : set.sessions) {
> setSessionClosing(s.sessionId);
> expirer.expire(s);
> }
> }
> nextExpirationTime += expirationInterval;
> }
> } catch (InterruptedException e) {
> handleException(this.getName(), e);
> }
> LOG.info("SessionTrackerImpl exited loop!");
> }
> {code}
> I think it may be better to use System.nanoTime(), not 
> System.currentTimeMillis, because the later can be changed manually or 
> automatically by a NTP client. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper issue #253: ZOOKEEPER-2774

2017-05-18 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/253
  
Merged to branch-3.4. Please close this pull request, @JiangJiafu.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (ZOOKEEPER-2774) Ephemeral znode will not be removed when sesstion timeout, if the system time of ZooKeeper node changes unexpectedly.

2017-05-18 Thread Michael Han (JIRA)

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

Michael Han resolved ZOOKEEPER-2774.

   Resolution: Fixed
Fix Version/s: 3.4.11

Issue resolved by pull request 253
[https://github.com/apache/zookeeper/pull/253]

> Ephemeral znode will not be removed when sesstion timeout, if the system time 
> of ZooKeeper node changes unexpectedly.
> -
>
> Key: ZOOKEEPER-2774
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2774
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.8, 3.4.9, 3.4.10
> Environment: Centos6.5
>Reporter: JiangJiafu
> Fix For: 3.4.11
>
>
> 1. Deploy a ZooKeeper cluster with one node.
> 2. Create a Ephemeral znode.
> 3. Change the system time of the ZooKeeper node to a earlier point.
> 4. Disconnect the client with the ZooKeeper server.
> Then the ephemeral znode will exist for a long time even when session timeout.
> I have read the ZooKeeper source code and I find the code int 
> SessionTrackerImpl.java,
> {code:title=SessionTrackerImpl.java|borderStyle=solid}
> @Override
> synchronized public void run() {
> try {
> while (running) {
> currentTime = System.currentTimeMillis();
> if (nextExpirationTime > currentTime) {
> this.wait(nextExpirationTime - currentTime);
> continue;
> }
> SessionSet set;
> set = sessionSets.remove(nextExpirationTime);
> if (set != null) {
> for (SessionImpl s : set.sessions) {
> setSessionClosing(s.sessionId);
> expirer.expire(s);
> }
> }
> nextExpirationTime += expirationInterval;
> }
> } catch (InterruptedException e) {
> handleException(this.getName(), e);
> }
> LOG.info("SessionTrackerImpl exited loop!");
> }
> {code}
> I think it may be better to use System.nanoTime(), not 
> System.currentTimeMillis, because the later can be changed manually or 
> automatically by a NTP client. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2731) Cleanup findbug warnings in branch-3.4: Malicious code vulnerability Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016488#comment-16016488
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2731:
---

Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/232#discussion_r117358635
  
--- Diff: src/java/main/org/apache/jute/compiler/JType.java ---
@@ -27,7 +27,7 @@
private String mCName;
 private String mCppName;
 private String mCsharpName;
-private String mJavaName;
+protected String mJavaName;
--- End diff --

@rakeshadr Apologies, I must not have been clear. There are no changes here 
that are for the "sake" of performance. In fact, my concern is that my changes 
will negatively impact performance. 

After revisiting this change I think it makes more sense for us just to 
ignore the EI and EI2 issues. I reverted the changes to the jute compiler and 
added org.apache.zookeeper.server.quorum.QuorumAuthPacket to the findbugs 
exclusions file.




> Cleanup findbug warnings in branch-3.4: Malicious code vulnerability Warnings
> -
>
> Key: ZOOKEEPER-2731
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2731
> Project: ZooKeeper
>  Issue Type: Sub-task
>Affects Versions: 3.4.9
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> MSorg.apache.zookeeper.Environment.JAAS_CONF_KEY isn't final but should be
> Bug type MS_SHOULD_BE_FINAL (click for details) 
> In class org.apache.zookeeper.Environment
> Field org.apache.zookeeper.Environment.JAAS_CONF_KEY
> At Environment.java:[line 34]
> MSorg.apache.zookeeper.server.ServerCnxn.cmd2String is a mutable 
> collection which should be package protected
> Bug type MS_MUTABLE_COLLECTION_PKGPROTECT (click for details) 
> In class org.apache.zookeeper.server.ServerCnxn
> Field org.apache.zookeeper.server.ServerCnxn.cmd2String
> At ServerCnxn.java:[line 230]
> MSorg.apache.zookeeper.ZooDefs$Ids.OPEN_ACL_UNSAFE is a mutable collection
> Bug type MS_MUTABLE_COLLECTION (click for details) 
> In class org.apache.zookeeper.ZooDefs$Ids
> Field org.apache.zookeeper.ZooDefs$Ids.OPEN_ACL_UNSAFE
> At ZooDefs.java:[line 100]
> MSorg.apache.zookeeper.ZooKeeperMain.commandMap is a mutable collection 
> which should be package protected
> Bug type MS_MUTABLE_COLLECTION_PKGPROTECT (click for details) 
> In class org.apache.zookeeper.ZooKeeperMain
> Field org.apache.zookeeper.ZooKeeperMain.commandMap
> At ZooKeeperMain.java:[line 53]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #232: ZOOKEEPER-2731: Cleanup findbug warnings in bra...

2017-05-18 Thread afine
Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/232#discussion_r117358635
  
--- Diff: src/java/main/org/apache/jute/compiler/JType.java ---
@@ -27,7 +27,7 @@
private String mCName;
 private String mCppName;
 private String mCsharpName;
-private String mJavaName;
+protected String mJavaName;
--- End diff --

@rakeshadr Apologies, I must not have been clear. There are no changes here 
that are for the "sake" of performance. In fact, my concern is that my changes 
will negatively impact performance. 

After revisiting this change I think it makes more sense for us just to 
ignore the EI and EI2 issues. I reverted the changes to the jute compiler and 
added org.apache.zookeeper.server.quorum.QuorumAuthPacket to the findbugs 
exclusions file.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016479#comment-16016479
 ] 

Hadoop QA commented on ZOOKEEPER-2733:
--

-1 overall.  GitHub Pull Request  Build
  

+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 appears to have generated 1 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 70 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/706//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/706//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/706//console

This message is automatically generated.

> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Failed: ZOOKEEPER- PreCommit Build #706

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/706/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 34.72 MB...]
 [exec] +1 tests included.  The patch appears to include 3 new or 
modified tests.
 [exec] 
 [exec] -1 javadoc.  The javadoc tool appears to have generated 1 
warning messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] -1 findbugs.  The patch appears to introduce 70 new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/706//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/706//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/706//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment added.
 [exec] c1ae1be7f76778954d8a9ec1471ad5dc9f3483c9 logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1703:
 exec returned: 2

Total time: 36 minutes 36 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2733
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
All tests passed

[jira] [Commented] (ZOOKEEPER-2785) Server inappropriately throttles connections under load before SASL completes

2017-05-18 Thread Michael Han (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016477#comment-16016477
 ] 

Michael Han commented on ZOOKEEPER-2785:


Merged to master, 3.5, and 3.4.
https://github.com/apache/zookeeper/commit/0a3e2d1d4bdbb96f41da7111db3913ef08068722
https://github.com/apache/zookeeper/commit/561a45a1e76f2e8f524559fbd44cf9b3d7233225
https://github.com/apache/zookeeper/commit/593c99c3cde9d9f24e62d1e613108e3c24d73d4c

Thanks for the patch [~abhishek.chouhan].



> Server inappropriately throttles connections under load before SASL completes
> -
>
> Key: ZOOKEEPER-2785
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2785
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.10
>Reporter: Abhishek Singh Chouhan
>Priority: Critical
>  Labels: sasl
> Fix For: 3.5.4, 3.6.0, 3.4.11
>
>
> When a zk server is running close to its outstanding requests limit, the 
> server incorrectly throttles the sasl request. This leads to the client 
> waiting for the final sasl packet (session is already established) and 
> deferring all non priming packets till then which also includes the ping 
> packets. The client then waits for the final packet but never gets it and 
> times out saying haven't heard from server. This is fatal for services such 
> as HBase which retry for finite attempts and exit post these attempts.
> Issue being that in ZooKeeperServer.processPacket(..) incase of sasl we send 
> the response and incorrectly also call cnxn.incrOutstandingRequests(h), which 
> throttles the connection if we're running over outstandingrequests limit, 
> which results in the server not processing the subsequent packet from the 
> client. Also we donot have any pending request to send for the connection and 
> hence never call enableRecv(). We should return after sending response to the 
> sasl request.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (ZOOKEEPER-2785) Server inappropriately throttles connections under load before SASL completes

2017-05-18 Thread Michael Han (JIRA)

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

Michael Han resolved ZOOKEEPER-2785.

   Resolution: Fixed
Fix Version/s: 3.5.4
   3.6.0

Issue resolved by pull request 256
[https://github.com/apache/zookeeper/pull/256]

> Server inappropriately throttles connections under load before SASL completes
> -
>
> Key: ZOOKEEPER-2785
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2785
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.10
>Reporter: Abhishek Singh Chouhan
>Priority: Critical
>  Labels: sasl
> Fix For: 3.4.11, 3.6.0, 3.5.4
>
>
> When a zk server is running close to its outstanding requests limit, the 
> server incorrectly throttles the sasl request. This leads to the client 
> waiting for the final sasl packet (session is already established) and 
> deferring all non priming packets till then which also includes the ping 
> packets. The client then waits for the final packet but never gets it and 
> times out saying haven't heard from server. This is fatal for services such 
> as HBase which retry for finite attempts and exit post these attempts.
> Issue being that in ZooKeeperServer.processPacket(..) incase of sasl we send 
> the response and incorrectly also call cnxn.incrOutstandingRequests(h), which 
> throttles the connection if we're running over outstandingrequests limit, 
> which results in the server not processing the subsequent packet from the 
> client. Also we donot have any pending request to send for the connection and 
> hence never call enableRecv(). We should return after sending response to the 
> sasl request.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2785) Server inappropriately throttles connections under load before SASL completes

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016473#comment-16016473
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2785:
---

Github user asfgit closed the pull request at:

https://github.com/apache/zookeeper/pull/256


> Server inappropriately throttles connections under load before SASL completes
> -
>
> Key: ZOOKEEPER-2785
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2785
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.10
>Reporter: Abhishek Singh Chouhan
>Priority: Critical
>  Labels: sasl
> Fix For: 3.5.4, 3.6.0, 3.4.11
>
>
> When a zk server is running close to its outstanding requests limit, the 
> server incorrectly throttles the sasl request. This leads to the client 
> waiting for the final sasl packet (session is already established) and 
> deferring all non priming packets till then which also includes the ping 
> packets. The client then waits for the final packet but never gets it and 
> times out saying haven't heard from server. This is fatal for services such 
> as HBase which retry for finite attempts and exit post these attempts.
> Issue being that in ZooKeeperServer.processPacket(..) incase of sasl we send 
> the response and incorrectly also call cnxn.incrOutstandingRequests(h), which 
> throttles the connection if we're running over outstandingrequests limit, 
> which results in the server not processing the subsequent packet from the 
> client. Also we donot have any pending request to send for the connection and 
> hence never call enableRecv(). We should return after sending response to the 
> sasl request.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #256: ZOOKEEPER-2785 Server inappropriately throttles...

2017-05-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/zookeeper/pull/256


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2762) Multithreaded correctness Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016455#comment-16016455
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2762:
---

Github user afine commented on the issue:

https://github.com/apache/zookeeper/pull/239
  
Done, thanks for the review @rakeshadr 


> Multithreaded correctness Warnings
> --
>
> Key: ZOOKEEPER-2762
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2762
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Abraham Fine
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper issue #239: ZOOKEEPER-2762: Cleanup findbug warnings in branch-3.4...

2017-05-18 Thread afine
Github user afine commented on the issue:

https://github.com/apache/zookeeper/pull/239
  
Done, thanks for the review @rakeshadr 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2732) Cleanup findbug warnings in branch-3.4: Performance Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016451#comment-16016451
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2732:
---

GitHub user afine opened a pull request:

https://github.com/apache/zookeeper/pull/258

ZOOKEEPER-2732: Cleanup findbug warnings in branch-3.4: Performance Warnings

@rakeshadr Apologies for recreating this, I accidentally pushed a bad 
branch in https://github.com/apache/zookeeper/pull/231 and GitHub will not let 
me reset the head for that PR. This should be rebased and ready to be merged.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/afine/zookeeper ZOOKEEPER-2732

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zookeeper/pull/258.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 #258


commit 7509f69e95749b30ba06fb224750bbb5cd487547
Author: Abraham Fine 
Date:   2017-04-18T18:40:12Z

ZOOKEEPER-2732: Cleanup findbug warnings in branch-3.4: Performance Warnings




> Cleanup findbug warnings in branch-3.4: Performance Warnings
> 
>
> Key: ZOOKEEPER-2732
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2732
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> BxBoxing/unboxing to parse a primitive new 
> org.apache.zookeeper.server.quorum.QuorumCnxManager(long, Map, 
> QuorumAuthServer, QuorumAuthLearner, int, boolean, int, boolean)
> Bxnew org.apache.zookeeper.server.quorum.QuorumCnxManager(long, Map, 
> QuorumAuthServer, QuorumAuthLearner, int, boolean, int, boolean) invokes 
> inefficient new Integer(String) constructor; use Integer.valueOf(String) 
> instead
> Dm
> org.apache.zookeeper.server.quorum.FastLeaderElection$Notification.toString() 
> invokes inefficient new String(String) constructor
> WMI   org.apache.zookeeper.server.DataTree.dumpEphemerals(PrintWriter) makes 
> inefficient use of keySet iterator instead of entrySet iterator
> WMI   
> org.apache.zookeeper.server.quorum.flexible.QuorumHierarchical.computeGroupWeight()
>  makes inefficient use of keySet iterator instead of entrySet iterator
> WMI   
> org.apache.zookeeper.server.quorum.flexible.QuorumHierarchical.containsQuorum(HashSet)
>  makes inefficient use of keySet iterator instead of entrySet iterator
> WMI   org.apache.zookeeper.ZooKeeperMain.usage() makes inefficient use of 
> keySet iterator instead of entrySet iterator
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #258: ZOOKEEPER-2732: Cleanup findbug warnings in bra...

2017-05-18 Thread afine
GitHub user afine opened a pull request:

https://github.com/apache/zookeeper/pull/258

ZOOKEEPER-2732: Cleanup findbug warnings in branch-3.4: Performance Warnings

@rakeshadr Apologies for recreating this, I accidentally pushed a bad 
branch in https://github.com/apache/zookeeper/pull/231 and GitHub will not let 
me reset the head for that PR. This should be rebased and ready to be merged.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/afine/zookeeper ZOOKEEPER-2732

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zookeeper/pull/258.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 #258


commit 7509f69e95749b30ba06fb224750bbb5cd487547
Author: Abraham Fine 
Date:   2017-04-18T18:40:12Z

ZOOKEEPER-2732: Cleanup findbug warnings in branch-3.4: Performance Warnings




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Failed: ZOOKEEPER- PreCommit Build #707

2017-05-18 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/707/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 3.19 KB...]
 [exec] Pull request id: 231
 [exec]   % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 [exec] Pull request title: ZOOKEEPER-2732: Cleanup findbug warnings in 
branch-3.4: Performance Warnings
 [exec] Defect number: ZOOKEEPER-2732 Dload 
 Upload   Total   SpentLeft  Speed
 [exec] - Parsed args, going to checkout -
 [exec] 
 [exec] 
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Testing patch for pull request 231.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec]   0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0100   1410   1410 0809  0 --:--:-- --:--:-- 
--:--:--   810
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec]  Pre-build trunk to verify trunk stability and javac warnings
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] /home/jenkins/tools/ant/apache-ant-1.9.9/bin/ant  
-Djavac.args=-Xlint -Xmaxwarns 1000 
-Djava5.home=/home/jenkins/tools/java5/latest 
-Dforrest.home=/home/jenkins/tools/forrest/latest -DZookeeperPatchProcess= 
clean tar > 
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess/trunkJavacWarnings.txt
 2>&1
 [exec] Trunk compilation is broken?
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec]   0 00  66410 0  17073  0 --:--:-- --:--:-- 
--:--:-- 17073mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1703:
 exec returned: 1

Total time: 21 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Recording test results
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
[description-setter] Description set: ZOOKEEPER-2732
Putting comment on the pull request
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7
Setting JDK_1_7_LATEST__HOME=/home/jenkins/tools/java/latest1.7



###
## FAILED TESTS (if any) 
##
No tests ran.

[jira] [Commented] (ZOOKEEPER-2732) Cleanup findbug warnings in branch-3.4: Performance Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016440#comment-16016440
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2732:
---

Github user afine closed the pull request at:

https://github.com/apache/zookeeper/pull/231


> Cleanup findbug warnings in branch-3.4: Performance Warnings
> 
>
> Key: ZOOKEEPER-2732
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2732
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> BxBoxing/unboxing to parse a primitive new 
> org.apache.zookeeper.server.quorum.QuorumCnxManager(long, Map, 
> QuorumAuthServer, QuorumAuthLearner, int, boolean, int, boolean)
> Bxnew org.apache.zookeeper.server.quorum.QuorumCnxManager(long, Map, 
> QuorumAuthServer, QuorumAuthLearner, int, boolean, int, boolean) invokes 
> inefficient new Integer(String) constructor; use Integer.valueOf(String) 
> instead
> Dm
> org.apache.zookeeper.server.quorum.FastLeaderElection$Notification.toString() 
> invokes inefficient new String(String) constructor
> WMI   org.apache.zookeeper.server.DataTree.dumpEphemerals(PrintWriter) makes 
> inefficient use of keySet iterator instead of entrySet iterator
> WMI   
> org.apache.zookeeper.server.quorum.flexible.QuorumHierarchical.computeGroupWeight()
>  makes inefficient use of keySet iterator instead of entrySet iterator
> WMI   
> org.apache.zookeeper.server.quorum.flexible.QuorumHierarchical.containsQuorum(HashSet)
>  makes inefficient use of keySet iterator instead of entrySet iterator
> WMI   org.apache.zookeeper.ZooKeeperMain.usage() makes inefficient use of 
> keySet iterator instead of entrySet iterator
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #231: ZOOKEEPER-2732: Cleanup findbug warnings in bra...

2017-05-18 Thread afine
Github user afine closed the pull request at:

https://github.com/apache/zookeeper/pull/231


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2732) Cleanup findbug warnings in branch-3.4: Performance Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016431#comment-16016431
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2732:
---

GitHub user afine reopened a pull request:

https://github.com/apache/zookeeper/pull/231

ZOOKEEPER-2732: Cleanup findbug warnings in branch-3.4: Performance Warnings



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/afine/zookeeper ZOOKEEPER-2732

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zookeeper/pull/231.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 #231






> Cleanup findbug warnings in branch-3.4: Performance Warnings
> 
>
> Key: ZOOKEEPER-2732
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2732
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> BxBoxing/unboxing to parse a primitive new 
> org.apache.zookeeper.server.quorum.QuorumCnxManager(long, Map, 
> QuorumAuthServer, QuorumAuthLearner, int, boolean, int, boolean)
> Bxnew org.apache.zookeeper.server.quorum.QuorumCnxManager(long, Map, 
> QuorumAuthServer, QuorumAuthLearner, int, boolean, int, boolean) invokes 
> inefficient new Integer(String) constructor; use Integer.valueOf(String) 
> instead
> Dm
> org.apache.zookeeper.server.quorum.FastLeaderElection$Notification.toString() 
> invokes inefficient new String(String) constructor
> WMI   org.apache.zookeeper.server.DataTree.dumpEphemerals(PrintWriter) makes 
> inefficient use of keySet iterator instead of entrySet iterator
> WMI   
> org.apache.zookeeper.server.quorum.flexible.QuorumHierarchical.computeGroupWeight()
>  makes inefficient use of keySet iterator instead of entrySet iterator
> WMI   
> org.apache.zookeeper.server.quorum.flexible.QuorumHierarchical.containsQuorum(HashSet)
>  makes inefficient use of keySet iterator instead of entrySet iterator
> WMI   org.apache.zookeeper.ZooKeeperMain.usage() makes inefficient use of 
> keySet iterator instead of entrySet iterator
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2732) Cleanup findbug warnings in branch-3.4: Performance Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016430#comment-16016430
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2732:
---

Github user afine closed the pull request at:

https://github.com/apache/zookeeper/pull/231


> Cleanup findbug warnings in branch-3.4: Performance Warnings
> 
>
> Key: ZOOKEEPER-2732
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2732
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> BxBoxing/unboxing to parse a primitive new 
> org.apache.zookeeper.server.quorum.QuorumCnxManager(long, Map, 
> QuorumAuthServer, QuorumAuthLearner, int, boolean, int, boolean)
> Bxnew org.apache.zookeeper.server.quorum.QuorumCnxManager(long, Map, 
> QuorumAuthServer, QuorumAuthLearner, int, boolean, int, boolean) invokes 
> inefficient new Integer(String) constructor; use Integer.valueOf(String) 
> instead
> Dm
> org.apache.zookeeper.server.quorum.FastLeaderElection$Notification.toString() 
> invokes inefficient new String(String) constructor
> WMI   org.apache.zookeeper.server.DataTree.dumpEphemerals(PrintWriter) makes 
> inefficient use of keySet iterator instead of entrySet iterator
> WMI   
> org.apache.zookeeper.server.quorum.flexible.QuorumHierarchical.computeGroupWeight()
>  makes inefficient use of keySet iterator instead of entrySet iterator
> WMI   
> org.apache.zookeeper.server.quorum.flexible.QuorumHierarchical.containsQuorum(HashSet)
>  makes inefficient use of keySet iterator instead of entrySet iterator
> WMI   org.apache.zookeeper.ZooKeeperMain.usage() makes inefficient use of 
> keySet iterator instead of entrySet iterator
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #231: ZOOKEEPER-2732: Cleanup findbug warnings in bra...

2017-05-18 Thread afine
GitHub user afine reopened a pull request:

https://github.com/apache/zookeeper/pull/231

ZOOKEEPER-2732: Cleanup findbug warnings in branch-3.4: Performance Warnings



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/afine/zookeeper ZOOKEEPER-2732

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zookeeper/pull/231.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 #231






---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #231: ZOOKEEPER-2732: Cleanup findbug warnings in bra...

2017-05-18 Thread afine
Github user afine closed the pull request at:

https://github.com/apache/zookeeper/pull/231


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016416#comment-16016416
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117345561
  
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/Observer.java ---
@@ -125,6 +125,8 @@ protected void processPacket(QuorumPacket qp) throws 
IOException{
 ObserverZooKeeperServer obs = (ObserverZooKeeperServer)zk;
 obs.commitRequest(request);
 break;
+default:
+LOG.error("Invalid packet type received by Observer: " + 
qp.getType());
--- End diff --

fixed


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016411#comment-16016411
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117345471
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ---
@@ -504,6 +504,8 @@ protected void pRequest2Txn(int type, long zxid, 
Request request, Record record,
 version = currentVersion + 1;
 request.txn = new CheckVersionTxn(path, version);
 break;
+default:
+LOG.error("Invalid OpCode received by 
PrepRequestProcessor: " + type);
--- End diff --

fixed


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016413#comment-16016413
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117345515
  
--- Diff: src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java ---
@@ -133,11 +133,17 @@ public boolean accept(File f){
 }
 }
 // add all non-excluded log files
-List files = new ArrayList(Arrays.asList(txnLog
-.getDataDir().listFiles(new MyFileFilter(PREFIX_LOG;
+List files = new ArrayList();
+File[] fileArray;
+if ((fileArray = txnLog.getDataDir().listFiles(new 
MyFileFilter(PREFIX_LOG))) != null) {
--- End diff --

fixed


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016414#comment-16016414
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117345530
  
--- Diff: src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java ---
@@ -133,11 +133,17 @@ public boolean accept(File f){
 }
 }
 // add all non-excluded log files
-List files = new ArrayList(Arrays.asList(txnLog
-.getDataDir().listFiles(new MyFileFilter(PREFIX_LOG;
+List files = new ArrayList();
+File[] fileArray;
+if ((fileArray = txnLog.getDataDir().listFiles(new 
MyFileFilter(PREFIX_LOG))) != null) {
+files.addAll(Arrays.asList(fileArray));
+}
+
 // add all non-excluded snapshot files to the deletion list
-files.addAll(Arrays.asList(txnLog.getSnapDir().listFiles(
-new MyFileFilter(PREFIX_SNAPSHOT;
+if ((fileArray = txnLog.getSnapDir().listFiles(new 
MyFileFilter(PREFIX_SNAPSHOT))) != null) {
--- End diff --

fixed


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016415#comment-16016415
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117345541
  
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/Follower.java ---
@@ -135,6 +135,8 @@ protected void processPacket(QuorumPacket qp) throws 
IOException{
 case Leader.SYNC:
 fzk.sync();
 break;
+default:
+LOG.error("Invalid packet type received by Observer: " + 
qp.getType());
--- End diff --

fixed


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016417#comment-16016417
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117345587
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/upgrade/UpgradeMain.java ---
@@ -113,16 +113,18 @@ private void createAllDirs() throws IOException {
  * @throws IOException
  */
 void copyFiles(File srcDir, File dstDir, String filter) throws 
IOException {
-File[] list = srcDir.listFiles();
-for (File file: list) {
-String name = file.getName();
-if (name.startsWith(filter)) {
-// we need to copy this file
-File dest = new File(dstDir, name);
-LOG.info("Renaming " + file + " to " + dest);
-if (!file.renameTo(dest)) {
-throw new IOException("Unable to rename " 
-+ file + " to " +  dest);
+File[] list;
+if ((list = srcDir.listFiles()) != null) {
--- End diff --

fixed


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #236: ZOOKEEPER-2733: Cleanup findbug warnings in bra...

2017-05-18 Thread afine
Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117345561
  
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/Observer.java ---
@@ -125,6 +125,8 @@ protected void processPacket(QuorumPacket qp) throws 
IOException{
 ObserverZooKeeperServer obs = (ObserverZooKeeperServer)zk;
 obs.commitRequest(request);
 break;
+default:
+LOG.error("Invalid packet type received by Observer: " + 
qp.getType());
--- End diff --

fixed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #236: ZOOKEEPER-2733: Cleanup findbug warnings in bra...

2017-05-18 Thread afine
Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117345541
  
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/Follower.java ---
@@ -135,6 +135,8 @@ protected void processPacket(QuorumPacket qp) throws 
IOException{
 case Leader.SYNC:
 fzk.sync();
 break;
+default:
+LOG.error("Invalid packet type received by Observer: " + 
qp.getType());
--- End diff --

fixed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #236: ZOOKEEPER-2733: Cleanup findbug warnings in bra...

2017-05-18 Thread afine
Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117345515
  
--- Diff: src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java ---
@@ -133,11 +133,17 @@ public boolean accept(File f){
 }
 }
 // add all non-excluded log files
-List files = new ArrayList(Arrays.asList(txnLog
-.getDataDir().listFiles(new MyFileFilter(PREFIX_LOG;
+List files = new ArrayList();
+File[] fileArray;
+if ((fileArray = txnLog.getDataDir().listFiles(new 
MyFileFilter(PREFIX_LOG))) != null) {
--- End diff --

fixed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #236: ZOOKEEPER-2733: Cleanup findbug warnings in bra...

2017-05-18 Thread afine
Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117345471
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ---
@@ -504,6 +504,8 @@ protected void pRequest2Txn(int type, long zxid, 
Request request, Record record,
 version = currentVersion + 1;
 request.txn = new CheckVersionTxn(path, version);
 break;
+default:
+LOG.error("Invalid OpCode received by 
PrepRequestProcessor: " + type);
--- End diff --

fixed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016382#comment-16016382
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117341551
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ---
@@ -628,14 +628,7 @@ protected void pRequest(Request request) throws 
RequestProcessorException {
 break;
  
 //All the rest don't need to create a Txn - just verify session
-case OpCode.sync:
-case OpCode.exists:
-case OpCode.getData:
-case OpCode.getACL:
-case OpCode.getChildren:
-case OpCode.getChildren2:
-case OpCode.ping:
-case OpCode.setWatches:
+default:
--- End diff --

I get your point. I would argue that we perform the check to make sure we 
don't get a bad OpCode here: 
https://github.com/apache/zookeeper/blob/branch-3.4/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java#L742
 and I think this is cleaner. I would be willing to change this if you feel 
strongly about it.


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #236: ZOOKEEPER-2733: Cleanup findbug warnings in bra...

2017-05-18 Thread afine
Github user afine commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117341551
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ---
@@ -628,14 +628,7 @@ protected void pRequest(Request request) throws 
RequestProcessorException {
 break;
  
 //All the rest don't need to create a Txn - just verify session
-case OpCode.sync:
-case OpCode.exists:
-case OpCode.getData:
-case OpCode.getACL:
-case OpCode.getChildren:
-case OpCode.getChildren2:
-case OpCode.ping:
-case OpCode.setWatches:
+default:
--- End diff --

I get your point. I would argue that we perform the check to make sure we 
don't get a bad OpCode here: 
https://github.com/apache/zookeeper/blob/branch-3.4/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java#L742
 and I think this is cleaner. I would be willing to change this if you feel 
strongly about it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2774) Ephemeral znode will not be removed when sesstion timeout, if the system time of ZooKeeper node changes unexpectedly.

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16016193#comment-16016193
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2774:
---

Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/253
  
LGTM - all unit test passed. The Jenkins check failed because it has 
findbug warnings and that is a known issue for branch-3.4. I will merge this to 
branch-3.4 soon.

One suggestion, in future pull request, please provide a descriptive title 
and a brief description of what the pull request did.


> Ephemeral znode will not be removed when sesstion timeout, if the system time 
> of ZooKeeper node changes unexpectedly.
> -
>
> Key: ZOOKEEPER-2774
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2774
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.4.8, 3.4.9, 3.4.10
> Environment: Centos6.5
>Reporter: JiangJiafu
>
> 1. Deploy a ZooKeeper cluster with one node.
> 2. Create a Ephemeral znode.
> 3. Change the system time of the ZooKeeper node to a earlier point.
> 4. Disconnect the client with the ZooKeeper server.
> Then the ephemeral znode will exist for a long time even when session timeout.
> I have read the ZooKeeper source code and I find the code int 
> SessionTrackerImpl.java,
> {code:title=SessionTrackerImpl.java|borderStyle=solid}
> @Override
> synchronized public void run() {
> try {
> while (running) {
> currentTime = System.currentTimeMillis();
> if (nextExpirationTime > currentTime) {
> this.wait(nextExpirationTime - currentTime);
> continue;
> }
> SessionSet set;
> set = sessionSets.remove(nextExpirationTime);
> if (set != null) {
> for (SessionImpl s : set.sessions) {
> setSessionClosing(s.sessionId);
> expirer.expire(s);
> }
> }
> nextExpirationTime += expirationInterval;
> }
> } catch (InterruptedException e) {
> handleException(this.getName(), e);
> }
> LOG.info("SessionTrackerImpl exited loop!");
> }
> {code}
> I think it may be better to use System.nanoTime(), not 
> System.currentTimeMillis, because the later can be changed manually or 
> automatically by a NTP client. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper issue #253: ZOOKEEPER-2774

2017-05-18 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/253
  
LGTM - all unit test passed. The Jenkins check failed because it has 
findbug warnings and that is a known issue for branch-3.4. I will merge this to 
branch-3.4 soon.

One suggestion, in future pull request, please provide a descriptive title 
and a brief description of what the pull request did.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16015987#comment-16015987
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user rakeshadr commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117284521
  
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/Observer.java ---
@@ -125,6 +125,8 @@ protected void processPacket(QuorumPacket qp) throws 
IOException{
 ObserverZooKeeperServer obs = (ObserverZooKeeperServer)zk;
 obs.commitRequest(request);
 break;
+default:
+LOG.error("Invalid packet type received by Observer: " + 
qp.getType());
--- End diff --

Can we change log message like below to improve readability.

`LOG.error("Invalid packet type: {} received by Observer", qp.getType());`


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16015989#comment-16015989
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user rakeshadr commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117283048
  
--- Diff: src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java ---
@@ -133,11 +133,17 @@ public boolean accept(File f){
 }
 }
 // add all non-excluded log files
-List files = new ArrayList(Arrays.asList(txnLog
-.getDataDir().listFiles(new MyFileFilter(PREFIX_LOG;
+List files = new ArrayList();
+File[] fileArray;
+if ((fileArray = txnLog.getDataDir().listFiles(new 
MyFileFilter(PREFIX_LOG))) != null) {
+files.addAll(Arrays.asList(fileArray));
+}
+
 // add all non-excluded snapshot files to the deletion list
-files.addAll(Arrays.asList(txnLog.getSnapDir().listFiles(
-new MyFileFilter(PREFIX_SNAPSHOT;
+if ((fileArray = txnLog.getSnapDir().listFiles(new 
MyFileFilter(PREFIX_SNAPSHOT))) != null) {
--- End diff --

Same as above, Its good to keep the var assignment outside if check for 
better readability.
`(fileArray = txnLog.getSnapDir().listFiles(new 
MyFileFilter(PREFIX_SNAPSHOT))`


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16015984#comment-16015984
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user rakeshadr commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117284290
  
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/Follower.java ---
@@ -135,6 +135,8 @@ protected void processPacket(QuorumPacket qp) throws 
IOException{
 case Leader.SYNC:
 fzk.sync();
 break;
+default:
+LOG.error("Invalid packet type received by Observer: " + 
qp.getType());
--- End diff --

Can we change log message like below to improve readability.
`LOG.error("Invalid packet type: {} received by Observer", qp.getType());`


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16015983#comment-16015983
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user rakeshadr commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117287341
  
--- Diff: ivy.xml ---
@@ -49,6 +49,8 @@
 
 
 
+
--- End diff --

I'd prefer to exclude `AuthFastLeaderElection.java` as this is deprecated 
rather than introducing google library dependency. Does this sound good to you. 
Thanks!


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16015988#comment-16015988
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user rakeshadr commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117280664
  
--- Diff: src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java ---
@@ -133,11 +133,17 @@ public boolean accept(File f){
 }
 }
 // add all non-excluded log files
-List files = new ArrayList(Arrays.asList(txnLog
-.getDataDir().listFiles(new MyFileFilter(PREFIX_LOG;
+List files = new ArrayList();
+File[] fileArray;
+if ((fileArray = txnLog.getDataDir().listFiles(new 
MyFileFilter(PREFIX_LOG))) != null) {
--- End diff --

Can we keep the var assignment `File[] fileArray` outside along with the 
object reference instead of clubbing with if check.

 File[] fileArray = txnLog.getDataDir().listFiles(new 
MyFileFilter(PREFIX_LOG);


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16015985#comment-16015985
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user rakeshadr commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117232748
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ---
@@ -504,6 +504,8 @@ protected void pRequest2Txn(int type, long zxid, 
Request request, Record record,
 version = currentVersion + 1;
 request.txn = new CheckVersionTxn(path, version);
 break;
+default:
+LOG.error("Invalid OpCode received by 
PrepRequestProcessor: " + type);
--- End diff --

Just a suggestion to make this more readable.

`LOG.error("Invalid OpCode: {} received by PrepRequestProcessor", type);`


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16015982#comment-16015982
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user rakeshadr commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117285488
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/upgrade/UpgradeMain.java ---
@@ -113,16 +113,18 @@ private void createAllDirs() throws IOException {
  * @throws IOException
  */
 void copyFiles(File srcDir, File dstDir, String filter) throws 
IOException {
-File[] list = srcDir.listFiles();
-for (File file: list) {
-String name = file.getName();
-if (name.startsWith(filter)) {
-// we need to copy this file
-File dest = new File(dstDir, name);
-LOG.info("Renaming " + file + " to " + dest);
-if (!file.renameTo(dest)) {
-throw new IOException("Unable to rename " 
-+ file + " to " +  dest);
+File[] list;
+if ((list = srcDir.listFiles()) != null) {
--- End diff --

Please keep var assignment `(list = srcDir.listFiles())` along with the 
object reference.

`File[] list = srcDir.listFiles();`


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (ZOOKEEPER-2733) Cleanup findbug warnings in branch-3.4: Dodgy code Warnings

2017-05-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16015986#comment-16015986
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2733:
---

Github user rakeshadr commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117279935
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ---
@@ -628,14 +628,7 @@ protected void pRequest(Request request) throws 
RequestProcessorException {
 break;
  
 //All the rest don't need to create a Txn - just verify session
-case OpCode.sync:
-case OpCode.exists:
-case OpCode.getData:
-case OpCode.getACL:
-case OpCode.getChildren:
-case OpCode.getChildren2:
-case OpCode.ping:
-case OpCode.setWatches:
+default:
--- End diff --

This will execute if any `unknown type` and is not expected, isn't it?
We could keep the existing case checks and add default like,
```
zks.sessionTracker.checkSession(request.sessionId,
  request.getOwner());
break;
default:
LOG.warn("unknown type " + request.type);
break;

```


> Cleanup findbug warnings in branch-3.4: Dodgy code Warnings
> ---
>
> Key: ZOOKEEPER-2733
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2733
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Rakesh R
>Assignee: Abraham Fine
> Fix For: 3.4.11
>
>
> Please refer the attached sheet in parent jira. Below is the details of 
> findbug warnings.
> {code}
> DB
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[]) uses the same code for two branches
> DLS   Dead store to txn in 
> org.apache.zookeeper.server.quorum.LearnerHandler.packetToString(QuorumPacket)
> NPLoad of known null value in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.PurgeTxnLog.purgeOlderSnapshots(FileTxnSnapLog, 
> File) due to return value of called method
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthLearner.send(DataOutputStream,
>  byte[])
> NPLoad of known null value in 
> org.apache.zookeeper.server.quorum.auth.SaslQuorumAuthServer.send(DataOutputStream,
>  byte[], QuorumAuth$Status)
> NPPossible null pointer dereference in 
> org.apache.zookeeper.server.upgrade.UpgradeMain.copyFiles(File, File, String) 
> due to return value of called method
> RCN   Redundant nullcheck of bytes, which is known to be non-null in 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next()
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(Request) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest2Txn(int, long, 
> Request, Record, boolean) where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerReceiver.run()
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.AuthFastLeaderElection$Messenger$WorkerSender.process(AuthFastLeaderElection$ToSend)
>  where default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Follower.processPacket(QuorumPacket) where 
> default case is missing
> SFSwitch statement found in 
> org.apache.zookeeper.server.quorum.Observer.processPacket(QuorumPacket) where 
> default case is missing
> STWrite to static field 
> org.apache.zookeeper.server.SyncRequestProcessor.randRoll from instance 
> method org.apache.zookeeper.server.SyncRequestProcessor.run()
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.err
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.path
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.stat
> UrF   Unread public/protected field: 
> org.apache.zookeeper.server.upgrade.DataTreeV1$ProcessTxnResult.type
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] zookeeper pull request #236: ZOOKEEPER-2733: Cleanup findbug warnings in bra...

2017-05-18 Thread rakeshadr
Github user rakeshadr commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117279935
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ---
@@ -628,14 +628,7 @@ protected void pRequest(Request request) throws 
RequestProcessorException {
 break;
  
 //All the rest don't need to create a Txn - just verify session
-case OpCode.sync:
-case OpCode.exists:
-case OpCode.getData:
-case OpCode.getACL:
-case OpCode.getChildren:
-case OpCode.getChildren2:
-case OpCode.ping:
-case OpCode.setWatches:
+default:
--- End diff --

This will execute if any `unknown type` and is not expected, isn't it?
We could keep the existing case checks and add default like,
```
zks.sessionTracker.checkSession(request.sessionId,
  request.getOwner());
break;
default:
LOG.warn("unknown type " + request.type);
break;

```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] zookeeper pull request #236: ZOOKEEPER-2733: Cleanup findbug warnings in bra...

2017-05-18 Thread rakeshadr
Github user rakeshadr commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/236#discussion_r117287341
  
--- Diff: ivy.xml ---
@@ -49,6 +49,8 @@
 
 
 
+
--- End diff --

I'd prefer to exclude `AuthFastLeaderElection.java` as this is deprecated 
rather than introducing google library dependency. Does this sound good to you. 
Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


  1   2   >