[jira] [Commented] (ZOOKEEPER-2062) RemoveWatchesTest takes forever to run

2015-04-29 Thread Rakesh R (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14519233#comment-14519233
 ] 

Rakesh R commented on ZOOKEEPER-2062:
-

Thanks [~cnauroth] for taking care this. Latest patch looks nice!

For the {{testRemoveSingleWatcher}} and {{testMultipleDataWatchers}}. Its 
written to see any events triggered after the session closure. I think there is 
a space to improve this also. In these tests, {{assertFalse}} is too costly and 
we could replace the {{assertFalse}} statement like below and move them above 
{{zk1.close();}} statement.

{code}
Assert.assertTrue(Didn't remove data watcher, w1.matches());
Assert.assertFalse(Should have removed data watcher, w2.matches());
{code}

to 

{code}
Assert.assertEquals(Didn't find data watcher, 1, 
zk2.getDataWatches().size());
Assert.assertEquals(Didn't find data watcher, /node2, 
zk2.getDataWatches().get(0));
removeWatches(zk2, /node2, w2, WatcherType.Any, false, Code.OK);
Assert.assertTrue(Didn't remove data watcher, w2.matches());
{code}

 RemoveWatchesTest takes forever to run
 --

 Key: ZOOKEEPER-2062
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2062
 Project: ZooKeeper
  Issue Type: Bug
  Components: tests
Affects Versions: 3.5.0
Reporter: Flavio Junqueira
Assignee: Chris Nauroth
 Attachments: ZOOKEEPER-2062.001.patch, ZOOKEEPER-2062.002.patch, 
 ZOOKEEPER-2062.003.patch


 [junit] Running org.apache.zookeeper.RemoveWatchesTest
 [junit] Tests run: 46, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
 306.188 sec



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


ZooKeeper-trunk-WinVS2008 - Build # 1779 - Still Failing

2015-04-29 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/1779/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 110 lines...]
   [javacc] File SimpleCharStream.java does not exist.  Will create one.
   [javacc] Parser generated successfully.

jute:
[javac] Compiling 39 source files to 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\build\classes

compile_jute_uptodate:

compile_jute:
[mkdir] Created dir: 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\java\generated
[mkdir] Created dir: 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\generated
 [java] ../../zookeeper.jute Parsed Successfully
 [java] ../../zookeeper.jute Parsed Successfully
[touch] Creating 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\java\generated\.generated

BUILD SUCCESSFUL
Total time: 9 seconds
[ZooKeeper-trunk-WinVS2008] $ cmd /c call 
C:\Windows\TEMP\hudson6774530960659639265.bat

f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008set 
ZOOKEEPER_HOME=f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk 

f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008msbuild 
trunk/src/c/zookeeper.sln /p:Configuration=Release 
Microsoft (R) Build Engine version 4.0.30319.18408
[Microsoft .NET Framework, version 4.0.30319.18444]
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, 
please add the /m switch.
Build started 4/29/2015 1:13:22 PM.
Project 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln
 on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration Release|Win32.
zookeeper:
  C:\Program Files (x86)\Microsoft Visual Studio 
9.0\Common7\IDE\..\..\vc\vcpackages\VCBuild.exe 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.vcproj
 Release|Win32 
cl : Command line warning D9035: option 'Wp64' has been deprecated and will be 
removed in a future release 
[f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln]
.\src\zookeeper.c(43): fatal error C1083: Cannot open include file: 'unistd.h': 
No such file or directory 
[f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln]
Cli:
  C:\Program Files (x86)\Microsoft Visual Studio 
9.0\Common7\IDE\..\..\vc\vcpackages\VCBuild.exe 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\Cli.vcproj
 Release|Win32 
Done Building Project 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln
 (default targets) -- FAILED.

Build FAILED.

f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln
 (default target) (1) -
(zookeeper target) - 
  cl : Command line warning D9035: option 'Wp64' has been deprecated and will 
be removed in a future release 
[f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln]


f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln
 (default target) (1) -
(zookeeper target) - 
  .\src\zookeeper.c(43): fatal error C1083: Cannot open include file: 
'unistd.h': No such file or directory 
[f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln]

1 Warning(s)
1 Error(s)

Time Elapsed 00:00:05.90

f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008exit 1 
Build step 'Execute Windows batch command' marked build as failure
Email was triggered for: Failure
Sending email for trigger: Failure



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

ZooKeeper-trunk-solaris - Build # 1016 - Still Failing

2015-04-29 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-solaris/1016/

###
## LAST 60 LINES OF THE CONSOLE 
###
Started by timer
Building remotely on solaris1 (Solaris) in workspace 
/export/home/hudson/hudson-slave/workspace/ZooKeeper-trunk-solaris
Updating http://svn.apache.org/repos/asf/zookeeper/trunk at revision 
'2015-04-29T08:31:26.720 +'
At revision 1676687
Updating http://svn.apache.org/repos/asf/hadoop/nightly at revision 
'2015-04-29T08:31:26.720 +'
At revision 1676687
no change for http://svn.apache.org/repos/asf/zookeeper/trunk since the 
previous build
no change for http://svn.apache.org/repos/asf/hadoop/nightly since the previous 
build
No emails were triggered.
[locks-and-latches] Checking to see if we really have the locks
[locks-and-latches] Have all the locks, build can start
[ZooKeeper-trunk-solaris] $ /bin/bash /var/tmp/hudson3437929861856873186.sh
/var/tmp/hudson3437929861856873186.sh: line 12: ant: command not found
Build step 'Execute shell' marked build as failure
[locks-and-latches] Releasing all the locks
[locks-and-latches] All the locks released
Recording test results
Email was triggered for: Failure
Sending email for trigger: Failure



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

ZooKeeper-trunk-WinVS2008 - Build # 1778 - Still Failing

2015-04-29 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/1778/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 108 lines...]
   [javacc] File SimpleCharStream.java does not exist.  Will create one.
   [javacc] Parser generated successfully.

jute:
[javac] Compiling 39 source files to 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\build\classes

compile_jute_uptodate:

compile_jute:
[mkdir] Created dir: 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\java\generated
[mkdir] Created dir: 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\generated
 [java] ../../zookeeper.jute Parsed Successfully
 [java] ../../zookeeper.jute Parsed Successfully
[touch] Creating 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\java\generated\.generated

BUILD SUCCESSFUL
Total time: 11 seconds
[ZooKeeper-trunk-WinVS2008] $ cmd /c call 
C:\Windows\TEMP\hudson4039730360837973344.bat

f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008set 
ZOOKEEPER_HOME=f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk 

f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008msbuild 
trunk/src/c/zookeeper.sln /p:Configuration=Release 
Microsoft (R) Build Engine version 4.0.30319.18408
[Microsoft .NET Framework, version 4.0.30319.18444]
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, 
please add the /m switch.
Build started 4/29/2015 9:23:40 AM.
Project 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln
 on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration Release|Win32.
zookeeper:
  C:\Program Files (x86)\Microsoft Visual Studio 
9.0\Common7\IDE\..\..\vc\vcpackages\VCBuild.exe 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.vcproj
 Release|Win32 
cl : Command line warning D9035: option 'Wp64' has been deprecated and will be 
removed in a future release 
[f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln]
.\src\zookeeper.c(43): fatal error C1083: Cannot open include file: 'unistd.h': 
No such file or directory 
[f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln]
Cli:
  C:\Program Files (x86)\Microsoft Visual Studio 
9.0\Common7\IDE\..\..\vc\vcpackages\VCBuild.exe 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\Cli.vcproj
 Release|Win32 
Done Building Project 
f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln
 (default targets) -- FAILED.

Build FAILED.

f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln
 (default target) (1) -
(zookeeper target) - 
  cl : Command line warning D9035: option 'Wp64' has been deprecated and will 
