Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE06018FB8 for ; Sun, 13 Sep 2015 21:04:52 +0000 (UTC) Received: (qmail 99861 invoked by uid 500); 13 Sep 2015 21:04:52 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 99805 invoked by uid 500); 13 Sep 2015 21:04:51 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 99792 invoked by uid 99); 13 Sep 2015 21:04:51 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Sep 2015 21:04:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 446F21A17EB for ; Sun, 13 Sep 2015 21:04:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.879 X-Spam-Level: *** X-Spam-Status: No, score=3.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 84pBXTL-XlcA for ; Sun, 13 Sep 2015 21:04:49 +0000 (UTC) Received: from mail-ig0-f181.google.com (mail-ig0-f181.google.com [209.85.213.181]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id EDB0242B78 for ; Sun, 13 Sep 2015 21:04:48 +0000 (UTC) Received: by igbkq10 with SMTP id kq10so77463265igb.0 for ; Sun, 13 Sep 2015 14:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=l1kd4/DGZ4tEqhRkZSEgeZOx83wOjjuxvmzsfGvqGlc=; b=h3GOCq9tznnzvtlj6UM6BtM1RWx+HxL3XfO8oTn5ym1/v/p3aM+SYcPHntHII2MmpN nFqqvyqxrQsOffodPYyXh6PLYiUsO7Y1KKjPYyuZyiXWHD4KseAUBVZEbs30/CL2nw0z UVQXiUEejryBT77BBXjfgPrXDMHMsam3rH/GKj8dswGLY/Js88d4AHQDhVjntKtW/XJi ezhPu2SMdJTadU6jyxxTZeZhD3ixHa+BmLqlPEnvUxmu7yt9fbbH+HIaqVrQgGL4T+VH jE/KBN6wES9mXZBwDnTyBRsHxyAaiAV5GWPZKArA9bnBySbqG/eZ1VNCHai/F3BAX15/ 36SQ== X-Received: by 10.50.221.104 with SMTP id qd8mr12976025igc.62.1442178288464; Sun, 13 Sep 2015 14:04:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.130.36 with HTTP; Sun, 13 Sep 2015 14:04:28 -0700 (PDT) In-Reply-To: References: From: Check Peck Date: Sun, 13 Sep 2015 14:04:28 -0700 Message-ID: Subject: Re: zookeeper design problem To: user Content-Type: multipart/alternative; boundary=001a113475ae9640a6051fa74cc5 --001a113475ae9640a6051fa74cc5 Content-Type: text/plain; charset=UTF-8 Sorry my use case will be like this: In my case, what does it mean? If I have 1000 clients and each client has 100 events znodes and those znodes 100 more childs and those childs have some data in it. Then what will fail if I try to do something? If the length of all childrens znode names is greater than 1 MB, then it will fail right? Data can be more than 1MB in each znode correct? This is what I am trying to understand basis on zookeeper limitation. On Sun, Sep 13, 2015 at 1:47 PM, Check Peck wrote: > Ok understood. As per other thread in which Jordan mention to me this: > > > > *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).* > In my case, what does it mean? If I have 1000 clients and each client has > 100 znodes and those znodes have some data in it. Then what will fail if I > try to do something? > > I am trying to get a better idea on this. > > On Sat, Sep 12, 2015 at 11:22 PM, Cameron McKenzie > wrote: > >> You can call the event / timestamp zNode's whatever you like. I'd just use >> a persistent sequential node for the name, and have your reaper make its >> decisions based on the creation / modification time of the event / >> timestamp zNode that you're referring to rather than the name of the zNode >> itself. >> >> On Sun, Sep 13, 2015 at 4:03 PM, Check Peck >> wrote: >> >> > Thanks Cameron for suggestion. Is it ok if I have timestamp1 instead of >> > event1, timestamp2 instead of event2 and so on? Or do you think it >> might be >> > bad idea. >> > >> > This timestamp will be System.currentTimeMillis() from Java. >> > >> > On Sat, Sep 12, 2015 at 10:06 PM, Cameron McKenzie < >> mckenzie.cam@gmail.com >> > > >> > wrote: >> > >> > > Can't you just add a zNode under client_xxx for each of your 'event' >> > > triplets, and then have the reaper go and remove that whole child node >> > when >> > > the 'event' node is beyond a certain age? Something like: >> > > >> > > /root/clients/client_100/event1/metric >> > > /root/clients/client_100/event1/transaction >> > > /root/clients/client_100/event1/log >> > > /root/clients/client_100/event2/metric >> > > /root/clients/client_100/event2/transaction >> > > /root/clients/client_100/event2/log >> > > /root/clients/client_101/event1/metric >> > > /root/clients/client_101/event1/transaction >> > > /root/clients/client_101/event1/log >> > > >> > > >> > > On Sun, Sep 13, 2015 at 7:59 AM, Check Peck >> > > wrote: >> > > >> > > > I am working on designing the zookeeper node hierarchy so looking >> for >> > > some >> > > > suggestion. I have a clients node under which I will have multiple >> > > clients >> > > > (for ex: client_100, client_101) >> > > > >> > > > /root/clients/client_100 >> > > > /root/clients/client_101 >> > > > /root/clients/client_102 >> > > > >> > > > Now inside each client, I need to store three things: >> > > > >> > > > 1. First is metric data which will be in JSON format (max 15 >> > key-value >> > > > pairs). >> > > > 2. Second is transaction data which will be plain simple string >> > (this >> > > > data should be less than 1 MB). >> > > > 3. Third is client logs data which will also be plain simple >> string >> > > > (this data should also be less than 1 MB). >> > > > >> > > > Also now most important thing, I can have multiple of above three >> > things >> > > > for each client. Meaning for client_100, I can have two metric data, >> > two >> > > > transaction data and two client logs. Here two is just a number it >> can >> > > be X >> > > > but I will have my reaper process running that can clean the old >> > "metric >> > > > data, transaction data and client logs" for each client after >> certain >> > > > period or some threshold. >> > > > >> > > > In short, for each client I have a list of above three things which >> I >> > > need >> > > > to show on zookeeper. What is the right design for this so that I >> don't >> > > > destroy zookeeper. I can have each znode for each of above three >> things >> > > but >> > > > I am not sure how can I bucket this since it will be multiple for >> each >> > > > clients. >> > > > >> > > > Also max number of clients I can have is 1000 that's all. But I will >> > have >> > > > another reaper process for this as well to keep deleting older >> clients >> > > > which doesn't had any activity from a long time. >> > > > >> > > >> > >> > > --001a113475ae9640a6051fa74cc5--