[jira] [Commented] (BOOKKEEPER-218) Provide journal manager to manage journal related operations

2012-04-17 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255431#comment-13255431
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-218:
--



bq.  On 2012-04-16 14:50:22, Ivan Kelly wrote:
bq.  >
bq.  
bq.  Sijie Guo wrote:
bq.  Thanks Ivan for reviewing. would like to update them in new patch.
bq.  
bq.  only one place about LastLogMark class I would like to explain. I 
would like to provide a tool to read journal file in BOOKKEEPER-183, including 
printing current LastLogMark. so admin guys could know the status of journal.
bq.  
bq.  so I leave LastLogMark as package accessible. does it make sense for 
you?

re: LastLogMark, thats fine. I simply didn't see why it needed to be accessible 
in the current code base, but if you have a plan for it there's no issue.


- Ivan


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


On 2012-04-17 05:50:11, Sijie Guo wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4737/
bq.  ---
bq.  
bq.  (Updated 2012-04-17 05:50:11)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Currently we put all journal related operations in Bookie class. It would 
be better to provide a journal manager to provide journal related operations. 
It would make Bookie logic more clearly.
bq.  
bq.  Besides that, some admin tools like BOOKKEEPER-183 needs to provide could 
use JournalManager to read/check journal files directly.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-218.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-218
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
00cba69 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieBean.java 
fa5171b 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieMXBean.java 
8418469 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java 
PRE-CREATION 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookKeeperClusterTestCase.java
 c172224 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieJournalRollingTest.java
 e795fce 
bq.  
bq.  Diff: https://reviews.apache.org/r/4737/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sijie
bq.  
bq.



> Provide journal manager to manage journal related operations
> 
>
> Key: BOOKKEEPER-218
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-218
> Project: Bookkeeper
>  Issue Type: Improvement
>  Components: bookkeeper-server
>Affects Versions: 4.1.0
>Reporter: Sijie Guo
>Assignee: Sijie Guo
> Fix For: 4.1.0
>
> Attachments: BK-218.diff, BK-218.diff_v2
>
>
> Currently we put all journal related operations in Bookie class. It would be 
> better to provide a journal manager to provide journal related operations. It 
> would make Bookie logic more clearly. 
> Besides that, some admin tools like BOOKKEEPER-183 needs to provide could use 
> JournalManager to read/check journal files directly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-218) Provide journal manager to manage journal related operations

2012-04-17 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255429#comment-13255429
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-218:
--


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

Ship it!


lgtm +1

- Ivan


On 2012-04-17 05:50:11, Sijie Guo wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4737/
bq.  ---
bq.  
bq.  (Updated 2012-04-17 05:50:11)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Currently we put all journal related operations in Bookie class. It would 
be better to provide a journal manager to provide journal related operations. 
It would make Bookie logic more clearly.
bq.  
bq.  Besides that, some admin tools like BOOKKEEPER-183 needs to provide could 
use JournalManager to read/check journal files directly.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-218.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-218
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
00cba69 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieBean.java 
fa5171b 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieMXBean.java 
8418469 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java 
PRE-CREATION 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookKeeperClusterTestCase.java
 c172224 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieJournalRollingTest.java
 e795fce 
bq.  
bq.  Diff: https://reviews.apache.org/r/4737/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sijie
bq.  
bq.



> Provide journal manager to manage journal related operations
> 
>
> Key: BOOKKEEPER-218
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-218
> Project: Bookkeeper
>  Issue Type: Improvement
>  Components: bookkeeper-server
>Affects Versions: 4.1.0
>Reporter: Sijie Guo
>Assignee: Sijie Guo
> Fix For: 4.1.0
>
> Attachments: BK-218.diff, BK-218.diff_v2
>
>
> Currently we put all journal related operations in Bookie class. It would be 
> better to provide a journal manager to provide journal related operations. It 
> would make Bookie logic more clearly. 
> Besides that, some admin tools like BOOKKEEPER-183 needs to provide could use 
> JournalManager to read/check journal files directly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-218) Provide journal manager to manage journal related operations

2012-04-16 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255335#comment-13255335
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-218:
--


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

(Updated 2012-04-17 05:50:11.011776)


Review request for bookkeeper.


Changes
---

attach a new patch addressed Ivan's comments.


Summary
---

Currently we put all journal related operations in Bookie class. It would be 
better to provide a journal manager to provide journal related operations. It 
would make Bookie logic more clearly.

Besides that, some admin tools like BOOKKEEPER-183 needs to provide could use 
JournalManager to read/check journal files directly.


This addresses bug BOOKKEEPER-218.
https://issues.apache.org/jira/browse/BOOKKEEPER-218


Diffs (updated)
-

  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
00cba69 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieBean.java 
fa5171b 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieMXBean.java 
8418469 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java 
PRE-CREATION 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookKeeperClusterTestCase.java
 c172224 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieJournalRollingTest.java
 e795fce 

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


Testing
---


Thanks,

Sijie



> Provide journal manager to manage journal related operations
> 
>
> Key: BOOKKEEPER-218
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-218
> Project: Bookkeeper
>  Issue Type: Improvement
>  Components: bookkeeper-server
>Affects Versions: 4.1.0
>Reporter: Sijie Guo
>Assignee: Sijie Guo
> Fix For: 4.1.0
>
> Attachments: BK-218.diff, BK-218.diff_v2
>
>
> Currently we put all journal related operations in Bookie class. It would be 
> better to provide a journal manager to provide journal related operations. It 
> would make Bookie logic more clearly. 
> Besides that, some admin tools like BOOKKEEPER-183 needs to provide could use 
> JournalManager to read/check journal files directly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-218) Provide journal manager to manage journal related operations

2012-04-16 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255332#comment-13255332
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-218:
--



bq.  On 2012-04-16 14:50:22, Ivan Kelly wrote:
bq.  >

Thanks Ivan for reviewing. would like to update them in new patch.

only one place about LastLogMark class I would like to explain. I would like to 
provide a tool to read journal file in BOOKKEEPER-183, including printing 
current LastLogMark. so admin guys could know the status of journal.

so I leave LastLogMark as package accessible. does it make sense for you?


- Sijie


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


On 2012-04-16 13:57:54, Sijie Guo wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4737/
bq.  ---
bq.  
bq.  (Updated 2012-04-16 13:57:54)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Currently we put all journal related operations in Bookie class. It would 
be better to provide a journal manager to provide journal related operations. 
It would make Bookie logic more clearly.
bq.  
bq.  Besides that, some admin tools like BOOKKEEPER-183 needs to provide could 
use JournalManager to read/check journal files directly.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-218.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-218
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
bbf561a 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieBean.java 
fa5171b 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieMXBean.java 
8418469 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/JournalManager.java
 PRE-CREATION 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookKeeperClusterTestCase.java
 c172224 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieJournalRollingTest.java
 e795fce 
bq.  
bq.  Diff: https://reviews.apache.org/r/4737/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sijie
bq.  
bq.



> Provide journal manager to manage journal related operations
> 
>
> Key: BOOKKEEPER-218
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-218
> Project: Bookkeeper
>  Issue Type: Improvement
>  Components: bookkeeper-server
>Affects Versions: 4.1.0
>Reporter: Sijie Guo
>Assignee: Sijie Guo
> Fix For: 4.1.0
>
> Attachments: BK-218.diff
>
>
> Currently we put all journal related operations in Bookie class. It would be 
> better to provide a journal manager to provide journal related operations. It 
> would make Bookie logic more clearly. 
> Besides that, some admin tools like BOOKKEEPER-183 needs to provide could use 
> JournalManager to read/check journal files directly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-203) improve ledger manager interface to remove zookeeper dependency on metadata operations.

2012-04-03 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13245762#comment-13245762
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-203:
--


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


It looks pretty good for me, I just have a few small comments.


bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java


For clarity, can we rename it to MetaStoreException or 
MetadataStoreException?



bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java


MetaStoreException



bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java


It doesn't look like we need to make this call public. If it is for 
testing, we could simply use inheritance, no?



bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java


I'm wondering if it is ok to have a reference specific to zk here. Is the 
idea here that for every new backend we add, we include required system 
properties here? 



bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ActiveLedgerManager.java


You may want to say bookie instead of server side.



bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ActiveLedgerManager.java


I wonder if ActiveLedgerManager is a good name for this class. It doesn't 
indicate that it is related to the bookie side, and it might be good to refer 
to it. But, I don't feel too strongly about it, since the comment before the 
class says that it is for bookies.



bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/LedgerManager.java


The comment here should not refer to zk, right?


- fpj


On 2012-04-01 15:56:33, Sijie Guo wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4603/
bq.  ---
bq.  
bq.  (Updated 2012-04-01 15:56:33)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  we need to improve ledger manager interface to remove zookeeper dependency 
on metadata operations, so it is easy for us to implement a MetaStore based 
ledger manager.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-203.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-203
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
ee38862 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
 2eed192 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerCacheImpl.java
 17c70f1 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java 
911c660 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
490c130 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 b9cd624 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerCreateOp.java
 f0a165f 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerDeleteOp.java
 5b10a5b 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
e576792 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 2dcf0e4 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java 
56186ab 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
 e1bd1ff 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractZkLedgerManager.java
 8fd7df8 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/ActiveLedgerManager.java
 PRE-CREATION 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/FlatLedgerManager.java
 1300974 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/FlatLedgerManagerFactory.java
 PRE-CREATION 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/HierarchicalLedgerManager.java
 b573181 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/HierarchicalLedgerManagerFactory.java
 PRE-CREATION 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/LedgerLayout.java 
3a3a81e 
bq.  

[jira] [Commented] (BOOKKEEPER-135) Fencing does not check the ledger masterPasswd

2012-03-20 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13233643#comment-13233643
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-135:
--


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

(Updated 2012-03-20 18:13:56.162926)


Review request for bookkeeper.


Changes
---

New patch is much simpler on the server side. A lot of the changes are just 
added the new error path for unauthorized fencing.


Summary
---

When fencing, the ledger handle is not checked before the fencing is applied. 
Currently the openLedger does fail, on because it will addEntry and fail at 
that point, but by this stage, fencing has already been applied. The check 
should be earlier.


This addresses bug BOOKKEEPER-135.
https://issues.apache.org/jira/browse/BOOKKEEPER-135


Diffs (updated)
-

  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
ad41ba5 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java 
911c660 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java 
56186ab 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
 c67a79c 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java 
7aad751 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java 
539d6b2 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadLastConfirmedOp.java
 7dd5363 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClient.java 
8a32c64 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtocol.java 
8598c08 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java 
1a315e1 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 75a8e8c 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieRecoveryTest.java
 b8923e8 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestFencing.java 
7de1c10 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
 99d6ef0 

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


Testing
---


Thanks,

Ivan



> Fencing does not check the ledger masterPasswd
> --
>
> Key: BOOKKEEPER-135
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-135
> Project: Bookkeeper
>  Issue Type: Bug
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.1.0
>
> Attachments: BOOKKEEPER-135.diff, BOOKKEEPER-135.diff, 
> BOOKKEEPER-135.diff, BOOKKEEPER-135.diff
>
>
> When fencing, the ledger handle is not checked before the fencing is applied. 
> Currently the openLedger does fail, on because it will addEntry and fail at 
> that point, but by this stage, fencing has already been applied. The check 
> should be earlier.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-112) Bookie Recovery on an open ledger will cause LedgerHandle#close on that ledger to fail

2012-03-02 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220843#comment-13220843
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-112:
--


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

(Updated 2012-03-02 11:27:34.221927)


Review request for bookkeeper.


Changes
---

new patch remove readForward flag from constructor. and also remove 
ScheduledExecutorService, since we don't need to care about long-chain, since 
the callback will be triggered in bookie client's netty thread not in same 
thread. 


Summary
---

Bookie recovery updates the ledger metadata in zookeeper. LedgerHandle will not 
get notified of this update, so it will try to write out its own ledger 
metadata, only to fail with KeeperException.BadVersion. This effectively fences 
all write operations on the LedgerHandle (close and addEntry). close will fail 
for obvious reasons. addEntry will fail once it gets to the failed bookie in 
the schedule, tries to write, fails, selects a new bookie and tries to update 
ledger metadata.

Update Line 605, testSyncBookieRecoveryToRandomBookiesCheckForDupes(), when done
Also, uncomment addEntry in 
TestFencing#testFencingInteractionWithBookieRecovery()


This addresses bug BOOKKEEPER-112.
https://issues.apache.org/jira/browse/BOOKKEEPER-112


Diffs (updated)
-

  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 37623dc 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
f71e53f 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 b403aa1 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
 c67a79c 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java 
29070eb 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieRecoveryTest.java
 99258ac 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestFencing.java 
015e4e4 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java 
dada67a 

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


Testing
---


Thanks,

Sijie



> Bookie Recovery on an open ledger will cause LedgerHandle#close on that 
> ledger to fail
> --
>
> Key: BOOKKEEPER-112
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-112
> Project: Bookkeeper
>  Issue Type: Bug
>Reporter: Flavio Junqueira
>Assignee: Sijie Guo
> Fix For: 4.1.0
>
> Attachments: BK-112.patch, BOOKKEEPER-112.patch, 
> BOOKKEEPER-112.patch_v2, BOOKKEEPER-112.patch_v3, BOOKKEEPER-112.patch_v4, 
> BOOKKEEPER-112.patch_v5
>
>
> Bookie recovery updates the ledger metadata in zookeeper. LedgerHandle will 
> not get notified of this update, so it will try to write out its own ledger 
> metadata, only to fail with KeeperException.BadVersion. This effectively 
> fences all write operations on the LedgerHandle (close and addEntry). close 
> will fail for obvious reasons. addEntry will fail once it gets to the failed 
> bookie in the schedule, tries to write, fails, selects a new bookie and tries 
> to update ledger metadata.
> Update Line 605, testSyncBookieRecoveryToRandomBookiesCheckForDupes(), when 
> done
> Also, uncomment addEntry in 
> TestFencing#testFencingInteractionWithBookieRecovery()

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-172) Upgrade framework for filesystem layouts

2012-02-21 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212489#comment-13212489
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-172:
--


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



bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileSystemUpgrade.java


should it be a constant define?


- Sijie


On 2012-02-15 14:08:46, Ivan Kelly wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3910/
bq.  ---
bq.  
bq.  (Updated 2012-02-15 14:08:46)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Part of BOOKKEEPER-163. This improvement creates a framework to allow 
administrators to upgrade the filesystem layout of previous bookkeeper versions 
to be usable by the most recent software. The upgrade processes are currently 
empty until BOOKKEEPER-163 adds something.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-172.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-172
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.bookkeeper-server/bin/bookkeeper b0629bd 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileSystemUpgrade.java
 PRE-CREATION 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/UpgradeTest.java 
PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3910/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Ivan
bq.  
bq.



> Upgrade framework for filesystem layouts
> 
>
> Key: BOOKKEEPER-172
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-172
> Project: Bookkeeper
>  Issue Type: Improvement
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.1.0
>
> Attachments: BOOKKEEPER-172.diff
>
>
> Part of BOOKKEEPER-163. This improvement creates a framework to allow 
> administrators to upgrade the filesystem layout of previous bookkeeper 
> versions to be usable by the most recent software. The upgrade processes are 
> currently empty until BOOKKEEPER-163 adds something.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-152) Can't recover a ledger whose current ensemble contain failed bookie.

2012-02-10 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205319#comment-13205319
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-152:
--


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

(Updated 2012-02-10 09:47:35.723185)


Review request for bookkeeper.


Summary
---

Proposed fix ensures that at least one of each quorum replies to 
ReadLastConfirmed.

Refactors code a bit to make the read last confirmed common for recovery and 
standalone read last confirmed.

The bug here was actually that we were waiting for quorumSize responses, from 
the bookies, when really all we need to get a response from one bookie in each 
possible quorum. in the 2/2 case as above this means only 1 bookie need 
response.

There's a fix for the timeouts and an improvement in fencing which fixing this 
uncovered.


This addresses bug BOOKKEEPER-152.
https://issues.apache.org/jira/browse/BOOKKEEPER-152


Diffs (updated)
-

  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 a68fc8c 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieRecoveryTest.java
 cbd2277 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java 
da52ca5 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieFailureTest.java
 5873255 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LedgerRecoveryTest.java
 77a2f69 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RoundRobinDistributionSchedule.java
 4a88747 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/DistributionSchedule.java
 f2ed6bd 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
e3d1847 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
 4625bbb 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadLastConfirmedOp.java
 43e999d 

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


Testing
---


Thanks,

Ivan



> Can't recover a ledger whose current ensemble contain failed bookie.
> 
>
> Key: BOOKKEEPER-152
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-152
> Project: Bookkeeper
>  Issue Type: Bug
>  Components: bookkeeper-client
>Affects Versions: 4.0.0
>Reporter: Sijie Guo
>Assignee: Ivan Kelly
> Fix For: 4.1.0
>
> Attachments: BK-152.draft.patch, BOOKKEEPER-152.diff, 
> BOOKKEEPER-152.diff
>
>
> Suppose we have a unclosed ledger L, whose ensemble size is 2, quorum size is 
> 2. the ledger's current ensemble is .
> bk2 is crashed. 
> we use recovery tool to recover entries in bk2. $ 
> bookkeeper-server/bin/bookkeeper org.apache.bookkeeper.tools.BookKeeperTools 
> bk2 
> recovery failed due to recovery tool can't open ledger L, since ledger L 
> doesn't have enough quorum to readLastConfirmed entry. 
> (asyncOpenLedgerNoRecovery)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-137) Do not create Ledger index files until absolutely necessary.

2012-02-07 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202590#comment-13202590
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-137:
--


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

(Updated 2012-02-07 18:13:15.812700)


Review request for bookkeeper.


Changes
---

New diff, addresses Sijie's comments. Diffed against trunk with BOOKKEEPER-165 
applied.


Summary
---

This is an optimization to speed up the case where we have many ledgers and are 
writing to them at random (a benchmark case we currently have). Currently, we 
create the ledger index file and write the first 1k of it to disk immediately. 
With a lot of ledgers being randomly written to, this means a lot of random 
writes on the ledger disk. This fix postpones the creation of the index file 
and writing of the first 1k until the first flush of the ledger.

This patch includes BOOKKEEPER-136, as they both deal in the same area, and I 
found it difficult to separate them.

BOOKKEEPER-135 is not required for this patch, and will need modifications 
after this goes in.


This addresses bug BOOKKEEPER-137.
https://issues.apache.org/jira/browse/BOOKKEEPER-137


Diffs (updated)
-

  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
99b797f 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java 
fa713c8 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/JournalChannel.java
 PRE-CREATION 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerCache.java 
0fc5206 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java
 728d729 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java 
2228ab4 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/util/LocalBookKeeper.java 
5706dd8 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieJournalTest.java
 PRE-CREATION 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieLayoutVersionTest.java
 c7b07e6 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieRecoveryTest.java
 8526db5 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java 
db1a763 

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


Testing
---


Thanks,

Ivan



> Do not create Ledger index files until absolutely necessary.
> 
>
> Key: BOOKKEEPER-137
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-137
> Project: Bookkeeper
>  Issue Type: Bug
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.1.0
>
> Attachments: BOOKKEEPER-137.diff, BOOKKEEPER-137.diff, 
> BOOKKEEPER-137.diff, BOOKKEEPER-137.diff
>
>
> This is an optimization to speed up the case where we have many ledgers and 
> are writing to them at random (a benchmark case we currently have). 
> Currently, we create the ledger index file and write the first 1k of it to 
> disk immediately. With a lot of ledgers being randomly written to, this means 
> a lot of random writes on the ledger disk. This fix postpones the creation of 
> the index file and writing of the first 1k until the first flush of the 
> ledger.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-165) Add versioning support for journal files

2012-02-07 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202566#comment-13202566
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-165:
--


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

Review request for bookkeeper.


Summary
---

Add versioning in the journal so that we can add new features to the journal 
without breaking backward compatibility.


This addresses bug BOOKKEEPER-165.
https://issues.apache.org/jira/browse/BOOKKEEPER-165


Diffs
-

  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
99b797f 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/JournalChannel.java
 PRE-CREATION 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerCache.java 
0fc5206 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/BookieJournalTest.java
 PRE-CREATION 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/client/ClientUtil.java 
PRE-CREATION 

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


Testing
---


Thanks,

Ivan



> Add versioning support for journal files
> 
>
> Key: BOOKKEEPER-165
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-165
> Project: Bookkeeper
>  Issue Type: New Feature
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.1.0
>
> Attachments: BOOKKEEPER-165.diff, BOOKKEEPER-165.diff
>
>
> Add versioning in the journal so that we can add new features to the journal 
> without breaking backward compatibility.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-158) Move latest benchmarking code into trunk

2012-01-31 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197066#comment-13197066
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-158:
--


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

Review request for bookkeeper.


Summary
---

Move the code we've been using for benchmarking into trunk.


This addresses bug BOOKKEEPER-158.
https://issues.apache.org/jira/browse/BOOKKEEPER-158


Diffs
-

  bookkeeper-benchmark/bin/benchmark PRE-CREATION 
  bookkeeper-benchmark/conf/log4j.properties PRE-CREATION 
  bookkeeper-benchmark/pom.xml f005531 
  
bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchBookie.java
 PRE-CREATION 
  
bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchReadThroughputLatency.java
 PRE-CREATION 
  
bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchThroughputLatency.java
 PRE-CREATION 
  
bookkeeper-benchmark/src/test/java/org/apache/bookkeeper/benchmark/TestBenchmark.java
 PRE-CREATION 
  bookkeeper-benchmark/src/test/resources/log4j.properties PRE-CREATION 
  bookkeeper-server/bin/bookkeeper b0629bd 

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


Testing
---


Thanks,

Ivan



> Move latest benchmarking code into trunk
> 
>
> Key: BOOKKEEPER-158
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-158
> Project: Bookkeeper
>  Issue Type: Improvement
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.1.0
>
> Attachments: BOOKKEEPER-158.diff
>
>
> Move the code we've been using for benchmarking into trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-157) For small packets, increasing number of bookies actually degrades performance.

2012-01-30 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196190#comment-13196190
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-157:
--


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

Review request for bookkeeper.


Summary
---

When benchmarking with packets smaller than 1k, performance will degrade when 
the ensemble contains more than 3 bookies. See attached diagram.


This addresses bug BOOKKEEPER-157.
https://issues.apache.org/jira/browse/BOOKKEEPER-157


Diffs
-

  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/CRC32DigestManager.java
 fb7c8bc 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
547e240 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/MacDigestManager.java
 a3ed9f3 

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


Testing
---


Thanks,

Ivan



> For small packets, increasing number of bookies actually degrades performance.
> --
>
> Key: BOOKKEEPER-157
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-157
> Project: Bookkeeper
>  Issue Type: Bug
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.1.0
>
> Attachments: BOOKKEEPER-157.diff, run1.pdf
>
>
> When benchmarking with packets smaller than 1k, performance will degrade when 
> the ensemble contains more than 3 bookies. See attached diagram.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--


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


Eugene, can you complete the patch for this issue? Documentation could be taken 
up separately.


- Thomas


On 2012-01-26 00:30:39, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-26 00:30:39)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.src/java/main/org/apache/zookeeper/Login.java 6d2a38c 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch, ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-23) Timeout requests

2012-01-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194944#comment-13194944
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-23:
-


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

Review request for bookkeeper.


Summary
---

If a client remains connected to a bookie, requests do not timeout. This is an 
undesirable behavior if a bookie is up but not responding to a request for some 
reason, like it is slow or has not handled an exception appropriately and did 
not respond to the client. I propose to add a timeout mechanism.


This addresses bug BOOKKEEPER-23.
https://issues.apache.org/jira/browse/BOOKKEEPER-23


Diffs
-

  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
cb3bb26 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java
 5e1c964 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/NIOServerFactory.java
 2a8df38 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 2fa79bb 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestReadTimeout.java
 PRE-CREATION 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java 
7403604 

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


Testing
---


Thanks,

Ivan



> Timeout requests
> 
>
> Key: BOOKKEEPER-23
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-23
> Project: Bookkeeper
>  Issue Type: Improvement
>Reporter: Flavio Junqueira
>Assignee: Ivan Kelly
> Fix For: 4.1.0
>
> Attachments: BOOKKEEPER-23.diff
>
>
> If a client remains connected to a bookie, requests do not timeout. This is 
> an undesirable behavior if a bookie is up but not responding to a request for 
> some reason, like it is slow or has not handled an exception appropriately 
> and did not respond to the client. I propose to add a timeout mechanism.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1366) Zookeeper should be tolerant of clock adjustments

2012-01-26 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1366:
--


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

Review request for zookeeper.


Summary
---

ZOOKEEPER-1366. Zookeeper should be tolerant of clock adjustments


This addresses bug ZOOKEEPER-1366.
https://issues.apache.org/jira/browse/ZOOKEEPER-1366


Diffs
-

  src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
  src/java/main/org/apache/zookeeper/ClientCnxnSocket.java 269f8e8 
  src/java/main/org/apache/zookeeper/Login.java 6d2a38c 
  src/java/main/org/apache/zookeeper/Shell.java f2c899a 
  src/java/main/org/apache/zookeeper/ZKUtil.java 4713a08 
  src/java/main/org/apache/zookeeper/common/Time.java PRE-CREATION 
  src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 9721f7c 
  src/java/main/org/apache/zookeeper/server/Request.java c6a2249 
  src/java/main/org/apache/zookeeper/server/ServerStats.java acbc97c 
  src/java/main/org/apache/zookeeper/server/SessionTrackerImpl.java cbae57a 
  src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 14f8c8f 
  src/java/main/org/apache/zookeeper/server/quorum/AuthFastLeaderElection.java 
8ba12c5 
  src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java 
473d01e 
  src/java/main/org/apache/zookeeper/server/quorum/Follower.java 29ef3f9 
  src/java/main/org/apache/zookeeper/server/quorum/Leader.java 27a5d20 
  src/java/systest/org/apache/zookeeper/test/system/GenerateLoad.java 57d0dcb 
  src/java/systest/org/apache/zookeeper/test/system/InstanceManager.java 
809fa48 
  src/java/systest/org/apache/zookeeper/test/system/SimpleSysTest.java 9cdf4d9 
  src/java/test/org/apache/zookeeper/common/TimeTest.java PRE-CREATION 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java 
c2cfd7a 
  src/java/test/org/apache/zookeeper/test/ClientBase.java 02638a1 
  src/java/test/org/apache/zookeeper/test/ClientHammerTest.java b807dbb 
  src/java/test/org/apache/zookeeper/test/CnxManagerTest.java fd59403 
  src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java 8e0b0eb 
  src/java/test/org/apache/zookeeper/test/ReadOnlyModeTest.java c705a7b 
  src/java/test/org/apache/zookeeper/test/StaticHostProviderTest.java 1fed88a 
  src/java/test/org/apache/zookeeper/test/TestHammer.java 09a678b 
  src/java/test/org/apache/zookeeper/test/ZooKeeperTestClient.java cc82c87 
  src/recipes/queue/src/c/tests/Util.cc 26a9a09 

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


