From user-return-11344-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Mon Apr 9 10:36:34 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 6DB0B180645 for ; Mon, 9 Apr 2018 10:36:34 +0200 (CEST) Received: (qmail 83509 invoked by uid 500); 9 Apr 2018 08:36:32 -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 83049 invoked by uid 99); 9 Apr 2018 08:36:30 -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; Mon, 09 Apr 2018 08:36:30 +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 1F36B18081B for ; Mon, 9 Apr 2018 08:29:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.88 X-Spam-Level: * X-Spam-Status: No, score=1.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_SHORT=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id c156hVlORT0q for ; Mon, 9 Apr 2018 08:29:34 +0000 (UTC) Received: from mail-ot0-f181.google.com (mail-ot0-f181.google.com [74.125.82.181]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id EA8D35F24C for ; Mon, 9 Apr 2018 08:29:33 +0000 (UTC) Received: by mail-ot0-f181.google.com with SMTP id d9-v6so5445860oth.10 for ; Mon, 09 Apr 2018 01:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=xdeLE8634aIlFUlbvO4OBtRjbdWJ9D5rDljxlqxeYpE=; b=hl3EiVfRQHV6ztgRjOy2aRi46cd3EBlCqOrPyLDFn6a4xu4rauFDZakDd4r/90s5BJ hukKZibnaZaR0J4kma/ETd8nwUYXy0zxyNMXG4okfYI2CDQKZGO/ET2zUeXRy/rnJI8Q I4DMkPqQzNGrb32O26MB30iDNvKqEX14lN4iYJLRa7MR4dbowW71K32cE6ehBkE+HuQG ENwE9uGxC2AqfwBURdz/vZnvLalCfjjsgHys2SJ5P42ZW9gHi+YwCv+OiwomrK/eSvAz aX7u2c5qeQc1qU3O+dZQZkrR4fSf2myRWBKV1IUSiqGlrDXRLp5fASo80BTY7kW7rDG5 HHrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=xdeLE8634aIlFUlbvO4OBtRjbdWJ9D5rDljxlqxeYpE=; b=e6/v9w1hFNfJ+M+CRp0sa7Z2ATc13frNQ3a7LeCOMd1m7x3i/ow+c0oaDxJmpo5tk8 rnMUtcbd9togl0d8EG/ayeIfwnHPQnIHfEvR1B+sOw5kMTpfOYzqu+lhCoT3wxsM0sKl U5E8YW65xM9oFUpzEx8FUljtb6BTHroV68+OifbM2wIUmhcZBYAvEPWj2sEOu7ZBjPnr +dWoHy7iJwZDZVaNijalXha5e1rJy/HyQu9EHdrx72vdulww2nEeKeJ+/5MpYxU9RGFy BaF75GB6gz5WB3+/4kNDnc5+urWh7hj79srbu/sqNIjNIevZdFoV4+Oj9E3dYFQfw0yz uWag== X-Gm-Message-State: AElRT7F/WJAkXVH7glsz7/L2Y2CYt+Yj5WO6EVa8NbqA6xilmnePtSoJ y3pd/CZXlLURuYuI9CHXW8eYpCiNj0hZCQgJRk6TsA== X-Google-Smtp-Source: AIpwx49cfy1UP7xYJXOiUrPdrEft9zOy2kH2W+F+2koAd29SX8b5+fOicAzIC/JXft6La7cBszXbcy7cuOnsxkMIjdY= X-Received: by 2002:a9d:c86:: with SMTP id b6-v6mr23450035otb.91.1523262567176; Mon, 09 Apr 2018 01:29:27 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:2829:0:0:0:0:0 with HTTP; Mon, 9 Apr 2018 01:29:26 -0700 (PDT) In-Reply-To: References: <9d9b34d1-5455-347d-ad87-880076d14638@elyograg.org> From: Andor Molnar Date: Mon, 9 Apr 2018 10:29:26 +0200 Message-ID: Subject: Re: Is the current max packet length available via the API? To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary="000000000000377a3a0569663470" --000000000000377a3a0569663470 Content-Type: text/plain; charset="UTF-8" If the ZK client is part of your application, you can probably read the jute.maxbuffer setting. However on the server side - as you mentioned - the setting should be consistent with the client. I believe it would make sense to expose the effective jute maxbuffer size via the "conf" 4lw command if that's any help to you. Would you like to contribute and submit a pull request for that on the master branch? Regards, Andor On Sat, Apr 7, 2018 at 8:13 PM, Shawn Heisey wrote: > On 4/6/2018 6:46 AM, Martin Gainty wrote: > > ZOOMAIN="-Dcom.sun.management.jmxremote >> -Dcom.sun.management.jmxremote.port=$JMXPORT >> -Dcom.sun.management.jmxremote.authenticate=$JMXAUTH >> -Dcom.sun.management.jmxremote.ssl=$JMXSSL -Dzookeeper.jmx.log4j.disable=$JMXLOG4J >> org.apache.zookeeper.server.quorum.QuorumPeerMain" >> fi >> else >> echo "JMX disabled by user request" >&2 >> ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain" >> fi >> MG>everything you need to setup JMX is located MG>athttp:// >> java.sun.com/javase/6/docs/technotes/guides/management/agent.html >> > > I know how to enable remote JMX when running a java program. I also know > how to connect a JMX client like jconsole to that program. > > What I was saying that I didn't know how to do was access data from JMX in > a Java program that I've written myself. > > Remote JMX seems like overkill, when all I want to know is what the ZK > client that's part of my application is currently using as a maximum packet > length. Reading ClientCnxn.packetLen gets me what I was after. It would > have taken an extensive code review for me to find that particular field, > so thank you for letting me know about it. > > If the client has an increased jute.maxbuffer but the server doesn't, then > there could still be a problem with writing data, but I'm not going to try > and detect that. In any case, I'm not going to abort the upload, I'm just > logging a warning. > > Thanks, > Shawn > > --000000000000377a3a0569663470--