Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C781B2009DC for ; Tue, 2 May 2017 09:54:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C6529160BAC; Tue, 2 May 2017 07:54:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 205DD160BA1 for ; Tue, 2 May 2017 09:54:07 +0200 (CEST) Received: (qmail 85631 invoked by uid 500); 2 May 2017 07:54:06 -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 85619 invoked by uid 99); 2 May 2017 07:54:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 May 2017 07:54:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EC143192709 for ; Tue, 2 May 2017 07:54:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.897 X-Spam-Level: X-Spam-Status: No, score=-0.897 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id TSWcvS5-PdSo for ; Tue, 2 May 2017 07:54:04 +0000 (UTC) Received: from mail-pg0-f43.google.com (mail-pg0-f43.google.com [74.125.83.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D51695F3BB for ; Tue, 2 May 2017 07:54:03 +0000 (UTC) Received: by mail-pg0-f43.google.com with SMTP id v1so57064606pgv.1 for ; Tue, 02 May 2017 00:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=XgSj2WRpGSOOuXJ7NznokjWfqCrIdtSIue+4VsMsQLA=; b=IC9ZpBEZaOFDImT4RG6+Em2+/6+upqsHqk2odJq9Gox3uMNxhBCNh4B5tCSPqfclzJ ZspDbIVcx0wf1wCte+0jzZI6+tQMVMpSrVHZ/FLUCy38UJ+wRNx9n185Tm968yHoNXia skzd5/PF/yCjL5WMqV1M/xJMrNlIbadeBlr8yaOezTaanV7xFu1x/5jy/ZS/LEvFYpw2 88P5l2I97nf4j6Lf5PeoLY5ZH0AMblyBab534xe3yw0VvebhhPHpDqpyKAJ50exeWiIh kGCJR9vaFZdihMnldcbH8Rgf9TE9So0iJlxwgq303FSCFs/dU/4kiC5Ae62NVudq5wA4 Iy9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=XgSj2WRpGSOOuXJ7NznokjWfqCrIdtSIue+4VsMsQLA=; b=S0dkKsUUEd2emrGsGOZvhBAga9/yml+0tnrT3SUrFthFmyuIdVqv/WSh2BqtfpkOeP z+xMKHhKBvaIaaX9nXzW3YCR1BdS1KU8ef9KXqpzVuoKMrx+1HI1XWGt4Prk0JyxW42w 5Q7TsVESTiJbKyhec1KJVxW7aacxA4d9pr6IJIH0OmnQSqGengGTKo4D4EdKO6WXZE5G aeNrkzqs1K/l4QdcSNh3/c0XVwqkxxfSmmQ8s6VqMsYqxC206eAKAon/AihezQiAx0zB nubeq+TFGTPBajp/QeARLipS2oc+omRMWkep4f3YHKHOtzrzKga01dQW8bOurKSMYN/v 0Vuw== X-Gm-Message-State: AN3rC/5Ubx0Th5YSEAkopnCVypza4UMjcXOyzu+88Bj0zGATEL39PrPt rq7AucTgkKM4iyKGoS9VNTZ6rAVY0NG9 X-Received: by 10.98.184.18 with SMTP id p18mr29509561pfe.45.1493711637134; Tue, 02 May 2017 00:53:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.155.72 with HTTP; Tue, 2 May 2017 00:53:56 -0700 (PDT) From: Onur Karaman Date: Tue, 2 May 2017 00:53:56 -0700 Message-ID: Subject: questions regarding the java ZooKeeper client and its asynchronous, multiop, asynchronous multiop apis To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=f403045d167a874670054e85d7ec archived-at: Tue, 02 May 2017 07:54:09 -0000 --f403045d167a874670054e85d7ec Content-Type: text/plain; charset=UTF-8 Hey everyone. When dealing with leadership initialization and group membership changes to my system, I'm looking into options for doing many zookeeper operations quickly. I'm using the java org.apache.zookeeper.ZooKeeper client. Both the client and ensemble are using zookeeper 3.4.9. Currently, our system entirely uses the synchronous apis but this can be problematic as the number of zookeeper operations grows. I've been considering the asynchronous apis as well as the synchronous and asynchronous multiop apis. To get around the 1MB "jute.maxbuffer" limitation on the multiop, I've also looked into splitting the operations into various multiop batch sizes for the synchronous and asynchronous multiop apis as an alternative to having one huge request. I've got a few questions: 1. How ready is multiop? Have people been using it in production? 2. Does all of this sound accurate? From what I understand, multiop is truly a transaction. Either all operations commit or all abort. a. With the synchronous multiop api, either a List is returned containing the successful results or a KeeperException is thrown in which you can call KeeperException.getResults() to spot the individual operation that caused the abort (it's the operation corresponding to the ErrorResult). b. With the asynchronous multiop api, you can spot the individual operation that caused the abort by looking up the operation corresponding to the ErrorResult in the List passed into the MultiCallback. 3. For the asynchronous multiop api, what is the relation, if any, between the return code passed to the MultiCallback and the error codes of the ErrorResults in the List passed into the MultiCallback? 4. In terms of reads, I looked over the APIs and only found individual synchronous and asynchronous reads. Is there no way to batch reads in a multiop? 5. Is there any config to control client memory usage? For instance, this can be in the form of bounding the number of in-flight asynchronous requests. - Onur --f403045d167a874670054e85d7ec--