Testing
---


Thanks,

Benjamin



> Zookeeper should be tolerant of clock adjustments
> -
>
> Key: ZOOKEEPER-1366
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1366
> Project: ZooKeeper
>  Issue Type: Bug
>Reporter: Ted Dunning
>Assignee: Ted Dunning
> Fix For: 3.4.3
>
> Attachments: ZOOKEEPER-1366-3.3.3.patch, ZOOKEEPER-1366.patch, 
> ZOOKEEPER-1366.patch, ZOOKEEPER-1366.patch, ZOOKEEPER-1366.patch
>
>
> If you want to wreak havoc on a ZK based system just do [date -s "+1hour"] 
> and watch the mayhem as all sessions expire at once.
> This shouldn't happen.  Zookeeper could easily know handle elapsed times as 
> elapsed times rather than as differences between absolute times.  The 
> absolute times are subject to adjustment when the clock is set while a timer 
> is not subject to this problem.  In Java, System.currentTimeMillis() gives 
> you absolute time while System.nanoTime() gives you time based on a timer 
> from an arbitrary epoch.
> I have done this and have been running tests now for some tens of minutes 
> with no failures.  I will set up a test machine to redo the build again on 
> Ubuntu and post a patch here for discussion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-26 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--



bq.  On 2012-01-26 18:18:55, Thomas wrote:
bq.  > conf/zoo_sample.cfg, line 30
bq.  > 
bq.  >
bq.  > What is the purpose of adding this to the server config?
bq.  >
bq.  
bq.  Eugene Koontz wrote:
bq.  Thomas, thanks for testing, and you are right - it doesn't belong here.
bq.  
bq.  It should probably be here:
bq.  
bq.  
https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zookeeper+and+SASL
bq.  
bq.  I'll edit that today (feel free to do so also, and would be curious to 
hear your comments about this wiki entry, was it helpful for you?)

Hi Eugene, I found your other page more useful as it covers the users 
perspective: https://github.com/ekoontz/zookeeper/wiki

This should become part of the ZooKeeper documentation.


- Thomas


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


On 2012-01-26 00:30:39, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-26 00:30:39)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.src/java/main/org/apache/zookeeper/Login.java 6d2a38c 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch, ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-26 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--



bq.  On 2012-01-26 18:18:55, Thomas wrote:
bq.  > conf/zoo_sample.cfg, line 30
bq.  > 
bq.  >
bq.  > What is the purpose of adding this to the server config?
bq.  >

Thomas, thanks for testing, and you are right - it doesn't belong here.

It should probably be here:

https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zookeeper+and+SASL

I'll edit that today (feel free to do so also, and would be curious to hear 
your comments about this wiki entry, was it helpful for you?)


- Eugene


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


On 2012-01-26 00:30:39, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-26 00:30:39)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.src/java/main/org/apache/zookeeper/Login.java 6d2a38c 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch, ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-26 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--


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


Tested patch with Hadoop client and CLI and works as expected. Only remaining 
question I have is WRT added comments in zoo_sample.cfg



conf/zoo_sample.cfg


What is the purpose of adding this to the server config?



- Thomas


On 2012-01-26 00:30:39, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-26 00:30:39)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.src/java/main/org/apache/zookeeper/Login.java 6d2a38c 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch, ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-25 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--



bq.  On 2012-01-25 21:56:22, Thomas wrote:
bq.  > src/java/main/org/apache/zookeeper/ClientCnxn.java, line 950
bq.  > 
bq.  >
bq.  > SASL connection also needs to be attempted when 
ZooKeeperSaslClient.LOGIN_CONTEXT_NAME_KEY is set as system property and 
java.security.auth.login.config is not set (that's what happens with Hadoop 
security). That was part of my patch.
bq.  >

Hi Thomas, 
Sorry, I should have addressed your use case (no JAAS configuration file 
because using Hadoop security JAAS configuration). I made the 
properties-checking more elaborate - please see if my latest patch matches your 
intent. I tried to make the code guess the user's intentions regarding SASL 
configuration and give diagnostic log messages in case of failure. I also added 
another test for a missing Login Context section (please see 
SaslAuthMissingClientConfigTest.java).


- Eugene


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


On 2012-01-26 00:30:39, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-26 00:30:39)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.src/java/main/org/apache/zookeeper/Login.java 6d2a38c 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch, ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-25 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--



bq.  On 2012-01-25 18:58:43, Eugene Koontz wrote:
bq.  > conf/zoo_sample.cfg, line 30
bq.  > 
bq.  >
bq.  > note that 'org.apache.zookeeper' prefix breaks convention with other 
variables.
bq.  
bq.  Thomas wrote:
bq.  zoo.cfg is read by the server. But here we need a setting on the 
client that goes into the system properties namespace. So certainly it needs to 
be prefixed in an appropriate way.
bq.  
bq.  If we follow existing convention as seen here:
bq.  
bq.  Boolean.getBoolean("zookeeper.disableAutoWatchReset");
bq.  
bq.  As per comment below, the originally suggested key seems to be fine:
bq.  
bq.  zookeeper.sasl.clientconfig
bq.  
bq.  
https://issues.apache.org/jira/browse/ZOOKEEPER-1373?focusedCommentId=13192817&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13192817
bq.

using 'zookeeper.sasl.clientconfig' as property name as Thomas suggests.


- Eugene


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


On 2012-01-26 00:30:39, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-26 00:30:39)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.src/java/main/org/apache/zookeeper/Login.java 6d2a38c 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch, ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on J

[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-25 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--



bq.  On 2012-01-25 19:23:47, Ted Yu wrote:
bq.  >

Thanks Ted, fixed these.


- Eugene


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


On 2012-01-26 00:30:39, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-26 00:30:39)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.src/java/main/org/apache/zookeeper/Login.java 6d2a38c 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch, ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-25 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--


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

(Updated 2012-01-26 00:30:39.276464)


Review request for zookeeper.


Changes
---

Address Ted and Thomas' reviews.


Summary
---

ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop security 
configuration override

Fix is to allow system property to designate the JAAS configuration section 
that the zookeeper client will use.


This addresses bug ZOOKEEPER-1373.
https://issues.apache.org/jira/browse/ZOOKEEPER-1373


Diffs (updated)
-

  src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
  src/java/test/org/apache/zookeeper/test/SaslAuthMissingClientConfigTest.java 
PRE-CREATION 
  src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
  src/java/main/org/apache/zookeeper/Login.java 6d2a38c 
  src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 722538e 
  conf/zoo_sample.cfg aafb324 
  src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 

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


Testing
---

"ant test" java tests pass.


Thanks,

Eugene



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-25 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--


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



src/java/main/org/apache/zookeeper/ClientCnxn.java


SASL connection also needs to be attempted when 
ZooKeeperSaslClient.LOGIN_CONTEXT_NAME_KEY is set as system property and 
java.security.auth.login.config is not set (that's what happens with Hadoop 
security). That was part of my patch.



- Thomas


On 2012-01-25 18:56:42, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-25 18:56:42)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-25 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--



bq.  On 2012-01-25 18:58:43, Eugene Koontz wrote:
bq.  > conf/zoo_sample.cfg, line 30
bq.  > 
bq.  >
bq.  > note that 'org.apache.zookeeper' prefix breaks convention with other 
variables.

zoo.cfg is read by the server. But here we need a setting on the client that 
goes into the system properties namespace. So certainly it needs to be prefixed 
in an appropriate way.

If we follow existing convention as seen here:

Boolean.getBoolean("zookeeper.disableAutoWatchReset");

As per comment below, the originally suggested key seems to be fine:

zookeeper.sasl.clientconfig

https://issues.apache.org/jira/browse/ZOOKEEPER-1373?focusedCommentId=13192817&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13192817


- Thomas


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


On 2012-01-25 18:56:42, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-25 18:56:42)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-25 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--


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



conf/zoo_sample.cfg


Redundant 'to ' in the beginning.



src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java


Does this (classname) match the entry in zoo_sample.cfg ?



src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java


Indentation is different from existing code.


- Ted


On 2012-01-25 18:56:42, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-25 18:56:42)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch, 
> ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-25 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--


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



conf/zoo_sample.cfg


note that 'org.apache.zookeeper' prefix breaks convention with other 
variables.


- Eugene


On 2012-01-25 18:56:42, Eugene Koontz wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3631/
bq.  ---
bq.  
bq.  (Updated 2012-01-25 18:56:42)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop 
security configuration override
bq.  
bq.  Fix is to allow system property to designate the JAAS configuration 
section that the zookeeper client will use.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1373.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1373
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.conf/zoo_sample.cfg aafb324 
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 
722538e 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
bq.
src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3631/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  "ant test" java tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Eugene
bq.  
bq.



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1373) Hardcoded SASL login context name clashes with Hadoop security configuration override

2012-01-25 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1373:
--


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

Review request for zookeeper.


Summary
---

ZOOKEEPER-1373: Hardcoded SASL login context name clashes with Hadoop security 
configuration override

Fix is to allow system property to designate the JAAS configuration section 
that the zookeeper client will use.


This addresses bug ZOOKEEPER-1373.
https://issues.apache.org/jira/browse/ZOOKEEPER-1373


Diffs
-

  conf/zoo_sample.cfg aafb324 
  src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
  src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 722538e 
  src/java/test/org/apache/zookeeper/test/SaslAuthDesignatedClientTest.java 
PRE-CREATION 
  src/java/test/org/apache/zookeeper/test/SaslAuthFailDesignatedClientTest.java 
PRE-CREATION 

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


Testing
---

"ant test" java tests pass.


Thanks,

Eugene



> Hardcoded SASL login context name clashes with Hadoop security configuration 
> override
> -
>
> Key: ZOOKEEPER-1373
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1373
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.2
>Reporter: Thomas Weise
>Assignee: Eugene Koontz
> Fix For: 3.4.3, 3.5.0
>
> Attachments: ZOOKEEPER-1373-TW_3_4.patch, ZOOKEEPER-1373.patch
>
>
> I'm trying to configure a process with Hadoop security (Hive metastore 
> server) to talk to ZooKeeper 3.4.2 with Kerberos authentication. In this 
> scenario Hadoop controls the SASL configuration 
> (org.apache.hadoop.security.UserGroupInformation.HadoopConfiguration), 
> instead of setting up the ZooKeeper "Client" loginContext via jaas.conf and 
> system property 
> {{-Djava.security.auth.login.config}}
> Using the Hadoop configuration would work, except that ZooKeeper client code 
> expects the loginContextName to be "Client" while Hadoop security will use  
> "hadoop-keytab-kerberos". I verified that by changing the name in the 
> debugger the SASL authentication succeeds while otherwise the login 
> configuration cannot be resolved and the connection to ZooKeeper is 
> unauthenticated. 
> To integrate with Hadoop, the following in ZooKeeperSaslClient would need to 
> change to make the name configurable:
>  {{login = new Login("Client",new ClientCallbackHandler(null));}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-95) extends zookeeper JMX to monitor and manage bookie server

2012-01-17 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187808#comment-13187808
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-95:
-


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


The bulk of the code in this patch could be removed if zookeeper's 
ZKMBeanRegistry was updated to allow easy extension. Have you looked at 
changing the ZK code? Of course, we'd need to continue to use the code in this 
patch until a version of zookeeper with the change is released, but i think it 
would make things cleaner.


bookkeeper-server/src/main/java/org/apache/bookkeeper/jmx/BKMBeanRegistry.java


Why is this static? 


- Ivan


On 2012-01-11 01:04:57, Sijie Guo wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3451/
bq.  ---
bq.  
bq.  (Updated 2012-01-11 01:04:57)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  we can extends/reuses zookeeper JMX until to monitor and manage bookie 
server
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-95.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-95
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/jmx/BKMBeanInfo.java 
PRE-CREATION 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/jmx/BKMBeanRegistry.java 
PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3451/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sijie
bq.  
bq.



> extends zookeeper JMX to monitor and manage bookie server
> -
>
> Key: BOOKKEEPER-95
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-95
> Project: Bookkeeper
>  Issue Type: Sub-task
>  Components: bookkeeper-server
>Affects Versions: 4.0.0
>Reporter: Sijie Guo
>Assignee: Sijie Guo
> Fix For: 4.1.0
>
> Attachments: BOOKKEEPER-95.patch, BOOKKEEPER-95.patch
>
>
> we can extends/reuses zookeeper JMX until to monitor and manage bookie server

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1296) Add zookeeper-setup-conf.sh script

2012-01-15 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1296:
--


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

(Updated 2012-01-16 05:42:12.266531)


Review request for zookeeper, Patrick Hunt and Mahadev Konar.


Changes
---

- Added man page for zookeeper-setup-conf.sh
- Added quorum, election port options
- Check and make directory before creating myid file.


Summary
---

Add a setup script for ZooKeeper


This addresses bug ZOOKEEPER-1296.
https://issues.apache.org/jira/browse/ZOOKEEPER-1296


Diffs (updated)
-

  http://svn.apache.org/repos/asf/zookeeper/trunk/build.xml 1231841 
  http://svn.apache.org/repos/asf/zookeeper/trunk/src/contrib/build-contrib.xml 
1231841 
  
http://svn.apache.org/repos/asf/zookeeper/trunk/src/contrib/zkpython/build.xml 
1231841 
  
http://svn.apache.org/repos/asf/zookeeper/trunk/src/contrib/zkpython/src/packages/rpm/spec/zkpython.spec
 1231841 
  
http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/man/zookeeper-setup-conf.sh.1
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
 1231841 
  
http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/rpm/spec/zookeeper.spec
 1231841 
  
http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh
 PRE-CREATION 

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


Testing
---


Thanks,

Eric



> Add zookeeper-setup-conf.sh script
> --
>
> Key: ZOOKEEPER-1296
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1296
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Affects Versions: 3.4.0
> Environment: Shell script
>Reporter: Eric Yang
>Assignee: Eric Yang
>Priority: Minor
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-1296-1.patch, ZOOKEEPER-1296-2.patch, 
> ZOOKEEPER-1296-3.patch, ZOOKEEPER-1296.patch
>
>
> It would be nice to provide a setup script for zoo.cfg and zookeeper-env.sh.  
> The proposed script will provide the following options:
> {noformat}
> usage: /usr/sbin/zookeeper-setup-conf.sh 
>   Required parameters:
> --conf-dir Set ZooKeeper configuration directory
> --log-dir  Set ZooKeeper log directory
>   Optional parameters:
> --auto-purge-interval=1Set snapshot auto purge interval
> --client-port=2181 Set client port
> --data-dir=/var/lib/zookeeper  Set data directory
> --hosts=host1,host2Set ZooKeeper qourum hostnames
> --init-limit=10Set initial sync limit
> --java-homeSet JAVA_HOME location
> --snapshot-count=3 Set snapshot retain count
> --sync-limit=5 Set sync limit
> --tick-time=2000   Set milliseconds of each tick
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1214) QuorumPeer should unregister only its previsously registered MBeans instead of use MBeanRegistry.unregisterAll() method.

2012-01-13 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1214:
--


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

(Updated 2012-01-13 12:10:38.234750)


Review request for zookeeper.


Summary
---

See https://issues.apache.org/jira/browse/ZOOKEEPER-1214


This addresses bug ZOOKEEPER-1214.
https://issues.apache.org/jira/browse/ZOOKEEPER-1214


Diffs (updated)
-

  /src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java 1226094 
  /src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 1226094 
  /src/java/test/org/apache/zookeeper/test/QuorumUtil.java 1226094 
  /src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java PRE-CREATION 

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


Testing
---

-


Thanks,

César



> QuorumPeer should unregister only its previsously registered MBeans instead 
> of use MBeanRegistry.unregisterAll() method.
> 
>
> Key: ZOOKEEPER-1214
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1214
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: quorum
>Reporter: César Álvarez Núñez
>Assignee: César Álvarez Núñez
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-1214.patch, ZOOKEEPER-1214.patch, 
> ZOOKEEPER-1214.patch
>
>
> When a QuorumPeer thread dies, it is unregistering *all* ZKMBeanInfo MBeans 
> previously registered on its java process; including those that has not been 
> registered by itself.
> It does not cause any side effect in production environment where each server 
> is running on a separate java process; but fails when using 
> "org.apache.zookeeper.test.QuorumUtil" to programmatically start up a 
> zookeeper server ensemble and use its provided methods to force Disconnected, 
> SyncConnected or SessionExpired events; in order to perform some 
> basic/functional testing.
> Scenario:
> * QuorumUtil qU = new QuorumUtil(1); // It creates a 3 servers ensemble.
> * qU.startAll(); // Startup all servers: 1 Leader + 2 Followers
> * qU.shutdown\(i\); // i is a number from 1 to 3. It shutdown one server.
> The last method causes that a QuorumPeer will die, invoking the 
> MBeanRegistry.unregisterAll() method.
> As a result, *all* ZKMBeanInfo MBeans are unregistered; including those 
> belonging to the other QuorumPeer instances.
> When trying to restart previous server (qU.restart\(i\)) an AssertionError is 
> thrown at MBeanRegistry.register(ZKMBeanInfo bean, ZKMBeanInfo parent) 
> method, causing the QuorumPeer thread dead.
> To solve it:
> * MBeanRegistry.unregisterAll() method has been removed.
> * QuorumPeer only unregister its ZKMBeanInfo MBeans.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1296) Add zookeeper-setup-conf.sh script

2012-01-12 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1296:
--



bq.  On 2011-12-22 23:52:26, Patrick Hunt wrote:
bq.  > 
http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml,
 lines 160-182
bq.  > 
bq.  >
bq.  > I had an idea when reviewing another jira recently. That fits with 
this and the new pkging really well. (sorry, that was after I mentioned about 
adding to the admin guide).
bq.  > 
bq.  > I now think we should add man pages for executables such as scripts. 
I think having a reference from the guide is not nearly as useful. Also, now 
that we have the pkgs we can include the man pages there. It's a much better 
solution than the guide for stuff like this. 
bq.  > 
bq.  > Would you mind moving this into a man page? Seems like mainly 
reformatting.

Will do.


bq.  On 2011-12-22 23:52:26, Patrick Hunt wrote:
bq.  > 
http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml,
 line 161
bq.  > 
bq.  >
bq.  > "a configuration file..."

Will make correction.


bq.  On 2011-12-22 23:52:26, Patrick Hunt wrote:
bq.  > 
http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml,
 line 166
bq.  > 
bq.  >
bq.  > should we give the example with sudo? or just user level.

sudo works better to be on the safe side for writing to /var.


bq.  On 2011-12-22 23:52:26, Patrick Hunt wrote:
bq.  > 
http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml,
 line 180
bq.  > 
bq.  >
bq.  > I'm not sure what this means "Forward to start ..."
bq.  > 
bq.  > ?

This means skip to next section.  I will revise the wording.


bq.  On 2011-12-22 23:52:26, Patrick Hunt wrote:
bq.  > 
http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh,
 line 47
bq.  > 
bq.  >
bq.  > running twice would overwrite the original, is there any way to 
store multiple versions?

backup old copy by timestamp?


bq.  On 2011-12-22 23:52:26, Patrick Hunt wrote:
bq.  > 
http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh,
 line 67
bq.  > 
bq.  >
bq.  > does this mean the datadir must exist prior to running the script? 
(would be good to document)

I will mkdir -p to make sure directory exists.


bq.  On 2011-12-22 23:52:26, Patrick Hunt wrote:
bq.  > 
http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh,
 lines 69-70
bq.  > 
bq.  >
bq.  > shouldn't we allow the quorum and election ports to be specified?

I will add those options.


bq.  On 2011-12-22 23:52:26, Patrick Hunt wrote:
bq.  > 
http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh,
 lines 153-154
bq.  > 
bq.  >
bq.  > this is wrong. we don't want to have autopurge on by default. it's 
too new of a feature.

I would recommend to have this feature on by default to reduce admin tasks.  
Long running server has tendency to run out of disk space without this option 
turn on, which I encountered several times.


bq.  On 2011-12-22 23:52:26, Patrick Hunt wrote:
bq.  > 
http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh,
 line 164
bq.  > 
bq.  >
bq.  > same q here re backup.

will add timestamp.


bq.  On 2011-12-22 23:52:26, Patrick Hunt wrote:
bq.  > 
http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh,
 lines 176-177
bq.  > 
bq.  >
bq.  > I'm not sure I get this, what's the expectation, that the user will 
run this on each of the servers, with exactly the same parameters? I see that 
the myid is based on this assumption, that seems like it's going to cause alot 
of problems. With zkconf I generated all the environments (for all servers) 
then allow the user to copy them to the right place. That limits this type of 
issue.

This is designed to run locally on the servers to integrate with configuration 
management tools like

[jira] [Commented] (ZOOKEEPER-1350) Please make JMX registration optional in LearnerZooKeeperServer

2012-01-05 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1350:
--


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

(Updated 2012-01-06 05:02:48.623412)


Review request for zookeeper.


Summary
---

LearnerZooKeeperServer has no option to disable JMX registrations. Curator has 
a test ZK server cluster. Due to the intricacies of JMX, the registrations 
cannot be easily undone. In order for the Curator Test cluster to be re-usable 
in a testing session, JavaAssist ugliness was necessary to make 
LearnerZooKeeperServer.registerJMX() and LearnerZooKeeperServer.unregisterJMX() 
NOPs. 


This addresses bug ZOOKEEPER-1350.
https://issues.apache.org/jira/browse/ZOOKEEPER-1350


Diffs (updated)
-

  /src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java 1227917 
  /src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 1227917 
  /src/java/main/org/apache/zookeeper/server/quorum/AuthFastLeaderElection.java 
1227917 
  /src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java 
1227917 
  /src/java/main/org/apache/zookeeper/server/quorum/LeaderElection.java 1227917 
  /src/java/main/org/apache/zookeeper/server/quorum/LeaderZooKeeperServer.java 
1227917 
  /src/java/main/org/apache/zookeeper/server/quorum/LearnerZooKeeperServer.java 
1227917 
  /src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 1227917 
  
/src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyZooKeeperServer.java 
1227917 
  /src/java/test/org/apache/zookeeper/server/quorum/LearnerTest.java 1227917 

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


Testing
---


Thanks,

Jordan



> Please make JMX registration optional in LearnerZooKeeperServer
> ---
>
> Key: ZOOKEEPER-1350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1350
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.4.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
> Attachments: jmx_optional.diff, patch.txt
>
>
> LearnerZooKeeperServer has no option to disable JMX registrations. Curator 
> has a test ZK server cluster. Due to the intricacies of JMX, the 
> registrations cannot be easily undone. In order for the Curator Test cluster 
> to be re-usable in a testing session, JavaAssist ugliness was necessary to 
> make LearnerZooKeeperServer.registerJMX() and 
> LearnerZooKeeperServer.unregisterJMX() NOPs. 
> I suggest a simple System property.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1350) Please make JMX registration optional in LearnerZooKeeperServer

2012-01-05 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1350:
--


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

(Updated 2012-01-06 04:59:53.911307)


Review request for zookeeper.


Summary (updated)
---

LearnerZooKeeperServer has no option to disable JMX registrations. Curator has 
a test ZK server cluster. Due to the intricacies of JMX, the registrations 
cannot be easily undone. In order for the Curator Test cluster to be re-usable 
in a testing session, JavaAssist ugliness was necessary to make 
LearnerZooKeeperServer.registerJMX() and LearnerZooKeeperServer.unregisterJMX() 
NOPs. 


This addresses bug ZOOKEEPER-1350.
https://issues.apache.org/jira/browse/ZOOKEEPER-1350


Diffs
-


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


Testing
---


Thanks,

Jordan



> Please make JMX registration optional in LearnerZooKeeperServer
> ---
>
> Key: ZOOKEEPER-1350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1350
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.4.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
> Attachments: jmx_optional.diff, patch.txt
>
>
> LearnerZooKeeperServer has no option to disable JMX registrations. Curator 
> has a test ZK server cluster. Due to the intricacies of JMX, the 
> registrations cannot be easily undone. In order for the Curator Test cluster 
> to be re-usable in a testing session, JavaAssist ugliness was necessary to 
> make LearnerZooKeeperServer.registerJMX() and 
> LearnerZooKeeperServer.unregisterJMX() NOPs. 
> I suggest a simple System property.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1214) QuorumPeer should unregister only its previsously registered MBeans instead of use MBeanRegistry.unregisterAll() method.

2012-01-05 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1214:
--



bq.  On 2011-12-14 23:36:06, Patrick Hunt wrote:
bq.  > /src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java, lines 126-127
bq.  > 
bq.  >
bq.  > cleanup this typo (2 returns)

Done.


bq.  On 2011-12-14 23:36:06, Patrick Hunt wrote:
bq.  > /src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java, line 130
bq.  > 
bq.  >
bq.  > let's call this 
bq.  > 
bq.  > getRegisteredBeans()
bq.  >

Ok.


bq.  On 2011-12-14 23:36:06, Patrick Hunt wrote:
bq.  > /src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java, lines 
757-767
bq.  > 
bq.  >
bq.  > Add back the try/catch protection. This was necessary in some cases 
(I can't remember why off the top of my head though).

I've enhanced the exception handling during "public void unregister(ZKMBeanInfo 
bean)" method invocation since JMException was caught and logged two times: 1) 
private void unregister(String path,ZKMBeanInfo bean) throws JMException, 2) 
public void unregister(ZKMBeanInfo bean).

I've also added a "catch(Throwable t)" to "public void unregister(ZKMBeanInfo 
bean)" method that will generate an error log instead of a warn. 


bq.  On 2011-12-14 23:36:06, Patrick Hunt wrote:
bq.  > /src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java, line 1
bq.  > 
bq.  >
bq.  > license header is missing. add the std boilerplate found on any 
other java file in the project.

As you can see I'm a newbie contributor ;-)


bq.  On 2011-12-14 23:36:06, Patrick Hunt wrote:
bq.  > /src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java, line 15
bq.  > 
bq.  >
bq.  > add a comment to the class describing what this set of tests is for

Done.


bq.  On 2011-12-14 23:36:06, Patrick Hunt wrote:
bq.  > /src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java, line 16
bq.  > 
bq.  >
bq.  > no tabs, reformat with spaces only. (you'll probably need to cleanup 
some of your other changes at the same time)

Done. It would be nice that the eclipse ant task will create the .setting files 
to set all formatting rules and useful save actions (like apply formatting). 
I'll investigate it and upload as a new jira if success.


bq.  On 2011-12-14 23:36:06, Patrick Hunt wrote:
bq.  > /src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java, line 19
bq.  > 
bq.  >
bq.  > it's fine to ref a jira here, however there should also be some 
details on what this test is doing. (short summary esp as the test itself is 
pretty clear)

Done.


- César


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


