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 6FF9018F54 for ; Sun, 13 Sep 2015 20:47:24 +0000 (UTC) Received: (qmail 75072 invoked by uid 500); 13 Sep 2015 20:47:23 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 75021 invoked by uid 500); 13 Sep 2015 20:47:23 -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 75009 invoked by uid 99); 13 Sep 2015 20:47:23 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Sep 2015 20:47:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 221C7F1474 for ; Sun, 13 Sep 2015 20:47:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id q9CltnXS1A1k for ; Sun, 13 Sep 2015 20:47:21 +0000 (UTC) Received: from mail-ig0-f178.google.com (mail-ig0-f178.google.com [209.85.213.178]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 02609204DC for ; Sun, 13 Sep 2015 20:47:21 +0000 (UTC) Received: by igbkq10 with SMTP id kq10so77325481igb.0 for ; Sun, 13 Sep 2015 13:47:20 -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=dpNP+2t10ONuPhJECfeT7wUsZIom7wO+B89KhPb3hEA=; b=wHm8Ep4XMrlu40AGNX5v7ecnkKqidxOzSCIQW5sZq1NvLCa+UVmdupnUH0n/5w6eS3 KobEQvYMWCulnQwSgIDmawMgZWoG7Yug+rrDuoUVeL8O/tRh425sBSGdflM7EHH1ylJp paTxYdabhC9tTDKtm8TuaLOJqV4iUl9NDiksHQRYbALbsICl4sm7OmO4TkYkeN2CdtkZ 2758rpOi0i6mgEkPS8ZgJMjBR8629HNBqH2/lq3W3K7LZrN6wofgbAEX9rJO0TL0/MOu /dK61iVLeEW+q0xEyxpx8ERZIyOwwBU6FVdNhCv5HwytIuC3mHmRR3gbsrw+33dPFFY9 I0rw== X-Received: by 10.50.221.104 with SMTP id qd8mr12911236igc.62.1442177240051; Sun, 13 Sep 2015 13:47:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.130.36 with HTTP; Sun, 13 Sep 2015 13:47:00 -0700 (PDT) In-Reply-To: References: From: Check Peck Date: Sun, 13 Sep 2015 13:47:00 -0700 Message-ID: Subject: Re: zookeeper design problem To: user Content-Type: multipart/alternative; boundary=001a113475ae18b566051fa70e94 --001a113475ae18b566051fa70e94 Content-Type: text/plain; charset=UTF-8 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. > > > > > > > > > > --001a113475ae18b566051fa70e94--