curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Check Peck <comptechge...@gmail.com>
Subject Re: seeing weird issue with distribute queue recipe in curator
Date Wed, 23 Sep 2015 21:12:20 GMT
Does anyone have any thoughts on this?

On Fri, Sep 18, 2015 at 9:39 PM, Check Peck <comptechgeeky@gmail.com> 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 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");
>         this.queue.put(work);
>     }
>
> And here is my serializer class:
>
>     public class DqTestHolderSerializer implements
> QueueSerializer<DqTestHolder> {
>
>         @Override
>         public DqTestHolder deserialize(byte[] buffer) {
>             // nothing here for now
>         }
>
>         @Override
>         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.
>
>     )103=DL-hOst-AbcdeFgh-Pletrs@host.com=K15O
>
> 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
>
>
>

Mime
View raw message