> On Dec. 18, 2014, 5:54 a.m., Sijie Guo wrote:
> > bookkeeper-server/src/main/java/org/apache/bookkeeper/client/UpdateLedgerOp.java,
> >  line 118
> > <https://reviews.apache.org/r/28835/diff/2/?file=792808#file792808line118>
> >
> >     why you need #get() here? isn't Runnable called only when readCb is 
> > completed?
> 
> Rakesh R wrote:
>     readCb.get() is used to see any errors during the ledger update. In case 
> of errors will stop issuing of ledgers and will exit.
> 
> Sijie Guo wrote:
>     readCb has a future, why can't you register a FutureCallback?
>     
>     
> http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/util/concurrent/Futures.html#addCallback%28com.google.common.util.concurrent.ListenableFuture,%20com.google.common.util.concurrent.FutureCallback%29
>     
>     so in the FutureCallback, you will know whether the operation is 
> completed or failed.

I have used futurecallback and updated the result in #success and #failure 
implemetations.


> On Dec. 18, 2014, 5:54 a.m., Sijie Guo wrote:
> > bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieShell.java,
> >  line 1194
> > <https://reviews.apache.org/r/28835/diff/2/?file=792807#file792807line1194>
> >
> >     The bookieId option is really weird. A much clear option would specify 
> > new bookieId, rather use 'ip' or 'hostname'.
> >     
> >     -1 on the option
> 
> Rakesh R wrote:
>     Followed same pattern of cookie updates. Make 'hostname' and 'ip' as 
> constants, so the user could only specify "updatebookie -bookieId hostname" 
> or "updatebookie -bookieId ip". Does this makes sense to you?
> 
> Sijie Guo wrote:
>     not at all. the cases to change bookie id are not just switching bookie 
> id between ip and hostname. it also could be the case you need to change ip 
> address.
> 
> Rakesh R wrote:
>     Thanks Sijie for this usecase. Can we suggest users to change the 
> 'ipaddress_1' to 'hostname', instead of changing 'ipaddress_1' to another 
> 'ipaddress_2'. Considering that the hostname would not be changed frequently 
> comparing to the ipaddress change. Do you agree with me?
>     
>     After seeing this comment, if this is a real world usecase then I feel 
> the same is applicable to Cookie also ?
> 
> Sijie Guo wrote:
>     it doesn't matter how often it happens. if it happens, the tool need to 
> be able to handle this case. using explicit bookie id is much more 
> straightfoward and clean behavior, rather than implicit hostname & ipaddress 
> switching. 
>     
>     I don't remember how cookie command. but yes, it applies for cookie too. 
> I do remember I made similar comment when reviewing cookie tool, no?
> 
> Rakesh R wrote:
>     Kindly refer the below comment:
>     
> https://issues.apache.org/jira/browse/BOOKKEEPER-773?focusedCommentId=14143268&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14143268
>     
>     
>     Initially I tried to make it more generic by taking bookieId from the 
> user, but based on this comment it has been agreed upon to go ahead with the 
> syntax,
>     
>     updatecookie -bookieId <hostname|ip>
> 
> Sijie Guo wrote:
>     ok. anyway, I am fine to stick to the constants right now. we might 
> change it later.

ok. Thanks!

So I retained -bookieId <hostname|ip> options


- Rakesh


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


On Jan. 1, 2015, 7:43 p.m., Rakesh R wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28835/
> -----------------------------------------------------------
> 
> (Updated Jan. 1, 2015, 7:43 p.m.)
> 
> 
> Review request for bookkeeper, fpj, Ivan Kelly, and Sijie Guo.
> 
> 
> Bugs: BOKKEEPER-634
>     https://issues.apache.org/jira/browse/BOKKEEPER-634
> 
> 
> Repository: bookkeeper-git
> 
> 
> Description
> -------
> 
> admin tool for changing the bookie's identifier to IP/hostname
> 
> 
> Diffs
> -----
> 
>   
> bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieShell.java 
> a1e4639 
>   
> bookkeeper-server/src/main/java/org/apache/bookkeeper/client/UpdateLedgerOp.java
>  PRE-CREATION 
>   
> bookkeeper-server/src/test/java/org/apache/bookkeeper/client/UpdateLedgerCmdTest.java
>  PRE-CREATION 
>   
> bookkeeper-server/src/test/java/org/apache/bookkeeper/client/UpdateLedgerOpTest.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/28835/diff/
> 
> 
> Testing
> -------
> 
> Added few tests
> 
> 
> Thanks,
> 
> Rakesh R
> 
>

Reply via email to