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

Rakesh R commented on BOOKKEEPER-634:
-------------------------------------

Attached a patch based on yesterday's proposal. I'll try to add more testcases.

bq.  I was expecting a rate limiting. 
Exactly rate limiting would be more efficient in this situation, permits will 
be distributed in a fixed rate. Let me try it once.
I'm putting one corner case to understand more, say zk is slow and configured 
throttling(batchsize) 100. Now it will send 100 requests per sec without 
considering the responses from zk. In worst case, there may be many requests 
waiting for zk responses like, 100 + 100 + 100 etc.

+New Algorithm considering both the cases+
1) rateLimiter = RateLimiter.create(batchsize); ledgersToBeUpdated = 
ArrayList(batchsize);
2) iterate and get one ledger. Add it to ledgersToBeUpdated
3) if ledgersToBeUpdated.size() < batchsize. If yes then goto 3.1, else goto 3.2
3.1) rateLimiter.acquire(). Go to 2
3.2) loop through ledgersToBeUpdated and do update. Waiting to get all the 
updation status.
3.3) check the status and update the counter. If errors exit with -1, else 
clear ledgersToBeUpdated and goto 3.4
3.4) check the limit reaches, if yes exit with 0 else goto 2.

ratelimiter will guarantee fixed rate of execution and on the other side 
batches will guarantee the completion status.


> Provide admin tool to rename bookie identifier in ledger metadata
> -----------------------------------------------------------------
>
>                 Key: BOOKKEEPER-634
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-634
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-client, bookkeeper-server
>    Affects Versions: 4.2.1
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 4.3.0
>
>         Attachments: 0001-BOOKKEEPER-634-initial-draft-version.patch, 
> 001-BOOKKEEPER-634-rename-bookieid-in-ledger.patch, 
> 002-BOOKKEEPER-634-rename-bookieid-in-ledger.patch, 
> BOOKKEEPER-634-rename-bookieid-in-ledger.patch, BOOKKEEPER-634.patch, 
> BOOKKEEPER-634.patch
>
>
> This JIRA to discuss about admin tool for changing the bookie's IP to 
> hostname.



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

Reply via email to