curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Check Peck <comptechge...@gmail.com>
Subject Re: Best Practice while creating znodes?
Date Sun, 13 Sep 2015 21:06:28 GMT
Ok so that means in the below code if I have 500 children in the list, and
znode names of all those 500 children is greater than 1 MB, then below get
call will fail. Am I correct?

List<String> children = client.getData().forPath("/root/clients/");

What about data in those znode? They can be more than 1MB in each znode
correct?

On Sun, Sep 13, 2015 at 1:57 PM, Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:

> The node names. Internally, ZooKeeper’s protocol is (by default) limited
> to 1MB per response.
>
> -JZ
>
>
>
> On September 13, 2015 at 3:44:10 PM, Check Peck (comptechgeeky@gmail.com)
> wrote:
>
> Hi Jordan,
>
> I was looking at this email which you sent me long time back. Here you
> mentioned - If I call getChildren(), the entire length of all the children
> can't exceed 1MB. Suppose, I have 500 clients as client_0, client_1 etc.
> And each client has 50-60 znodes with some data in it.
>
> List<String> children = client.getData().forPath("/root/clients/");
>
> So by length here you mean, actual znode name of all clients? Or something
> else?
>
> Actually I am confuse what does length the the entire length of all the
> children means? Does it mean data also within each node or just the
> zookeeper path of those node.
>
>
> On Thu, Nov 7, 2013 at 10:57 AM, Jordan Zimmerman <
> jordan@jordanzimmerman.com> wrote:
>
> > There are very few limitations on naming. You can't use a slash. Have a
> > look at:
> >
> > org.apache.zookeeper.common.PathUtils
> >
> > In terms of length, ZooKeeper has a 1MB limit per API call. So, for
> > example, if you call getChildren(), the entire length of all the
> children
> > can't exceed 1MB (unless you reconfigure ZK).
> >
> > -JZ
> >
> > On Nov 7, 2013, at 10:45 AM, Techy Teck <comptechgeeky@gmail.com>
> wrote:
> >
> > Can anyone help me on this?
> >
> > Is there any best practices that we need to follow while creating the
> > znodes?
> >
> > Meaning the znode name should be small not very large names or there
> > shouldn't be a dot or underscore within the word?
> >
> > Anything like that?
> >
> > I will be using Apache Curator.
> >
> >
> >
> >
> > On Wed, Nov 6, 2013 at 11:24 AM, Techy Teck <comptechgeeky@gmail.com>
> > wrote:
> >
> >> Is there any best practices that we need to follow while creating the
> >> znodes?
> >>
> >> Meaning the znode name should be small not very large names or there
> >> shouldn't be a dot or underscore within the word?
> >>
> >> Anything like that?
> >>
> >>
> >
> >
>
>

Mime
View raw message