On 2011-10-05 11:59:30, César Álvarez Núñez wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2208/
bq.  ---
bq.  
bq.  (Updated 2011-10-05 11:59:30)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  See https://issues.apache.org/jira/browse/ZOOKEEPER-1214
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1214.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1214
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq./src/java/test/org/apache/zookeeper/test/QuorumUtil.java 1179165 
bq./src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java 
PRE-CREATION 
bq./src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 
1179166 
bq./src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java 1169669 
bq.  
bq.  Diff: https://reviews.apache.org/r/2208/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  -
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  César
bq.  
bq.



> QuorumPeer should unregister only its previsously registered MBeans instead 
> of use MBeanRegistry.unregisterAll() method.
> 
>
> Key: ZOOKEEPER-1214
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1214
> 

[jira] [Commented] (ZOOKEEPER-1327) there are still remnants of hadoop urls

2012-01-05 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1327:
--


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

Review request for zookeeper.


Summary
---

Just removed all Apache Hadoop and the old ZK url references.


This addresses bug ZOOKEEPER-1327.
https://issues.apache.org/jira/browse/ZOOKEEPER-1327


Diffs
-

  README.txt 3495f47 
  ivy.xml 14a46c9 
  src/c/README 397d04c 
  src/c/configure.ac 4e1a8d5 
  src/c/include/winconfig.h b89843c 
  src/contrib/huebrowser/README ef921f5 
  src/contrib/huebrowser/zkui/setup.py d2ae009 
  src/contrib/huebrowser/zkui/src/zkui/templates/tree.mako aa72169 
  src/contrib/loggraph/ivy.xml ee69011 
  src/contrib/monitoring/README c88a9d8 
  src/contrib/rest/ivy.xml f4ee8ba 
  src/contrib/zkperl/README 520e624 
  src/contrib/zkperl/ZooKeeper.pm 2440603 
  src/contrib/zooinspector/ivy.xml 4e5107e 
  
src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/about.html 
eed820a 
  src/docs/src/documentation/content/xdocs/bookkeeperStarted.xml e65e00a 
  src/docs/src/documentation/content/xdocs/recipes.xml 5d9f65c 
  src/docs/src/documentation/content/xdocs/releasenotes.xml 6bce57b 
  src/docs/src/documentation/content/xdocs/site.xml 34ac4b3 
  src/docs/src/documentation/content/xdocs/tabs.xml 739ebf2 
  src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml 85d2b8b 
  src/docs/src/documentation/content/xdocs/zookeeperOver.xml 67e4600 
  src/docs/src/documentation/content/xdocs/zookeeperProgrammers.xml bfc23dc 
  src/docs/src/documentation/content/xdocs/zookeeperStarted.xml 5726704 
  src/docs/src/documentation/content/xdocs/zookeeperTutorial.xml a155a9b 
  src/docs/src/documentation/skinconf.xml 6aee626 
  src/java/main/org/apache/zookeeper/server/auth/KerberosName.java 0700841 

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


Testing
---

Mostly meta area changes, but did ant package just to ensure things are 
alright. Reports a BUILD SUCCESSFUL.


Thanks,

Harsh



> there are still remnants of hadoop urls
> ---
>
> Key: ZOOKEEPER-1327
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1327
> Project: ZooKeeper
>  Issue Type: Bug
>Reporter: Benjamin Reed
>Assignee: Harsh J
> Fix For: 3.5.0, 3.4.3
>
>
> there are still hadoop urls and references to zookeeper lists under the 
> hadoop project in the sources.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-442) need a way to remove watches that are no longer of interest

2012-01-04 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-442:
-


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



src/java/main/org/apache/zookeeper/ZooKeeper.java


is it needed? would be good to be sure before we commit



src/java/main/org/apache/zookeeper/ZooKeeper.java


it would be good to document here why we are calling the async version 
(that this is the only way to ensure that all pending watches have been 
processed before notifying that that watch was removed successfully).



src/java/main/org/apache/zookeeper/ZooKeeper.java


ditto


- Patrick


On 2012-01-04 09:41:43, Daniel Gómez Ferro wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3364/
bq.  ---
bq.  
bq.  (Updated 2012-01-04 09:41:43)
bq.  
bq.  
bq.  Review request for zookeeper and Benjamin Reed.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Added APIs to remove watches that are not needed anymore. If the removal 
completes successfully it is guaranteed that the watcher won't be notified.
bq.  
bq.  With the current semantics if two clients remove watches on a znode at the 
same time the watch is triggered, one could remove it successfully while the 
other could receive the notification first.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-442.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-442
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.src/java/main/org/apache/zookeeper/KeeperException.java 7c10d2c 
bq.src/java/main/org/apache/zookeeper/Watcher.java 36c7b5b 
bq.src/java/main/org/apache/zookeeper/ZooDefs.java c7f1b20 
bq.src/java/main/org/apache/zookeeper/ZooKeeper.java e82eaa0 
bq.src/java/main/org/apache/zookeeper/server/DataTree.java 757a572 
bq.src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 
336827a 
bq.src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 
1a80d74 
bq.src/java/main/org/apache/zookeeper/server/Request.java c6a2249 
bq.src/java/main/org/apache/zookeeper/server/WatchManager.java 0e7c815 
bq.src/java/main/org/apache/zookeeper/server/ZKDatabase.java 2842803 
bq.src/java/test/org/apache/zookeeper/test/RemoveWatchesTest.java 
PRE-CREATION 
bq.src/zookeeper.jute d24e145 
bq.  
bq.  Diff: https://reviews.apache.org/r/3364/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Added unit test that checks client side semantics.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Daniel
bq.  
bq.



> need a way to remove watches that are no longer of interest
> ---
>
> Key: ZOOKEEPER-442
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-442
> Project: ZooKeeper
>  Issue Type: New Feature
>Reporter: Benjamin Reed
>Assignee: Daniel Gómez Ferro
>Priority: Critical
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch
>
>
> currently the only way a watch cleared is to trigger it. we need a way to 
> enumerate the outstanding watch objects, find watch events the objects are 
> watching for, and remove interests in an event.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-442) need a way to remove watches that are no longer of interest

2012-01-04 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-442:
-


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



src/java/main/org/apache/zookeeper/ZooKeeper.java


This class is getting rather large, it should be refactored into it's own 
file.



src/java/main/org/apache/zookeeper/ZooKeeper.java


all watchers _registered by this session_, correct?



src/java/main/org/apache/zookeeper/ZooKeeper.java


this is confusing, what does "leak" mean? It might be good to move this 
detail from here to the programmer guide.



src/java/main/org/apache/zookeeper/ZooKeeper.java


@throws?



src/java/main/org/apache/zookeeper/ZooKeeper.java


Update all the @since with expected release - looks like 3.5.0



src/java/main/org/apache/zookeeper/ZooKeeper.java


why type vs having explicit methods?

removeChildWatches
removeDataWatches

we're unlikely to add more watch types.

On second thought though, shouldn't we have a "both" (or "alltypes", 
etc...) option as well? If that's the case perhaps 3 is enough to have a type...



src/java/main/org/apache/zookeeper/ZooKeeper.java


since is incorrect



src/java/main/org/apache/zookeeper/ZooKeeper.java


async operations don't throw keeperexception, see other async ops such as 
getData



src/java/main/org/apache/zookeeper/ZooKeeper.java


see my comment on method signature - your intuition was correct.


- Patrick


On 2012-01-04 09:41:43, Daniel Gómez Ferro wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3364/
bq.  ---
bq.  
bq.  (Updated 2012-01-04 09:41:43)
bq.  
bq.  
bq.  Review request for zookeeper and Benjamin Reed.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Added APIs to remove watches that are not needed anymore. If the removal 
completes successfully it is guaranteed that the watcher won't be notified.
bq.  
bq.  With the current semantics if two clients remove watches on a znode at the 
same time the watch is triggered, one could remove it successfully while the 
other could receive the notification first.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-442.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-442
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.src/java/main/org/apache/zookeeper/KeeperException.java 7c10d2c 
bq.src/java/main/org/apache/zookeeper/Watcher.java 36c7b5b 
bq.src/java/main/org/apache/zookeeper/ZooDefs.java c7f1b20 
bq.src/java/main/org/apache/zookeeper/ZooKeeper.java e82eaa0 
bq.src/java/main/org/apache/zookeeper/server/DataTree.java 757a572 
bq.src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 
336827a 
bq.src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 
1a80d74 
bq.src/java/main/org/apache/zookeeper/server/Request.java c6a2249 
bq.src/java/main/org/apache/zookeeper/server/WatchManager.java 0e7c815 
bq.src/java/main/org/apache/zookeeper/server/ZKDatabase.java 2842803 
bq.src/java/test/org/apache/zookeeper/test/RemoveWatchesTest.java 
PRE-CREATION 
bq.src/zookeeper.jute d24e145 
bq.  
bq.  Diff: https://reviews.apache.org/r/3364/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Added unit test that checks client side semantics.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Daniel
bq.  
bq.



> need a way to remove watches that are no longer of interest
> ---
>
> Key: ZOOKEEPER-442
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-442
> Project: ZooKeeper
>  Issue Type: New Feature
>Reporter: Benjamin Reed
>Assignee: Daniel Gómez Ferro
>Priority: Critical
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-44

[jira] [Commented] (ZOOKEEPER-442) need a way to remove watches that are no longer of interest

2012-01-04 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-442:
-


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


As part of this patch the programmer guide needs to be updated to detail how 
this feature works. In particular it should detail the semantics of watch 
removal, any "gotchas" to watch out for, etc...

- Patrick


On 2012-01-04 09:41:43, Daniel Gómez Ferro wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3364/
bq.  ---
bq.  
bq.  (Updated 2012-01-04 09:41:43)
bq.  
bq.  
bq.  Review request for zookeeper and Benjamin Reed.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Added APIs to remove watches that are not needed anymore. If the removal 
completes successfully it is guaranteed that the watcher won't be notified.
bq.  
bq.  With the current semantics if two clients remove watches on a znode at the 
same time the watch is triggered, one could remove it successfully while the 
other could receive the notification first.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-442.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-442
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.src/java/main/org/apache/zookeeper/KeeperException.java 7c10d2c 
bq.src/java/main/org/apache/zookeeper/Watcher.java 36c7b5b 
bq.src/java/main/org/apache/zookeeper/ZooDefs.java c7f1b20 
bq.src/java/main/org/apache/zookeeper/ZooKeeper.java e82eaa0 
bq.src/java/main/org/apache/zookeeper/server/DataTree.java 757a572 
bq.src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 
336827a 
bq.src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 
1a80d74 
bq.src/java/main/org/apache/zookeeper/server/Request.java c6a2249 
bq.src/java/main/org/apache/zookeeper/server/WatchManager.java 0e7c815 
bq.src/java/main/org/apache/zookeeper/server/ZKDatabase.java 2842803 
bq.src/java/test/org/apache/zookeeper/test/RemoveWatchesTest.java 
PRE-CREATION 
bq.src/zookeeper.jute d24e145 
bq.  
bq.  Diff: https://reviews.apache.org/r/3364/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Added unit test that checks client side semantics.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Daniel
bq.  
bq.



> need a way to remove watches that are no longer of interest
> ---
>
> Key: ZOOKEEPER-442
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-442
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Benjamin Reed
>Assignee: Daniel Gómez Ferro
>Priority: Critical
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch
>
>
> currently the only way a watch cleared is to trigger it. we need a way to 
> enumerate the outstanding watch objects, find watch events the objects are 
> watching for, and remove interests in an event.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-442) need a way to remove watches that are no longer of interest

2012-01-04 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-442:
-


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


This is only a first pass. Looks ok but I would like more attention to anything 
you're not really sure about.


src/java/main/org/apache/zookeeper/ZooKeeper.java


Maybe collapse this to if(watchers != null && watchers.contains(watcher)) ?



src/java/main/org/apache/zookeeper/ZooKeeper.java


I don't think that you should override this method to do two things based 
on the variables passed in, it's confusing and unnecessary. Can we have instead 
two methods, one for removing all watchers and one for just removing a watch if 
it exists?



src/java/main/org/apache/zookeeper/ZooKeeper.java


??



src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java


Let's not check in files that are just reordering of imports...


- Camille


On 2012-01-04 09:41:43, Daniel Gómez Ferro wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3364/
bq.  ---
bq.  
bq.  (Updated 2012-01-04 09:41:43)
bq.  
bq.  
bq.  Review request for zookeeper and Benjamin Reed.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Added APIs to remove watches that are not needed anymore. If the removal 
completes successfully it is guaranteed that the watcher won't be notified.
bq.  
bq.  With the current semantics if two clients remove watches on a znode at the 
same time the watch is triggered, one could remove it successfully while the 
other could receive the notification first.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-442.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-442
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
bq.src/java/main/org/apache/zookeeper/KeeperException.java 7c10d2c 
bq.src/java/main/org/apache/zookeeper/Watcher.java 36c7b5b 
bq.src/java/main/org/apache/zookeeper/ZooDefs.java c7f1b20 
bq.src/java/main/org/apache/zookeeper/ZooKeeper.java e82eaa0 
bq.src/java/main/org/apache/zookeeper/server/DataTree.java 757a572 
bq.src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 
336827a 
bq.src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 
1a80d74 
bq.src/java/main/org/apache/zookeeper/server/Request.java c6a2249 
bq.src/java/main/org/apache/zookeeper/server/WatchManager.java 0e7c815 
bq.src/java/main/org/apache/zookeeper/server/ZKDatabase.java 2842803 
bq.src/java/test/org/apache/zookeeper/test/RemoveWatchesTest.java 
PRE-CREATION 
bq.src/zookeeper.jute d24e145 
bq.  
bq.  Diff: https://reviews.apache.org/r/3364/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Added unit test that checks client side semantics.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Daniel
bq.  
bq.



> need a way to remove watches that are no longer of interest
> ---
>
> Key: ZOOKEEPER-442
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-442
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Benjamin Reed
>Assignee: Daniel Gómez Ferro
>Priority: Critical
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch
>
>
> currently the only way a watch cleared is to trigger it. we need a way to 
> enumerate the outstanding watch objects, find watch events the objects are 
> watching for, and remove interests in an event.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-442) need a way to remove watches that are no longer of interest

2012-01-04 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-442:
-


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

Review request for zookeeper and Benjamin Reed.


Summary
---

Added APIs to remove watches that are not needed anymore. If the removal 
completes successfully it is guaranteed that the watcher won't be notified.

With the current semantics if two clients remove watches on a znode at the same 
time the watch is triggered, one could remove it successfully while the other 
could receive the notification first.


This addresses bug ZOOKEEPER-442.
https://issues.apache.org/jira/browse/ZOOKEEPER-442


Diffs
-

  src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
  src/java/main/org/apache/zookeeper/KeeperException.java 7c10d2c 
  src/java/main/org/apache/zookeeper/Watcher.java 36c7b5b 
  src/java/main/org/apache/zookeeper/ZooDefs.java c7f1b20 
  src/java/main/org/apache/zookeeper/ZooKeeper.java e82eaa0 
  src/java/main/org/apache/zookeeper/server/DataTree.java 757a572 
  src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 336827a 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 1a80d74 
  src/java/main/org/apache/zookeeper/server/Request.java c6a2249 
  src/java/main/org/apache/zookeeper/server/WatchManager.java 0e7c815 
  src/java/main/org/apache/zookeeper/server/ZKDatabase.java 2842803 
  src/java/test/org/apache/zookeeper/test/RemoveWatchesTest.java PRE-CREATION 
  src/zookeeper.jute d24e145 

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


Testing
---

Added unit test that checks client side semantics.


Thanks,

Daniel



> need a way to remove watches that are no longer of interest
> ---
>
> Key: ZOOKEEPER-442
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-442
> Project: ZooKeeper
>  Issue Type: Improvement
>Reporter: Benjamin Reed
>Assignee: Daniel Gómez Ferro
>Priority: Critical
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch
>
>
> currently the only way a watch cleared is to trigger it. we need a way to 
> enumerate the outstanding watch objects, find watch events the objects are 
> watching for, and remove interests in an event.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1296) Add zookeeper-setup-conf.sh script

2011-12-22 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1296:
--


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



http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml


I had an idea when reviewing another jira recently. That fits with this and 
the new pkging really well. (sorry, that was after I mentioned about adding to 
the admin guide).

I now think we should add man pages for executables such as scripts. I 
think having a reference from the guide is not nearly as useful. Also, now that 
we have the pkgs we can include the man pages there. It's a much better 
solution than the guide for stuff like this. 

Would you mind moving this into a man page? Seems like mainly reformatting.



http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml


"a configuration file..."



http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml


should we give the example with sudo? or just user level.



http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml


I'm not sure what this means "Forward to start ..."

?



http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh


should this be required given having separate dirs is optional?



http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh


are the values after the = supposed to be defaults? because --hosts has a 
default of host1,host2, that' doesn't seem right.



http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh


running twice would overwrite the original, is there any way to store 
multiple versions?



http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh


does this mean the datadir must exist prior to running the script? (would 
be good to document)



http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh


shouldn't we allow the quorum and election ports to be specified?



http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh


this is wrong. we don't want to have autopurge on by default. it's too new 
of a feature.



http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh


same q here re backup.



http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh


I'm not sure I get this, what's the expectation, that the user will run 
this on each of the servers, with exactly the same parameters? I see that the 
myid is based on this assumption, that seems like it's going to cause alot of 
problems. With zkconf I generated all the environments (for all servers) then 
allow the user to copy them to the right place. That limits this type of issue.


- Patrick


On 2011-12-09 20:45:09, Eric Yang wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3116/
bq.  ---
bq.  
bq.  (Updated 2011-12-09 20:45:09)
bq.  
bq.  
bq.  Review request for zookeeper, Patrick Hunt and Mahadev Konar.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Add a setup script for ZooKeeper
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1296.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1296
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.http://svn.apache.org/repos/asf/zookeeper/trunk/build.xml 1200013 
bq.
http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
 1200013 
bq.
http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh
 PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3116/diff
bq.  
bq.  
bq.  Testing
bq.  

[jira] [Commented] (ZOOKEEPER-1292) FLETest is flaky

2011-12-15 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1292:
--


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

(Updated 2011-12-15 14:21:47.413394)


Review request for zookeeper and Benjamin Reed.


Summary
---

Improved test for FLE.


This addresses bug ZOOKEEPER-1292.
https://issues.apache.org/jira/browse/ZOOKEEPER-1292


Diffs
-

  /src/java/test/org/apache/zookeeper/test/FLETest.java 1214749 

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


Testing
---


Thanks,

fpj



> FLETest is flaky
> 
>
> Key: ZOOKEEPER-1292
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1292
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: leaderElection
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-1292.patch, ZOOKEEPER-1292.patch, 
> ZOOKEEPER-1292.patch
>
>
> testLE in FLETest is convoluted, difficult to read, and doesn't test FLE 
> appropriately. The goal of this jira is to clean it up and propose a more 
> reasonable test case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1214) QuorumPeer should unregister only its previsously registered MBeans instead of use MBeanRegistry.unregisterAll() method.

2011-12-14 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1214:
--


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


a good cleanup, some comments before we can commit it.


/src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java


cleanup this typo (2 returns)



/src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java


let's call this 

getRegisteredBeans()




/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java


Add back the try/catch protection. This was necessary in some cases (I 
can't remember why off the top of my head though).



/src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java


license header is missing. add the std boilerplate found on any other java 
file in the project.



/src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java


add a comment to the class describing what this set of tests is for



/src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java


no tabs, reformat with spaces only. (you'll probably need to cleanup some 
of your other changes at the same time)



/src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java


it's fine to ref a jira here, however there should also be some details on 
what this test is doing. (short summary esp as the test itself is pretty clear)


- Patrick


On 2011-10-05 11:59:30, César Álvarez Núñez wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2208/
bq.  ---
bq.  
bq.  (Updated 2011-10-05 11:59:30)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  See https://issues.apache.org/jira/browse/ZOOKEEPER-1214
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1214.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1214
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq./src/java/test/org/apache/zookeeper/test/QuorumUtil.java 1179165 
bq./src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java 
PRE-CREATION 
bq./src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 
1179166 
bq./src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java 1169669 
bq.  
bq.  Diff: https://reviews.apache.org/r/2208/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  -
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  César
bq.  
bq.



> QuorumPeer should unregister only its previsously registered MBeans instead 
> of use MBeanRegistry.unregisterAll() method.
> 
>
> Key: ZOOKEEPER-1214
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1214
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: quorum
>Reporter: César Álvarez Núñez
>Assignee: César Álvarez Núñez
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-1214.patch, ZOOKEEPER-1214.patch
>
>
> When a QuorumPeer thread dies, it is unregistering *all* ZKMBeanInfo MBeans 
> previously registered on its java process; including those that has not been 
> registered by itself.
> It does not cause any side effect in production environment where each server 
> is running on a separate java process; but fails when using 
> "org.apache.zookeeper.test.QuorumUtil" to programmatically start up a 
> zookeeper server ensemble and use its provided methods to force Disconnected, 
> SyncConnected or SessionExpired events; in order to perform some 
> basic/functional testing.
> Scenario:
> * QuorumUtil qU = new QuorumUtil(1); // It creates a 3 servers ensemble.
> * qU.startAll(); // Startup all servers: 1 Leader + 2 Followers
> * qU.shutdown\(i\); // i is a number from 1 to 3. It shutdown one server.
> The last method causes that a QuorumPeer will die, invoking the 
> MBeanRegistry.unregisterAll() method.
> As a result, *all* ZKMBeanInfo MBeans are unregistered; including those 
> belonging to the other QuorumPeer instances.
> When trying to restart previous server (qU.restart\(i\)) an AssertionError is 
> thrown at MBeanRegistry.register(ZKMBeanInfo

[jira] [Commented] (ZOOKEEPER-1296) Add zookeeper-setup-conf.sh script

2011-12-09 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1296:
--


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

Review request for zookeeper, Patrick Hunt and Mahadev Konar.


Summary
---

Add a setup script for ZooKeeper


This addresses bug ZOOKEEPER-1296.
https://issues.apache.org/jira/browse/ZOOKEEPER-1296


Diffs
-

  http://svn.apache.org/repos/asf/zookeeper/trunk/build.xml 1200013 
  
http://svn.apache.org/repos/asf/zookeeper/trunk/src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
 1200013 
  
http://svn.apache.org/repos/asf/zookeeper/trunk/src/packages/zookeeper-setup-conf.sh
 PRE-CREATION 

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


Testing
---


Thanks,

Eric



> Add zookeeper-setup-conf.sh script
> --
>
> Key: ZOOKEEPER-1296
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1296
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Affects Versions: 3.4.0
> Environment: Shell script
>Reporter: Eric Yang
>Assignee: Eric Yang
>Priority: Minor
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-1296-1.patch, ZOOKEEPER-1296-2.patch, 
> ZOOKEEPER-1296.patch
>
>
> It would be nice to provide a setup script for zoo.cfg and zookeeper-env.sh.  
> The proposed script will provide the following options:
> {noformat}
> usage: /usr/sbin/zookeeper-setup-conf.sh 
>   Required parameters:
> --conf-dir Set ZooKeeper configuration directory
> --log-dir  Set ZooKeeper log directory
>   Optional parameters:
> --auto-purge-interval=1Set snapshot auto purge interval
> --client-port=2181 Set client port
> --data-dir=/var/lib/zookeeper  Set data directory
> --hosts=host1,host2Set ZooKeeper qourum hostnames
> --init-limit=10Set initial sync limit
> --java-homeSet JAVA_HOME location
> --snapshot-count=3 Set snapshot retain count
> --sync-limit=5 Set sync limit
> --tick-time=2000   Set milliseconds of each tick
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-101) Add Fencing to Bookkeeper

2011-11-15 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150621#comment-13150621
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-101:
--



bq.  On 2011-11-15 07:18:20, Dhruba Borthakur wrote:
bq.  > 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java, line 
583
bq.  > 
bq.  >
bq.  > Just a minor nit: maybe rename addEntryToLedger to 
addEntryInternal() just to distinguish public methods from private methods. No 
big deal anyways!

Changed.


bq.  On 2011-11-15 07:18:20, Dhruba Borthakur wrote:
bq.  > 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java, line 
602
bq.  > 
bq.  >
bq.  > This is called when a client is trying to do recovery. In this case, 
should this call first assert that the fenced flag is already set in the 
handle? something like:
bq.  > 
bq.  > if (!handle.isFeenced()) {
bq.  >   throw Exception()
bq.  > }

we don't always fence the ledger before recovery. In the case of bookie 
recovery, we want to replicate all active ledgers to ensure full replication. 
Some may be open, some may be. In this case we use a recovery add, to ensure we 
can add. All adds will be of entries read from the same ledger, on another 
bookie.


bq.  On 2011-11-15 07:18:20, Dhruba Borthakur wrote:
bq.  > 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java, line 
639
bq.  > 
bq.  >
bq.  > I like this simple api to fence. Maybe the javadoc can specify that 
even if the handle is already fenced, invoking this api is ok and keeps the 
fencing flag still set.

Added.


bq.  On 2011-11-15 07:18:20, Dhruba Borthakur wrote:
bq.  > 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java, line 
642
bq.  > 
bq.  >
bq.  > A handle, once fenced, can never be set to an 'unfenced' state, am I 
correct?

Yes, fencing is permanent.  


- Ivan


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


On 2011-11-10 11:14:47, Ivan Kelly wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2594/
bq.  ---
bq.  
bq.  (Updated 2011-11-10 11:14:47)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  BookKeeper is designed for use as a Write ahead log. In systems with a 
primary/backup architecture, the primary will write state updates to the WAL. 
If the primary dies the backup comes online, reads the WAL to get the latest 
state and starts serving requests. However, if the primary was only partitioned 
from the network, or stuck in a long GC, a split brain occurs. Both primary and 
backup can service client requests.
bq.  
bq.  Fencing(http://en.wikipedia.org/wiki/Fencing_%28computing%29) ensures that 
this cannot happen. With fencing, the backup can close the WAL of the primary, 
and cause any subsequent attempt by the primary to write to the WAL to give an 
error.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-101.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-101
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
d651894 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieException.java
 292617e 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java
 024cac3 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java 
d7c8f67 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
a1fbab7 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 b3eb5b9 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerCreateOp.java
 6f72e47 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
8c2a54f 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 328c7ca 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java 
a68856c 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
 7465c52 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java 
eddd760 
bq.
bookkeeper-server/src/m

[jira] [Commented] (BOOKKEEPER-108) add configuration support for BK

2011-11-11 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148658#comment-13148658
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-108:
--


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


I have to run now, I'll try to go through this again in more detail over the 
weekend. 


http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/bin/bookkeeper


As I commented on BookieServer(see below), our script should only use the 
conf file.



http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java


It'd be nice if these methods returned a ClientConfiguration object, so you 
could chain calls, i.e.

ClientConfiguration c = new 
ClientConfiguration().setThrottleValue(100).setPasswd('foobar');





http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java


BookieServer should start with _either_ :

1. --conf 

or

2.   etc

not both. 

2. is only for people who are already using that format in scripts to call 
BookieServer directly. Our own script should only use the configuration file.


- Ivan


On 2011-11-11 17:29:32, Sijie Guo wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2771/
bq.  ---
bq.  
bq.  (Updated 2011-11-11 17:29:32)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  manage all server-side settings in a Configuration object
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-108.
bq.  http://issues.apache.org/jira/browse/BOOKKEEPER-108
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/bin/bookkeeper
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/conf/bk_client.conf
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/conf/bk_server.conf
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/conf/bkenv.sh
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerCache.java
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerEntryPage.java
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerCreateOp.java
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java
 1200945 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/o

[jira] [Commented] (BOOKKEEPER-91) Bookkeeper and hedwig clients should not use log4j directly

2011-11-11 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-91?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148613#comment-13148613
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-91:
-


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

Review request for bookkeeper.


Summary
---

Using log4j directly requires that any application using bookkeeper or hedwig 
clients have to configure log4j.

We should use something like commons logging[1] or slf4j[2].

[1] http://commons.apache.org/logging/index.html
[2] http://www.slf4j.org/


This addresses bug BOOKKEEPER-91.
https://issues.apache.org/jira/browse/BOOKKEEPER-91


Diffs
-

  bookkeeper-benchmark/pom.xml 3f905ae 
  
bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/MySqlClient.java
 ad5f445 
  
bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/TestClient.java
 213763f 
  bookkeeper-server/pom.xml fd6cef6 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
d651894 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java 
1410bc4 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java 
7c4f250 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerCache.java 
1aa3594 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java
 024cac3 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
a1fbab7 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 b3eb5b9 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookieWatcher.java 
b2fbc6b 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/DigestManager.java 
97552e6 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerCreateOp.java
 6f72e47 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerDeleteOp.java
 97b06fb 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerEntry.java 
8f65e1b 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
8c2a54f 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 328c7ca 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java 
a68856c 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
 7465c52 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java 
eddd760 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java 
385b16c 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadLastConfirmedOp.java
 c2d4cee 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClient.java 
d70ae27 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java 
f1b3ad9 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/NIOServerFactory.java
 e0743bb 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 2cd4de8 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/streaming/LedgerInputStream.java
 911b539 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/streaming/LedgerOutputStream.java
 bbde2fb 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/BookKeeperTools.java
 e15f0a4 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/util/LocalBookKeeper.java 
4e5b134 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/util/SafeRunnable.java 
b8284b8 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTestClient.java
 39334af 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerCacheTest.java
 07639aa 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/AsyncLedgerOpsTest.java
 6614bc5 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java 
6bac569 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
 97dc2ab 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieFailureTest.java
 8dbae67 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieReadWriteTest.java
 74b5d6f 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieRecoveryTest.java
 ac54d9a 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/CloseTest.java 
b43db91 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConcurrentLedgerTest.java
 ebb17d2 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConditionalSetTest.java
 0b04a91 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LedgerDeleteTest.java
 48d5e70 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/Ledge

[jira] [Commented] (BOOKKEEPER-108) add configuration support for BK

2011-11-11 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148588#comment-13148588
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-108:
--


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

(Updated 2011-11-11 17:29:32.204949)


Review request for bookkeeper.


Changes
---

made changes according to Ivan's suggestions.

1) create ClientConfiguration to manage client-side settings
2) add descriptions for settings in bk_server.conf / bk_client.conf
3) add SystemConfiguration in Configuration objects for backward compatible.