be removed in a future release 
[f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln]


f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln
 (default target) (1) -
(zookeeper target) - 
  .\src\zookeeper.c(43): fatal error C1083: Cannot open include file: 
'unistd.h': No such file or directory 
[f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008\trunk\src\c\zookeeper.sln]

1 Warning(s)
1 Error(s)

Time Elapsed 00:00:08.14

f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008exit 1 
Build step 'Execute Windows batch command' marked build as failure
Email was triggered for: Failure
Sending email for trigger: Failure



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

[jira] [Commented] (ZOOKEEPER-2171) avoid reverse lookups in QuorumCnxManager

2015-04-29 Thread Michi Mutsuzaki (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14518753#comment-14518753
 ] 

Michi Mutsuzaki commented on ZOOKEEPER-2171:


Thanks Raul for quick turnaround! We dropped support for java6 in 
ZOOKEEPER-1963. I prefer to use gethoststring consistently throughout the code 
base to avoid future confusions/issues. What do you think?

 avoid reverse lookups in QuorumCnxManager
 -

 Key: ZOOKEEPER-2171
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2171
 Project: ZooKeeper
  Issue Type: Bug
  Components: quorum
Reporter: Raul Gutierrez Segales
Assignee: Raul Gutierrez Segales
 Fix For: 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2171.patch


 Apparently, ZOOKEEPER-107 (via a quick git-blame look) introduced a bunch of 
 getHostName() calls in QCM. Besides the overhead, these can cause problems 
 when mixed with failing/mis-configured DNS servers.
 It would be nice to reduce them, if that doesn't affect operational 
 correctness. 



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


[jira] [Updated] (ZOOKEEPER-2062) RemoveWatchesTest takes forever to run

2015-04-29 Thread Rakesh R (JIRA)

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

Rakesh R updated ZOOKEEPER-2062:

Fix Version/s: 3.6.0
   3.5.2

 RemoveWatchesTest takes forever to run
 --

 Key: ZOOKEEPER-2062
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2062
 Project: ZooKeeper
  Issue Type: Bug
  Components: tests
Affects Versions: 3.5.0
Reporter: Flavio Junqueira
Assignee: Chris Nauroth
 Fix For: 3.5.2, 3.6.0

 Attachments: ZOOKEEPER-2062.001.patch, ZOOKEEPER-2062.002.patch, 
 ZOOKEEPER-2062.003.patch, ZOOKEEPER-2062.004.patch


 [junit] Running org.apache.zookeeper.RemoveWatchesTest
 [junit] Tests run: 46, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
 306.188 sec



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


[jira] [Commented] (ZOOKEEPER-2163) Introduce new ZNode type: container

2015-04-29 Thread Rakesh R (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14519705#comment-14519705
 ] 

Rakesh R commented on ZOOKEEPER-2163:
-

Thanks [~randgalt], Nice Work!

