curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <>
Subject Re: seeing weird issue with distribute queue recipe in curator
Date Wed, 23 Sep 2015 21:14:09 GMT
Please open an issue in Jira and provide a test. I haven’t heard of anything like this before.


On September 18, 2015 at 11:40:01 PM, Check Peck ( wrote:

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

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", "",
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 + "=" + this.clientName;

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 - "" 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

View raw message