Summary
---

manage all server-side settings in a Configuration object


This addresses bug BOOKKEEPER-108.
http://issues.apache.org/jira/browse/BOOKKEEPER-108


Diffs (updated)
-

  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/bin/bookkeeper
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/conf/bk_client.conf
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/conf/bk_server.conf
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/conf/bkenv.sh
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerCache.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerEntryPage.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerCreateOp.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClient.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/NIOServerFactory.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/LocalBookKeeper.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTestClient.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerCacheTest.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
 1200945 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieFai

[jira] [Commented] (BOOKKEEPER-101) Add Fencing to Bookkeeper

2011-11-08 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146351#comment-13146351
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-101:
--



bq.  On 2011-11-08 15:08:05, fpj wrote:
bq.  > Great job, Ivan! I just have one question and one comment. The comment 
is about documentation. Shouldn't we add some documentation for this feature?
bq.  > 
bq.  > I also ran the tests, and they pass fine for me.

We should add some doc on the website for sure. I'd prefer to get this into the 
codebase first though, and create another JIRA for documenting it, as otherwise 
this could rot.


bq.  On 2011-11-08 15:08:05, fpj wrote:
bq.  > 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java, 
line 655
bq.  > 
bq.  >
bq.  > What's the goal of setting "in recovery" in zookeeper? Is it to 
prevent the writer from closing the ledger? I also wonder if we can miss 
complete writes in the closed ledger if we writer to zookeeper before fencing 
bookies off.

We have to mark the ledger as "in recovery" so that the writing client can't 
change the ensemble under our feet. 

We wont miss complete writes, because the recovery process will still run copy 
any entry's greater than lastAddConfirmed to a quorum of ledgers.


- Ivan


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


On 2011-11-04 17:40:53, Ivan Kelly wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2594/
bq.  ---
bq.  
bq.  (Updated 2011-11-04 17:40:53)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  BookKeeper is designed for use as a Write ahead log. In systems with a 
primary/backup architecture, the primary will write state updates to the WAL. 
If the primary dies the backup comes online, reads the WAL to get the latest 
state and starts serving requests. However, if the primary was only partitioned 
from the network, or stuck in a long GC, a split brain occurs. Both primary and 
backup can service client requests.
bq.  
bq.  Fencing(http://en.wikipedia.org/wiki/Fencing_%28computing%29) ensures that 
this cannot happen. With fencing, the backup can close the WAL of the primary, 
and cause any subsequent attempt by the primary to write to the WAL to give an 
error.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-101.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-101
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
d651894 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieException.java
 292617e 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java
 024cac3 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java 
d7c8f67 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
a1fbab7 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 b3eb5b9 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerCreateOp.java
 6f72e47 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
8c2a54f 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 328c7ca 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java 
a68856c 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
 7465c52 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java 
eddd760 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java 
385b16c 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadLastConfirmedOp.java
 c2d4cee 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClient.java 
d70ae27 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtocol.java 
873dafe 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java 
f1b3ad9 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 2cd4de8 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerCacheTest.java
 07639aa 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestFencing.java 
PRE-CREATION 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/

[jira] [Commented] (BOOKKEEPER-101) Add Fencing to Bookkeeper

2011-11-08 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146348#comment-13146348
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-101:
--


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


Great job, Ivan! I just have one question and one comment. The comment is about 
documentation. Shouldn't we add some documentation for this feature?

I also ran the tests, and they pass fine for me.


bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java


What's the goal of setting "in recovery" in zookeeper? Is it to prevent the 
writer from closing the ledger? I also wonder if we can miss complete writes in 
the closed ledger if we writer to zookeeper before fencing bookies off.  


- fpj


On 2011-11-04 17:40:53, Ivan Kelly wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2594/
bq.  ---
bq.  
bq.  (Updated 2011-11-04 17:40:53)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  BookKeeper is designed for use as a Write ahead log. In systems with a 
primary/backup architecture, the primary will write state updates to the WAL. 
If the primary dies the backup comes online, reads the WAL to get the latest 
state and starts serving requests. However, if the primary was only partitioned 
from the network, or stuck in a long GC, a split brain occurs. Both primary and 
backup can service client requests.
bq.  
bq.  Fencing(http://en.wikipedia.org/wiki/Fencing_%28computing%29) ensures that 
this cannot happen. With fencing, the backup can close the WAL of the primary, 
and cause any subsequent attempt by the primary to write to the WAL to give an 
error.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-101.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-101
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
d651894 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieException.java
 292617e 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java
 024cac3 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java 
d7c8f67 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
a1fbab7 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 b3eb5b9 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerCreateOp.java
 6f72e47 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
8c2a54f 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 328c7ca 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java 
a68856c 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
 7465c52 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java 
eddd760 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java 
385b16c 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadLastConfirmedOp.java
 c2d4cee 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClient.java 
d70ae27 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtocol.java 
873dafe 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java 
f1b3ad9 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 2cd4de8 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerCacheTest.java
 07639aa 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestFencing.java 
PRE-CREATION 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestProtoVersions.java
 f6cd8c9 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java 
6bac569 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
 97dc2ab 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieRecoveryTest.java
 ac54d9a 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConcurrentLedgerTest.java
 ebb17d2 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LoopbackClient.java 
85822bf 
bq.
hedwig-server/src/main/java/org/apache/hedwig/server/benchmark/B

[jira] [Commented] (BOOKKEEPER-101) Add Fencing to Bookkeeper

2011-11-04 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144201#comment-13144201
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-101:
--


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

(Updated 2011-11-04 17:40:53.862350)


Review request for bookkeeper.


Summary
---

BookKeeper is designed for use as a Write ahead log. In systems with a 
primary/backup architecture, the primary will write state updates to the WAL. 
If the primary dies the backup comes online, reads the WAL to get the latest 
state and starts serving requests. However, if the primary was only partitioned 
from the network, or stuck in a long GC, a split brain occurs. Both primary and 
backup can service client requests.

Fencing(http://en.wikipedia.org/wiki/Fencing_%28computing%29) ensures that this 
cannot happen. With fencing, the backup can close the WAL of the primary, and 
cause any subsequent attempt by the primary to write to the WAL to give an 
error.


This addresses bug BOOKKEEPER-101.
https://issues.apache.org/jira/browse/BOOKKEEPER-101


Diffs (updated)
-

  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
d651894 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieException.java
 292617e 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java
 024cac3 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java 
d7c8f67 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
a1fbab7 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 b3eb5b9 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerCreateOp.java
 6f72e47 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
8c2a54f 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 328c7ca 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java 
a68856c 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
 7465c52 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java 
eddd760 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java 
385b16c 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadLastConfirmedOp.java
 c2d4cee 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClient.java 
d70ae27 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtocol.java 
873dafe 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java 
f1b3ad9 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 2cd4de8 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerCacheTest.java
 07639aa 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestFencing.java 
PRE-CREATION 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestProtoVersions.java
 f6cd8c9 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java 
6bac569 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
 97dc2ab 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieRecoveryTest.java
 ac54d9a 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConcurrentLedgerTest.java
 ebb17d2 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LoopbackClient.java 
85822bf 
  
hedwig-server/src/main/java/org/apache/hedwig/server/benchmark/BookieBenchmark.java
 18319d7 

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


Testing
---


Thanks,

Ivan



> Add Fencing to Bookkeeper
> -
>
> Key: BOOKKEEPER-101
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-101
> Project: Bookkeeper
>  Issue Type: New Feature
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.0.0
>
> Attachments: BOOKKEEPER-101.diff, BOOKKEEPER-101.diff
>
>
> BookKeeper is designed for use as a Write ahead log. In systems with a 
> primary/backup architecture, the primary will write state updates to the WAL. 
> If the primary dies the backup comes online, reads the WAL to get the latest 
> state and starts serving requests. However, if the primary was only 
> partitioned from the network, or stuck in a long GC, a split brain occurs. 
> Both primary and backup can service client requests. 
> Fencing(http://en.wikipedia.org/wiki/Fencing_%28computing%29) ensures that 
> this cannot happen. With fencing, the backup can c

[jira] [Commented] (BOOKKEEPER-50) NullPointException at LedgerDescriptor#cmpMasterKey

2011-11-03 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143409#comment-13143409
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-50:
-


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


Looks good. I have a few comments about spelling etc, and only one comment 
which may require code change (regarding zero length keys).


http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java


This comment should simply be removed.



http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java


existed is wrong tense here. Should be existing. as in, existingMasterKey :)




http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java


What if the ledger is created with a zero length key?



http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java


Wired should be Weird. 



http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java


Perhaps add a FileInfo javadoc for what the format is for the file. 





http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java


I don't like the name _read. It's not very descriptive when compared to 
"read". I think it would be better to rename read to readData, and rename _read 
to read.



http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java


javadoc exceptions don't match the signature exceptions.


- Ivan


On 2011-10-31 17:39:19, Sijie Guo wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2642/
bq.  ---
bq.  
bq.  (Updated 2011-10-31 17:39:19)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  save master key in header part of ledger index file.
bq.  
bq.  so we can load master key when opening an existed ledger index file to 
avoid that master key is null.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-50.
bq.  http://issues.apache.org/jira/browse/BOOKKEEPER-50
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
 1195369 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java
 1195369 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java
 1195369 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieReadAfterBookieRestartTest.java
 PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/2642/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sijie
bq.  
bq.



> NullPointException at LedgerDescriptor#cmpMasterKey
> ---
>
> Key: BOOKKEEPER-50
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-50
> Project: Bookkeeper
>  Issue Type: Bug
>  Components: bookkeeper-server
>Affects Versions: 3.4.0
>Reporter: xulei
>Assignee: Sijie Guo
> Fix For: 4.0.0
>
> Attachments: BookieReadAfterBookieRestartTest.java, 
> bookkeeper-50.patch, bookkeeper-50.patch
>
>
> the LedgerDescriptor will be created when it is missed in LedgerCache. 
> NullPointException will be thrown out in the following case:
> 1. The ledger descriptor is created and cached to LedgerCache because of a 
> readEntry operation in bookie. The ledger descriptor was created without 
> setting master key (we don't know master key in a read request)
> 2. An addEntry is sent after 1 . since the ledg

[jira] [Commented] (ZOOKEEPER-1284) Cleanup minor PrepRequestProcessor issues

2011-11-03 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1284:
--


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

(Updated 2011-11-03 10:12:51.768461)


Review request for zookeeper.


Changes
---

Changed this review request to relate to issue ZOOKEEPER-1284


Summary (updated)
---

This is _not_ a diff againt current trunk but against the trunk _before_ the 
first version of the ZK-1246 patch got committed.


This addresses bug ZOOKEEPER-1284.
https://issues.apache.org/jira/browse/ZOOKEEPER-1284


Diffs
-

  CHANGES.txt 8ed2bc2 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 1a80d74 
  src/java/test/org/apache/zookeeper/server/PrepRequestProcessorTest.java 
PRE-CREATION 

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


Testing
---


Thanks,

Thomas



> Cleanup minor PrepRequestProcessor issues
> -
>
> Key: ZOOKEEPER-1284
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1284
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
>Priority: Minor
> Attachments: ZOOKEEPER-1284.patch
>
>
> Instead of having if statements in every switch case in pRequest2Txn, it is 
> possible to have only one if statement before the switch case in pRequest.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1246) Dead code in PrepRequestProcessor catch Exception block

2011-11-02 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1246:
--


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

Review request for zookeeper.


Summary
---

This is _not_ a diff againt current trunk but against the trunk _before_ the 
first version of the ZK-1246 patch got committed.


This addresses bug ZOOKEEPER-1246.
https://issues.apache.org/jira/browse/ZOOKEEPER-1246


Diffs
-

  CHANGES.txt 8ed2bc2 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 1a80d74 
  src/java/test/org/apache/zookeeper/server/PrepRequestProcessorTest.java 
PRE-CREATION 

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


Testing
---


Thanks,

Thomas



> Dead code in PrepRequestProcessor catch Exception block
> ---
>
> Key: ZOOKEEPER-1246
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1246
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
>Priority: Blocker
> Fix For: 3.4.0, 3.5.0
>
> Attachments: ZOOKEEPER-1246.patch, ZOOKEEPER-1246.patch, 
> ZOOKEEPER-1246.patch, ZOOKEEPER-1246.patch, ZOOKEEPER-1246_trunk.patch, 
> ZOOKEEPER-1246_trunk.patch
>
>
> This is a regression introduced by ZOOKEEPER-965 (multi transactions). The 
> catch(Exception e) block in PrepRequestProcessor.pRequest contains an if 
> block with condition request.getHdr() != null. This condition will always 
> evaluate to false since the changes in ZOOKEEPER-965.
> This is caused by a change in sequence: Before ZK-965, the txnHeader was set 
> _before_ the deserialization of the request. Afterwards the deserialization 
> happens before request.setHdr is set. So the following RequestProcessors 
> won't see the request as a failed one but as a Read request, since it doesn't 
> have a hdr set.
> Notes:
> - it is very bad practice to catch Exception. The block should rather catch 
> IOException
> - The check whether the TxnHeader is set in the request is used at several 
> places to see whether the request is a read or write request. It isn't 
> obvious for a newby, what it means whether a request has a hdr set or not.
> - at the beginning of pRequest the hdr and txn of request are set to null. 
> However there is no chance that these fields could ever not be null at this 
> point. The code however suggests that this could be the case. There should 
> rather be an assertion that confirms that these fields are indeed null. The 
> practice of doing things "just in case", even if there is no chance that this 
> case could happen, is a very stinky code smell and means that the code isn't 
> understandable or trustworthy.
> - The multi transaction switch case block in pRequest is very hard to read, 
> because it missuses the request.{hdr|txn} fields as local variables.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-50) NullPointException at LedgerDescriptor#cmpMasterKey

2011-10-31 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13140362#comment-13140362
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-50:
-


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

Review request for bookkeeper.


Summary
---

save master key in header part of ledger index file.

so we can load master key when opening an existed ledger index file to avoid 
that master key is null.


This addresses bug BOOKKEEPER-50.
http://issues.apache.org/jira/browse/BOOKKEEPER-50


Diffs
-

  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
 1195369 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java
 1195369 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java
 1195369 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieReadAfterBookieRestartTest.java
 PRE-CREATION 

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


Testing
---


Thanks,

Sijie



> NullPointException at LedgerDescriptor#cmpMasterKey
> ---
>
> Key: BOOKKEEPER-50
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-50
> Project: Bookkeeper
>  Issue Type: Bug
>  Components: bookkeeper-server
>Affects Versions: 3.4.0
>Reporter: xulei
> Attachments: BookieReadAfterBookieRestartTest.java, 
> bookkeeper-50.patch
>
>
> the LedgerDescriptor will be created when it is missed in LedgerCache. 
> NullPointException will be thrown out in the following case:
> 1. The ledger descriptor is created and cached to LedgerCache because of a 
> readEntry operation in bookie. The ledger descriptor was created without 
> setting master key (we don't know master key in a read request)
> 2. An addEntry is sent after 1 . since the ledger descriptor has been cached, 
> so addEntry will use it to compare master key. then NullPointException is 
> thrown out.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1217) Remove unnecessary MissingSessionException in ZooKeeperServer

2011-10-29 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1217:
--


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

Review request for zookeeper.


Summary
---



> Remove unnecessary MissingSessionException in ZooKeeperServer
> -
>
> Key: ZOOKEEPER-1217
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1217
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
>Priority: Minor
> Attachments: ZOOKEEPER-1217.patch, ZOOKEEPER-1217.patch, 
> ZOOKEEPER-1217.patch, ZOOKEEPER-1217.patch, ZOOKEEPER-1217.patch
>
>
> MissingSessionException in only thrown and catched once inside this class and 
> can as well be replaced by a boolean return value.
> While I'm at it: The method throwing this Exception makes more sense to be 
> inlined in the one place from where it is called.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1259) central mapping from type to txn record class

2011-10-29 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1259:
--


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

Review request for zookeeper.


Summary
---



> central mapping from type to txn record class
> -
>
> Key: ZOOKEEPER-1259
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1259
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
> Attachments: ZOOKEEPER-1259.patch, ZOOKEEPER-1259.patch, 
> ZOOKEEPER-1259.patch, ZOOKEEPER-1259.patch
>
>
> There are two places where large switch statements do nothing else to get the 
> correct Record class accorging to a txn type. Provided a static map in 
> SerializeUtils from type to Class and a method to retrieve 
> a new txn Record instance for a type.
> Code size reduced by 28 lines.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-101) Add Fencing to Bookkeeper

2011-10-28 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138567#comment-13138567
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-101:
--


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

Review request for bookkeeper.


Summary
---

BookKeeper is designed for use as a Write ahead log. In systems with a 
primary/backup architecture, the primary will write state updates to the WAL. 
If the primary dies the backup comes online, reads the WAL to get the latest 
state and starts serving requests. However, if the primary was only partitioned 
from the network, or stuck in a long GC, a split brain occurs. Both primary and 
backup can service client requests.

Fencing(http://en.wikipedia.org/wiki/Fencing_%28computing%29) ensures that this 
cannot happen. With fencing, the backup can close the WAL of the primary, and 
cause any subsequent attempt by the primary to write to the WAL to give an 
error.


This addresses bug BOOKKEEPER-101.
https://issues.apache.org/jira/browse/BOOKKEEPER-101


Diffs
-

  bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java 
ab6 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieException.java
 292617e 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java
 024cac3 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
a1fbab7 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 b3eb5b9 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerCreateOp.java
 6f72e47 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
8c2a54f 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 328c7ca 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java 
a68856c 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
 7465c52 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java 
eddd760 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java 
385b16c 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadLastConfirmedOp.java
 c2d4cee 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClient.java 
d70ae27 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtocol.java 
873dafe 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java 
eea81b9 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 2cd4de8 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerCacheTest.java
 07639aa 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestProtoVersions.java
 f6cd8c9 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
 97dc2ab 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieRecoveryTest.java
 ac54d9a 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ConcurrentLedgerTest.java
 ebb17d2 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LoopbackClient.java 
85822bf 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/TestFencing.java 
PRE-CREATION 

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


Testing
---


Thanks,

Ivan



> Add Fencing to Bookkeeper
> -
>
> Key: BOOKKEEPER-101
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-101
> Project: Bookkeeper
>  Issue Type: New Feature
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.0.0
>
> Attachments: BOOKKEEPER-101.diff
>
>
> BookKeeper is designed for use as a Write ahead log. In systems with a 
> primary/backup architecture, the primary will write state updates to the WAL. 
> If the primary dies the backup comes online, reads the WAL to get the latest 
> state and starts serving requests. However, if the primary was only 
> partitioned from the network, or stuck in a long GC, a split brain occurs. 
> Both primary and backup can service client requests. 
> Fencing(http://en.wikipedia.org/wiki/Fencing_%28computing%29) ensures that 
> this cannot happen. With fencing, the backup can close the WAL of the 
> primary, and cause any subsequent attempt by the primary to write to the WAL 
> to give an error. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information

[jira] [Commented] (BOOKKEEPER-83) Added versioning and flags to the bookie protocol

2011-10-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13137029#comment-13137029
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-83:
-


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

Ship it!


There is just a tiny typo that we could consider doing. We can even fix it upon 
commit instead of making you generate a new patch.


bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java


We could fix the typo here... :-)


- fpj


On 2011-10-17 14:02:54, Ivan Kelly wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2401/
bq.  ---
bq.  
bq.  (Updated 2011-10-17 14:02:54)
bq.  
bq.  
bq.  Review request for bookkeeper, fpj and Benjamin Reed.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  There is no concept of versions in the BookKeeper protocol at the moment. 
This patch addresses that. 
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-83.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-83
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java 
eb76a1d 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtocol.java 
63084a8 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java 
1ff135b 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/NIOServerFactory.java
 b38604a 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
 9141067 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestProtoVersions.java
 PRE-CREATION 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
 4cfaf30 
bq.  
bq.  Diff: https://reviews.apache.org/r/2401/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Ivan
bq.  
bq.



> Added versioning and flags to the bookie protocol
> -
>
> Key: BOOKKEEPER-83
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-83
> Project: Bookkeeper
>  Issue Type: Improvement
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.0.0
>
> Attachments: BOOKKEEPER-83.diff
>
>
> There is no concept of versions in the BookKeeper protocol at the moment. 
> This patch addresses that. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-71) hedwig c++ client does not build.

2011-10-26 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13136092#comment-13136092
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-71:
-


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

(Updated 2011-10-26 16:38:06.854585)


Review request for bookkeeper.


Changes
---

Implemented the check for boost TR1 if builtin is not found.


Summary
---

The path to the protobuf spec is wrong in lib/Makefile.am.

I also cleaned up the tests, and made it use the provided scripts to stop and 
start bookkeeper and hedwig daemons.


This addresses bug BOOKKEEPER-71.
https://issues.apache.org/jira/browse/BOOKKEEPER-71


Diffs (updated)
-

  hedwig-client/src/main/cpp/README PRE-CREATION 
  hedwig-client/src/main/cpp/config.h.in 19266b3 
  hedwig-client/src/main/cpp/lib/Makefile.am 9a53138 
  hedwig-client/src/main/cpp/scripts/network-delays.sh f566098 
  hedwig-client/src/main/cpp/scripts/server-control.sh fa7f1c1 
  hedwig-client/src/main/cpp/scripts/tester.sh c288076 
  hedwig-client/src/main/cpp/test/Makefile.am 84db87f 
  hedwig-client/src/main/cpp/test/main.cpp ef9190e 
  hedwig-client/src/main/cpp/test/publishtest.cpp 95599d7 
  hedwig-client/src/main/cpp/test/pubsubtest.cpp c0feade 
  hedwig-client/src/main/cpp/test/servercontrol.h cac09e6 
  hedwig-client/src/main/cpp/test/servercontrol.cpp 49696b7 
  hedwig-client/src/main/cpp/test/subscribetest.cpp 41da339 
  hedwig-client/src/main/cpp/test/util.h 2d92244 
  hedwig-server/src/test/java/org/apache/hedwig/ServerControl.java be64f93 
  hedwig-server/src/test/java/org/apache/hedwig/ServerControlDaemon.java 
14de705 

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


Testing
---


Thanks,

Ivan



> hedwig c++ client does not build. 
> --
>
> Key: BOOKKEEPER-71
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-71
> Project: Bookkeeper
>  Issue Type: Bug
>Affects Versions: 3.4.0
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.0.0
>
> Attachments: BOOKKEEPER-71.diff, BOOKKEEPER-71.diff
>
>
> The path to the protobuf spec is wrong in lib/Makefile.am. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-77) Add a console client for hedwig

2011-10-26 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135872#comment-13135872
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-77:
-


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


This is very nice :) 

I have a few general comments. 
- Firstly, I dont think it should be a separate package. I would be inclined to 
include it in hedwig-server, and put the a cli option in 
hedwig-server/bin/hedwig. Its an admin tool really, so it should go with the 
server.
- Is it possible to intergrate some help with the actual commands. I don't know 
about jline, but when I've done cli interfaces in the past it's always been 
possible to attach the help to the actual commands. 



http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/src/main/java/org/apache/hedwig/client/console/HedwigConsole.java


Could you add a "show subscriptions" here.



http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/src/main/java/org/apache/hedwig/client/console/HedwigConsole.java


zkquorums should be zkquorum, or even better zkserver. you only need to 
connect to one server, not a quorum and it's unlikely you'll change zkserver 
during the lifetime of the client.