I will review it sometime later. Could you please raise a [review 
ticket|https://reviews.apache.org/dashboard/] and upload patch to it. Also, one 
general suggestion, it would be good to keep the old patches in the jira itself 
for references.

 Introduce new ZNode type: container
 ---

 Key: ZOOKEEPER-2163
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2163
 Project: ZooKeeper
  Issue Type: New Feature
  Components: c client, java client, server
Affects Versions: 3.5.0
Reporter: Jordan Zimmerman
Assignee: Jordan Zimmerman
 Attachments: zookeeper-2163.3.patch


 BACKGROUND
 
 A recurring problem for ZooKeeper users is garbage collection of parent 
 nodes. Many recipes (e.g. locks, leaders, etc.) call for the creation of a 
 parent node under which participants create sequential nodes. When the 
 participant is done, it deletes its node. In practice, the ZooKeeper tree 
 begins to fill up with orphaned parent nodes that are no longer needed. The 
 ZooKeeper APIs don’t provide a way to clean these. Over time, ZooKeeper can 
 become unstable due to the number of these nodes.
 CURRENT SOLUTIONS
 ===
 Apache Curator has a workaround solution for this by providing the Reaper 
 class which runs in the background looking for orphaned parent nodes and 
 deleting them. This isn’t ideal and it would be better if ZooKeeper supported 
 this directly.
 PROPOSAL
 =
 ZOOKEEPER-723 and ZOOKEEPER-834 have been proposed to allow EPHEMERAL nodes 
 to contain child nodes. This is not optimum as EPHEMERALs are tied to a 
 session and the general use case of parent nodes is for PERSISTENT nodes. 
 This proposal adds a new node type, CONTAINER. A CONTAINER node is the same 
 as a PERSISTENT node with the additional property that when its last child is 
 deleted, it is deleted (and CONTAINER nodes recursively up the tree are 
 deleted if empty).
 CANONICAL USAGE
 
 {code}
 while ( true) { // or some reasonable limit
 try {
 zk.create(path, ...);
 break;
 } catch ( KeeperException.NoNodeException e ) {
 try {
 zk.createContainer(containerPath, ...);
 } catch ( KeeperException.NodeExistsException ignore) {
}
 }
 }
 {code}



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


Re: Review Request 32979: ZOOKEEPER-2159 - Allow pluggable SASL authentication

2015-04-29 Thread Yuliya Feldman


 On April 28, 2015, 1:10 a.m., Eugene Koontz wrote:
  src/java/main/org/apache/zookeeper/LoginFactory.java, line 30
  https://reviews.apache.org/r/32979/diff/1/?file=920929#file920929line30
 
  I'm not sure that we need this factory class - I don't see where we 
  have any multiple logins in the test code (or in non-test code). If we do 
  only need this factory in the test code, then it might be better under the 
  test/ directory.
 
 Yuliya Feldman wrote:
 Yes - so far the use case for multiple logins is only in Tests where we 
 do both client and server.

Multiple login in test code is implicit - because you start both client and 
server within the same process. Ideally Login should be a singleton as you 
should be logging once per process, but in case of UnitTests it is not the 
case. I also could imagine some of those situations with Hbase (or other 
application) embedded ZookeeperServer - where the same process (HBaseMaster for 
example) can behave as ZK client and ZK server at the same time.


- Yuliya


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32979/#review81785
---


On April 29, 2015, 10:19 a.m., Yuliya Feldman wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/32979/
 ---
 
 (Updated April 29, 2015, 10:19 a.m.)
 
 
 Review request for zookeeper, Eugene Koontz, Patrick Hunt, and Camille 
 Fournier.
 
 
 Repository: zookeeper-git
 
 
 Description
 ---
 
 Today SASLAuthenticationProvider is used for all SASL based authentications 
 which creates some if/else statements in ZookeeperSaslClient and 
 ZookeeperSaslServer code with just Kerberos and Digest.
 We want to use yet another different SASL based authentication and adding one 
 more if/else with some code specific just to that new way does not make 
 much sense.
 Proposal is to allow to plug custom SASL Authentication mechanism(s) without 
 further changes in Zookeeper code.
 
 
 Diffs
 -
 
   src/java/main/org/apache/zookeeper/Login.java 44b0bdf 
   src/java/main/org/apache/zookeeper/LoginFactory.java PRE-CREATION 
   src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 53f33e8 
   src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java 1235faa 
   src/java/main/org/apache/zookeeper/server/ZooKeeperSaslServer.java 60711ee 
   src/java/main/org/apache/zookeeper/server/auth/AuthMethod.java PRE-CREATION 
   src/java/main/org/apache/zookeeper/server/auth/AuthRegistry.java 
 PRE-CREATION 
   src/java/main/org/apache/zookeeper/server/auth/DigestAuthMethod.java 
 PRE-CREATION 
   src/java/main/org/apache/zookeeper/server/auth/KerberosAuthMethod.java 
 PRE-CREATION 
   src/java/test/org/apache/zookeeper/test/SaslPluggableAuthTest.java 
 PRE-CREATION 
   src/java/test/org/apache/zookeeper/test/auth/util/GenericLoginModule.java 
 PRE-CREATION 
   src/java/test/org/apache/zookeeper/test/auth/util/SimpleAuthMethod.java 
 PRE-CREATION 
   src/java/test/org/apache/zookeeper/test/auth/util/SimpleSaslClient.java 
 PRE-CREATION 
   src/java/test/org/apache/zookeeper/test/auth/util/SimpleSaslProvider.java 
 PRE-CREATION 
   src/java/test/org/apache/zookeeper/test/auth/util/SimpleSaslServer.java 
 PRE-CREATION 
 
 Diff: https://reviews.apache.org/r/32979/diff/
 
 
 Testing
 ---
 
 UnitTests passed, New Unit Tests added
 tested Digest and Kerberos(with real KDC)
 
 
 Thanks,
 
 Yuliya Feldman
 




[jira] [Updated] (ZOOKEEPER-2171) avoid reverse lookups in QuorumCnxManager

2015-04-29 Thread Raul Gutierrez Segales (JIRA)

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

Raul Gutierrez Segales updated ZOOKEEPER-2171:
--
Attachment: ZOOKEEPER-2171.patch

This replaces all getHostName calls for getHostString (which does not perform 
reverse lookups).

In addition to that, it removes HostNameUtils since Java 6 isn't supported 
anymore (ZOOKEEPER-1963).

cc: [~michim], [~rakeshr]


 avoid reverse lookups in QuorumCnxManager
 -

 Key: ZOOKEEPER-2171
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2171
 Project: ZooKeeper
  Issue Type: Bug
  Components: quorum
Reporter: Raul Gutierrez Segales
Assignee: Raul Gutierrez Segales
 Fix For: 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2171.patch, ZOOKEEPER-2171.patch


 Apparently, ZOOKEEPER-107 (via a quick git-blame look) introduced a bunch of 
 getHostName() calls in QCM. Besides the overhead, these can cause problems 
 when mixed with failing/mis-configured DNS servers.
 It would be nice to reduce them, if that doesn't affect operational 
 correctness. 



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


[jira] [Commented] (ZOOKEEPER-2126) ClientCnxn.close doesn't wait for eventThread exit which cause out of order log when close Zookeeper client session.

2015-04-29 Thread zhihai xu (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14519975#comment-14519975
 ] 

zhihai xu commented on ZOOKEEPER-2126:
--

thanks [~rakeshr], Yes, adding the session id in the log is a good idea.

 ClientCnxn.close doesn't wait for eventThread exit which cause out of order 
 log when close Zookeeper client session.
 

 Key: ZOOKEEPER-2126
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2126
 Project: ZooKeeper
  Issue Type: Improvement
Affects Versions: 3.6.0
Reporter: zhihai xu
Assignee: surendra singh lilhore
 Attachments: ZOOKEEPER-2126.patch


 We saw the following out of order log when close Zookeeper client session.
 {code}
 2015-02-16 06:01:12,985 INFO org.apache.zookeeper.ZooKeeper: Session: 
 0x24b8df4044005d4 closed
 .
 2015-02-16 06:01:12,995 INFO org.apache.zookeeper.ClientCnxn: EventThread 
 shut down
 {code}
 This logs are very confusing if a new Zookeeper client session is created 
 between these two logs. We may think new Zookeeper client session shutdown it 
 EventThread instead of the old closed Zookeeper client session.
 Should we wait for sendThread and eventThread died in the ClientCnxn.close?
 We can add the following code in ClientCnxn.close.
 {code}
 sendThread.join(timeout);
 eventThread.join(timeout);
 {code}
 with the change, we won't interleave old closed session with new session.
 We can also create a new close API to support this so we won't affect the old 
 code if people use old close API.



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


[jira] [Commented] (ZOOKEEPER-2159) Pluggable SASL Authentication

2015-04-29 Thread Yuliya Feldman (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14519765#comment-14519765
 ] 

Yuliya Feldman commented on ZOOKEEPER-2159:
---

[~ekoontz]  I have posted patch that addresses majority of your comments. Thank 
you for the review

 Pluggable SASL Authentication
 -

 Key: ZOOKEEPER-2159
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2159
 Project: ZooKeeper
  Issue Type: Improvement
  Components: java client, server
Reporter: Yuliya Feldman
Assignee: Yuliya Feldman
 Attachments: PluggableZookeeperAuthentication (1).pdf, 
 PluggableZookeeperAuthentication.pdf


 Today SASLAuthenticationProvider is used for all SASL based authentications 
 which creates some if/else statements in ZookeeperSaslClient and 
 ZookeeperSaslServer code with just Kerberos and Digest.
 We want to use yet another different SASL based authentication and adding one 
 more if/else with some code specific just to that new way does not make 
 much sense.
 Proposal is to allow to plug custom SASL Authentication mechanism(s) without  
 further changes in Zookeeper code.



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


[jira] [Commented] (ZOOKEEPER-2062) RemoveWatchesTest takes forever to run

2015-04-29 Thread Chris Nauroth (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14519804#comment-14519804
 ] 

Chris Nauroth commented on ZOOKEEPER-2062:
--

bq. -1 core tests. The patch failed core unit tests.

The test failure looks unrelated, since the patch changed only one test suite, 
and the failure is in a different test suite.

There is a nice speed-up visible in that last Jenkins run!  :-)

Before:
Tests run: 46, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 306.188 sec

After:
Tests run: 46, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 54.075 sec


 RemoveWatchesTest takes forever to run
 --

 Key: ZOOKEEPER-2062
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2062
 Project: ZooKeeper
  Issue Type: Bug
  Components: tests
Affects Versions: 3.5.0
Reporter: Flavio Junqueira
Assignee: Chris Nauroth
 Fix For: 3.5.2, 3.6.0

 Attachments: ZOOKEEPER-2062.001.patch, ZOOKEEPER-2062.002.patch, 
 ZOOKEEPER-2062.003.patch, ZOOKEEPER-2062.004.patch


 [junit] Running org.apache.zookeeper.RemoveWatchesTest
 [junit] Tests run: 46, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
 306.188 sec



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


[jira] [Commented] (ZOOKEEPER-2062) RemoveWatchesTest takes forever to run

2015-04-29 Thread Rakesh R (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14519817#comment-14519817
 ] 

Rakesh R commented on ZOOKEEPER-2062:
-

Thanks [~cnauroth], Nice to see the tests passed in 53secs in the latest 
jenkins report. I could see only {{*NoConnection}} tests are taking more time, 
but I'm OK as these unit test cases depending on zookeeper client connection 
timeouts.

