zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio Martella <claudio.marte...@tis.bz.it>
Subject counter with zookeeper
Date Thu, 02 Dec 2010 14:29:26 GMT

I'm trying to implement a String->Long dictionary, as I'm doing text
processing in M/R and would like to speed up my things.
In order to implement the mapping, I need to access a high speed atomic
counter that allows me to pick the latest used Long, increment it and
use it for the latest-discovered new word to put in the dictionary.

At first i thought about using a regular sequential znode and use the
sequence number as the counter value, but I realize the sequence number
is an int, while i'd like a long. Is that correct? I'm refering to
Stat.getVersion() in the API.

In case this strategy is unfeasible, the second possibility is to use a
WriteLock to "/counter" to control access the payload of the znode,
where i'd put the counter value, or access to a special row in
cassandra, where i'd put the counter value. The Cassandra option is
probably the best possibility, as i'm storing my dictionary there
anyway, but I'd like to hear from you about latency and performance for
this options in ZK.



Claudio Martella
Digital Technologies
Unit Research & Development - Analyst

TIS innovation park
Via Siemens 19 | Siemensstr. 19
39100 Bolzano | 39100 Bozen
Tel. +39 0471 068 123
Fax  +39 0471 068 129
claudio.martella@tis.bz.it http://www.tis.bz.it

Short information regarding use of personal data. According to Section 13 of Italian Legislative
Decree no. 196 of 30 June 2003, we inform you that we process your personal data in order
to fulfil contractual and fiscal obligations and also to send you information regarding our
services and events. Your personal data are processed with and without electronic means and
by respecting data subjects' rights, fundamental freedoms and dignity, particularly with regard
to confidentiality, personal identity and the right to personal data protection. At any time
and without formalities you can write an e-mail to privacy@tis.bz.it in order to object the
processing of your personal data for the purpose of sending advertising materials and also
to exercise the right to access personal data and other rights referred to in Section 7 of
Decree 196/2003. The data controller is TIS Techno Innovation Alto Adige, Siemens Street n.
19, Bolzano. You can find the complete information on the web site www.tis.bz.it.

View raw message