zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jürgen Wagner (DVT)" <juergen.wag...@devoteam.com>
Subject Re: Best strategy to test Zookeeper
Date Tue, 11 Nov 2014 05:14:44 GMT
Hello Ibrahim,
  do the following:

- Create a znode /tests/status and keep setting a Watcher on it to look
out for data updates. This is one process just watching the znode and
logging times of changes.

- Run your second process which actually performs the tests, plus it
will update /tests/status as the last request after having performed all
tests. /tests/status may be set to, e.g., "completed" or a timestamp
indicating the time when that request was sent. This is the second
process creating the test scenario.

What will now happen is the following:

- The Watcher process will sit there and wait for /tests/status updates.
- The test process will run and finally update the special znode.
- The Watcher process will be notified of the update (the test
completion) and log the test completion time, plus the value found in
the special znode.

As there is a total ordering of all requests within the test process
session, you can be sure that the update to /tests/status is in fact the
last operation, i.e., all of your async requests have been completed and
all data is really persistently stored in Zookeeper. If you have
sub-tests or different phases in your tests, these phases could make
intermediate updates of your status znode, providing the time when the
actual operations of the respective phase have been processed and
completed by Zookeeper.

If you want to be really precise, you would run the /tests/status
setting without any tests and discount this execution time from the
results of your test. That would be the (miniscule) overhead of the
final test completion latch.

Best regards,
--Jürgen

On 11.11.2014 06:00, Ibrahim wrote:
> Hi Jürgen,
>
> When you say "Then set up a watcher for this special node to get notified
> when Zookeeper has finished processing all requests". 
>
> In fact, the main reason for posting this question is that I do not know
> when Zookeeper will finish processing all requests (In Async mode). I need
> to catch end time.
>
> Can you give me hint with this?
>
> Thanks alot
>
> Ibrahim
>
>  
>
>
>
> --
> View this message in context: http://zookeeper-user.578899.n2.nabble.com/Best-strategy-to-test-Zookeeper-tp7580580p7580584.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.


-- 

Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
уважением
*i.A. Jürgen Wagner*
Head of Competence Center "Intelligence"
& Senior Cloud Consultant

Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
E-Mail: juergen.wagner@devoteam.com
<mailto:juergen.wagner@devoteam.com>, URL: www.devoteam.de
<http://www.devoteam.de/>

------------------------------------------------------------------------
Managing Board: Jürgen Hatzipantelis (CEO)
Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071



Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message