Return-Path: X-Original-To: apmail-helix-user-archive@minotaur.apache.org Delivered-To: apmail-helix-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 6D88F10D5C for ; Wed, 19 Feb 2014 06:41:33 +0000 (UTC) Received: (qmail 21043 invoked by uid 500); 19 Feb 2014 06:41:32 -0000 Delivered-To: apmail-helix-user-archive@helix.apache.org Received: (qmail 20954 invoked by uid 500); 19 Feb 2014 06:41:31 -0000 Mailing-List: contact user-help@helix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@helix.apache.org Delivered-To: mailing list user@helix.apache.org Received: (qmail 20946 invoked by uid 99); 19 Feb 2014 06:41:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Feb 2014 06:41:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of osgigeek@gmail.com designates 209.85.220.178 as permitted sender) Received: from [209.85.220.178] (HELO mail-vc0-f178.google.com) (209.85.220.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Feb 2014 06:41:23 +0000 Received: by mail-vc0-f178.google.com with SMTP id ik5so13852397vcb.23 for ; Tue, 18 Feb 2014 22:41:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=8BexwxjnAk4zWXR1Nnv8afUYDCLzhl5/mbSJuXTX+yw=; b=ip4jeN1gZ8S5esLn7Tqml4AaQapvkMGU7IVPapWjvxiSFfAk52MpP36F+5oBzWix3j +jB+73W5YKYhU94K3cIVu09ukrCSBCLe9SagdcNrPqCkW5HaVbFmEaPqs7Uh8rZLVVWM zR3PrvA63RuGkErST4gYMl3ULTHX0Pi2hnn6NQywzKmsK8yva4pqT0ZOI8z5nhm50p6H UThAbc27q9PAyENFRbhUdPRZqYTovN+EEuGHJ8UAP8izz1qOhKBwqBSGtOMbM1tR1dpL cfmmZBbn4ryjc9OaXgyXGW2VHDkK6wGPnWR6xQN4VABtXgVc7DlMiQUBp8TGEcTrGD/V ycqQ== MIME-Version: 1.0 X-Received: by 10.52.63.233 with SMTP id j9mr193813vds.69.1392792062926; Tue, 18 Feb 2014 22:41:02 -0800 (PST) Received: by 10.220.90.80 with HTTP; Tue, 18 Feb 2014 22:41:02 -0800 (PST) In-Reply-To: References: Date: Tue, 18 Feb 2014 22:41:02 -0800 Message-ID: Subject: Re: HelixAdmin API Usage From: Sandeep Nayak To: user@helix.apache.org Content-Type: multipart/alternative; boundary=001a11369b042825d004f2bcac0d X-Virus-Checked: Checked by ClamAV on apache.org --001a11369b042825d004f2bcac0d Content-Type: text/plain; charset=ISO-8859-1 Absolutely I will be interested in helping wherever I can, just point me in the right direction. Sandeep On Tue, Feb 18, 2014 at 10:34 PM, Kanak Biscuitwala wrote: > Sandeep: also, if you're interested, we would love to get your feedback on > API changes we're making. We definitely want to make sure that whatever we > put out there is actually helpful for developers new to Helix. > > Kanak > > ________________________________ > > Date: Tue, 18 Feb 2014 22:31:51 -0800 > > Subject: Re: HelixAdmin API Usage > > From: g.kishore@gmail.com > > To: user@helix.apache.org > > > > Agree with Sandeep, this should not be throwing runtime exception. I > > wouldn't be surprised if there are additional places where runtime > > exception is thrown. > > > > Sandeep, it will be great if you can help us clean up the exception > > hierarchy. > > > > > > On Tue, Feb 18, 2014 at 10:27 PM, Sandeep Nayak > > > wrote: > > Hi Kanak, > > > > Thanks for the background but I am sure you will agree that as a Java > > API it looks broken if I catch RuntimeExceptions and then assume that > > nothing went wrong and proceed to create the instance configuration. > > > > I will do exactly that (catch Runtime exception) for now but maybe the > > take-away is to log a debt ticket to resolve it and provide a cleaner > > API in the near future. > > > > Let me know if there is anything I can do to help be it logging the > > ticket or helping out with the API if there is a venue to iron out the > > exception hierarchies. > > > > Thanks, > > > > Sandeep > > > > > > > > > > On Tue, Feb 18, 2014 at 10:21 PM, Kanak Biscuitwala > > > wrote: > > Hi Sandeep, > > > > Mostly for compatibility and historical reasons. Also, many Helix > > systems typically run HelixAdmin via the REST or command line API, so > > in those cases, a loud failure is more natural. > > > > We've wanted to add checked exceptions for some time now, but haven't > > had the cycles to take the time and really get it right. > > > > Kanak > > ________________________________ > >> Date: Tue, 18 Feb 2014 22:15:53 -0800 > >> Subject: HelixAdmin API Usage > >> From: osgigeek@gmail.com > >> To: user@helix.apache.org > >> > >> Hi, > >> > >> Prior to adding an instance config to a cluster I am trying to check if > >> there exists such a configuration already using > >> ZKHelixAdmin.getInstanceConfig. I found that it throws a > >> RuntimeException as against returning a null or throwing a checked > >> exception. > >> > >> I think the use-case of wanting to know if an instance is already > >> existent in the cluster and if not adding one seems common. Throwing a > >> RuntimeException indicates a condition that the system cannot handle, a > >> checked exception on the other hand would be more appropriate so that > >> the invoker of getInstanceConfig can take an action to remedy the lack > >> of configuration by creating it. > >> > >> Is there a reason for the RuntimeException? > >> > >> Thanks, > >> > >> Sandeep > > > > > --001a11369b042825d004f2bcac0d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Absolutely I will be interested in helping wherever I can,= just point me in the right direction.

Sandeep


On Tue, Feb= 18, 2014 at 10:34 PM, Kanak Biscuitwala <kanak.b@hotmail.com> wrote:
Sandeep: also, if you're interested, we = would love to get your feedback on API changes we're making. We definit= ely want to make sure that whatever we put out there is actually helpful fo= r developers new to Helix.

Kanak

________________________________
> Date: Tue, 18 Feb 2014 22:31:51 -0800
> Subject: Re: HelixAdmin API Usage
> From: g.kishore@gmail.com=
> To: user@helix.apache.org=
>
> Agree with Sandeep, this should not be throwing runtime exception. I > wouldn't be surprised if there are additional places where runtime=
> exception is thrown.
>
> Sandeep, it will be great if you can help us clean up the exception > hierarchy.
>
>
> On Tue, Feb 18, 2014 at 10:27 PM, Sandeep Nayak
> <osgige= ek@gmail.com<mailto:osgigeek@g= mail.com>> wrote:
> Hi Kanak,
>
> Thanks for the background but I am sure you will agree that as a Java<= br> > API it looks broken if I catch RuntimeExceptions and then assume that<= br> > nothing went wrong and proceed to create the instance configuration. >
> I will do exactly that (catch Runtime exception) for now but maybe the=
> take-away is to log a debt ticket to resolve it and provide a cleaner<= br> > API in the near future.
>
> Let me know if there is anything I can do to help be it logging the > ticket or helping out with the API if there is a venue to iron out the=
> exception hierarchies.
>
> Thanks,
>
> Sandeep
>
>
>
>
> On Tue, Feb 18, 2014 at 10:21 PM, Kanak Biscuitwala
> <kanak= .b@hotmail.com<mailto:kanak.b= @hotmail.com>> wrote:
> Hi Sandeep,
>
> Mostly for compatibility and historical reasons. Also, many Helix
> systems typically run HelixAdmin via the REST or command line API, so<= br> > in those cases, a loud failure is more natural.
>
> We've wanted to add checked exceptions for some time now, but have= n't
> had the cycles to take the time and really get it right.
>
> Kanak
> ________________________________
>> Date: Tue, 18 Feb 2014 22:15:53 -0800
>> Subject: HelixAdmin API Usage
>> From: osgigeek@gmail.c= om<mailto:osgigeek@gmail.com>
>> To:
user@helix.apache.org= <mailto:user@helix.apache.o= rg>
>>
>> Hi,
>>
>> Prior to adding an instance config to a cluster I am trying to che= ck if
>> there exists such a configuration already using
>> ZKHelixAdmin.getInstanceConfig. I found that it throws a
>> RuntimeException as against returning a null or throwing a checked=
>> exception.
>>
>> I think the use-case of wanting to know if an instance is already<= br> >> existent in the cluster and if not adding one seems common. Throwi= ng a
>> RuntimeException indicates a condition that the system cannot hand= le, a
>> checked exception on the other hand would be more appropriate so t= hat
>> the invoker of getInstanceConfig can take an action to remedy the = lack
>> of configuration by creating it.
>>
>> Is there a reason for the RuntimeException?
>>
>> Thanks,
>>
>> Sandeep
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0

--001a11369b042825d004f2bcac0d--