http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/src/main/java/org/apache/hedwig/client/console/HedwigConsole.java


These keys should be defined as final static Strings rather than using the 
actual string for each option.


- Ivan


On 2011-10-26 10:54:04, Sijie Guo wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2570/
bq.  ---
bq.  
bq.  (Updated 2011-10-26 10:54:04)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  using zookeeper client to read metadata, use hedwig client to interact 
with hedwig, use bookkeeper client to openLedgerNoRecovery to read messages to 
implement a hedwig console
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-77.
bq.  http://issues.apache.org/jira/browse/BOOKKEEPER-77
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/bin/hedwig_console
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/conf/hedwig-env.sh
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/conf/hedwig_console.conf
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/pom.xml
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/src/main/java/org/apache/hedwig/client/console/HedwigConsole.java
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/src/main/java/org/apache/hedwig/client/console/JLineHedwigCompletor.java
 PRE-CREATION 
bq.
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/src/main/java/org/apache/hedwig/client/console/ReadTopic.java
 PRE-CREATION 
bq.http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/pom.xml 
1188996 
bq.  
bq.  Diff: https://reviews.apache.org/r/2570/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sijie
bq.  
bq.



> Add a console client for hedwig
> ---
>
> Key: BOOKKEEPER-77
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-77
> Project: Bookkeeper
>  Issue Type: New Feature
>  Components: hedwig-client
>Reporter: Sijie Guo
> Attachments: bookkeeper-77-draft.patch, hedwig-console.tar.gz
>
>
> implement a console client to use/admin hedwig system.
> Usage : hedwig_console [options] COMMAND [argument ...]
> (if no COMMAND specified, hedwig_console will enter interactive mode.)
> OPTIONS:
> {quote}
>--zkquorumsthe quorum list of zookeeper cluster
>--zktimeouttimeout of zookeeper client
>--zk_hedwig_prefix the prefix of zookeeper path to store hedwig 
> metadata
>--region   which region of hedwig to connect
>--consume_interval the consume interval of hub server
> {quote}
> COMMANDS:
> * pub  
> ** Publish  to the specified . 
> * sub   [mode]
> ** Subscribe the specified  as subscriber . (NOTE: only 
> run in INTERACT

[jira] [Commented] (BOOKKEEPER-77) Add a console client for hedwig

2011-10-26 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135859#comment-13135859
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-77:
-


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

Review request for bookkeeper.


Summary
---

using zookeeper client to read metadata, use hedwig client to interact with 
hedwig, use bookkeeper client to openLedgerNoRecovery to read messages to 
implement a hedwig console


This addresses bug BOOKKEEPER-77.
http://issues.apache.org/jira/browse/BOOKKEEPER-77


Diffs
-

  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/bin/hedwig_console
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/conf/hedwig-env.sh
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/conf/hedwig_console.conf
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/pom.xml
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/src/main/java/org/apache/hedwig/client/console/HedwigConsole.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/src/main/java/org/apache/hedwig/client/console/JLineHedwigCompletor.java
 PRE-CREATION 
  
http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/hedwig-console/src/main/java/org/apache/hedwig/client/console/ReadTopic.java
 PRE-CREATION 
  http://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk/pom.xml 1188996 

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


Testing
---


Thanks,

Sijie



> Add a console client for hedwig
> ---
>
> Key: BOOKKEEPER-77
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-77
> Project: Bookkeeper
>  Issue Type: New Feature
>  Components: hedwig-client
>Reporter: Sijie Guo
> Attachments: bookkeeper-77-draft.patch, hedwig-console.tar.gz
>
>
> implement a console client to use/admin hedwig system.
> Usage : hedwig_console [options] COMMAND [argument ...]
> (if no COMMAND specified, hedwig_console will enter interactive mode.)
> OPTIONS:
> {quote}
>--zkquorumsthe quorum list of zookeeper cluster
>--zktimeouttimeout of zookeeper client
>--zk_hedwig_prefix the prefix of zookeeper path to store hedwig 
> metadata
>--region   which region of hedwig to connect
>--consume_interval the consume interval of hub server
> {quote}
> COMMANDS:
> * pub  
> ** Publish  to the specified . 
> * sub   [mode]
> ** Subscribe the specified  as subscriber . (NOTE: only 
> run in INTERACTIVE mode now) 
> ** mode: subscription mode. available values are 0, 1, 2.
> *** 0 = CREATE : create the subscription if not subscription before.
> *** 1 = ATTACH (default) : attach the subscription
> *** 2 = CREATE_OR_ATTACH : if the subscription is not existed, create the 
> subscription then attach. 
> * closesub  
> ** Close subscription of subscriber . (NOTE: it just close the 
> subscription connection and do cleanup work in client-side, without REMOVING 
> subscription state from server side) 
> * unsub  
> ** Remove subscription state of subscriber . the subscription 
> state of subscriber  will be removed from server side. 
> * consume   
> ** Move the subscription ptr of subscriber  from ptr to ptr + 
> num_messages_to_consume. 
> * consumeto   
> ** Move the subscription ptr of subscriber  from ptr to 
> . 
> ** NOTE: consume*/*consumeto just sent consume request to hub server and hub 
> server move the subscription ptr in its memory. Hub server lazily persists 
> the subscription ptr to zookeeper. the default persist interval in hub server 
> is 50 messages. so use DESCRIBE TOPIC to show subscription, the subscription 
> ptr might be not changed. 
> * pubsub
> ** A test command to test healthy of hedwig cluster. 
> *# sub  as subscriber _ .
> *# subscriber _ will wait a message until 
>  secs.
> *# publish a message _ to topic  .
> *# when subscriber  receive the message, it will check 
> the message is the published message
> *# received message or timeout, subscriber  will 
> unsubscribe the 
> *# quit
> {quote}
>   [hedwig: (standalone) 7] pubsub t test 10 test_message
>   Starting PUBSUB test ...
>   Sub topic t, subscriber id test-1319602021044
>   Pub topic t : test_message-1319602021044
>   Received message : test_message-1319602021044
>   PUBSUB SUCCESS. TIME: 43 MS
>   SUCCESS. Finished 0.058 s
> {quote}  
> * show hubs
> ** list all available hub serve

[jira] [Commented] (BOOKKEEPER-89) Bookkeeper API changes for initial Bookkeeper release

2011-10-26 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135835#comment-13135835
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-89:
-


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

(Updated 2011-10-26 09:49:18.492814)


Review request for bookkeeper.


Changes
---

Addressed comments. Removed passwd->key change. Added BookKeeperAdmin and moved 
BookKeeperTools back to tools package.


Summary
---

Changes are as follows.

BookKeeper#createLedger, parameter is named passwd, "Key" used in LedgerHandle 
api
BookKeeper#getBookieClient shouldn't be public
BookKeeper#createComplete shouldn't be public
BookKeeper#openComplete shouldn't be public
BookKeeper#deleteComplete shouldn't be public
BookKeeper#halt could be changed to close(), should throw a BKException

LedgerHandle#getLedgerKey passwd is used in BookKeeper, should possibly be 
private
LedgerHandle#getLedgerMetadata shouldn't be public
LedgerHandle#getDigestManager shouldn't be public
LedgerHandle#getDistributionSchedule shouldn't be public
LedgerHandle#writeLedgerConfig shouldn't be public
LedgerHandle#addEntry should return void, errors should go in an Exception
LedgerHandle#readComplete should not be public
LedgerHandle#addComplete should not be public
LedgerHandle#readLastConfirmedCompelte should not be public
LedgerHandle#closeComplete should not be public

ASyncCallback#RecoverCallback shouldn't be public


This addresses bug BOOKKEEPER-89.
https://issues.apache.org/jira/browse/BOOKKEEPER-89


Diffs (updated)
-

  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/AsyncCallback.java 
6421460 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
6af43ae 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
 PRE-CREATION 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/DigestManager.java 
d4af3fa 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/DistributionSchedule.java
 78aaa15 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
959df73 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/MacDigestManager.java
 1131652 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/BookKeeperTools.java
 94e444c 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTestClient.java
 dfc63d7 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerCacheTest.java
 PRE-CREATION 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java 
224c796 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieFailureTest.java
 82483f3 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieReadWriteTest.java
 56331ef 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieRecoveryTest.java
 f933ba1 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LedgerCacheTest.java 
3a78507 
  
hedwig-server/src/main/java/org/apache/hedwig/server/benchmark/BookkeeperBenchmark.java
 a934985 
  hedwig-server/src/main/java/org/apache/hedwig/server/netty/PubSubServer.java 
726341d 
  
hedwig-server/src/test/java/org/apache/hedwig/server/persistence/BookKeeperTestBase.java
 b918d97 
  pom.xml 2392db5 

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


Testing
---


Thanks,

Ivan



> Bookkeeper API changes for initial Bookkeeper release
> -
>
> Key: BOOKKEEPER-89
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-89
> Project: Bookkeeper
>  Issue Type: Improvement
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.0.0
>
> Attachments: BOOKKEEPER-89.diff, BOOKKEEPER-89.diff, 
> BOOKKEEPER-89.diff
>
>
> Changes are as follows.
> BookKeeper#createLedger, parameter is named passwd, "Key" used in 
> LedgerHandle api
> BookKeeper#getBookieClient shouldn't be public
> BookKeeper#createComplete shouldn't be public
> BookKeeper#openComplete shouldn't be public
> BookKeeper#deleteComplete shouldn't be public
> BookKeeper#halt could be changed to close(), should throw a BKException
> LedgerHandle#getLedgerKey passwd is used in BookKeeper, should possibly be 
> private
> LedgerHandle#getLedgerMetadata shouldn't be public
> LedgerHandle#getDigestManager shouldn't be public
> LedgerHandle#getDistributionSchedule shouldn't be public
> LedgerHandle#writeLedgerConfig shouldn't be public
> LedgerHandle#addEntry should return void, errors should go in an Exception
> LedgerHandle#readComplete should not be public
> LedgerHandle#addComplete 

[jira] [Commented] (BOOKKEEPER-71) hedwig c++ client does not build.

2011-10-26 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135806#comment-13135806
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-71:
-



bq.  On 2011-10-26 07:12:07, Sijie Guo wrote:
bq.  > most is ok for me.
bq.  > 
bq.  > there are two suggestions:
bq.  > 
bq.  > 1) separate cppunit DEPS. since only test need cppunit, library doesn't.
bq.  > 
bq.  > configure.ac
bq.  > 
bq.  > -PKG_CHECK_MODULES([DEPS], [liblog4cxx protobuf cppunit])
bq.  > +PKG_CHECK_MODULES([DEPS], [liglog4cxx protobuf])
bq.  > +PKG_CHECK_MODULES([TESTDEPS], [cppunit])
bq.  > 
bq.  > add TESTDEPS_LIBS only in test/Makefile.am .
bq.  > 
bq.  > 2) cpp client can't build in gcc 3.4.0, since there is no tr1 library.
bq.  > 
bq.  > I suggested that change the headers which using tr1 libary as below.
bq.  > 
bq.  > +#ifdef HAVE_TR1
bq.  > #include 
bq.  > +#else
bq.  > +#include 
bq.  > +#endif
bq.  > 
bq.  > then checking tr1 library in configure.ac
bq.  > 
bq.  > +AC_CHECK_HEADER(tr1/unordered_map, [AC_DEFINE([HAVE_TR1],[],["Have 
tr1"])],[])

I'll fix these and upload a new patch. Thanks for the review :)


- Ivan


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


On 2011-10-19 14:44:23, Ivan Kelly wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2446/
bq.  ---
bq.  
bq.  (Updated 2011-10-19 14:44:23)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  The path to the protobuf spec is wrong in lib/Makefile.am.
bq.  
bq.  I also cleaned up the tests, and made it use the provided scripts to stop 
and start bookkeeper and hedwig daemons.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-71.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-71
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.hedwig-server/src/test/java/org/apache/hedwig/ServerControlDaemon.java 
14de705 
bq.hedwig-client/src/main/cpp/test/util.h 2d92244 
bq.hedwig-server/src/test/java/org/apache/hedwig/ServerControl.java be64f93 
bq.hedwig-client/src/main/cpp/test/subscribetest.cpp 41da339 
bq.hedwig-client/src/main/cpp/test/servercontrol.cpp 49696b7 
bq.hedwig-client/src/main/cpp/test/servercontrol.h cac09e6 
bq.hedwig-client/src/main/cpp/test/pubsubtest.cpp c0feade 
bq.hedwig-client/src/main/cpp/test/main.cpp ef9190e 
bq.hedwig-client/src/main/cpp/test/publishtest.cpp 95599d7 
bq.hedwig-client/src/main/cpp/test/Makefile.am 84db87f 
bq.hedwig-client/src/main/cpp/scripts/tester.sh c288076 
bq.hedwig-client/src/main/cpp/scripts/network-delays.sh f566098 
bq.hedwig-client/src/main/cpp/scripts/server-control.sh fa7f1c1 
bq.hedwig-client/src/main/cpp/lib/Makefile.am 9a53138 
bq.hedwig-client/src/main/cpp/README PRE-CREATION 
bq.hedwig-client/src/main/cpp/config.h.in 19266b3 
bq.  
bq.  Diff: https://reviews.apache.org/r/2446/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Ivan
bq.  
bq.



> hedwig c++ client does not build. 
> --
>
> Key: BOOKKEEPER-71
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-71
> Project: Bookkeeper
>  Issue Type: Bug
>Affects Versions: 3.4.0
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.0.0
>
> Attachments: BOOKKEEPER-71.diff
>
>
> The path to the protobuf spec is wrong in lib/Makefile.am. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-89) Bookkeeper API changes for initial Bookkeeper release

2011-10-26 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135805#comment-13135805
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-89:
-



bq.  On 2011-10-26 00:03:20, fpj wrote:
bq.  > 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java, 
line 187
bq.  > 
bq.  >
bq.  > We differentiate between password and ledger key in BookKeeper. The 
password is the string that the application passes to bookkeeper when creating 
a ledger. The password is used to generate the ledger key (check the 
constructor of ledger handle) and the mac key when MAC is being used.

Ah, I'll change this back then and update the javadoc for 
LedgerHandle#getLedgerKey


bq.  On 2011-10-26 00:03:20, fpj wrote:
bq.  > 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperTools.java,
 line 547
bq.  > 
bq.  >
bq.  > Is this a tab?

Nope, it's line which contains only whitespace, in this case spaces. Its 
considered bad style, so thats probably why it's on show here.


bq.  On 2011-10-26 00:03:20, fpj wrote:
bq.  > 
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerCacheTest.java,
 line 22
bq.  > 
bq.  >
bq.  > Why are we moving this test to a different package?

It accesses MacDigestManager, which is now package private. In general I think 
it's better to have tests in the same package as the code they're testing, so 
that they can poke at internals without having to open them to the world.


bq.  On 2011-10-26 00:03:20, fpj wrote:
bq.  > 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperTools.java,
 line 1
bq.  > 
bq.  >
bq.  > I understand that these tools need visibility to some internal 
methods of the client package, but this class is not really part of the 
bookkeeper client. It is instead a tool for things like bookie recovery.
bq.  > 
bq.  > I was wondering if we should at least have it in a separate folder 
to avoid confusion.

It's a tricky one. While it is toollike, it reaches into the internals of the 
client code. Really a tool should just use the public api itself. How about 
this? I'll move the BookKeeperTools back to tools, and put the main() in it, 
but then I'll create a class BookKeeperAdmin which acts as an admin client and 
implements the code that reaches into the internals. Then BookKeeperTools can 
use the public methods exposed by BookKeeperAdmin.


- Ivan


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


On 2011-10-24 14:53:25, Ivan Kelly wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2543/
bq.  ---
bq.  
bq.  (Updated 2011-10-24 14:53:25)
bq.  
bq.  
bq.  Review request for bookkeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  Changes are as follows.
bq.  
bq.  BookKeeper#createLedger, parameter is named passwd, "Key" used in 
LedgerHandle api
bq.  BookKeeper#getBookieClient shouldn't be public
bq.  BookKeeper#createComplete shouldn't be public
bq.  BookKeeper#openComplete shouldn't be public
bq.  BookKeeper#deleteComplete shouldn't be public
bq.  BookKeeper#halt could be changed to close(), should throw a BKException
bq.  
bq.  LedgerHandle#getLedgerKey passwd is used in BookKeeper, should possibly be 
private
bq.  LedgerHandle#getLedgerMetadata shouldn't be public
bq.  LedgerHandle#getDigestManager shouldn't be public
bq.  LedgerHandle#getDistributionSchedule shouldn't be public
bq.  LedgerHandle#writeLedgerConfig shouldn't be public
bq.  LedgerHandle#addEntry should return void, errors should go in an Exception
bq.  LedgerHandle#readComplete should not be public
bq.  LedgerHandle#addComplete should not be public
bq.  LedgerHandle#readLastConfirmedCompelte should not be public
bq.  LedgerHandle#closeComplete should not be public
bq.  
bq.  ASyncCallback#RecoverCallback shouldn't be public
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-89.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-89
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/AsyncCallback.java 
6421460 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
6af43ae 
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperTools.

[jira] [Commented] (ZOOKEEPER-1199) Make OpCode an enum

2011-10-25 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1199:
--


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

(Updated 2011-10-25 16:51:47.887909)


Review request for zookeeper.


Changes
---

centralized the logic to deserialize requests in PrepRequestProcessor and 
FinalRequestProcessor


Summary
---

There are four places in the ZK code, that mapped OpCodes to string 
representations. One of them wasn't used anymore, two others represented the 
same mapping and the last one provided four letter representations. As you can 
see in the definition of the OpCode enum, there were strings missing for some 
newer added OpCodes. You might want to say, which strings I should put in?
I spotted an inconsistency in server/quorum/ReadOnlyRequestProcessor.java. 
There's a switch checking for a write operation which does not include multi, 
start- and stopsession. What is intended there?


This addresses bug ZOOKEEPER-1199.
https://issues.apache.org/jira/browse/ZOOKEEPER-1199


Diffs (updated)
-

  src/contrib/loggraph/src/java/org/apache/zookeeper/graph/TxnLogSource.java 
809c455 
  src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
  src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 9216751 
  src/java/main/org/apache/zookeeper/MultiResponse.java 97d4c7d 
  src/java/main/org/apache/zookeeper/MultiTransactionRecord.java af3b58d 
  src/java/main/org/apache/zookeeper/Op.java 3c3db2e 
  src/java/main/org/apache/zookeeper/OpResult.java 514318f 
  src/java/main/org/apache/zookeeper/ZooDefs.java c7f1b20 
  src/java/main/org/apache/zookeeper/ZooKeeper.java e82eaa0 
  src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 722538e 
  src/java/main/org/apache/zookeeper/server/DataTree.java 757a572 
  src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 336827a 
  src/java/main/org/apache/zookeeper/server/LogFormatter.java 9be3fe3 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java e44c65e 
  src/java/main/org/apache/zookeeper/server/Request.java c6a2249 
  src/java/main/org/apache/zookeeper/server/ServerCnxn.java 6dd509b 
  src/java/main/org/apache/zookeeper/server/TraceFormatter.java 60d1cc7 
  src/java/main/org/apache/zookeeper/server/ZKDatabase.java 2842803 
  src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 9ccaa0e 
  src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java 
938cf19 
  src/java/main/org/apache/zookeeper/server/quorum/CommitProcessor.java 2f77e9d 
  
src/java/main/org/apache/zookeeper/server/quorum/FollowerRequestProcessor.java 
a1c8ce2 
  src/java/main/org/apache/zookeeper/server/quorum/FollowerZooKeeperServer.java 
27bf496 
  src/java/main/org/apache/zookeeper/server/quorum/Learner.java a97a543 
  src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java 2d0714f 
  src/java/main/org/apache/zookeeper/server/quorum/LearnerSyncRequest.java 
bfbc9a8 
  src/java/main/org/apache/zookeeper/server/quorum/Observer.java 8e77ac8 
  
src/java/main/org/apache/zookeeper/server/quorum/ObserverRequestProcessor.java 
e94414f 
  
src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyRequestProcessor.java 
82d1468 
  src/java/main/org/apache/zookeeper/server/util/SerializeUtils.java f9647c4 
  src/java/test/org/apache/zookeeper/common/OpCodeTest.java PRE-CREATION 
  src/java/test/org/apache/zookeeper/server/quorum/LearnerTest.java e37cbec 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java 
38a3c57 
  src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java a134210 

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


Testing
---


Thanks,

Thomas



> Make OpCode an enum
> ---
>
> Key: ZOOKEEPER-1199
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1199
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
> Attachments: ZOOKEEPER-1199.patch, ZOOKEEPER-1199.patch, 
> ZOOKEEPER-1199.patch, ZOOKEEPER-1199.patch, ZOOKEEPER-1199.patch, 
> ZOOKEEPER-1199.patch
>
>
> ZooDefs.OpCode is an interface with integer constants. Changing this to an 
> enum provides safety. See "Item 30: Use enums instead of int constants" in 
> Effective Java.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1199) Make OpCode an enum

2011-10-24 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1199:
--


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

(Updated 2011-10-24 17:44:19.879262)


Review request for zookeeper.


Summary
---

There are four places in the ZK code, that mapped OpCodes to string 
representations. One of them wasn't used anymore, two others represented the 
same mapping and the last one provided four letter representations. As you can 
see in the definition of the OpCode enum, there were strings missing for some 
newer added OpCodes. You might want to say, which strings I should put in?
I spotted an inconsistency in server/quorum/ReadOnlyRequestProcessor.java. 
There's a switch checking for a write operation which does not include multi, 
start- and stopsession. What is intended there?


This addresses bug ZOOKEEPER-1199.
https://issues.apache.org/jira/browse/ZOOKEEPER-1199


Diffs (updated)
-

  src/contrib/loggraph/src/java/org/apache/zookeeper/graph/TxnLogSource.java 
809c455 
  src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
  src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 9216751 
  src/java/main/org/apache/zookeeper/MultiResponse.java 97d4c7d 
  src/java/main/org/apache/zookeeper/MultiTransactionRecord.java af3b58d 
  src/java/main/org/apache/zookeeper/Op.java 3c3db2e 
  src/java/main/org/apache/zookeeper/OpResult.java 514318f 
  src/java/main/org/apache/zookeeper/ZooDefs.java c7f1b20 
  src/java/main/org/apache/zookeeper/ZooKeeper.java e82eaa0 
  src/java/main/org/apache/zookeeper/client/ZooKeeperSaslClient.java 722538e 
  src/java/main/org/apache/zookeeper/server/DataTree.java 757a572 
  src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 336827a 
  src/java/main/org/apache/zookeeper/server/LogFormatter.java 9be3fe3 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java e44c65e 
  src/java/main/org/apache/zookeeper/server/Request.java c6a2249 
  src/java/main/org/apache/zookeeper/server/ServerCnxn.java 6dd509b 
  src/java/main/org/apache/zookeeper/server/TraceFormatter.java 60d1cc7 
  src/java/main/org/apache/zookeeper/server/ZKDatabase.java 2842803 
  src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 9ccaa0e 
  src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java 
938cf19 
  src/java/main/org/apache/zookeeper/server/quorum/CommitProcessor.java 2f77e9d 
  
src/java/main/org/apache/zookeeper/server/quorum/FollowerRequestProcessor.java 
a1c8ce2 
  src/java/main/org/apache/zookeeper/server/quorum/FollowerZooKeeperServer.java 
27bf496 
  src/java/main/org/apache/zookeeper/server/quorum/Learner.java a97a543 
  src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java c518792 
  src/java/main/org/apache/zookeeper/server/quorum/LearnerSyncRequest.java 
bfbc9a8 
  src/java/main/org/apache/zookeeper/server/quorum/Observer.java 8e77ac8 
  
src/java/main/org/apache/zookeeper/server/quorum/ObserverRequestProcessor.java 
e94414f 
  
src/java/main/org/apache/zookeeper/server/quorum/ReadOnlyRequestProcessor.java 
82d1468 
  src/java/main/org/apache/zookeeper/server/util/SerializeUtils.java f9647c4 
  src/java/test/org/apache/zookeeper/common/OpCodeTest.java PRE-CREATION 
  src/java/test/org/apache/zookeeper/server/quorum/LearnerTest.java e37cbec 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java 
7a5a75b 
  src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java a134210 

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


Testing
---


Thanks,

Thomas



> Make OpCode an enum
> ---
>
> Key: ZOOKEEPER-1199
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1199
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
> Attachments: ZOOKEEPER-1199.patch, ZOOKEEPER-1199.patch, 
> ZOOKEEPER-1199.patch
>
>
> ZooDefs.OpCode is an interface with integer constants. Changing this to an 
> enum provides safety. See "Item 30: Use enums instead of int constants" in 
> Effective Java.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1216) Fix more eclipse compiler warnings, also in Tests

2011-10-24 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1216:
--


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

(Updated 2011-10-24 16:59:05.682064)


Review request for zookeeper.


Summary
---

ZOOKEEPER-1216 Fix more eclipse compiler warnings, also in Tests

I did set up a new work environment for a presentation of 
Eclipse+EGit+Gerrit+Jenkins and found more warnings that were ignored on my 
machine.
Warnings are now down to 5! So no excuses to introduce new ones!

Fixed warnings:

removed unused imports
removed unused variables / methods
added missing generics
added ignore warnings for calls to deprecated code in tests


This addresses bug ZOOKEEPER-1216.
https://issues.apache.org/jira/browse/ZOOKEEPER-1216


Diffs (updated)
-

  src/java/main/org/apache/zookeeper/JLineZNodeCompletor.java 02b0645 
  src/java/main/org/apache/zookeeper/Login.java 294801a 
  src/java/main/org/apache/zookeeper/ZooKeeperMain.java 98784d1 
  src/java/main/org/apache/zookeeper/server/ByteBufferOutputStream.java a2fcc95 
  src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java 1511ddb 
  src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java d1ce278 
  src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java c518792 
  src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java e2e24aa 
  src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java 13541e8 
  src/java/systest/org/apache/zookeeper/test/system/BaseSysTest.java 575a743 
  src/java/systest/org/apache/zookeeper/test/system/GenerateLoad.java ce239f9 
  src/java/systest/org/apache/zookeeper/test/system/InstanceContainer.java 
b22e078 
  src/java/systest/org/apache/zookeeper/test/system/InstanceManager.java 
93c51b8 
  src/java/systest/org/apache/zookeeper/test/system/SimpleClient.java 44f113a 
  src/java/test/org/apache/zookeeper/TestableZooKeeper.java f8344b6 
  src/java/test/org/apache/zookeeper/ZKTestCase.java b721cfc 
  src/java/test/org/apache/zookeeper/server/InvalidSnapshotTest.java 738f665 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java 
7a5a75b 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerTestBase.java 
31d32f4 
  src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java a6a86d0 
  src/java/test/org/apache/zookeeper/test/ACLRootTest.java 7307cbf 
  src/java/test/org/apache/zookeeper/test/ClientTest.java e99d8df 
  src/java/test/org/apache/zookeeper/test/CreateModeTest.java a3b838a 
  src/java/test/org/apache/zookeeper/test/EventTypeTest.java e6a9826 
  src/java/test/org/apache/zookeeper/test/FLELostMessageTest.java 81ea12b 
  src/java/test/org/apache/zookeeper/test/FLETest.java b1b8e82 
  src/java/test/org/apache/zookeeper/test/FLEZeroWeightTest.java 1b6ab70 
  src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java 
5a9c759 
  src/java/test/org/apache/zookeeper/test/KeeperStateTest.java 55dc852 
  src/java/test/org/apache/zookeeper/test/LENonTerminateTest.java 21fed78 
  src/java/test/org/apache/zookeeper/test/LETest.java 78d68f0 
  src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java 2e0dcd9 
  src/java/test/org/apache/zookeeper/test/ObserverHierarchicalQuorumTest.java 
9d373fc 
  src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java bef1a33 
  src/java/test/org/apache/zookeeper/test/QuorumTest.java c9c3b9a 
  src/java/test/org/apache/zookeeper/test/RepeatStartupTest.java 3421004 
  src/java/test/org/apache/zookeeper/test/SessionTest.java df9bd54 
  src/java/test/org/apache/zookeeper/test/WatcherTest.java fc3eccd 
  src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java fbf09b3 

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


Testing
---


Thanks,

Thomas



> Fix more eclipse compiler warnings, also in Tests
> -
>
> Key: ZOOKEEPER-1216
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1216
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
>Priority: Minor
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-1216.patch, ZOOKEEPER-1216.patch, 
> ZOOKEEPER-1216.patch, ZOOKEEPER-1216.patch
>
>
> I did set up a new work environment for a presentation of 
> Eclipse+EGit+Gerrit+Jenkins and found more warnings that were ignored on my 
> machine.
> Warnings are now down to 5! So no excuses to introduce new ones!
> Fixed warnings:
> - removed unused imports
> - removed unused variables / methods

[jira] [Commented] (BOOKKEEPER-90) Hedwig API changes for initial Bookkeeper release

2011-10-24 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134170#comment-13134170
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-90:
-


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

Review request for bookkeeper.


Summary
---

HedwigClient#getSslFactory shouldn't be public
HedwigClient#getConsumeCallback shouldn't be public
HedwigClient#doConnect shouldn't be public
HedwigClient#getHostFromChannel shouldn't be public
HedwigClient#getResponseHandlerFromChannel shouldn't be public
HedwigClient#getHostForTopic shouldn't be public
HedwigClient#clearAllTopicsForHost shouldn't be public
HedwigClient#getClientTimer shoulnd't be public
HedwigClient#stop should throw some sort of Exception in the case of errors

HedwigPublisher#publish shouldn't use protobuf ByteString, as it requires the 
user to import protobufs
HedwigPublisher#getChannelForHost shouldn't be public

HedwigSubscriber#HedwigSubscriber shouldn't be public
HedwigSubscriber#doConsume shouldn't be public
HedwigSubscriber#hasSubscription probably shouldn't be public
HedwigSubscriber#getSubscriptionList shoulnd't exist
HedwigSubscriber#getChannelForTopic shouldn't be public
HedwigSubscriber#setChannelforTopic shouldn't be public
HedwigSubscriber#removeChannelForTopic shound't be public

MessageHandler#consume should be called 'deliver'

The hedwig client is under a netty package. There's nothing netty specific 
about the api, so it should be in the org.apache.hedwig.client package.


This addresses bug BOOKKEEPER-90.
https://issues.apache.org/jira/browse/BOOKKEEPER-90


Diffs
-

  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/AsyncCallback.java 
6421460 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
6af43ae 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperTools.java
 PRE-CREATION 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/DigestManager.java 
d4af3fa 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/DistributionSchedule.java
 78aaa15 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
959df73 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/MacDigestManager.java
 1131652 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/BookKeeperTools.java
 94e444c 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTestClient.java
 dfc63d7 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerCacheTest.java
 PRE-CREATION 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java 
224c796 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieFailureTest.java
 82483f3 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieReadWriteTest.java
 56331ef 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieRecoveryTest.java
 f933ba1 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LedgerCacheTest.java 
3a78507 
  hedwig-client/src/main/java/org/apache/hedwig/client/HedwigClient.java 
PRE-CREATION 
  hedwig-client/src/main/java/org/apache/hedwig/client/api/Client.java 
PRE-CREATION 
  hedwig-client/src/main/java/org/apache/hedwig/client/api/MessageHandler.java 
ddf92b1 
  
hedwig-client/src/main/java/org/apache/hedwig/client/benchmark/BenchmarkPublisher.java
 687062b 
  
hedwig-client/src/main/java/org/apache/hedwig/client/benchmark/BenchmarkSubscriber.java
 0e87dd7 
  
hedwig-client/src/main/java/org/apache/hedwig/client/benchmark/HedwigBenchmark.java
 643f6d9 
  
hedwig-client/src/main/java/org/apache/hedwig/client/handlers/MessageConsumeCallback.java
 2e11d63 
  
hedwig-client/src/main/java/org/apache/hedwig/client/handlers/PublishResponseHandler.java
 90e62ba 
  
hedwig-client/src/main/java/org/apache/hedwig/client/handlers/SubscribeReconnectCallback.java
 60388fa 
  
hedwig-client/src/main/java/org/apache/hedwig/client/handlers/SubscribeResponseHandler.java
 2256a68 
  
hedwig-client/src/main/java/org/apache/hedwig/client/handlers/UnsubscribeResponseHandler.java
 f12e476 
  
hedwig-client/src/main/java/org/apache/hedwig/client/netty/ClientChannelPipelineFactory.java
 9c36e87 
  
hedwig-client/src/main/java/org/apache/hedwig/client/netty/ConnectCallback.java 
3f13754 
  hedwig-client/src/main/java/org/apache/hedwig/client/netty/HedwigClient.java 
b270d34 
  
hedwig-client/src/main/java/org/apache/hedwig/client/netty/HedwigClientImpl.java
 PRE-CREATION 
  
hedwig-client/src/main/java/org/apache/hedwig/client/netty/HedwigPublisher.java 
e381107 
  
hedwig-client/src/main/java/org/apache/hedwig/client/netty/HedwigSubscriber.java
 7b21a4d 
  
hedwig-cl

[jira] [Commented] (BOOKKEEPER-89) Bookkeeper API changes for initial Bookkeeper release

2011-10-24 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134118#comment-13134118
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-89:
-


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

(Updated 2011-10-24 14:53:25.740238)


Review request for bookkeeper.


Summary
---

Changes are as follows.

BookKeeper#createLedger, parameter is named passwd, "Key" used in LedgerHandle 
api
BookKeeper#getBookieClient shouldn't be public
BookKeeper#createComplete shouldn't be public
BookKeeper#openComplete shouldn't be public
BookKeeper#deleteComplete shouldn't be public
BookKeeper#halt could be changed to close(), should throw a BKException

LedgerHandle#getLedgerKey passwd is used in BookKeeper, should possibly be 
private
LedgerHandle#getLedgerMetadata shouldn't be public
LedgerHandle#getDigestManager shouldn't be public
LedgerHandle#getDistributionSchedule shouldn't be public
LedgerHandle#writeLedgerConfig shouldn't be public
LedgerHandle#addEntry should return void, errors should go in an Exception
LedgerHandle#readComplete should not be public
LedgerHandle#addComplete should not be public
LedgerHandle#readLastConfirmedCompelte should not be public
LedgerHandle#closeComplete should not be public

ASyncCallback#RecoverCallback shouldn't be public


This addresses bug BOOKKEEPER-89.
https://issues.apache.org/jira/browse/BOOKKEEPER-89


Diffs (updated)
-

  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/AsyncCallback.java 
6421460 
  bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java 
6af43ae 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperTools.java
 PRE-CREATION 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/DigestManager.java 
d4af3fa 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/DistributionSchedule.java
 78aaa15 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
959df73 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/MacDigestManager.java
 1131652 
  
bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/BookKeeperTools.java
 94e444c 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTestClient.java
 dfc63d7 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/LedgerCacheTest.java
 PRE-CREATION 
  bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java 
224c796 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieFailureTest.java
 82483f3 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieReadWriteTest.java
 56331ef 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieRecoveryTest.java
 f933ba1 
  
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LedgerCacheTest.java 
3a78507 
  
hedwig-server/src/main/java/org/apache/hedwig/server/benchmark/BookkeeperBenchmark.java
 a934985 
  hedwig-server/src/main/java/org/apache/hedwig/server/netty/PubSubServer.java 
726341d 
  
hedwig-server/src/test/java/org/apache/hedwig/server/persistence/BookKeeperTestBase.java
 b918d97 
  pom.xml 2392db5 

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


Testing
---


Thanks,

Ivan



> Bookkeeper API changes for initial Bookkeeper release
> -
>
> Key: BOOKKEEPER-89
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-89
> Project: Bookkeeper
>  Issue Type: Improvement
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 4.0.0
>
> Attachments: BOOKKEEPER-89.diff, BOOKKEEPER-89.diff
>
>
> Changes are as follows.
> BookKeeper#createLedger, parameter is named passwd, "Key" used in 
> LedgerHandle api
> BookKeeper#getBookieClient shouldn't be public
> BookKeeper#createComplete shouldn't be public
> BookKeeper#openComplete shouldn't be public
> BookKeeper#deleteComplete shouldn't be public
> BookKeeper#halt could be changed to close(), should throw a BKException
> LedgerHandle#getLedgerKey passwd is used in BookKeeper, should possibly be 
> private
> LedgerHandle#getLedgerMetadata shouldn't be public
> LedgerHandle#getDigestManager shouldn't be public
> LedgerHandle#getDistributionSchedule shouldn't be public
> LedgerHandle#writeLedgerConfig shouldn't be public
> LedgerHandle#addEntry should return void, errors should go in an Exception
> LedgerHandle#readComplete should not be public
> LedgerHandle#addComplete should not be public
> LedgerHandle#readLastConfirmedCompelte should not be public
> LedgerHandle#closeComplete should not be public
> ASyncCallback#RecoverCallba

[jira] [Commented] (BOOKKEEPER-84) Add versioning for ZK metadata

2011-10-21 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132613#comment-13132613
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-84:
-



bq.  On 2011-10-21 11:58:39, fpj wrote:
bq.  > 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java,
 line 47
bq.  > 
bq.  >
bq.  > I guess there is no easy way to make sure that we update this value 
when we change the format, right? Basically we need to remember to update it.

Yes


- Ivan


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


On 2011-10-17 16:44:00, Ivan Kelly wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2403/
bq.  ---
bq.  
bq.  (Updated 2011-10-17 16:44:00)
bq.  
bq.  
bq.  Review request for bookkeeper, fpj and Benjamin Reed.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  There's no zk metadata versioning, which means that reading clients may 
misinterpret the data saved in ZK.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-84.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-84
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 4452643 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestLedgerMetadata.java
 PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/2403/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Ivan
bq.  
bq.



> Add versioning for ZK metadata
> --
>
> Key: BOOKKEEPER-84
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-84
> Project: Bookkeeper
>  Issue Type: Improvement
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 3.4.0
>
> Attachments: BOOKKEEPER-84.diff
>
>
> There's no zk metadata versioning, which means that reading clients may 
> misinterpret the data saved in ZK. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-84) Add versioning for ZK metadata

2011-10-21 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132611#comment-13132611
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-84:
-


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



bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java


I guess there is no easy way to make sure that we update this value when we 
change the format, right? Basically we need to remember to update it.


- fpj


On 2011-10-17 16:44:00, Ivan Kelly wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2403/
bq.  ---
bq.  
bq.  (Updated 2011-10-17 16:44:00)
bq.  
bq.  
bq.  Review request for bookkeeper, fpj and Benjamin Reed.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  There's no zk metadata versioning, which means that reading clients may 
misinterpret the data saved in ZK.
bq.  
bq.  
bq.  This addresses bug BOOKKEEPER-84.
bq.  https://issues.apache.org/jira/browse/BOOKKEEPER-84
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
 4452643 
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestLedgerMetadata.java
 PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/2403/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Ivan
bq.  
bq.



> Add versioning for ZK metadata
> --
>
> Key: BOOKKEEPER-84
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-84
> Project: Bookkeeper
>  Issue Type: Improvement
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 3.4.0
>
> Attachments: BOOKKEEPER-84.diff
>
>
> There's no zk metadata versioning, which means that reading clients may 
> misinterpret the data saved in ZK. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1234) basic cleanup in LearnerHandler

2011-10-19 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1234:
--


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



src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java


we should keep this - it's useful when debugging. unfort QP is generated so 
we can't add toString there. thoughts?



src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java


this removal is problematic

1) the test caller is probably fine - it's overriding the setting

2) however Leader.java is using syncLimit, not initLimit. this may indicate 
a bug in the existing code? Ben/Flavio/Henry might know for sure.


- Patrick


On 2011-10-18 08:46:17, Thomas Koch wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2421/
bq.  ---
bq.  
bq.  (Updated 2011-10-18 08:46:17)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1234.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1234
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java 
c518792 
bq.  
bq.  Diff: https://reviews.apache.org/r/2421/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> basic cleanup in LearnerHandler
> ---
>
> Key: ZOOKEEPER-1234
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1234
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
> Attachments: ZOOKEEPER-1234.patch
>
>
> - order class members: properties, constructor, methods
> - make properties private final
> - rename version to protocolVersion
> - The integer value 0x1 should be extracted to a constant with a 
> declarative name. But since I don't yet fully understand its purpose, I've no 
> idea for the name of the constant.
> - Initialize properties BinaryInpuutArchive ia, BinaryOutputArchive oa and 
> BuferedOutputSream bufferedOutput in the constructor so that they can be made 
> final.
> - Remove call to sock.setSoTimeout. All two users of the class set the 
> sockettimeout anyways themselfes. This also removes a link to the Leader 
> class.
> - remove unused method packetToString.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (BOOKKEEPER-71) hedwig c++ client does not build.

2011-10-19 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130658#comment-13130658
 ] 

jirapos...@reviews.apache.org commented on BOOKKEEPER-71:
-


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

Review request for bookkeeper.


Summary
---

The path to the protobuf spec is wrong in lib/Makefile.am.

I also cleaned up the tests, and made it use the provided scripts to stop and 
start bookkeeper and hedwig daemons.


This addresses bug BOOKKEEPER-71.
https://issues.apache.org/jira/browse/BOOKKEEPER-71


Diffs
-

  hedwig-server/src/test/java/org/apache/hedwig/ServerControlDaemon.java 
14de705 
  hedwig-client/src/main/cpp/test/util.h 2d92244 
  hedwig-server/src/test/java/org/apache/hedwig/ServerControl.java be64f93 
  hedwig-client/src/main/cpp/test/subscribetest.cpp 41da339 
  hedwig-client/src/main/cpp/test/servercontrol.cpp 49696b7 
  hedwig-client/src/main/cpp/test/servercontrol.h cac09e6 
  hedwig-client/src/main/cpp/test/pubsubtest.cpp c0feade 
  hedwig-client/src/main/cpp/test/main.cpp ef9190e 
  hedwig-client/src/main/cpp/test/publishtest.cpp 95599d7 
  hedwig-client/src/main/cpp/test/Makefile.am 84db87f 
  hedwig-client/src/main/cpp/scripts/tester.sh c288076 
  hedwig-client/src/main/cpp/scripts/network-delays.sh f566098 
  hedwig-client/src/main/cpp/scripts/server-control.sh fa7f1c1 
  hedwig-client/src/main/cpp/lib/Makefile.am 9a53138 
  hedwig-client/src/main/cpp/README PRE-CREATION 
  hedwig-client/src/main/cpp/config.h.in 19266b3 

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


Testing
---


Thanks,

Ivan



> hedwig c++ client does not build. 
> --
>
> Key: BOOKKEEPER-71
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-71
> Project: Bookkeeper
>  Issue Type: Bug
>Affects Versions: 3.4.0
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Fix For: 3.4.0
>
> Attachments: BOOKKEEPER-71.diff
>
>
> The path to the protobuf spec is wrong in lib/Makefile.am. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1234) basic cleanup in LearnerHandler

2011-10-18 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1234:
--


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

Review request for zookeeper.


Summary
---



> basic cleanup in LearnerHandler
> ---
>
> Key: ZOOKEEPER-1234
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1234
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
> Attachments: ZOOKEEPER-1234.patch
>
>
> - order class members: properties, constructor, methods
> - make properties private final
> - rename version to protocolVersion
> - The integer value 0x1 should be extracted to a constant with a 
> declarative name. But since I don't yet fully understand its purpose, I've no 
> idea for the name of the constant.
> - Initialize properties BinaryInpuutArchive ia, BinaryOutputArchive oa and 
> BuferedOutputSream bufferedOutput in the constructor so that they can be made 
> final.
> - Remove call to sock.setSoTimeout. All two users of the class set the 
> sockettimeout anyways themselfes. This also removes a link to the Leader 
> class.
> - remove unused method packetToString.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1226) extract version check in separate method in PrepRequestProcessor

2011-10-17 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1226:
--


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

Ship it!


- Camille


On 2011-10-16 17:09:47, Thomas Koch wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2397/
bq.  ---
bq.  
bq.  (Updated 2011-10-16 17:09:47)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1226.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1226
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 
ce58145 
bq.  
bq.  Diff: https://reviews.apache.org/r/2397/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> extract version check in separate method in PrepRequestProcessor
> 
>
> Key: ZOOKEEPER-1226
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1226
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
> Attachments: ZOOKEEPER-1226.patch
>
>
> The following code is repeated 4 times and should be put in a method that 
> either throws the Exception or returns the incremented version (see below).
> {code}
> version = setDataRequest.getVersion();
> int currentVersion = nodeRecord.stat.getVersion();
> if (version != -1 && version != currentVersion) {
> throw new KeeperException.BadVersionException(path);
> }
> version = currentVersion + 1;
> {code}
> {code}
> private static int checkAndIncVersion(int currentVersion, int 
> versionToCompare, String path )
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1204) Shorten calls to ZooTrace

2011-10-16 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1204:
--


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

(Updated 2011-10-16 19:05:48.308818)


Review request for zookeeper.


Summary
---



> Shorten calls to ZooTrace
> -
>
> Key: ZOOKEEPER-1204
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1204
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
> Attachments: ZOOKEEPER-1204.patch, ZOOKEEPER-1204.patch
>
>
> The calls to ZooTrace are kind of verbose and contain duplicated logic. This 
> patch makes the calls as short as possible so that they do not distract that 
> much from what's actually going on.
> Calls to LOG.isTraceEnabled() are removed at many places, because this check 
> is done anyways inside ZooTracer. At some places it has been left, to avoid 
> costly message creation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1226) extract version check in separate method in PrepRequestProcessor

2011-10-16 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1226:
--


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

Review request for zookeeper.


Summary
---



> extract version check in separate method in PrepRequestProcessor
> 
>
> Key: ZOOKEEPER-1226
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1226
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
> Attachments: ZOOKEEPER-1226.patch
>
>
> The following code is repeated 4 times and should be put in a method that 
> either throws the Exception or returns the incremented version (see below).
> {code}
> version = setDataRequest.getVersion();
> int currentVersion = nodeRecord.stat.getVersion();
> if (version != -1 && version != currentVersion) {
> throw new KeeperException.BadVersionException(path);
> }
> version = currentVersion + 1;
> {code}
> {code}
> private static int checkAndIncVersion(int currentVersion, int 
> versionToCompare, String path )
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1221) Provide accessors for Request.{hdr|txn}

2011-10-12 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1221:
--


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

Review request for zookeeper.


Summary
---

I'm working on a larger patch that makes the Request class immutable. To see, 
where the hdr and txn fields are modified, it helped to introduce accessor 
methods. The JVM should happily inline the method calls so no performance 
overhead should be expected.

There's a minor, unrelated change included: ToBeAppliedRequestProcessor had a 
reference to the toBeApplied list of the Leader. So it was hard to find all 
places, where this list was actually modified. The patch gives instead the 
leader instance to the toBeAppliedRequestProcessor and the processor then 
accesses leader.toBeApplied.


This addresses bug ZOOKEEPER-1221.
https://issues.apache.org/jira/browse/ZOOKEEPER-1221


Diffs
-

  src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java c746299 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ce58145 
  src/java/main/org/apache/zookeeper/server/Request.java 53631f1 
  src/java/main/org/apache/zookeeper/server/ZKDatabase.java 92f475b 
  src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java 
fec70de 
  src/java/main/org/apache/zookeeper/server/quorum/CommitProcessor.java a0c2cbd 
  src/java/main/org/apache/zookeeper/server/quorum/FollowerZooKeeperServer.java 
95c77b5 
  src/java/main/org/apache/zookeeper/server/quorum/Leader.java 42bdfe9 
  src/java/main/org/apache/zookeeper/server/quorum/LeaderZooKeeperServer.java 
976726e 
  src/java/main/org/apache/zookeeper/server/quorum/Observer.java 2e15a81 
  
src/java/main/org/apache/zookeeper/server/quorum/ProposalRequestProcessor.java 
9d7de1d 
  src/java/main/org/apache/zookeeper/server/quorum/SendAckRequestProcessor.java 
7f81a5a 
  src/java/main/org/apache/zookeeper/server/upgrade/UpgradeSnapShotV1.java 
1ca9f9a 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java 
be29939 

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


Testing
---


Thanks,

Thomas



> Provide accessors for Request.{hdr|txn}
> ---
>
> Key: ZOOKEEPER-1221
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1221
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
>Priority: Minor
> Attachments: ZOOKEEPER-1221.patch
>
>
> I'm working on a larger patch that makes the Request class immutable. To see, 
> where the hdr and txn fields are modified, it helped to introduce accessor 
> methods. The JVM should happily inline the method calls so no performance 
> overhead should be expected.
> There's a minor, unrelated change included: ToBeAppliedRequestProcessor had a 
> reference to the toBeApplied list of the Leader. So it was hard to find all 
> places, where this list was actually modified. The patch gives instead the 
> leader instance to the toBeAppliedRequestProcessor and the processor then 
> accesses leader.toBeApplied.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1112) Add support for C client for SASL authentication

2011-10-09 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1112:
--


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

Review request for zookeeper.


Summary
---

2nd patch
* provides a simple api for sasl authentication (zoo_sasl_init, 
zoo_sasl_connect, zoo_sasl_authenticate)
* requires libsasl2 (and plugins)
* autoconf/make configuration
* test for digest-md5 authentication
* extended configuration for digest-md5 sasl server required by sasl2


This addresses bug ZOOKEEPER-1112.
https://issues.apache.org/jira/browse/ZOOKEEPER-1112


Diffs
-

  src/c/Makefile.am dbf4080 
  src/c/configure.ac 4e1a8d5 
  src/c/include/zookeeper_sasl.h e69de29 
  src/c/src/zk_sasl.c e69de29 
  src/c/tests/TestClient.cc 2d45cec 
  src/java/main/org/apache/zookeeper/server/ZooKeeperSaslServer.java 0ca18dc 

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


Testing
---


Thanks,

Tom



> Add support for C client for SASL authentication
> 
>
> Key: ZOOKEEPER-1112
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1112
> Project: ZooKeeper
>  Issue Type: New Feature
>Reporter: Eugene Koontz
>Assignee: Tom Klonikowski
> Attachments: ZOOKEEPER-1112.patch, ZOOKEEPER-1112_1.patch, 
> ZOOKEEPER-1112_1.patch, ZOOKEEPER-1112_2.patch, ZOOKEEPER-1112_2.patch, 
> ZOOKEEPER-1112_3.patch, zookeeper-c-client-sasl.patch
>
>
> Hopefully this would leverage the SASL server-side support provided by 
> ZOOKEEPER-938. It would be similar to the Java SASL client support also 
> provided in ZOOKEEPER-938.
> Java has built-in SASL support, but I'm not sure what C libraries are 
> available for SASL and if so, are they compatible with the Apache license.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1112) Add support for C client for SASL authentication

2011-10-09 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1112:
--


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

(Updated 2011-10-09 16:30:25.396109)


Review request for zookeeper, Eugene Koontz, Mahadev Konar, and Tom Klonikowski.


Changes
---

Updated patches with simpler synchronous sasl function and a little more testing


Summary
---

This first patch implements the zookeeper sasl operations, extends the 
zkServer.sh test script with the ability to start a sasl enabled server and 
adds a test that checks the initial DIGEST-MD5 response.

It introduces no external requirements but provides zoo_sasl/zoo_asasl 
functions that allow applications (or the addon from patch #2) to communicate 
with the sasl server backend.

Patch #2 will add a simple api for sasl authentication, patch #3 includes a 
sasl enabled command line client.


This addresses bug ZOOKEEPER-1112.
https://issues.apache.org/jira/browse/ZOOKEEPER-1112


Diffs (updated)
-

  src/c/include/proto.h bce408e 
  src/c/include/zookeeper.h 7d1066a 
  src/c/src/zk_adaptor.h 6aed38f 
  src/c/src/zookeeper.c 64d7a4d 
  src/c/tests/TestClient.cc 2d45cec 
  src/c/tests/jaas.digest.server.conf e69de29 
  src/c/tests/zkServer.sh 0af80f8 

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


Testing
---


Thanks,

Tom



> Add support for C client for SASL authentication
> 
>
> Key: ZOOKEEPER-1112
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1112
> Project: ZooKeeper
>  Issue Type: New Feature
>Reporter: Eugene Koontz
>Assignee: Tom Klonikowski
> Attachments: ZOOKEEPER-1112.patch, ZOOKEEPER-1112_1.patch, 
> ZOOKEEPER-1112_1.patch, ZOOKEEPER-1112_2.patch, ZOOKEEPER-1112_2.patch, 
> ZOOKEEPER-1112_3.patch, zookeeper-c-client-sasl.patch
>
>
> Hopefully this would leverage the SASL server-side support provided by 
> ZOOKEEPER-938. It would be similar to the Java SASL client support also 
> provided in ZOOKEEPER-938.
> Java has built-in SASL support, but I'm not sure what C libraries are 
> available for SASL and if so, are they compatible with the Apache license.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1112) Add support for C client for SASL authentication

2011-10-07 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1112:
--


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



src/c/include/zookeeper.h


I'm gonna replace the callback with two out parameters here.


- Tom


On 2011-10-07 18:58:28, Tom Klonikowski wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2252/
bq.  ---
bq.  
bq.  (Updated 2011-10-07 18:58:28)
bq.  
bq.  
bq.  Review request for zookeeper, Eugene Koontz, Mahadev Konar, and Tom 
Klonikowski.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  This first patch implements the zookeeper sasl operations, extends the 
zkServer.sh test script with the ability to start a sasl enabled server and 
adds a test that checks the initial DIGEST-MD5 response.
bq.  
bq.  It introduces no external requirements but provides zoo_sasl/zoo_asasl 
functions that allow applications (or the addon from patch #2) to communicate 
with the sasl server backend.
bq.  
bq.  Patch #2 will add a simple api for sasl authentication, patch #3 includes 
a sasl enabled command line client.
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-1112.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-1112
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/c/include/proto.h bce408e 
bq.src/c/include/zookeeper.h 7d1066a 
bq.src/c/src/zk_adaptor.h 6aed38f 
bq.src/c/src/zookeeper.c 64d7a4d 
bq.src/c/tests/TestClient.cc 2d45cec 
bq.src/c/tests/jaas.digest.server.conf e69de29 
bq.src/c/tests/zkServer.sh 0af80f8 
bq.  
bq.  Diff: https://reviews.apache.org/r/2252/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Tom
bq.  
bq.



> Add support for C client for SASL authentication
> 
>
> Key: ZOOKEEPER-1112
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1112
> Project: ZooKeeper
>  Issue Type: New Feature
>Reporter: Eugene Koontz
>Assignee: Tom Klonikowski
> Attachments: ZOOKEEPER-1112.patch, ZOOKEEPER-1112_1.patch, 
> ZOOKEEPER-1112_2.patch, ZOOKEEPER-1112_3.patch, zookeeper-c-client-sasl.patch
>
>
> Hopefully this would leverage the SASL server-side support provided by 
> ZOOKEEPER-938. It would be similar to the Java SASL client support also 
> provided in ZOOKEEPER-938.
> Java has built-in SASL support, but I'm not sure what C libraries are 
> available for SASL and if so, are they compatible with the Apache license.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1112) Add support for C client for SASL authentication

2011-10-07 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1112:
--


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

(Updated 2011-10-07 18:58:28.724545)


Review request for zookeeper, Eugene Koontz, Mahadev Konar, and Tom Klonikowski.


Changes
---

Replaced with the recent patch (#1 of 3)


Summary (updated)
---

This first patch implements the zookeeper sasl operations, extends the 
zkServer.sh test script with the ability to start a sasl enabled server and 
adds a test that checks the initial DIGEST-MD5 response.

It introduces no external requirements but provides zoo_sasl/zoo_asasl 
functions that allow applications (or the addon from patch #2) to communicate 
with the sasl server backend.

Patch #2 will add a simple api for sasl authentication, patch #3 includes a 
sasl enabled command line client.


This addresses bug ZOOKEEPER-1112.
https://issues.apache.org/jira/browse/ZOOKEEPER-1112


Diffs (updated)
-

  src/c/include/proto.h bce408e 
  src/c/include/zookeeper.h 7d1066a 
  src/c/src/zk_adaptor.h 6aed38f 
  src/c/src/zookeeper.c 64d7a4d 
  src/c/tests/TestClient.cc 2d45cec 
  src/c/tests/jaas.digest.server.conf e69de29 
  src/c/tests/zkServer.sh 0af80f8 

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


Testing
---


Thanks,

Tom



> Add support for C client for SASL authentication
> 
>
> Key: ZOOKEEPER-1112
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1112
> Project: ZooKeeper
>  Issue Type: New Feature
>Reporter: Eugene Koontz
>Assignee: Tom Klonikowski
> Attachments: ZOOKEEPER-1112.patch, ZOOKEEPER-1112_1.patch, 
> ZOOKEEPER-1112_2.patch, ZOOKEEPER-1112_3.patch, zookeeper-c-client-sasl.patch
>
>
> Hopefully this would leverage the SASL server-side support provided by 
> ZOOKEEPER-938. It would be similar to the Java SASL client support also 
> provided in ZOOKEEPER-938.
> Java has built-in SASL support, but I'm not sure what C libraries are 
> available for SASL and if so, are they compatible with the Apache license.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1216) Fix more eclipse compiler warnings, also in Tests

2011-10-07 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1216:
--


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

(Updated 2011-10-07 16:06:16.659495)


Review request for zookeeper.


Summary
---

ZOOKEEPER-1216 Fix more eclipse compiler warnings, also in Tests

I did set up a new work environment for a presentation of 
Eclipse+EGit+Gerrit+Jenkins and found more warnings that were ignored on my 
machine.
Warnings are now down to 5! So no excuses to introduce new ones!

Fixed warnings:

removed unused imports
removed unused variables / methods
added missing generics
added ignore warnings for calls to deprecated code in tests


This addresses bug ZOOKEEPER-1216.
https://issues.apache.org/jira/browse/ZOOKEEPER-1216


Diffs (updated)
-

  src/java/main/org/apache/zookeeper/JLineZNodeCompletor.java 02b0645 
  src/java/main/org/apache/zookeeper/ZooKeeperMain.java 98784d1 
  src/java/main/org/apache/zookeeper/server/ByteBufferOutputStream.java a2fcc95 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ce58145 
  src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java 1511ddb 
  src/java/main/org/apache/zookeeper/server/Request.java 53631f1 
  src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java d1ce278 
  src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java c518792 
  src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java e2e24aa 
  src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java 13541e8 
  src/java/systest/org/apache/zookeeper/test/system/BaseSysTest.java 575a743 
  src/java/systest/org/apache/zookeeper/test/system/GenerateLoad.java ce239f9 
  src/java/systest/org/apache/zookeeper/test/system/InstanceContainer.java 
b22e078 
  src/java/systest/org/apache/zookeeper/test/system/InstanceManager.java 
93c51b8 
  src/java/systest/org/apache/zookeeper/test/system/SimpleClient.java 44f113a 
  src/java/test/org/apache/zookeeper/TestableZooKeeper.java f8344b6 
  src/java/test/org/apache/zookeeper/ZKTestCase.java b721cfc 
  src/java/test/org/apache/zookeeper/server/InvalidSnapshotTest.java 738f665 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java 
be29939 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerTestBase.java 
31d32f4 
  src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java a6a86d0 
  src/java/test/org/apache/zookeeper/test/ACLRootTest.java 7307cbf 
  src/java/test/org/apache/zookeeper/test/ClientTest.java e99d8df 
  src/java/test/org/apache/zookeeper/test/CreateModeTest.java a3b838a 
  src/java/test/org/apache/zookeeper/test/EventTypeTest.java e6a9826 
  src/java/test/org/apache/zookeeper/test/FLELostMessageTest.java 81ea12b 
  src/java/test/org/apache/zookeeper/test/FLETest.java b1b8e82 
  src/java/test/org/apache/zookeeper/test/FLEZeroWeightTest.java 1b6ab70 
  src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java 
5a9c759 
  src/java/test/org/apache/zookeeper/test/KeeperStateTest.java 55dc852 
  src/java/test/org/apache/zookeeper/test/LENonTerminateTest.java 21fed78 
  src/java/test/org/apache/zookeeper/test/LETest.java 78d68f0 
  src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java 2e0dcd9 
  src/java/test/org/apache/zookeeper/test/ObserverHierarchicalQuorumTest.java 
9d373fc 
  src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java bef1a33 
  src/java/test/org/apache/zookeeper/test/QuorumTest.java c9c3b9a 
  src/java/test/org/apache/zookeeper/test/RepeatStartupTest.java 3421004 
  src/java/test/org/apache/zookeeper/test/SessionTest.java df9bd54 
  src/java/test/org/apache/zookeeper/test/UpgradeTest.java 514404f 
  src/java/test/org/apache/zookeeper/test/WatcherTest.java fc3eccd 
  src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java fbf09b3 

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


Testing
---


Thanks,

Thomas



> Fix more eclipse compiler warnings, also in Tests
> -
>
> Key: ZOOKEEPER-1216
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1216
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
>Priority: Minor
> Attachments: ZOOKEEPER-1216.patch, ZOOKEEPER-1216.patch
>
>
> I did set up a new work environment for a presentation of 
> Eclipse+EGit+Gerrit+Jenkins and found more warnings that were ignored on my 
> machine.
> Warnings are now down to 5! So no excuses to introduce new ones!
> Fix

[jira] [Commented] (ZOOKEEPER-1216) Fix more eclipse compiler warnings, also in Tests

2011-10-07 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1216:
--


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

Review request for zookeeper.


Summary
---

ZOOKEEPER-1216 Fix more eclipse compiler warnings, also in Tests

I did set up a new work environment for a presentation of 
Eclipse+EGit+Gerrit+Jenkins and found more warnings that were ignored on my 
machine.
Warnings are now down to 5! So no excuses to introduce new ones!

Fixed warnings:

removed unused imports
removed unused variables / methods
added missing generics
added ignore warnings for calls to deprecated code in tests


This addresses bug ZOOKEEPER-1216.
https://issues.apache.org/jira/browse/ZOOKEEPER-1216


Diffs
-

  src/java/main/org/apache/zookeeper/ZooKeeperMain.java 98784d1 
  src/java/main/org/apache/zookeeper/server/ByteBufferOutputStream.java a2fcc95 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ce58145 
  src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java 1511ddb 
  src/java/main/org/apache/zookeeper/server/Request.java 53631f1 
  src/java/main/org/apache/zookeeper/server/ZooKeeperServerMain.java d1ce278 
  src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java c518792 
  src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java e2e24aa 
  src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java 13541e8 
  src/java/systest/org/apache/zookeeper/test/system/BaseSysTest.java 575a743 
  src/java/systest/org/apache/zookeeper/test/system/GenerateLoad.java ce239f9 
  src/java/systest/org/apache/zookeeper/test/system/InstanceContainer.java 
b22e078 
  src/java/systest/org/apache/zookeeper/test/system/InstanceManager.java 
93c51b8 
  src/java/systest/org/apache/zookeeper/test/system/SimpleClient.java 44f113a 
  src/java/test/org/apache/zookeeper/TestableZooKeeper.java f8344b6 
  src/java/test/org/apache/zookeeper/ZKTestCase.java b721cfc 
  src/java/test/org/apache/zookeeper/server/InvalidSnapshotTest.java 738f665 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java 
be29939 
  src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerTestBase.java 
31d32f4 
  src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java a6a86d0 
  src/java/test/org/apache/zookeeper/test/ACLRootTest.java 7307cbf 
  src/java/test/org/apache/zookeeper/test/ClientTest.java e99d8df 
  src/java/test/org/apache/zookeeper/test/CreateModeTest.java a3b838a 
  src/java/test/org/apache/zookeeper/test/EventTypeTest.java e6a9826 
  src/java/test/org/apache/zookeeper/test/FLELostMessageTest.java 81ea12b 
  src/java/main/org/apache/zookeeper/JLineZNodeCompletor.java 02b0645 
  src/java/test/org/apache/zookeeper/test/FLETest.java b1b8e82 
  src/java/test/org/apache/zookeeper/test/FLEZeroWeightTest.java 1b6ab70 
  src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java 
5a9c759 
  src/java/test/org/apache/zookeeper/test/KeeperStateTest.java 55dc852 
  src/java/test/org/apache/zookeeper/test/LENonTerminateTest.java 21fed78 
  src/java/test/org/apache/zookeeper/test/LETest.java 78d68f0 
  src/java/test/org/apache/zookeeper/test/MultiTransactionTest.java 2e0dcd9 
  src/java/test/org/apache/zookeeper/test/ObserverHierarchicalQuorumTest.java 
9d373fc 
  src/java/test/org/apache/zookeeper/test/QuorumQuotaTest.java bef1a33 
  src/java/test/org/apache/zookeeper/test/QuorumTest.java c9c3b9a 
  src/java/test/org/apache/zookeeper/test/RepeatStartupTest.java 3421004 
  src/java/test/org/apache/zookeeper/test/SessionTest.java df9bd54 
  src/java/test/org/apache/zookeeper/test/UpgradeTest.java 514404f 
  src/java/test/org/apache/zookeeper/test/WatcherTest.java fc3eccd 
  src/java/test/org/apache/zookeeper/test/ZooKeeperQuotaTest.java fbf09b3 

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


Testing
---


Thanks,

Thomas



> Fix more eclipse compiler warnings, also in Tests
> -
>
> Key: ZOOKEEPER-1216
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1216
> Project: ZooKeeper
>  Issue Type: Sub-task
>Reporter: Thomas Koch
>Assignee: Thomas Koch
>Priority: Minor
> Attachments: ZOOKEEPER-1216.patch
>
>
> I did set up a new work environment for a presentation of 
> Eclipse+EGit+Gerrit+Jenkins and found more warnings that were ignored on my 
> machine.
> Warnings are now down to 5! So no excuses to introduce new ones!
> Fixed warnings:
> - removed unused imports
> - removed unused variables / 

[jira] [Commented] (ZOOKEEPER-1112) Add support for C client for SASL authentication

2011-10-06 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1112:
--


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

(Updated 2011-10-06 19:09:56.213145)


Review request for zookeeper and Eugene Koontz.


Summary
---

It now supports DIGEST-MD5 and GSSAPI (and virtually any mech SASL supports). 
cli_mt works with GSSAPI, cli_st with DIGEST-MD5 and GSSAPI

Example: cli_st -u super -h zk-sasl-md5 -m DIGEST-MD5 localhost:2181
 cli_mt -M GSSAPI localhost:2181

* requires libsasl2 and plugins

* zookeeper
  o zoo_(a)sasl(*zh, *conn, *data, len, cptr)
* zk_sasl
  o zoo_sasl_init(*callbacks)
  o zoo_sasl_connect(*zh, *servicename, *host, **conn, **supportedmechs, 
*mechcount)
  o zoo_(a)sasl_authenticate(*zh, *conn, *mech, *supportedmechs)

This latest patch includes

* detection of libsasl2
* configure option --with-sasl (default: on)
* compiler flag SASL
* a simple test for DIGEST-MD5 authentication


This addresses bug ZOOKEEPER-1112.
https://issues.apache.org/jira/browse/ZOOKEEPER-1112


Diffs
-

  src/c/src/zk_adaptor.h 6aed38f 
  src/c/src/zk_sasl.h PRE-CREATION 
  src/c/src/zk_sasl.c PRE-CREATION 
  src/c/src/cli.c c9fe4dd 
  src/c/Makefile.am dbf4080 
  src/c/configure.ac 4e1a8d5 
  src/c/include/proto.h bce408e 
  src/c/include/zookeeper.h 7d1066a 
  src/c/src/zookeeper.c 64d7a4d 
  src/c/tests/TestClient.cc 2d45cec 
  src/c/tests/jaas.digest.server.conf PRE-CREATION 
  src/c/tests/zkServer.sh 0af80f8 
  src/java/main/org/apache/zookeeper/server/ZooKeeperSaslServer.java 0ca18dc 

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


Testing
---


Thanks,

Tom



> Add support for C client for SASL authentication
> 
>
> Key: ZOOKEEPER-1112
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1112
> Project: ZooKeeper
>  Issue Type: New Feature
>Reporter: Eugene Koontz
> Attachments: ZOOKEEPER-1112.patch, zookeeper-c-client-sasl.patch
>
>
> Hopefully this would leverage the SASL server-side support provided by 
> ZOOKEEPER-938. It would be similar to the Java SASL client support also 
> provided in ZOOKEEPER-938.
> Java has built-in SASL support, but I'm not sure what C libraries are 
> available for SASL and if so, are they compatible with the Apache license.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1112) Add support for C client for SASL authentication

2011-10-06 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1112:
--


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

(Updated 2011-10-06 19:10:21.800060)


Review request for zookeeper, Eugene Koontz and Tom Klonikowski.


Summary
---

It now supports DIGEST-MD5 and GSSAPI (and virtually any mech SASL supports). 
cli_mt works with GSSAPI, cli_st with DIGEST-MD5 and GSSAPI

Example: cli_st -u super -h zk-sasl-md5 -m DIGEST-MD5 localhost:2181
 cli_mt -M GSSAPI localhost:2181

* requires libsasl2 and plugins

* zookeeper
  o zoo_(a)sasl(*zh, *conn, *data, len, cptr)
* zk_sasl
  o zoo_sasl_init(*callbacks)
  o zoo_sasl_connect(*zh, *servicename, *host, **conn, **supportedmechs, 
*mechcount)
  o zoo_(a)sasl_authenticate(*zh, *conn, *mech, *supportedmechs)

This latest patch includes

* detection of libsasl2
* configure option --with-sasl (default: on)
* compiler flag SASL
* a simple test for DIGEST-MD5 authentication


This addresses bug ZOOKEEPER-1112.
https://issues.apache.org/jira/browse/ZOOKEEPER-1112


Diffs
-

  src/c/src/zk_adaptor.h 6aed38f 
  src/c/src/zk_sasl.h PRE-CREATION 
  src/c/src/zk_sasl.c PRE-CREATION 
  src/c/src/cli.c c9fe4dd 
  src/c/Makefile.am dbf4080 
  src/c/configure.ac 4e1a8d5 
  src/c/include/proto.h bce408e 
  src/c/include/zookeeper.h 7d1066a 
  src/c/src/zookeeper.c 64d7a4d 
  src/c/tests/TestClient.cc 2d45cec 
  src/c/tests/jaas.digest.server.conf PRE-CREATION 
  src/c/tests/zkServer.sh 0af80f8 
  src/java/main/org/apache/zookeeper/server/ZooKeeperSaslServer.java 0ca18dc 

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


Testing
---


Thanks,

Tom



> Add support for C client for SASL authentication
> 
>
> Key: ZOOKEEPER-1112
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1112
> Project: ZooKeeper
>  Issue Type: New Feature
>Reporter: Eugene Koontz
> Attachments: ZOOKEEPER-1112.patch, zookeeper-c-client-sasl.patch
>
>
> Hopefully this would leverage the SASL server-side support provided by 
> ZOOKEEPER-938. It would be similar to the Java SASL client support also 
> provided in ZOOKEEPER-938.
> Java has built-in SASL support, but I'm not sure what C libraries are 
> available for SASL and if so, are they compatible with the Apache license.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1209) LeaderElection recipe doesn't handle the split-brain issue, n/w disconnection can bring both the client nodes to be in ELECTED

2011-10-05 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1209:
--


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

Review request for zookeeper and Mahadev Konar.


Summary
---

The attached patch handles Syncconnected, Disconnected, Expired connection 
events. Tries to make client to neutral after disconnection and stop after 
session expiration, rather than in Active mode.


This addresses bug ZOOKEEPER-1209.
https://issues.apache.org/jira/browse/ZOOKEEPER-1209


Diffs
-

  
./src/recipes/election/test/org/apache/zookeeper/recipes/leader/LeaderElectionAwareTest.java
 PRE-CREATION 
  
./src/recipes/election/src/java/org/apache/zookeeper/recipes/leader/LeaderElectionSupport.java
 1179108 

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


Testing
---

See test program and description on 
https://issues.apache.org/jira/browse/ZOOKEEPER-1209


Thanks,

Rakesh



> LeaderElection recipe doesn't handle the split-brain issue, n/w disconnection 
> can bring both the client nodes to be in ELECTED
> --
>
> Key: ZOOKEEPER-1209
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1209
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: recipes
>Affects Versions: 3.3.3
>Reporter: Rakesh R
>Assignee: Rakesh R
> Attachments: ZOOKEEPER-1209.patch
>
>
> *Case1-* N/w disconnection can bring both the client nodes to be in ELECTED 
> state. Current LeaderElectionSupport(LES) f/w handles only 'NodeDeletion'.
>  
> Consider the scenario where ELECTED and READY nodes are running. Say ELECTED 
> node's n/w got failed and is "Disconnected" from ZooKeeper. But it will 
> behave as ELECTED as it is not getting any events from the 
> LeaderElectionSupport(LES) framework.
> After sessiontimeout, node in READY state will be notified by 'NodeDeleted' 
> event and will go to ELECTED state.
> *Problem:* 
> Both the node becomes ELECTED and finally the user sees two Master (ELECTED) 
> node and cause inconsistencies.
> *Case2-* Also in this case, Let's say if user has started only one client 
> node and becomes ELECTED. After sometime n/w has disconnected with the 
> ZooKeeper server and the session got expired. 
> *Problem:*
> Still the client node will be in the ELECTED state. After sometime if user 
> has started the second client node. Again both the nodes becomes ELECTED.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1172) Support for custom org.apache.zookeeper.client.HostProvider implementation.

2011-10-05 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1172:
--


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

(Updated 2011-10-05 12:00:44.407863)


Review request for zookeeper.


Summary
---



> Support for custom org.apache.zookeeper.client.HostProvider implementation.
> ---
>
> Key: ZOOKEEPER-1172
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1172
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: java client
>Reporter: César Álvarez Núñez
>Assignee: César Álvarez Núñez
> Attachments: ZOOKEEPER-1172.patch, ZOOKEEPER-1172.patch, 
> ZOOKEEPER-1172.patch
>
>
> The interface org.apache.zookeeper.client.HostProvider exist but it is 
> hardcoded to org.apache.zookeeper.client.StaticHostProvider at Zookeeper 
> constructor.
> Now it could be replaced by any other implementation just by calling the new 
> Zookeeper constructor methods which accept a HostProvider as paramater.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-1214) QuorumPeer should unregister only its previsously registered MBeans instead of use MBeanRegistry.unregisterAll() method.

2011-10-05 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-1214:
--


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

Review request for zookeeper.


Summary
---

See https://issues.apache.org/jira/browse/ZOOKEEPER-1214


This addresses bug ZOOKEEPER-1214.
https://issues.apache.org/jira/browse/ZOOKEEPER-1214


Diffs
-

  /src/java/test/org/apache/zookeeper/test/QuorumUtil.java 1179165 
  /src/java/test/org/apache/zookeeper/test/QuorumUtilTest.java PRE-CREATION 
  /src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java 1179166 
  /src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java 1169669 

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


Testing
---

-


Thanks,

César



> QuorumPeer should unregister only its previsously registered MBeans instead 
> of use MBeanRegistry.unregisterAll() method.
> 
>
> Key: ZOOKEEPER-1214
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1214
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: quorum
>Reporter: César Álvarez Núñez
>Assignee: César Álvarez Núñez
> Attachments: ZOOKEEPER-1214.patch, ZOOKEEPER-1214.patch
>
>
> When a QuorumPeer thread dies, it is unregistering *all* ZKMBeanInfo MBeans 
> previously registered on its java process; including those that has not been 
> registered by itself.
> It does not cause any side effect in production environment where each server 
> is running on a separate java process; but fails when using 
> "org.apache.zookeeper.test.QuorumUtil" to programmatically start up a 
> zookeeper server ensemble and use its provided methods to force Disconnected, 
> SyncConnected or SessionExpired events; in order to perform some 
> basic/functional testing.
> Scenario:
> * QuorumUtil qU = new QuorumUtil(1); // It creates a 3 servers ensemble.
> * qU.startAll(); // Startup all servers: 1 Leader + 2 Followers
> * qU.shutdown\(i\); // i is a number from 1 to 3. It shutdown one server.
> The last method causes that a QuorumPeer will die, invoking the 
> MBeanRegistry.unregisterAll() method.
> As a result, *all* ZKMBeanInfo MBeans are unregistered; including those 
> belonging to the other QuorumPeer instances.
> When trying to restart previous server (qU.restart\(i\)) an AssertionError is 
> thrown at MBeanRegistry.register(ZKMBeanInfo bean, ZKMBeanInfo parent) 
> method, causing the QuorumPeer thread dead.
> To solve it:
> * MBeanRegistry.unregisterAll() method has been removed.
> * QuorumPeer only unregister its ZKMBeanInfo MBeans.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (ZOOKEEPER-786) Exception in ZooKeeper.toString

2011-09-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-786:
-



bq.  On 2011-09-27 13:59:22, Camille Fournier wrote:
bq.  > src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java, line 195
bq.  > 
bq.  >
bq.  > Why was this removed? It is not germane to the patch at hand.
bq.  
bq.  Thomas Koch wrote:
bq.  You're right, the removal had nothing to do with the issue, but it was 
the right thing to do, once I've been there. It may happen in rare cases, that 
connect returns true already there, but primeConnection() is called anyways 
later from doTransport(). Having to possible call origins only adds to 
uncertainty.
bq.  Did you observe any problems with this?
bq.  
bq.  Camille Fournier wrote:
bq.  Are you sure that the lines in doTransport() will be called and 
executed if the socket connects immediately? I don't personally know whether 
that is the case or not. You didn't write any tests to show that this would 
happen, and you shouldn't have made the change for purposes of removing 
uncertainty without explicitly calling out what you were doing. If you are 
quite sure that even in the case of an immediate connection, OP_CONNECT will be 
set and we will hit that in doTransport, I'm fine with this change. But I don't 
like having changes like this snuck in under the radar, because if this is not 
the case and it causes a bug, it will be a massive pain to find.
bq.  
bq.  Camille Fournier wrote:
bq.  It seems to me, by the by, that if a socket is immediately connected 
it will NOT set the selection key for OP_CONNECT, because state will be set to 
ST_CONNECTED (see the source for SocketChannelImpl, specifically connect:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.connect%28java.net.SocketAddress%29
bq.  
bq.  and translateReadyOps:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.translateReadyOps%28int%2Cint%2Csun.nio.ch.SelectionKeyImpl%29
bq.  
bq.  So, I'm not sure that this is a safe change to make, and you should 
always, always, always, be careful when changing anything to do with our NIO 
code unless you are really sure of the consequences.
bq.  
bq.  Patrick Hunt wrote:
bq.  Camille, you're right, I missed this change. Thanks.
bq.  
bq.  There is definitely a reason for this! The connect call can return 
immediately with a connected indication, in which case we need to run the 
primeConnection code, if you don't OP_CONNECT will never be indicated (because 
the connection already took place) and primeConnection will therefore never be 
called in doTransport.
bq.  
bq.  I believe we saw this with Solaris (there was a bug on this but I 
can't find it either on apache nor sourceforge).
bq.  
bq.
bq.  
bq.  Camille Fournier wrote:
bq.  Ted deserves the credit, he pointed it out as part of 1174. If you 
don't mind, I will pull this bit out of the change in trunk when I check in 
1174 there.
bq.  
bq.  Patrick Hunt wrote:
bq.  It would be better to keep the changes distinct. Would you mind 
committing this snippet first, as a second patch for 786, then apply 1174? Or 
I/you can entirely roll back this change from trunk, you can commit 1174, and 
then Thomas can update this patch and reapply. Which would you prefer?
bq.  
bq.  Camille Fournier wrote:
bq.  I'll roll back this change as a second patch for 786, then apply 1174. 
This just went into trunk right?
bq.  
bq.  Patrick Hunt wrote:
bq.  In trunk I see this:
bq.  
bq.  sockKey = sock.register(selector, SelectionKey.OP_CONNECT);
bq.  sock.connect(addr);
bq.  
bq.  however in branch-3.4 I see this:
bq.  
bq.  boolean immediateConnect = sock.connect(addr);
bq.  sockKey = sock.register(selector, SelectionKey.OP_CONNECT);
bq.  if (immediateConnect) {
bq.  sendThread.primeConnection();
bq.  }
bq.  
bq.  so yes, this patch was applied only to trunk, however, isn't this a 
bug? sock.register is being called after sock.connect.
bq.  
bq.  Also, why was this patch applied to branch 3.4, but it's not available 
on trunk?
bq.

I see. 1174 was committed to branch-3.4 but this change caused a conflict for 
trunk.

Isn't this a timing issue then? registering after connecting?


- Patrick


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

[jira] [Commented] (ZOOKEEPER-786) Exception in ZooKeeper.toString

2011-09-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-786:
-



bq.  On 2011-09-27 13:59:22, Camille Fournier wrote:
bq.  > src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java, line 195
bq.  > 
bq.  >
bq.  > Why was this removed? It is not germane to the patch at hand.
bq.  
bq.  Thomas Koch wrote:
bq.  You're right, the removal had nothing to do with the issue, but it was 
the right thing to do, once I've been there. It may happen in rare cases, that 
connect returns true already there, but primeConnection() is called anyways 
later from doTransport(). Having to possible call origins only adds to 
uncertainty.
bq.  Did you observe any problems with this?
bq.  
bq.  Camille Fournier wrote:
bq.  Are you sure that the lines in doTransport() will be called and 
executed if the socket connects immediately? I don't personally know whether 
that is the case or not. You didn't write any tests to show that this would 
happen, and you shouldn't have made the change for purposes of removing 
uncertainty without explicitly calling out what you were doing. If you are 
quite sure that even in the case of an immediate connection, OP_CONNECT will be 
set and we will hit that in doTransport, I'm fine with this change. But I don't 
like having changes like this snuck in under the radar, because if this is not 
the case and it causes a bug, it will be a massive pain to find.
bq.  
bq.  Camille Fournier wrote:
bq.  It seems to me, by the by, that if a socket is immediately connected 
it will NOT set the selection key for OP_CONNECT, because state will be set to 
ST_CONNECTED (see the source for SocketChannelImpl, specifically connect:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.connect%28java.net.SocketAddress%29
bq.  
bq.  and translateReadyOps:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.translateReadyOps%28int%2Cint%2Csun.nio.ch.SelectionKeyImpl%29
bq.  
bq.  So, I'm not sure that this is a safe change to make, and you should 
always, always, always, be careful when changing anything to do with our NIO 
code unless you are really sure of the consequences.
bq.  
bq.  Patrick Hunt wrote:
bq.  Camille, you're right, I missed this change. Thanks.
bq.  
bq.  There is definitely a reason for this! The connect call can return 
immediately with a connected indication, in which case we need to run the 
primeConnection code, if you don't OP_CONNECT will never be indicated (because 
the connection already took place) and primeConnection will therefore never be 
called in doTransport.
bq.  
bq.  I believe we saw this with Solaris (there was a bug on this but I 
can't find it either on apache nor sourceforge).
bq.  
bq.
bq.  
bq.  Camille Fournier wrote:
bq.  Ted deserves the credit, he pointed it out as part of 1174. If you 
don't mind, I will pull this bit out of the change in trunk when I check in 
1174 there.
bq.  
bq.  Patrick Hunt wrote:
bq.  It would be better to keep the changes distinct. Would you mind 
committing this snippet first, as a second patch for 786, then apply 1174? Or 
I/you can entirely roll back this change from trunk, you can commit 1174, and 
then Thomas can update this patch and reapply. Which would you prefer?
bq.  
bq.  Camille Fournier wrote:
bq.  I'll roll back this change as a second patch for 786, then apply 1174. 
This just went into trunk right?

In trunk I see this:

sockKey = sock.register(selector, SelectionKey.OP_CONNECT);
sock.connect(addr);

however in branch-3.4 I see this:

boolean immediateConnect = sock.connect(addr);
sockKey = sock.register(selector, SelectionKey.OP_CONNECT);
if (immediateConnect) {
sendThread.primeConnection();
}

so yes, this patch was applied only to trunk, however, isn't this a bug? 
sock.register is being called after sock.connect.

Also, why was this patch applied to branch 3.4, but it's not available on trunk?


- Patrick


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


On 2011-09-14 22:18:24, Thomas Koch wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1714/
bq.  ---

[jira] [Commented] (ZOOKEEPER-786) Exception in ZooKeeper.toString

2011-09-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-786:
-



bq.  On 2011-09-27 13:59:22, Camille Fournier wrote:
bq.  > src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java, line 195
bq.  > 
bq.  >
bq.  > Why was this removed? It is not germane to the patch at hand.
bq.  
bq.  Thomas Koch wrote:
bq.  You're right, the removal had nothing to do with the issue, but it was 
the right thing to do, once I've been there. It may happen in rare cases, that 
connect returns true already there, but primeConnection() is called anyways 
later from doTransport(). Having to possible call origins only adds to 
uncertainty.
bq.  Did you observe any problems with this?
bq.  
bq.  Camille Fournier wrote:
bq.  Are you sure that the lines in doTransport() will be called and 
executed if the socket connects immediately? I don't personally know whether 
that is the case or not. You didn't write any tests to show that this would 
happen, and you shouldn't have made the change for purposes of removing 
uncertainty without explicitly calling out what you were doing. If you are 
quite sure that even in the case of an immediate connection, OP_CONNECT will be 
set and we will hit that in doTransport, I'm fine with this change. But I don't 
like having changes like this snuck in under the radar, because if this is not 
the case and it causes a bug, it will be a massive pain to find.
bq.  
bq.  Camille Fournier wrote:
bq.  It seems to me, by the by, that if a socket is immediately connected 
it will NOT set the selection key for OP_CONNECT, because state will be set to 
ST_CONNECTED (see the source for SocketChannelImpl, specifically connect:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.connect%28java.net.SocketAddress%29
bq.  
bq.  and translateReadyOps:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.translateReadyOps%28int%2Cint%2Csun.nio.ch.SelectionKeyImpl%29
bq.  
bq.  So, I'm not sure that this is a safe change to make, and you should 
always, always, always, be careful when changing anything to do with our NIO 
code unless you are really sure of the consequences.
bq.  
bq.  Patrick Hunt wrote:
bq.  Camille, you're right, I missed this change. Thanks.
bq.  
bq.  There is definitely a reason for this! The connect call can return 
immediately with a connected indication, in which case we need to run the 
primeConnection code, if you don't OP_CONNECT will never be indicated (because 
the connection already took place) and primeConnection will therefore never be 
called in doTransport.
bq.  
bq.  I believe we saw this with Solaris (there was a bug on this but I 
can't find it either on apache nor sourceforge).
bq.  
bq.
bq.  
bq.  Camille Fournier wrote:
bq.  Ted deserves the credit, he pointed it out as part of 1174. If you 
don't mind, I will pull this bit out of the change in trunk when I check in 
1174 there.
bq.  
bq.  Patrick Hunt wrote:
bq.  It would be better to keep the changes distinct. Would you mind 
committing this snippet first, as a second patch for 786, then apply 1174? Or 
I/you can entirely roll back this change from trunk, you can commit 1174, and 
then Thomas can update this patch and reapply. Which would you prefer?

I'll roll back this change as a second patch for 786, then apply 1174. This 
just went into trunk right?


- Camille


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


On 2011-09-14 22:18:24, Thomas Koch wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1714/
bq.  ---
bq.  
bq.  (Updated 2011-09-14 22:18:24)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-786.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-786
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04 
bq.  
bq.  Diff: https://reviews.apache.org/r/1714/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> Exception in ZooKeeper.toString
> ---
>
>   

[jira] [Commented] (ZOOKEEPER-786) Exception in ZooKeeper.toString

2011-09-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-786:
-



bq.  On 2011-09-27 13:59:22, Camille Fournier wrote:
bq.  > src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java, line 195
bq.  > 
bq.  >
bq.  > Why was this removed? It is not germane to the patch at hand.
bq.  
bq.  Thomas Koch wrote:
bq.  You're right, the removal had nothing to do with the issue, but it was 
the right thing to do, once I've been there. It may happen in rare cases, that 
connect returns true already there, but primeConnection() is called anyways 
later from doTransport(). Having to possible call origins only adds to 
uncertainty.
bq.  Did you observe any problems with this?
bq.  
bq.  Camille Fournier wrote:
bq.  Are you sure that the lines in doTransport() will be called and 
executed if the socket connects immediately? I don't personally know whether 
that is the case or not. You didn't write any tests to show that this would 
happen, and you shouldn't have made the change for purposes of removing 
uncertainty without explicitly calling out what you were doing. If you are 
quite sure that even in the case of an immediate connection, OP_CONNECT will be 
set and we will hit that in doTransport, I'm fine with this change. But I don't 
like having changes like this snuck in under the radar, because if this is not 
the case and it causes a bug, it will be a massive pain to find.
bq.  
bq.  Camille Fournier wrote:
bq.  It seems to me, by the by, that if a socket is immediately connected 
it will NOT set the selection key for OP_CONNECT, because state will be set to 
ST_CONNECTED (see the source for SocketChannelImpl, specifically connect:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.connect%28java.net.SocketAddress%29
bq.  
bq.  and translateReadyOps:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.translateReadyOps%28int%2Cint%2Csun.nio.ch.SelectionKeyImpl%29
bq.  
bq.  So, I'm not sure that this is a safe change to make, and you should 
always, always, always, be careful when changing anything to do with our NIO 
code unless you are really sure of the consequences.
bq.  
bq.  Patrick Hunt wrote:
bq.  Camille, you're right, I missed this change. Thanks.
bq.  
bq.  There is definitely a reason for this! The connect call can return 
immediately with a connected indication, in which case we need to run the 
primeConnection code, if you don't OP_CONNECT will never be indicated (because 
the connection already took place) and primeConnection will therefore never be 
called in doTransport.
bq.  
bq.  I believe we saw this with Solaris (there was a bug on this but I 
can't find it either on apache nor sourceforge).
bq.  
bq.
bq.  
bq.  Camille Fournier wrote:
bq.  Ted deserves the credit, he pointed it out as part of 1174. If you 
don't mind, I will pull this bit out of the change in trunk when I check in 
1174 there.

It would be better to keep the changes distinct. Would you mind committing this 
snippet first, as a second patch for 786, then apply 1174? Or I/you can 
entirely roll back this change from trunk, you can commit 1174, and then Thomas 
can update this patch and reapply. Which would you prefer?


- Patrick


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


On 2011-09-14 22:18:24, Thomas Koch wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1714/
bq.  ---
bq.  
bq.  (Updated 2011-09-14 22:18:24)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-786.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-786
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04 
bq.  
bq.  Diff: https://reviews.apache.org/r/1714/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> Exception in ZooKeeper.toString
> ---
>
> Key: ZOOKEEPER-786
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-786
> Project: ZooKeeper
>   

[jira] [Commented] (ZOOKEEPER-786) Exception in ZooKeeper.toString

2011-09-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-786:
-



bq.  On 2011-09-27 13:59:22, Camille Fournier wrote:
bq.  > src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java, line 195
bq.  > 
bq.  >
bq.  > Why was this removed? It is not germane to the patch at hand.
bq.  
bq.  Thomas Koch wrote:
bq.  You're right, the removal had nothing to do with the issue, but it was 
the right thing to do, once I've been there. It may happen in rare cases, that 
connect returns true already there, but primeConnection() is called anyways 
later from doTransport(). Having to possible call origins only adds to 
uncertainty.
bq.  Did you observe any problems with this?
bq.  
bq.  Camille Fournier wrote:
bq.  Are you sure that the lines in doTransport() will be called and 
executed if the socket connects immediately? I don't personally know whether 
that is the case or not. You didn't write any tests to show that this would 
happen, and you shouldn't have made the change for purposes of removing 
uncertainty without explicitly calling out what you were doing. If you are 
quite sure that even in the case of an immediate connection, OP_CONNECT will be 
set and we will hit that in doTransport, I'm fine with this change. But I don't 
like having changes like this snuck in under the radar, because if this is not 
the case and it causes a bug, it will be a massive pain to find.
bq.  
bq.  Camille Fournier wrote:
bq.  It seems to me, by the by, that if a socket is immediately connected 
it will NOT set the selection key for OP_CONNECT, because state will be set to 
ST_CONNECTED (see the source for SocketChannelImpl, specifically connect:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.connect%28java.net.SocketAddress%29
bq.  
bq.  and translateReadyOps:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.translateReadyOps%28int%2Cint%2Csun.nio.ch.SelectionKeyImpl%29
bq.  
bq.  So, I'm not sure that this is a safe change to make, and you should 
always, always, always, be careful when changing anything to do with our NIO 
code unless you are really sure of the consequences.
bq.  
bq.  Patrick Hunt wrote:
bq.  Camille, you're right, I missed this change. Thanks.
bq.  
bq.  There is definitely a reason for this! The connect call can return 
immediately with a connected indication, in which case we need to run the 
primeConnection code, if you don't OP_CONNECT will never be indicated (because 
the connection already took place) and primeConnection will therefore never be 
called in doTransport.
bq.  
bq.  I believe we saw this with Solaris (there was a bug on this but I 
can't find it either on apache nor sourceforge).
bq.  
bq.

Ted deserves the credit, he pointed it out as part of 1174. If you don't mind, 
I will pull this bit out of the change in trunk when I check in 1174 there.


- Camille


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


On 2011-09-14 22:18:24, Thomas Koch wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1714/
bq.  ---
bq.  
bq.  (Updated 2011-09-14 22:18:24)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-786.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-786
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04 
bq.  
bq.  Diff: https://reviews.apache.org/r/1714/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> Exception in ZooKeeper.toString
> ---
>
> Key: ZOOKEEPER-786
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-786
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.3.1
> Environment: Mac OS X, x86
>Reporter: Stephen Green
>Assignee: Thomas Koch
>Priority: Minor
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-786.patch
>
>
> When trying to call ZooKeeper.toString

[jira] [Commented] (ZOOKEEPER-786) Exception in ZooKeeper.toString

2011-09-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-786:
-



bq.  On 2011-09-27 13:59:22, Camille Fournier wrote:
bq.  > src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java, line 195
bq.  > 
bq.  >
bq.  > Why was this removed? It is not germane to the patch at hand.
bq.  
bq.  Thomas Koch wrote:
bq.  You're right, the removal had nothing to do with the issue, but it was 
the right thing to do, once I've been there. It may happen in rare cases, that 
connect returns true already there, but primeConnection() is called anyways 
later from doTransport(). Having to possible call origins only adds to 
uncertainty.
bq.  Did you observe any problems with this?
bq.  
bq.  Camille Fournier wrote:
bq.  Are you sure that the lines in doTransport() will be called and 
executed if the socket connects immediately? I don't personally know whether 
that is the case or not. You didn't write any tests to show that this would 
happen, and you shouldn't have made the change for purposes of removing 
uncertainty without explicitly calling out what you were doing. If you are 
quite sure that even in the case of an immediate connection, OP_CONNECT will be 
set and we will hit that in doTransport, I'm fine with this change. But I don't 
like having changes like this snuck in under the radar, because if this is not 
the case and it causes a bug, it will be a massive pain to find.
bq.  
bq.  Camille Fournier wrote:
bq.  It seems to me, by the by, that if a socket is immediately connected 
it will NOT set the selection key for OP_CONNECT, because state will be set to 
ST_CONNECTED (see the source for SocketChannelImpl, specifically connect:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.connect%28java.net.SocketAddress%29
bq.  
bq.  and translateReadyOps:
bq.  
bq.  
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.translateReadyOps%28int%2Cint%2Csun.nio.ch.SelectionKeyImpl%29
bq.  
bq.  So, I'm not sure that this is a safe change to make, and you should 
always, always, always, be careful when changing anything to do with our NIO 
code unless you are really sure of the consequences.

Camille, you're right, I missed this change. Thanks.

There is definitely a reason for this! The connect call can return immediately 
with a connected indication, in which case we need to run the primeConnection 
code, if you don't OP_CONNECT will never be indicated (because the connection 
already took place) and primeConnection will therefore never be called in 
doTransport.

I believe we saw this with Solaris (there was a bug on this but I can't find it 
either on apache nor sourceforge).


- Patrick


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


On 2011-09-14 22:18:24, Thomas Koch wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1714/
bq.  ---
bq.  
bq.  (Updated 2011-09-14 22:18:24)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-786.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-786
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04 
bq.  
bq.  Diff: https://reviews.apache.org/r/1714/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> Exception in ZooKeeper.toString
> ---
>
> Key: ZOOKEEPER-786
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-786
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.3.1
> Environment: Mac OS X, x86
>Reporter: Stephen Green
>Assignee: Thomas Koch
>Priority: Minor
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-786.patch
>
>
> When trying to call ZooKeeper.toString during client disconnections, an 
> exception can be generated:
> [04/06/10 15:39:57.744] ERROR Error while calling watcher 
> java.lang.Error: java.net.SocketException: Socket operation on non-socket
>   at sun.nio.ch.Net.localAddress(Net.j

[jira] [Commented] (ZOOKEEPER-786) Exception in ZooKeeper.toString

2011-09-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-786:
-



bq.  On 2011-09-27 13:59:22, Camille Fournier wrote:
bq.  > src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java, line 195
bq.  > 
bq.  >
bq.  > Why was this removed? It is not germane to the patch at hand.
bq.  
bq.  Thomas Koch wrote:
bq.  You're right, the removal had nothing to do with the issue, but it was 
the right thing to do, once I've been there. It may happen in rare cases, that 
connect returns true already there, but primeConnection() is called anyways 
later from doTransport(). Having to possible call origins only adds to 
uncertainty.
bq.  Did you observe any problems with this?
bq.  
bq.  Camille Fournier wrote:
bq.  Are you sure that the lines in doTransport() will be called and 
executed if the socket connects immediately? I don't personally know whether 
that is the case or not. You didn't write any tests to show that this would 
happen, and you shouldn't have made the change for purposes of removing 
uncertainty without explicitly calling out what you were doing. If you are 
quite sure that even in the case of an immediate connection, OP_CONNECT will be 
set and we will hit that in doTransport, I'm fine with this change. But I don't 
like having changes like this snuck in under the radar, because if this is not 
the case and it causes a bug, it will be a massive pain to find.

It seems to me, by the by, that if a socket is immediately connected it will 
NOT set the selection key for OP_CONNECT, because state will be set to 
ST_CONNECTED (see the source for SocketChannelImpl, specifically connect:

http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.connect%28java.net.SocketAddress%29

and translateReadyOps:

http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/nio/ch/SocketChannelImpl.java#SocketChannelImpl.translateReadyOps%28int%2Cint%2Csun.nio.ch.SelectionKeyImpl%29

So, I'm not sure that this is a safe change to make, and you should always, 
always, always, be careful when changing anything to do with our NIO code 
unless you are really sure of the consequences.


- Camille


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


On 2011-09-14 22:18:24, Thomas Koch wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1714/
bq.  ---
bq.  
bq.  (Updated 2011-09-14 22:18:24)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-786.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-786
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04 
bq.  
bq.  Diff: https://reviews.apache.org/r/1714/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> Exception in ZooKeeper.toString
> ---
>
> Key: ZOOKEEPER-786
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-786
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.3.1
> Environment: Mac OS X, x86
>Reporter: Stephen Green
>Assignee: Thomas Koch
>Priority: Minor
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-786.patch
>
>
> When trying to call ZooKeeper.toString during client disconnections, an 
> exception can be generated:
> [04/06/10 15:39:57.744] ERROR Error while calling watcher 
> java.lang.Error: java.net.SocketException: Socket operation on non-socket
>   at sun.nio.ch.Net.localAddress(Net.java:128)
>   at sun.nio.ch.SocketChannelImpl.localAddress(SocketChannelImpl.java:430)
>   at sun.nio.ch.SocketAdaptor.getLocalAddress(SocketAdaptor.java:147)
>   at java.net.Socket.getLocalSocketAddress(Socket.java:717)
>   at 
> org.apache.zookeeper.ClientCnxn.getLocalSocketAddress(ClientCnxn.java:227)
>   at org.apache.zookeeper.ClientCnxn.toString(ClientCnxn.java:183)
>   at java.lang.String.valueOf(String.java:2826)
>   at java.lang.StringBuilder.append(StringBuilder.java:115)
>   at org.apache.zookeeper.ZooKeeper.toString(ZooKeeper.java:1486)
>   at java.util.Formatte

[jira] [Commented] (ZOOKEEPER-786) Exception in ZooKeeper.toString

2011-09-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-786:
-



bq.  On 2011-09-27 13:59:22, Camille Fournier wrote:
bq.  > src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java, line 195
bq.  > 
bq.  >
bq.  > Why was this removed? It is not germane to the patch at hand.
bq.  
bq.  Thomas Koch wrote:
bq.  You're right, the removal had nothing to do with the issue, but it was 
the right thing to do, once I've been there. It may happen in rare cases, that 
connect returns true already there, but primeConnection() is called anyways 
later from doTransport(). Having to possible call origins only adds to 
uncertainty.
bq.  Did you observe any problems with this?

Are you sure that the lines in doTransport() will be called and executed if the 
socket connects immediately? I don't personally know whether that is the case 
or not. You didn't write any tests to show that this would happen, and you 
shouldn't have made the change for purposes of removing uncertainty without 
explicitly calling out what you were doing. If you are quite sure that even in 
the case of an immediate connection, OP_CONNECT will be set and we will hit 
that in doTransport, I'm fine with this change. But I don't like having changes 
like this snuck in under the radar, because if this is not the case and it 
causes a bug, it will be a massive pain to find.


- Camille


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


On 2011-09-14 22:18:24, Thomas Koch wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1714/
bq.  ---
bq.  
bq.  (Updated 2011-09-14 22:18:24)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-786.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-786
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04 
bq.  
bq.  Diff: https://reviews.apache.org/r/1714/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> Exception in ZooKeeper.toString
> ---
>
> Key: ZOOKEEPER-786
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-786
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.3.1
> Environment: Mac OS X, x86
>Reporter: Stephen Green
>Assignee: Thomas Koch
>Priority: Minor
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-786.patch
>
>
> When trying to call ZooKeeper.toString during client disconnections, an 
> exception can be generated:
> [04/06/10 15:39:57.744] ERROR Error while calling watcher 
> java.lang.Error: java.net.SocketException: Socket operation on non-socket
>   at sun.nio.ch.Net.localAddress(Net.java:128)
>   at sun.nio.ch.SocketChannelImpl.localAddress(SocketChannelImpl.java:430)
>   at sun.nio.ch.SocketAdaptor.getLocalAddress(SocketAdaptor.java:147)
>   at java.net.Socket.getLocalSocketAddress(Socket.java:717)
>   at 
> org.apache.zookeeper.ClientCnxn.getLocalSocketAddress(ClientCnxn.java:227)
>   at org.apache.zookeeper.ClientCnxn.toString(ClientCnxn.java:183)
>   at java.lang.String.valueOf(String.java:2826)
>   at java.lang.StringBuilder.append(StringBuilder.java:115)
>   at org.apache.zookeeper.ZooKeeper.toString(ZooKeeper.java:1486)
>   at java.util.Formatter$FormatSpecifier.printString(Formatter.java:2794)
>   at java.util.Formatter$FormatSpecifier.print(Formatter.java:2677)
>   at java.util.Formatter.format(Formatter.java:2433)
>   at java.util.Formatter.format(Formatter.java:2367)
>   at java.lang.String.format(String.java:2769)
>   at com.echonest.cluster.ZooContainer.process(ZooContainer.java:544)
>   at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:488)
> Caused by: java.net.SocketException: Socket operation on non-socket
>   at sun.nio.ch.Net.localInetAddress(Native Method)
>   at sun.nio.ch.Net.localAddress(Net.java:125)
>   ... 15 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!defaul

[jira] [Commented] (ZOOKEEPER-786) Exception in ZooKeeper.toString

2011-09-27 Thread jirapos...@reviews.apache.org (Commented) (JIRA)

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

jirapos...@reviews.apache.org commented on ZOOKEEPER-786:
-



bq.  On 2011-09-27 13:59:22, Camille Fournier wrote:
bq.  > src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java, line 195
bq.  > 
bq.  >
bq.  > Why was this removed? It is not germane to the patch at hand.

You're right, the removal had nothing to do with the issue, but it was the 
right thing to do, once I've been there. It may happen in rare cases, that 
connect returns true already there, but primeConnection() is called anyways 
later from doTransport(). Having to possible call origins only adds to 
uncertainty.
Did you observe any problems with this?


- Thomas


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


On 2011-09-14 22:18:24, Thomas Koch wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1714/
bq.  ---
bq.  
bq.  (Updated 2011-09-14 22:18:24)
bq.  
bq.  
bq.  Review request for zookeeper.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  .
bq.  
bq.  
bq.  This addresses bug ZOOKEEPER-786.
bq.  https://issues.apache.org/jira/browse/ZOOKEEPER-786
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.src/java/main/org/apache/zookeeper/ClientCnxnSocketNIO.java 626da04 
bq.  
bq.  Diff: https://reviews.apache.org/r/1714/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thomas
bq.  
bq.



> Exception in ZooKeeper.toString
> ---
>
> Key: ZOOKEEPER-786
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-786
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.3.1
> Environment: Mac OS X, x86
>Reporter: Stephen Green
>Assignee: Thomas Koch
>Priority: Minor
> Fix For: 3.5.0
>
> Attachments: ZOOKEEPER-786.patch
>
>
> When trying to call ZooKeeper.toString during client disconnections, an 
> exception can be generated:
> [04/06/10 15:39:57.744] ERROR Error while calling watcher 
> java.lang.Error: java.net.SocketException: Socket operation on non-socket
>   at sun.nio.ch.Net.localAddress(Net.java:128)
>   at sun.nio.ch.SocketChannelImpl.localAddress(SocketChannelImpl.java:430)
>   at sun.nio.ch.SocketAdaptor.getLocalAddress(SocketAdaptor.java:147)
>   at java.net.Socket.getLocalSocketAddress(Socket.java:717)
>   at 
> org.apache.zookeeper.ClientCnxn.getLocalSocketAddress(ClientCnxn.java:227)
>   at org.apache.zookeeper.ClientCnxn.toString(ClientCnxn.java:183)
>   at java.lang.String.valueOf(String.java:2826)
>   at java.lang.StringBuilder.append(StringBuilder.java:115)
>   at org.apache.zookeeper.ZooKeeper.toString(ZooKeeper.java:1486)
>   at java.util.Formatter$FormatSpecifier.printString(Formatter.java:2794)
>   at java.util.Formatter$FormatSpecifier.print(Formatter.java:2677)
>   at java.util.Formatter.format(Formatter.java:2433)
>   at java.util.Formatter.format(Formatter.java:2367)
>   at java.lang.String.format(String.java:2769)
>   at com.echonest.cluster.ZooContainer.process(ZooContainer.java:544)
>   at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:488)
> Caused by: java.net.SocketException: Socket operation on non-socket
>   at sun.nio.ch.Net.localInetAddress(Native Method)
>   at sun.nio.ch.Net.localAddress(Net.java:125)
>   ... 15 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




  1   2   >