[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-11-09 Thread Arshad Mohammad (JIRA)

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

Arshad Mohammad commented on ZOOKEEPER-2211:


Thanks [~rgs] for committing the patch. Submitted 
ZOOKEEPER-2211-04_br_3_4.patch for branch-3.4.

> PurgeTxnLog does not correctly purge when snapshots and logs are at different 
> locations
> ---
>
> Key: ZOOKEEPER-2211
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: scripts
>Affects Versions: 3.4.6, 3.5.0
> Environment: Ubuntu 12.04, Java 1.7.
>Reporter: Wesley Chow
>Assignee: Arshad Mohammad
> Fix For: 3.4.7, 3.5.2, 3.6.0
>
> Attachments: ZOOKEEPER-2211-02.patch, ZOOKEEPER-2211-03.patch, 
> ZOOKEEPER-2211-04.patch, ZOOKEEPER-2211-04_br_3_4.patch, ZOOKEEPER-2211.patch
>
>
> PurgeTxnLog does not work when snapshots and transaction logs are at 
> different file paths. The argument handling is buggy and only works when both 
> snap and datalog dirs are given, and datalog dir contains both logs and snaps 
> (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-11-09 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2211:
--

-1 overall.  Here are the results of testing the latest attachment 
  
http://issues.apache.org/jira/secure/attachment/12771356/ZOOKEEPER-2211-04_br_3_4.patch
  against trunk revision 1713320.

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

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

-1 patch.  The patch command could not apply the patch.

Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2952//console

This message is automatically generated.

> PurgeTxnLog does not correctly purge when snapshots and logs are at different 
> locations
> ---
>
> Key: ZOOKEEPER-2211
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: scripts
>Affects Versions: 3.4.6, 3.5.0
> Environment: Ubuntu 12.04, Java 1.7.
>Reporter: Wesley Chow
>Assignee: Arshad Mohammad
> Fix For: 3.4.7, 3.5.2, 3.6.0
>
> Attachments: ZOOKEEPER-2211-02.patch, ZOOKEEPER-2211-03.patch, 
> ZOOKEEPER-2211-04.patch, ZOOKEEPER-2211-04_br_3_4.patch, ZOOKEEPER-2211.patch
>
>
> PurgeTxnLog does not work when snapshots and transaction logs are at 
> different file paths. The argument handling is buggy and only works when both 
> snap and datalog dirs are given, and datalog dir contains both logs and snaps 
> (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-11-08 Thread Raul Gutierrez Segales (JIRA)

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

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

Merged for trunk and 3.5:

https://github.com/apache/zookeeper/commit/f16133d015603e97f893f91b99a6e5353e90f9df
https://github.com/apache/zookeeper/commit/f6f5eb505fc2994d971c0b1150c16c8e43e877e6

[~arshad.mohammad]: the patch doesn't apply cleanly to 3.4, do you mind 
rebasing the patch for that branch? Thanks! (and, sorry for the delayed merge!)

> PurgeTxnLog does not correctly purge when snapshots and logs are at different 
> locations
> ---
>
> Key: ZOOKEEPER-2211
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: scripts
>Affects Versions: 3.4.6, 3.5.0
> Environment: Ubuntu 12.04, Java 1.7.
>Reporter: Wesley Chow
>Assignee: Arshad Mohammad
> Fix For: 3.4.7, 3.5.2, 3.6.0
>
> Attachments: ZOOKEEPER-2211-02.patch, ZOOKEEPER-2211-03.patch, 
> ZOOKEEPER-2211-04.patch, ZOOKEEPER-2211.patch
>
>
> PurgeTxnLog does not work when snapshots and transaction logs are at 
> different file paths. The argument handling is buggy and only works when both 
> snap and datalog dirs are given, and datalog dir contains both logs and snaps 
> (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-11-08 Thread Hudson (JIRA)

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

Hudson commented on ZOOKEEPER-2211:
---

FAILURE: Integrated in ZooKeeper-trunk #2811 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/2811/])
ZOOKEEPER-2211: PurgeTxnLog does not correctly purge when snapshots and
logs are at different locations (Arshad Mohammad via rgs) (rgs: 
[http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN=rev=1713296])
* trunk/CHANGES.txt
* trunk/src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java
* trunk/src/java/test/org/apache/zookeeper/server/PurgeTxnTest.java


> PurgeTxnLog does not correctly purge when snapshots and logs are at different 
> locations
> ---
>
> Key: ZOOKEEPER-2211
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: scripts
>Affects Versions: 3.4.6, 3.5.0
> Environment: Ubuntu 12.04, Java 1.7.
>Reporter: Wesley Chow
>Assignee: Arshad Mohammad
> Fix For: 3.4.7, 3.5.2, 3.6.0
>
> Attachments: ZOOKEEPER-2211-02.patch, ZOOKEEPER-2211-03.patch, 
> ZOOKEEPER-2211-04.patch, ZOOKEEPER-2211.patch
>
>
> PurgeTxnLog does not work when snapshots and transaction logs are at 
> different file paths. The argument handling is buggy and only works when both 
> snap and datalog dirs are given, and datalog dir contains both logs and snaps 
> (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-09-28 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2211:
--

+1 overall.  Here are the results of testing the latest attachment 
  
http://issues.apache.org/jira/secure/attachment/12764025/ZOOKEEPER-2211-04.patch
  against trunk revision 1705482.

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

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

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

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

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

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

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

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

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

This message is automatically generated.

> PurgeTxnLog does not correctly purge when snapshots and logs are at different 
> locations
> ---
>
> Key: ZOOKEEPER-2211
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: scripts
>Affects Versions: 3.4.6, 3.5.0
> Environment: Ubuntu 12.04, Java 1.7.
>Reporter: Wesley Chow
>Assignee: Arshad Mohammad
> Fix For: 3.4.7, 3.5.2, 3.6.0
>
> Attachments: ZOOKEEPER-2211-02.patch, ZOOKEEPER-2211-03.patch, 
> ZOOKEEPER-2211-04.patch, ZOOKEEPER-2211.patch
>
>
> PurgeTxnLog does not work when snapshots and transaction logs are at 
> different file paths. The argument handling is buggy and only works when both 
> snap and datalog dirs are given, and datalog dir contains both logs and snaps 
> (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-09-27 Thread Raul Gutierrez Segales (JIRA)

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

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

Thanks for the patch [~arshad.mohammad]!

A few nits:

In:

{code}
+String countOption = "";
+if (args.length == 3) {
+countOption = args[1];
+num = Integer.parseInt(args[2]);
+} else {
+snapDir = new File(args[1]);
+countOption = args[2];
+num = Integer.parseInt(args[3]);
+}
{code}

you should catch NumberFormatException for each parseInt called (and show usage 
and exit).

Also, testPurgeTxnLogWithDataDir() and testPurgeTxnLogWithoutDataDir are almost 
the same except for String [] args and the assert calls. I think you can 
extract that into a helper method and call that from both tests (with the 
needed params).

Thanks!

> PurgeTxnLog does not correctly purge when snapshots and logs are at different 
> locations
> ---
>
> Key: ZOOKEEPER-2211
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: scripts
>Affects Versions: 3.4.6, 3.5.0
> Environment: Ubuntu 12.04, Java 1.7.
>Reporter: Wesley Chow
>Assignee: Arshad Mohammad
> Fix For: 3.4.7, 3.5.2, 3.6.0
>
> Attachments: ZOOKEEPER-2211-02.patch, ZOOKEEPER-2211-03.patch, 
> ZOOKEEPER-2211.patch
>
>
> PurgeTxnLog does not work when snapshots and transaction logs are at 
> different file paths. The argument handling is buggy and only works when both 
> snap and datalog dirs are given, and datalog dir contains both logs and snaps 
> (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-09-25 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2211:
--

-1 overall.  Here are the results of testing the latest attachment 
  
http://issues.apache.org/jira/secure/attachment/12762442/ZOOKEEPER-2211-03.patch
  against trunk revision 1705225.

+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/2886//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2886//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2886//console

This message is automatically generated.

> PurgeTxnLog does not correctly purge when snapshots and logs are at different 
> locations
> ---
>
> Key: ZOOKEEPER-2211
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: scripts
>Affects Versions: 3.4.6, 3.5.0
> Environment: Ubuntu 12.04, Java 1.7.
>Reporter: Wesley Chow
>Assignee: Arshad Mohammad
> Fix For: 3.4.7, 3.5.2, 3.6.0
>
> Attachments: ZOOKEEPER-2211-02.patch, ZOOKEEPER-2211-03.patch, 
> ZOOKEEPER-2211.patch
>
>
> PurgeTxnLog does not work when snapshots and transaction logs are at 
> different file paths. The argument handling is buggy and only works when both 
> snap and datalog dirs are given, and datalog dir contains both logs and snaps 
> (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-09-25 Thread Arshad Mohammad (JIRA)

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

Arshad Mohammad commented on ZOOKEEPER-2211:


Thanks a lot  [~rakeshr] for your review comments
# handled
#  Here "greater than 3" means at least 4, but as per the existing 
functionality even 3 snap/logs can be retained.  So I think message "greater 
than 3" will be misleading. IMHO,  "greater than or equal to 3" will be more 
appropriate message. Changed the message to {code}System.out.println("\tcount 
-- the number of old snaps/logs you want to keep, value should be greater than 
or equal to 3");{code} 
is this OK?

> PurgeTxnLog does not correctly purge when snapshots and logs are at different 
> locations
> ---
>
> Key: ZOOKEEPER-2211
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: scripts
>Affects Versions: 3.4.6, 3.5.0
> Environment: Ubuntu 12.04, Java 1.7.
>Reporter: Wesley Chow
>Assignee: Arshad Mohammad
> Fix For: 3.4.7, 3.5.2, 3.6.0
>
> Attachments: ZOOKEEPER-2211-02.patch, ZOOKEEPER-2211.patch
>
>
> PurgeTxnLog does not work when snapshots and transaction logs are at 
> different file paths. The argument handling is buggy and only works when both 
> snap and datalog dirs are given, and datalog dir contains both logs and snaps 
> (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-09-24 Thread Rakesh R (JIRA)

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

Rakesh R commented on ZOOKEEPER-2211:
-

Thanks [~arshad.mohammad] for taking this ahead. Patch looks overall fine, just 
few comments:

# Please add one more validation to check the {{-n}} argument name. If user 
pass an argument other than "-n", then should fail. Since its not using command 
line parser, we could add a simple check like  "-n".equals(argOption)
# instead of {{minimum value is 3}}, can you rephrase it to {{greater than 3}}.
{code}
System.out.println("\tcount -- the number of old snaps/logs you want to keep, 
value should be greater than 3");
{code}

> PurgeTxnLog does not correctly purge when snapshots and logs are at different 
> locations
> ---
>
> Key: ZOOKEEPER-2211
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: scripts
>Affects Versions: 3.4.6, 3.5.0
> Environment: Ubuntu 12.04, Java 1.7.
>Reporter: Wesley Chow
>Assignee: Arshad Mohammad
>Priority: Minor
> Fix For: 3.4.7, 3.5.2, 3.6.0
>
> Attachments: ZOOKEEPER-2211-02.patch, ZOOKEEPER-2211.patch
>
>
> PurgeTxnLog does not work when snapshots and transaction logs are at 
> different file paths. The argument handling is buggy and only works when both 
> snap and datalog dirs are given, and datalog dir contains both logs and snaps 
> (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-08-30 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2211:
--

+1 overall.  Here are the results of testing the latest attachment 
  
http://issues.apache.org/jira/secure/attachment/12753132/ZOOKEEPER-2211-02.patch
  against trunk revision 1698058.

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

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

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

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

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

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

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

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

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

This message is automatically generated.

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Assignee: Arshad Mohammad
Priority: Minor
 Fix For: 3.4.7, 3.5.2, 3.6.0

 Attachments: ZOOKEEPER-2211-02.patch, ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-08-27 Thread Wesley Chow (JIRA)

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

Wesley Chow commented on ZOOKEEPER-2211:


I'm really sorry I haven't had time to get to this. I would just go ahead and 
close it as invalid and perhaps I'll be inspired to come back to this later.

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Assignee: Wesley Chow
Priority: Minor
 Fix For: 3.4.7, 3.5.2, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-08-23 Thread Raul Gutierrez Segales (JIRA)

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

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

[~chowwesley], [~rakeshr]: are you still interesting in cleaning up that 
parsing code or should we close this is as invalid (given it isn't a bug per 
se)? Thanks!

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Assignee: Wesley Chow
Priority: Minor
 Fix For: 3.4.7, 3.5.2, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-10 Thread Rakesh R (JIRA)

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

Rakesh R commented on ZOOKEEPER-2211:
-

Thank you [~wesc] for the contribution. It would be great if you can add unit 
tests in {{org.apache.zookeeper.server.PurgeTxnTest}} class. Probably you can 
directly call  {{PurgeTxnLog#main(String [] args)}} in the tests by giving the 
{{args}} array. This will help to cover the parsing logic.

+Note:+ Please don't delete the old patch which you already attached in the 
jira because previous attachments would help as a reference for the reviewers. 
You can attach a new patch to the jira, our jenkins will automatically picks up 
the latest one and run the test.

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2211:
--

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12738654/txn_purge.patch
  against trunk revision 1683878.

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

-1 tests included.  The patch doesn't appear to include any new or modified 
tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

-1 patch.  The patch command could not apply the patch.

Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/2757//console

This message is automatically generated.

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: txn_purge.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Raul Gutierrez Segales (JIRA)

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

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

Thanks for the patch [~wesc]. To generate a patch from git you should use 
--no-prefix, i.e.:

{code}
$ git diff --no-prefix HEAD~1..  ZOOKEEPER-2211.patch
{code}

Mind regenerating and uploading again?

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: txn_purge.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Raul Gutierrez Segales (JIRA)

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

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

(otherwise, CI does not know how to apply it.) 

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: txn_purge.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Raul Gutierrez Segales (JIRA)

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

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

Also, see http://wiki.apache.org/hadoop/ZooKeeper/HowToContribute. The 
convention for patch naming is ZOOKEEPER-.patch (i.e.: in this case 
ZOOKEEPER-2211.patch). 

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: txn_purge.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-2211:
--

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

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

-1 tests included.  The patch doesn't appear to include any new or modified 
tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

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

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

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

This message is automatically generated.

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Raul Gutierrez Segales (JIRA)

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

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

yeah, that usually works (i think). 

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Wesley Chow (JIRA)

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

Wesley Chow commented on ZOOKEEPER-2211:


The how to contribute wiki page says that after fixing a failed patch I 
should select resume progress, but I don't see that as an option? Do I cancel 
patch and resubmit?

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Raul Gutierrez Segales (JIRA)

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

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

the failure looks pretty unrelated:

{code}
org.apache.zookeeper.test.ClientPortBindTest.testBindByAddress

java.net.SocketException: No such device
at java.net.NetworkInterface.isLoopback0(Native Method)
at java.net.NetworkInterface.isLoopback(NetworkInterface.java:382)
at 
org.apache.zookeeper.test.ClientPortBindTest.testBindByAddress(ClientPortBindTest.java:61)
at 
org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:55)

{code}

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Raul Gutierrez Segales (JIRA)

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

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

That being said, that parsing code should be cleaned up. 

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Raul Gutierrez Segales (JIRA)

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

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

[~wesc]: actually, the patch is wrong so -1. You are just missing -n which is 
mandatory, that's why it checks for 3 (datadir -n count) or 4 args (datadir 
snapdir -n count). 

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Wesley Chow (JIRA)

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

Wesley Chow commented on ZOOKEEPER-2211:


Oh no, you're right. I think we copied an incorrect example for our systems 
that omitted the -n, and I just didn't think about it when reading the code. 
I'll readjust.

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Wesley Chow (JIRA)

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

Wesley Chow commented on ZOOKEEPER-2211:


Hudson reran the tests without me resubmitting the patch. It's failing a core 
test and a findbugs run, neither of which are related to this code. Should I 
just ignore? Also, I'm not sure if I have time to write tests, and my java fu 
is pretty rusty. Is that necessary before being accepted?

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Raul Gutierrez Segales (JIRA)

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

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

Yeah, we can just ignore it. I think this is find since it's cmdline parsing. 
So +1, I'll merge in a bit. Thanks ! 

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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


[jira] [Commented] (ZOOKEEPER-2211) PurgeTxnLog does not correctly purge when snapshots and logs are at different locations

2015-06-09 Thread Wesley Chow (JIRA)

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

Wesley Chow commented on ZOOKEEPER-2211:


Great, looking forward to it!

 PurgeTxnLog does not correctly purge when snapshots and logs are at different 
 locations
 ---

 Key: ZOOKEEPER-2211
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2211
 Project: ZooKeeper
  Issue Type: Bug
  Components: scripts
Affects Versions: 3.4.6, 3.5.0
 Environment: Ubuntu 12.04, Java 1.7.
Reporter: Wesley Chow
Priority: Minor
 Fix For: 3.4.6, 3.5.1, 3.6.0

 Attachments: ZOOKEEPER-2211.patch


 PurgeTxnLog does not work when snapshots and transaction logs are at 
 different file paths. The argument handling is buggy and only works when both 
 snap and datalog dirs are given, and datalog dir contains both logs and snaps 
 (snap is ignored).



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