{code}
testChRootRemoveWatcher[0]  86 ms   Passed
testChRootRemoveWatcher[1]  76 ms   Passed
testManyChildWatchers[0]0.3 sec Passed
testManyChildWatchers[1]0.24 secPassed
testManyDataWatchers[0] 0.28 secPassed
testManyDataWatchers[1] 0.26 secPassed
testManyPreNodeWatchers[0]  0.21 secPassed
testManyPreNodeWatchers[1]  0.19 secPassed
testManyWatchersWhenNoConnection[0] 5.7 sec Passed
testManyWatchersWhenNoConnection[1] 6.3 sec Passed
testMultipleChildWatchers[0]3 sec   Passed
testMultipleChildWatchers[1]3 sec   Passed
testMultipleDataWatchers[0] 67 ms   Passed
testMultipleDataWatchers[1] 58 ms   Passed
testNoWatcherException[0]   79 ms   Passed
testNoWatcherException[1]   60 ms   Passed
testNoWatcherServerException[0] 58 ms   Passed
testNoWatcherServerException[1] 46 ms   Passed
testNullWatcherReference[0] 48 ms   Passed
testNullWatcherReference[1] 45 ms   Passed
testRemoveAllChildWatchers[0]   59 ms   Passed
testRemoveAllChildWatchers[1]   59 ms   Passed
testRemoveAllChildWatchesOnAPath[0] 50 ms   Passed
testRemoveAllChildWatchesOnAPath[1] 47 ms   Passed
testRemoveAllDataWatchers[0]65 ms   Passed
testRemoveAllDataWatchers[1]64 ms   Passed
testRemoveAllDataWatchesOnAPath[0]  55 ms   Passed
testRemoveAllDataWatchesOnAPath[1]  48 ms   Passed
testRemoveAllNoWatcherException[0]  55 ms   Passed
testRemoveAllNoWatcherException[1]  46 ms   Passed
testRemoveAllWatchers[0]73 ms   Passed
testRemoveAllWatchers[1]62 ms   Passed
testRemoveAllWatchesOnAPath[0]  55 ms   Passed
testRemoveAllWatchesOnAPath[1]  51 ms   Passed
testRemoveAnyChildWatcher[0]62 ms   Passed
testRemoveAnyChildWatcher[1]53 ms   Passed
testRemoveAnyDataWatcher[0] 66 ms   Passed
testRemoveAnyDataWatcher[1] 52 ms   Passed
testRemoveSingleWatcher[0]  0.36 secPassed
testRemoveSingleWatcher[1]  54 ms   Passed
testRemoveWatcherWhenNoConnection[0]16 sec  Passed
testRemoveWatcherWhenNoConnection[1]15 sec  Passed
testRemoveWhenMultipleChildWatchesOnAPath[0]55 ms   Passed
testRemoveWhenMultipleChildWatchesOnAPath[1]50 ms   Passed
testRemoveWhenMultipleDataWatchesOnAPath[0] 58 ms   Passed
testRemoveWhenMultipleDataWatchesOnAPath[1] 51 ms   Passed
{code}

+1 latest patch looks good to me.

 RemoveWatchesTest takes forever to run
 --

 Key: ZOOKEEPER-2062
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2062
 Project: ZooKeeper
  Issue Type: Bug
  Components: tests
Affects Versions: 3.5.0
Reporter: Flavio Junqueira
Assignee: Chris Nauroth
 Fix For: 3.5.2, 3.6.0

 Attachments: ZOOKEEPER-2062.001.patch, ZOOKEEPER-2062.002.patch, 
 ZOOKEEPER-2062.003.patch, ZOOKEEPER-2062.004.patch


 [junit] Running org.apache.zookeeper.RemoveWatchesTest
 [junit] Tests run: 46, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
 306.188 sec



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


[jira] [Updated] (ZOOKEEPER-2154) NPE in KeeperException

2015-04-29 Thread Rakesh R (JIRA)

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

Rakesh R updated ZOOKEEPER-2154:

Release Note:   (was: attached patch , please review)

 NPE in KeeperException
 --

 Key: ZOOKEEPER-2154
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2154
 Project: ZooKeeper
  Issue Type: Bug
  Components: java client
Affects Versions: 3.4.0
Reporter: surendra singh lilhore
Assignee: surendra singh lilhore
 Attachments: ZOOKEEPER-2154.patch


 KeeperException should handle exception is code is null...



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


Failed: ZOOKEEPER-2062 PreCommit Build #2657

2015-04-29 Thread Apache Jenkins Server
Jira: https://issues.apache.org/jira/browse/ZOOKEEPER-2062
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2657/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 363428 lines...]
 [exec] 
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +1 tests included.  The patch appears to include 3 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 2.0.3) 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-Build/2657//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2657//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2657//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] 214888d46d65bd3c9b971d1c0b177d31249ff43f logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-Build/trunk/build.xml:1721:
 exec returned: 1

Total time: 43 minutes 9 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Sending artifact delta relative to PreCommit-ZOOKEEPER-Build #2654
Archived 7 artifacts
Archive block size is 32768
Received 3 blocks and 464975 bytes
Compression is 17.5%
Took 3.9 sec
Recording test results
Description set: ZOOKEEPER-2062
Email was triggered for: Failure
Sending email for trigger: Failure



###
## FAILED TESTS (if any) 
##
1 tests failed.
REGRESSION:  
org.apache.zookeeper.server.quorum.ReconfigRecoveryTest.testCurrentServersAreObserversInNextConfig

Error Message:
waiting for server 3 being up

Stack Trace:
junit.framework.AssertionFailedError: waiting for server 3 being up
at 
org.apache.zookeeper.server.quorum.ReconfigRecoveryTest.testCurrentServersAreObserversInNextConfig(ReconfigRecoveryTest.java:217)
at 
org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52)




[jira] [Commented] (ZOOKEEPER-2062) RemoveWatchesTest takes forever to run

2015-04-29 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14519785#comment-14519785
 ] 

Hadoop QA commented on ZOOKEEPER-2062:
--

-1 overall.  Here are the results of testing the latest attachment 
  
http://issues.apache.org/jira/secure/attachment/12729218/ZOOKEEPER-2062.004.patch
  against trunk revision 1676359.

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

+1 tests included.  The patch appears to include 3 new or modified tests.

+1 javadoc.  The javadoc tool did not generate any warning messages.

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

+1 findbugs.  The patch does not introduce any new Findbugs (version 2.0.3) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

-1 core tests.  The patch failed core unit tests.

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

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

This message is automatically generated.

 RemoveWatchesTest takes forever to run
 --

 Key: ZOOKEEPER-2062
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2062
 Project: ZooKeeper
  Issue Type: Bug
  Components: tests
Affects Versions: 3.5.0
Reporter: Flavio Junqueira
Assignee: Chris Nauroth
 Fix For: 3.5.2, 3.6.0

 Attachments: ZOOKEEPER-2062.001.patch, ZOOKEEPER-2062.002.patch, 
 ZOOKEEPER-2062.003.patch, ZOOKEEPER-2062.004.patch


 [junit] Running org.apache.zookeeper.RemoveWatchesTest
 [junit] Tests run: 46, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
 306.188 sec



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


Re: Review Request 32979: ZOOKEEPER-2159 - Allow pluggable SASL authentication

2015-04-29 Thread Yuliya Feldman

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32979/
---

(Updated April 29, 2015, 10:19 a.m.)


Review request for zookeeper, Eugene Koontz, Patrick Hunt, and Camille Fournier.


Changes
---

Addressed review comments


Repository: zookeeper-git


Description
---

Today SASLAuthenticationProvider is used for all SASL based authentications 
which creates some if/else statements in ZookeeperSaslClient and 
ZookeeperSaslServer code with just Kerberos and Digest.
We want to use yet another different SASL based authentication and adding one 
more if/else with some code specific just to that new way does not make much 
sense.
Proposal is to allow to plug custom SASL Authentication mechanism(s) without 
further changes in Zookeeper code.


Diffs (updated)
-

  src/java/main/org/apache/zookeeper/Login.java 44b0bdf 
  src/java/main/org/apache/zookeeper/LoginFactory.java PRE-CREATION 
  src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 53f33e8 
  src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java 1235faa 
  src/java/main/org/apache/zookeeper/server/ZooKeeperSaslServer.java 60711ee 
  src/java/main/org/apache/zookeeper/server/auth/AuthMethod.java PRE-CREATION 
  src/java/main/org/apache/zookeeper/server/auth/AuthRegistry.java PRE-CREATION 
  src/java/main/org/apache/zookeeper/server/auth/DigestAuthMethod.java 
PRE-CREATION 
  src/java/main/org/apache/zookeeper/server/auth/KerberosAuthMethod.java 
PRE-CREATION 
  src/java/test/org/apache/zookeeper/test/SaslPluggableAuthTest.java 
