Return-Path: X-Original-To: apmail-curator-user-archive@minotaur.apache.org Delivered-To: apmail-curator-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3905114E9 for ; Fri, 16 May 2014 22:51:40 +0000 (UTC) Received: (qmail 15989 invoked by uid 500); 16 May 2014 11:42:24 -0000 Delivered-To: apmail-curator-user-archive@curator.apache.org Received: (qmail 35040 invoked by uid 500); 16 May 2014 11:28:32 -0000 Mailing-List: contact user-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@curator.apache.org Delivered-To: mailing list user@curator.apache.org Received: (qmail 65829 invoked by uid 99); 16 May 2014 11:19:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2014 11:19:16 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vkeylis2009@gmail.com designates 209.85.128.173 as permitted sender) Received: from [209.85.128.173] (HELO mail-ve0-f173.google.com) (209.85.128.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2014 21:23:52 +0000 Received: by mail-ve0-f173.google.com with SMTP id pa12so2076836veb.18 for ; Thu, 15 May 2014 14:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=J1I47nRTRUtGhjtILyozrhpDDLHSlVBx/W2OXBZ5wQA=; b=dUa7gv1Wqwa5p9VF01rou67nRV/hxjGtW7zJ/c40bL9WZMJjBYFhPvtk4i8x+J6qgI ld/gFgBTAhcQ4Yy+mW7bStwslqXFNxv3dptUlqd7istQCT+mWoRITZDVOnt2UIV/EXW2 bzPQa6zlu2z0M1Xxeh4AohTzYVwpe66+4FpgAbE8QNj5AW3RuAc7DSuUTSKJ1gsJN1iq ybAAN8vv7TGqJYSVkKJ6PGpBGAwpUXMylI0UCHXOBmBzX+BPio2r2creDkQRoJD++KYv ej9TIXoAdjf+dbgzQoWxzK+Ejkq88YRNjQROQMMzj+drA51m2Ud711aYaFlPS90r+XYk 6GGA== MIME-Version: 1.0 X-Received: by 10.220.183.4 with SMTP id ce4mr58337vcb.54.1400189012154; Thu, 15 May 2014 14:23:32 -0700 (PDT) Received: by 10.220.181.137 with HTTP; Thu, 15 May 2014 14:23:32 -0700 (PDT) Date: Thu, 15 May 2014 14:23:32 -0700 Message-ID: Subject: How to create znode with curator From: Vadim Keylis To: "user@curator.apache.org" Content-Type: multipart/alternative; boundary=089e0139fe9eb020e904f976e884 X-Virus-Checked: Checked by ClamAV on apache.org --089e0139fe9eb020e904f976e884 Content-Type: text/plain; charset=UTF-8 How do you create a path if it does not exist. CuratorFramework client = CuratorFrameworkFactory.newClient("dzoo01:2181/kafka", new ExponentialBackoffRetry(1000, 3)); path= '/name/offset/event-capture/topic'; I check if path exists if(curatorFramework.checkExists().forPath(path) == null){ curatorFramework.create().forPath(path) } will that code snippet create znode? Thanks, Vadim --089e0139fe9eb020e904f976e884 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
How do you create a path if it does not exist.
C= uratorFramework =C2=A0 =C2=A0client =3D CuratorFrameworkFactory.newClient(&= quot;dzoo01:2181/kafka", new ExponentialBackoffRetry(1000, 3));
path=3D '/name/offset/event-capture/topic';

I check if path exists
if(curatorFramework.checkExists().forPat= h(path) =3D=3D null){
=C2=A0 =C2=A0=C2=A0curatorFramework.cre= ate().forPath(path)
}

will that code snippet create znode?
<= div>

Thanks,
Vadim=C2=A0
--089e0139fe9eb020e904f976e884--