zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Check Peck <comptechge...@gmail.com>
Subject seeing weird issue with distribute queue recipe in curator
Date Sat, 19 Sep 2015 04:39:33 GMT
I am seeing very weird issue when using DistributedQueue recipe in Curator.
I am thinking it might be a bug in Zookeeper or Curator but not sure yet or
may be I am doing something silly.

I am trying to queue message in Zookeeper using DistributedQueue recipe:

    public void queueMessages() throws Exception {
        // below is the data I am sending
        DqTestHolder work = new DqTestHolder("103", "
DL-hOst-AbcdeFgh-Pletrs@host.com", "K15O");

And here is my serializer class:

    public class DqTestHolderSerializer implements
QueueSerializer<DqTestHolder> {

        public DqTestHolder deserialize(byte[] buffer) {
            // nothing here for now

        public byte[] serialize(DqTestHolder work) {
            return work.toString().getBytes();

And here is my DqTestHolder class:

    public class DqTestHolder {
        private final String clientId;
        private final String emailId;
        private final String clientName;

        public DqTestHolder(final String clientId, final String emailId,
final String clientName) {
            this.clientId = clientId;
            this.emailId = emailId;
            this.clientName = clientName;

        // getters here

        public String toString() {
            return this.clientId + "=" + this.emailId + "=" +

Now after I queue above data and I go and see exhibitor, I am seeing
something like this: You see it is appending bracket ")" infront of data
and sometimes I see "(" this as well which is not what I am sending above.


This is only happening when we send data with "-" in it I guess and if we
have something like this in emailId - "abcde@host.com" then I don't see any
bracket and it shows correctly what I am sending. So if anyone tried to get
data using getData() method, I get exactly what I see in exhibitor but not
what I have sent above.

Also when we try to use getData() method of curator to get above data from
znode, I see some wierd characters getting appended to it as well. I am
using Curator 2.8.0

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