PRE-CREATION 
  src/java/test/org/apache/zookeeper/test/auth/util/GenericLoginModule.java 
PRE-CREATION 
  src/java/test/org/apache/zookeeper/test/auth/util/SimpleAuthMethod.java 
PRE-CREATION 
  src/java/test/org/apache/zookeeper/test/auth/util/SimpleSaslClient.java 
PRE-CREATION 
  src/java/test/org/apache/zookeeper/test/auth/util/SimpleSaslProvider.java 
PRE-CREATION 
  src/java/test/org/apache/zookeeper/test/auth/util/SimpleSaslServer.java 
PRE-CREATION 

Diff: https://reviews.apache.org/r/32979/diff/


Testing
---

UnitTests passed, New Unit Tests added
tested Digest and Kerberos(with real KDC)


Thanks,

Yuliya Feldman



[jira] [Commented] (ZOOKEEPER-2126) ClientCnxn.close doesn't wait for eventThread exit which cause out of order log when close Zookeeper client session.

2015-04-29 Thread Rakesh R (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14519959#comment-14519959
 ] 

Rakesh R commented on ZOOKEEPER-2126:
-

Thanks [~zxu] and [~surendrasingh].

From the jira description, it looks like need to find a better way to 
differentiate the old client and the new client as the shutdown logging 
happens later. I prefer not to wait for the {{SendThread}} and {{EventThread}} 
completion instead how about adding the session id in the logs like,
{code}
LOG.info(EventThread shut down for session: 0x{}, 
Long.toHexString(getSessionId()));

ZooTrace.logTraceMessage(LOG, ZooTrace.getTextTraceLevel(), SendThread 
exitedloop for session: 0x + Long.toHexString(getSessionId());
{code}

 ClientCnxn.close doesn't wait for eventThread exit which cause out of order 
 log when close Zookeeper client session.
 

 Key: ZOOKEEPER-2126
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2126
 Project: ZooKeeper
  Issue Type: Improvement
Affects Versions: 3.6.0
Reporter: zhihai xu
Assignee: surendra singh lilhore
 Attachments: ZOOKEEPER-2126.patch


 We saw the following out of order log when close Zookeeper client session.
 {code}
 2015-02-16 06:01:12,985 INFO org.apache.zookeeper.ZooKeeper: Session: 
 0x24b8df4044005d4 closed
 .
 2015-02-16 06:01:12,995 INFO org.apache.zookeeper.ClientCnxn: EventThread 
 shut down
 {code}
 This logs are very confusing if a new Zookeeper client session is created 
 between these two logs. We may think new Zookeeper client session shutdown it 
 EventThread instead of the old closed Zookeeper client session.
 Should we wait for sendThread and eventThread died in the ClientCnxn.close?
 We can add the following code in ClientCnxn.close.
 {code}
 sendThread.join(timeout);
 eventThread.join(timeout);
 {code}
 with the change, we won't interleave old closed session with new session.
 We can also create a new close API to support this so we won't affect the old 
 code if people use old close API.



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


[jira] [Commented] (ZOOKEEPER-2163) Introduce new ZNode type: container

2015-04-29 Thread Jordan Zimmerman (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14520279#comment-14520279
 ] 

Jordan Zimmerman commented on ZOOKEEPER-2163:
-

I can't get rbt to work. It keeps saying path: error: unable to find 
6b04e1a1e4a07785cf3472b6b0b323fcf835dd6e. There's already a review at Github. 
Can we use that?


 Introduce new ZNode type: container
 ---

 Key: ZOOKEEPER-2163
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2163
 Project: ZooKeeper
  Issue Type: New Feature
  Components: c client, java client, server
Affects Versions: 3.5.0
Reporter: Jordan Zimmerman
Assignee: Jordan Zimmerman
 Attachments: zookeeper-2163.3.patch


 BACKGROUND
 
 A recurring problem for ZooKeeper users is garbage collection of parent 
 nodes. Many recipes (e.g. locks, leaders, etc.) call for the creation of a 
 parent node under which participants create sequential nodes. When the 
 participant is done, it deletes its node. In practice, the ZooKeeper tree 
 begins to fill up with orphaned parent nodes that are no longer needed. The 
 ZooKeeper APIs don’t provide a way to clean these. Over time, ZooKeeper can 
 become unstable due to the number of these nodes.
 CURRENT SOLUTIONS
 ===
 Apache Curator has a workaround solution for this by providing the Reaper 
 class which runs in the background looking for orphaned parent nodes and 
 deleting them. This isn’t ideal and it would be better if ZooKeeper supported 
 this directly.
 PROPOSAL
 =
 ZOOKEEPER-723 and ZOOKEEPER-834 have been proposed to allow EPHEMERAL nodes 
 to contain child nodes. This is not optimum as EPHEMERALs are tied to a 
 session and the general use case of parent nodes is for PERSISTENT nodes. 
 This proposal adds a new node type, CONTAINER. A CONTAINER node is the same 
 as a PERSISTENT node with the additional property that when its last child is 
 deleted, it is deleted (and CONTAINER nodes recursively up the tree are 
 deleted if empty).
 CANONICAL USAGE
 
 {code}
 while ( true) { // or some reasonable limit
 try {
 zk.create(path, ...);
 break;
 } catch ( KeeperException.NoNodeException e ) {
 try {
 zk.createContainer(containerPath, ...);
 } catch ( KeeperException.NodeExistsException ignore) {
}
 }
 }
 {code}



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


[jira] [Commented] (ZOOKEEPER-2171) avoid reverse lookups in QuorumCnxManager

2015-04-29 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14520204#comment-14520204
 ] 

Hadoop QA commented on ZOOKEEPER-2171:
--

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12729272/ZOOKEEPER-2171.patch
  against trunk revision 1676359.

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

+1 tests included.  The patch appears to include 11 new or modified tests.

+1 javadoc.  The javadoc tool did not generate any warning messages.

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

+1 findbugs.  The patch does not introduce any new Findbugs (version 2.0.3) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

-1 core tests.  The patch failed core unit tests.

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

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

This message is automatically generated.

 avoid reverse lookups in QuorumCnxManager
 -

 Key: ZOOKEEPER-2171
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2171
 Project: ZooKeeper
  Issue Type: Bug
  Components: quorum
Reporter: Raul Gutierrez Segales
Assignee: Raul Gutierrez Segales
 Fix For: 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2171.patch, ZOOKEEPER-2171.patch


 Apparently, ZOOKEEPER-107 (via a quick git-blame look) introduced a bunch of 
 getHostName() calls in QCM. Besides the overhead, these can cause problems 
 when mixed with failing/mis-configured DNS servers.
 It would be nice to reduce them, if that doesn't affect operational 
 correctness. 



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


Failed: ZOOKEEPER-2171 PreCommit Build #2658

2015-04-29 Thread Apache Jenkins Server
Jira: https://issues.apache.org/jira/browse/ZOOKEEPER-2171
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2658/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 365348 lines...]
 [exec] 
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +1 tests included.  The patch appears to include 11 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 2.0.3) 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-Build/2658//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2658//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2658//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] a25598f943a6c3a165149d9563b72413b1d5e27f logged out
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 

BUILD FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-Build/trunk/build.xml:1721:
 exec returned: 1

Total time: 47 minutes 10 seconds
Build step 'Execute shell' marked build as failure
Archiving artifacts
Sending artifact delta relative to PreCommit-ZOOKEEPER-Build #2654
Archived 7 artifacts
Archive block size is 32768
Received 2 blocks and 497097 bytes
Compression is 11.6%
Took 3.6 sec
Recording test results
Description set: ZOOKEEPER-2171
Email was triggered for: Failure
Sending email for trigger: Failure



###
## FAILED TESTS (if any) 
##
5 tests failed.
REGRESSION:  
org.apache.zookeeper.server.quorum.Zab1_0Test.testLeaderInConnectingFollowers

Error Message:
Address already in use

Stack Trace:
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at 
java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:374)
at java.net.ServerSocket.bind(ServerSocket.java:376)
at java.net.ServerSocket.bind(ServerSocket.java:330)
at org.apache.zookeeper.server.quorum.Leader.init(Leader.java:229)
at 
org.apache.zookeeper.server.quorum.Zab1_0Test.createLeader(Zab1_0Test.java:1230)
at 
org.apache.zookeeper.server.quorum.Zab1_0Test.testLeaderInConnectingFollowers(Zab1_0Test.java:156)


REGRESSION:  org.apache.zookeeper.test.ACLCountTest.testAclCount

Error Message:
Address already in use

Stack Trace:
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:344)
at sun.nio.ch.Net.bind(Net.java:336)
at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at 
org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:687)
at 
org.apache.zookeeper.server.ServerCnxnFactory.configure(ServerCnxnFactory.java:75)
at 
org.apache.zookeeper.server.ServerCnxnFactory.createFactory(ServerCnxnFactory.java:152)
at 
org.apache.zookeeper.server.ServerCnxnFactory.createFactory(ServerCnxnFactory.java:145)
at 

Re: ASC/SHA1/MD5 data for releases missing since 3.3.2

2015-04-29 Thread Flavio Junqueira
But is it expected that the signature files aren't propagated to the mirrors? 
I'd think that they should be propagated too.

-Flavio

 On 29 Apr 2015, at 19:29, Michi Mutsuzaki mutsuz...@gmail.com wrote:
 
 You can find these files here: https://www.apache.org/dist/zookeeper/
 
 I guess these files are not mirrored for security reasons.
 
 On Wed, Apr 29, 2015 at 10:49 AM, Flavio Junqueira
 fpjunque...@yahoo.com.invalid wrote:
 That's weird, we definitely generate them for the RCs, and I'm quite sure 
 were publishing them:
 http://people.apache.org/~fpj/zookeeper-3.4.6-candidate-0/
 
 I'm not sure what's going, and Pat Hunt might know about it. I'll see if I 
 can find out more in the meanwhile.
 -Flavio
 
 
 
 On Wednesday, April 29, 2015 4:13 PM, ralph tice ralph.t...@gmail.com 
 wrote:
 
 
 
 Hi,
 
 I was surprised to discover that releases haven't been published with
 MD5/etc signatures since 3.3.2.
 
 Is this an intentional change by the project or an oversight?  Is there an
 alternative method of verifying integrity of releases?
 
 Thanks,
 
 --Ralph
 
 
 
 



Re: ASC/SHA1/MD5 data for releases missing since 3.3.2

2015-04-29 Thread Chris Nauroth
For the sake of comparison to another Apache project, here is a mirror of
Hadoop:

http://www.webhostingreviewjam.com/mirror/apache/hadoop/common/hadoop-2.7.0
/


The checksum information in the .mds file is mirrored, but the signature
in the .asc file is not mirrored.  For ZooKeeper on that same mirror, both
the signature and the checksum are missing:

http://www.webhostingreviewjam.com/mirror/apache/zookeeper/zookeeper-3.5.0-
alpha/


I'm not familiar with the details of the mirroring configuration.  Maybe
it's worth filing an INFRA ticket?

--Chris Nauroth




On 4/29/15, 2:47 PM, Flavio Junqueira fpjunque...@yahoo.com.INVALID
wrote:

But is it expected that the signature files aren't propagated to the
mirrors? I'd think that they should be propagated too.

-Flavio

 On 29 Apr 2015, at 19:29, Michi Mutsuzaki mutsuz...@gmail.com wrote:
 
 You can find these files here: https://www.apache.org/dist/zookeeper/
 
 I guess these files are not mirrored for security reasons.
 
 On Wed, Apr 29, 2015 at 10:49 AM, Flavio Junqueira
 fpjunque...@yahoo.com.invalid wrote:
 That's weird, we definitely generate them for the RCs, and I'm quite
sure were publishing them:
 http://people.apache.org/~fpj/zookeeper-3.4.6-candidate-0/
 
 I'm not sure what's going, and Pat Hunt might know about it. I'll see
if I can find out more in the meanwhile.
 -Flavio
 
 
 
 On Wednesday, April 29, 2015 4:13 PM, ralph tice
ralph.t...@gmail.com wrote:
 
 
 
 Hi,
 
 I was surprised to discover that releases haven't been published with
 MD5/etc signatures since 3.3.2.
 
 Is this an intentional change by the project or an oversight?  Is
there an
 alternative method of verifying integrity of releases?
 
 Thanks,
 
 --Ralph
 
 
 
 




Re: ASC/SHA1/MD5 data for releases missing since 3.3.2

2015-04-29 Thread Flavio Junqueira
+1 to checking with infra.

-Flavio

 On 29 Apr 2015, at 23:09, Chris Nauroth cnaur...@hortonworks.com wrote:
 
 For the sake of comparison to another Apache project, here is a mirror of
 Hadoop:
 
 http://www.webhostingreviewjam.com/mirror/apache/hadoop/common/hadoop-2.7.0
 /
 
 
 The checksum information in the .mds file is mirrored, but the signature
 in the .asc file is not mirrored.  For ZooKeeper on that same mirror, both
 the signature and the checksum are missing:
 
 http://www.webhostingreviewjam.com/mirror/apache/zookeeper/zookeeper-3.5.0-
 alpha/
 
 
 I'm not familiar with the details of the mirroring configuration.  Maybe
 it's worth filing an INFRA ticket?
 
 --Chris Nauroth
 
 
 
 
 On 4/29/15, 2:47 PM, Flavio Junqueira fpjunque...@yahoo.com.INVALID
 wrote:
 
 But is it expected that the signature files aren't propagated to the
 mirrors? I'd think that they should be propagated too.
 
 -Flavio
 
 On 29 Apr 2015, at 19:29, Michi Mutsuzaki mutsuz...@gmail.com wrote:
 
 You can find these files here: https://www.apache.org/dist/zookeeper/
 
 I guess these files are not mirrored for security reasons.
 
 On Wed, Apr 29, 2015 at 10:49 AM, Flavio Junqueira
 fpjunque...@yahoo.com.invalid wrote:
 That's weird, we definitely generate them for the RCs, and I'm quite
 sure were publishing them:
 http://people.apache.org/~fpj/zookeeper-3.4.6-candidate-0/
 
 I'm not sure what's going, and Pat Hunt might know about it. I'll see
 if I can find out more in the meanwhile.
 -Flavio
 
 
 
On Wednesday, April 29, 2015 4:13 PM, ralph tice
 ralph.t...@gmail.com wrote:
 
 
 
 Hi,
 
 I was surprised to discover that releases haven't been published with
 MD5/etc signatures since 3.3.2.
 
 Is this an intentional change by the project or an oversight?  Is
 there an
 alternative method of verifying integrity of releases?
 
 Thanks,
 
 --Ralph
 
 
 
 
 
 



Re: ASC/SHA1/MD5 data for releases missing since 3.3.2

2015-04-29 Thread Chris Nauroth
Thanks, Flavio.  I went ahead and filed the infra ticket:

https://issues.apache.org/jira/browse/INFRA-9556


--Chris Nauroth




On 4/29/15, 3:16 PM, Flavio Junqueira fpjunque...@yahoo.com.INVALID
wrote:

+1 to checking with infra.

-Flavio

 On 29 Apr 2015, at 23:09, Chris Nauroth cnaur...@hortonworks.com
wrote:
 
 For the sake of comparison to another Apache project, here is a mirror
of
 Hadoop:
 
 
http://www.webhostingreviewjam.com/mirror/apache/hadoop/common/hadoop-2.7
.0
 /
 
 
 The checksum information in the .mds file is mirrored, but the signature
 in the .asc file is not mirrored.  For ZooKeeper on that same mirror,
both
 the signature and the checksum are missing:
 
 
http://www.webhostingreviewjam.com/mirror/apache/zookeeper/zookeeper-3.5.
0-
 alpha/
 
 
 I'm not familiar with the details of the mirroring configuration.  Maybe
 it's worth filing an INFRA ticket?
 
 --Chris Nauroth
 
 
 
 
 On 4/29/15, 2:47 PM, Flavio Junqueira fpjunque...@yahoo.com.INVALID
 wrote:
 
 But is it expected that the signature files aren't propagated to the
 mirrors? I'd think that they should be propagated too.
 
 -Flavio
 
 On 29 Apr 2015, at 19:29, Michi Mutsuzaki mutsuz...@gmail.com wrote:
 
 You can find these files here: https://www.apache.org/dist/zookeeper/
 
 I guess these files are not mirrored for security reasons.
 
 On Wed, Apr 29, 2015 at 10:49 AM, Flavio Junqueira
 fpjunque...@yahoo.com.invalid wrote:
 That's weird, we definitely generate them for the RCs, and I'm quite
 sure were publishing them:
 http://people.apache.org/~fpj/zookeeper-3.4.6-candidate-0/
 
 I'm not sure what's going, and Pat Hunt might know about it. I'll see
 if I can find out more in the meanwhile.
 -Flavio
 
 
 
On Wednesday, April 29, 2015 4:13 PM, ralph tice
 ralph.t...@gmail.com wrote:
 
 
 
 Hi,
 
 I was surprised to discover that releases haven't been published with
 MD5/etc signatures since 3.3.2.
 
 Is this an intentional change by the project or an oversight?  Is
 there an
 alternative method of verifying integrity of releases?
 
 Thanks,
 
 --Ralph
 
 
 
 
 
 




[jira] [Commented] (ZOOKEEPER-2171) avoid reverse lookups in QuorumCnxManager

2015-04-29 Thread Raul Gutierrez Segales (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14520571#comment-14520571
 ] 

Raul Gutierrez Segales commented on ZOOKEEPER-2171:
---

Hmm, ant test-core-java passes locally for me but we get this in CI:

{noformat}
Error Message

Address already in use

Stacktrace

java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:344)
at sun.nio.ch.Net.bind(Net.java:336)
at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at 
org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:687)
at 
org.apache.zookeeper.server.ServerCnxnFactory.configure(ServerCnxnFactory.java:75)
at 
org.apache.zookeeper.server.ServerCnxnFactory.createFactory(ServerCnxnFactory.java:152)
at 
org.apache.zookeeper.server.ServerCnxnFactory.createFactory(ServerCnxnFactory.java:145)
at 
org.apache.zookeeper.test.ACLCountTest.testAclCount(ACLCountTest.java:73)
at 
org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52)
{noformat}

I'll have it run one more time. 

 avoid reverse lookups in QuorumCnxManager
 -

 Key: ZOOKEEPER-2171
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2171
 Project: ZooKeeper
  Issue Type: Bug
  Components: quorum
Reporter: Raul Gutierrez Segales
Assignee: Raul Gutierrez Segales
 Fix For: 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2171.patch, ZOOKEEPER-2171.patch


 Apparently, ZOOKEEPER-107 (via a quick git-blame look) introduced a bunch of 
 getHostName() calls in QCM. Besides the overhead, these can cause problems 
 when mixed with failing/mis-configured DNS servers.
 It would be nice to reduce them, if that doesn't affect operational 
 correctness. 



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


[jira] [Commented] (ZOOKEEPER-2015) I found memory leak in zk client for c++

2015-04-29 Thread Jaesung Lee (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14520755#comment-14520755
 ] 

Jaesung Lee commented on ZOOKEEPER-2015:


I resolved same problem, using deallocate_String_vector function.

 I found memory leak in zk client for c++
 

 Key: ZOOKEEPER-2015
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2015
 Project: ZooKeeper
  Issue Type: Bug
  Components: c client
Affects Versions: 3.4.6
 Environment: linux/centos 6.3
Reporter: gao fengpu
Priority: Minor
 Fix For: 3.4.6


 ==15070== 895,632 bytes in 57,640 blocks are indirectly lost in loss record 
 370 of 371
 ==15070==at 0x4C2677B: calloc (vg_replace_malloc.c:593)
 ==15070==by 0x4C59BB: deserialize_String_vector (zookeeper.jute.c:245)
 ==15070==by 0x4C5AE7: deserialize_GetChildrenResponse 
 (zookeeper.jute.c:874)
 ==15070==by 0x4BEE7E: zookeeper_process (zookeeper.c:1906)
 ==15070==by 0x4BFF8E: do_io (mt_adaptor.c:439)
 ==15070==by 0x4E36850: start_thread (in /lib64/libpthread-2.12.so)
 ==15070==by 0x58D367C: clone (in /lib64/libc-2.12.so)
 ==15070==
 ==15070== 1,946,648 (1,051,016 direct, 895,632 indirect) bytes in 64,035 
 blocks are definitely lost in loss record 371 of 371
 ==15070==at 0x4C2677B: calloc (vg_replace_malloc.c:593)
 ==15070==by 0x4C59BB: deserialize_String_vector (zookeeper.jute.c:245)
 ==15070==by 0x4C5AE7: deserialize_GetChildrenResponse 
 (zookeeper.jute.c:874)
 ==15070==by 0x4BEE7E: zookeeper_process (zookeeper.c:1906)
 ==15070==by 0x4BFF8E: do_io (mt_adaptor.c:439)
 ==15070==by 0x4E36850: start_thread (in /lib64/libpthread-2.12.so)
 ==15070==by 0x58D367C: clone (in /lib64/libc-2.12.so)



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


Re: ASC/SHA1/MD5 data for releases missing since 3.3.2

2015-04-29 Thread Chris Nauroth
Apache infra replied stating that this is working by design.  The hashes
and signatures are not propagated to mirrors.  Instead, they reside only
at apache.org.  That makes sense when you consider that a malicious mirror
could host bad bits (i.e. containing backdoors) and then just provide a
hash that matches that patched binary.  Instead, we state that the hashes
and signatures come from apache.org.  As long as you trust the apache.org
domain, you know that those hashes and signatures are trustworthy.

A potential improvement would be to update releases.html to provide a
hyperlink to the relevant spot in apache.org for hash and signature files.

Infra also stated that the .mds file I mentioned for Hadoop is considered
non-standard, and therefore not subject to this filtering for the mirrors.

--Chris Nauroth




On 4/29/15, 3:56 PM, Chris Nauroth cnaur...@hortonworks.com wrote:

Thanks, Flavio.  I went ahead and filed the infra ticket:

https://issues.apache.org/jira/browse/INFRA-9556


--Chris Nauroth




On 4/29/15, 3:16 PM, Flavio Junqueira fpjunque...@yahoo.com.INVALID
wrote:

+1 to checking with infra.

-Flavio

 On 29 Apr 2015, at 23:09, Chris Nauroth cnaur...@hortonworks.com
wrote:
 
 For the sake of comparison to another Apache project, here is a mirror
of
 Hadoop:
 
 
http://www.webhostingreviewjam.com/mirror/apache/hadoop/common/hadoop-2.
7
.0
 /
 
 
 The checksum information in the .mds file is mirrored, but the
signature
 in the .asc file is not mirrored.  For ZooKeeper on that same mirror,
both
 the signature and the checksum are missing:
 
 
http://www.webhostingreviewjam.com/mirror/apache/zookeeper/zookeeper-3.5
.
0-
 alpha/
 
 
 I'm not familiar with the details of the mirroring configuration.
Maybe
 it's worth filing an INFRA ticket?
 
 --Chris Nauroth
 
 
 
 
 On 4/29/15, 2:47 PM, Flavio Junqueira fpjunque...@yahoo.com.INVALID
 wrote:
 
 But is it expected that the signature files aren't propagated to the
 mirrors? I'd think that they should be propagated too.
 
 -Flavio
 
 On 29 Apr 2015, at 19:29, Michi Mutsuzaki mutsuz...@gmail.com
wrote:
 
 You can find these files here: https://www.apache.org/dist/zookeeper/
 
 I guess these files are not mirrored for security reasons.
 
 On Wed, Apr 29, 2015 at 10:49 AM, Flavio Junqueira
 fpjunque...@yahoo.com.invalid wrote:
 That's weird, we definitely generate them for the RCs, and I'm quite
 sure were publishing them:
 http://people.apache.org/~fpj/zookeeper-3.4.6-candidate-0/
 
 I'm not sure what's going, and Pat Hunt might know about it. I'll
see
 if I can find out more in the meanwhile.
 -Flavio
 
 
 
On Wednesday, April 29, 2015 4:13 PM, ralph tice
 ralph.t...@gmail.com wrote:
 
 
 
 Hi,
 
 I was surprised to discover that releases haven't been published
with
 MD5/etc signatures since 3.3.2.
 
 Is this an intentional change by the project or an oversight?  Is
 there an
 alternative method of verifying integrity of releases?
 
 Thanks,
 
 --Ralph
 
 
 
 
 
 





[jira] [Commented] (ZOOKEEPER-2171) avoid reverse lookups in QuorumCnxManager

2015-04-29 Thread Raul Gutierrez Segales (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14519639#comment-14519639
 ] 

Raul Gutierrez Segales commented on ZOOKEEPER-2171:
---

Ah - great! I'll update the patch to use getHostString everywhere and drop the 
utility method for java6.

 avoid reverse lookups in QuorumCnxManager
 -

 Key: ZOOKEEPER-2171
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2171
 Project: ZooKeeper
  Issue Type: Bug
  Components: quorum
Reporter: Raul Gutierrez Segales
Assignee: Raul Gutierrez Segales
 Fix For: 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2171.patch


 Apparently, ZOOKEEPER-107 (via a quick git-blame look) introduced a bunch of 
 getHostName() calls in QCM. Besides the overhead, these can cause problems 
 when mixed with failing/mis-configured DNS servers.
 It would be nice to reduce them, if that doesn't affect operational 
 correctness. 



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


[jira] [Updated] (ZOOKEEPER-2062) RemoveWatchesTest takes forever to run

2015-04-29 Thread Chris Nauroth (JIRA)

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

Chris Nauroth updated ZOOKEEPER-2062:
-
Attachment: ZOOKEEPER-2062.004.patch

Thanks again, Rakesh.  Here is patch v004 incorporating your last suggestion.

 RemoveWatchesTest takes forever to run
 --

 Key: ZOOKEEPER-2062
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2062
 Project: ZooKeeper
  Issue Type: Bug
  Components: tests
Affects Versions: 3.5.0
Reporter: Flavio Junqueira
Assignee: Chris Nauroth
 Attachments: ZOOKEEPER-2062.001.patch, ZOOKEEPER-2062.002.patch, 
 ZOOKEEPER-2062.003.patch, ZOOKEEPER-2062.004.patch


 [junit] Running org.apache.zookeeper.RemoveWatchesTest
 [junit] Tests run: 46, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
 306.188 sec



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


Review Request 33713: Complete implementation and doc

2015-04-29 Thread Jordan Zimmerman

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33713/
---

Review request for zookeeper.


Bugs: ZOOKEEPER-2163
https://issues.apache.org/jira/browse/ZOOKEEPER-2163


Repository: zookeeper-git


Description
---

Introduce new ZNode type: container


Diffs
-

  CHANGES.txt 51ec65d 
  bin/zkServer.sh dae3ce2 
  src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml c12c2ca 
  src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml 223cf8e 
  src/java/main/org/apache/zookeeper/ZooDefs.java a4fc331 
  src/java/main/org/apache/zookeeper/ZooKeeper.java dd8ecf4 
  src/java/main/org/apache/zookeeper/server/ContainerManager.java PRE-CREATION 
  src/java/main/org/apache/zookeeper/server/DataNode.java b341a69 
  src/java/main/org/apache/zookeeper/server/DataTree.java 78cddb1 
  src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 7e3c29f 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 4911acf 
  src/java/main/org/apache/zookeeper/server/Request.java bed9b13 
  src/java/main/org/apache/zookeeper/server/TraceFormatter.java 582383d 
  src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java 63daea0 
  src/java/main/org/apache/zookeeper/server/quorum/CommitProcessor.java cf0900b 
  
src/java/main/org/apache/zookeeper/server/quorum/FollowerRequestProcessor.java 
4d061f4 
  src/java/main/org/apache/zookeeper/server/quorum/LeaderZooKeeperServer.java 
6434d02 
  
src/java/main/org/apache/zookeeper/server/quorum/ObserverRequestProcessor.java 
36a23ee 
  
src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyRequestProcessor.java 
a49319c 
  src/java/main/org/apache/zookeeper/server/util/SerializeUtils.java 1a45c5e 
  src/java/test/org/apache/zookeeper/server/CreateContainerTest.java 
PRE-CREATION 
  src/zookeeper.jute 709e935 

Diff: https://reviews.apache.org/r/33713/diff/


Testing
---


Thanks,

Jordan Zimmerman



[jira] [Commented] (ZOOKEEPER-2163) Introduce new ZNode type: container

2015-04-29 Thread Jordan Zimmerman (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14520804#comment-14520804
 ] 

Jordan Zimmerman commented on ZOOKEEPER-2163:
-

I finally figured it out: https://reviews.apache.org/r/33713

 Introduce new ZNode type: container
 ---

 Key: ZOOKEEPER-2163
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2163
 Project: ZooKeeper
  Issue Type: New Feature
  Components: c client, java client, server
Affects Versions: 3.5.0
Reporter: Jordan Zimmerman
Assignee: Jordan Zimmerman
 Attachments: zookeeper-2163.3.patch


 BACKGROUND
 
 A recurring problem for ZooKeeper users is garbage collection of parent 
 nodes. Many recipes (e.g. locks, leaders, etc.) call for the creation of a 
 parent node under which participants create sequential nodes. When the 
 participant is done, it deletes its node. In practice, the ZooKeeper tree 
 begins to fill up with orphaned parent nodes that are no longer needed. The 
 ZooKeeper APIs don’t provide a way to clean these. Over time, ZooKeeper can 
 become unstable due to the number of these nodes.
 CURRENT SOLUTIONS
 ===
 Apache Curator has a workaround solution for this by providing the Reaper 
 class which runs in the background looking for orphaned parent nodes and 
 deleting them. This isn’t ideal and it would be better if ZooKeeper supported 
 this directly.
 PROPOSAL
 =
 ZOOKEEPER-723 and ZOOKEEPER-834 have been proposed to allow EPHEMERAL nodes 
 to contain child nodes. This is not optimum as EPHEMERALs are tied to a 
 session and the general use case of parent nodes is for PERSISTENT nodes. 
 This proposal adds a new node type, CONTAINER. A CONTAINER node is the same 
 as a PERSISTENT node with the additional property that when its last child is 
 deleted, it is deleted (and CONTAINER nodes recursively up the tree are 
 deleted if empty).
 CANONICAL USAGE
 
 {code}
 while ( true) { // or some reasonable limit
 try {
 zk.create(path, ...);
 break;
 } catch ( KeeperException.NoNodeException e ) {
 try {
 zk.createContainer(containerPath, ...);
 } catch ( KeeperException.NodeExistsException ignore) {
}
 }
 }
 {code}



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