You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@helix.apache.org by Sandeep Nayak <os...@gmail.com> on 2014/02/19 07:15:53 UTC

HelixAdmin API Usage

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

Re: HelixAdmin API Usage

Posted by Sandeep Nayak <os...@gmail.com>.
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 <ka...@hotmail.com>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
> > <os...@gmail.com>> 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
> > <ka...@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
> > 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<ma...@gmail.com>
> >> To: user@helix.apache.org<ma...@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
> >
> >
>

RE: HelixAdmin API Usage

Posted by Kanak Biscuitwala <ka...@hotmail.com>.
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 
> <os...@gmail.com>> 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 
> <ka...@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 
> 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<ma...@gmail.com> 
>> To: user@helix.apache.org<ma...@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 
> 
> 		 	   		  

Re: HelixAdmin API Usage

Posted by Sandeep Nayak <os...@gmail.com>.
I will send out something on the dev mail list and we can iterate there
until it solidifies and finalizes after which either I can get write access
or one of you guys can post it to the wiki.

Thanks,

Sandeep


On Tue, Feb 18, 2014 at 10:42 PM, Kanak Biscuitwala <ka...@hotmail.com>wrote:

> Just to clarify, by 0.7 I mean the master branch. Generally we use the
> dev@helix.apache.org mailing list in conjunction with the wiki (
> https://cwiki.apache.org/confluence/display/HELIX/Apache+Helix). Kishore
> may need to give you write access if you intend to use it.
>
> Kanak
>
> ________________________________
> > Date: Tue, 18 Feb 2014 22:39:19 -0800
> > Subject: Re: HelixAdmin API Usage
> > From: osgigeek@gmail.com
> > To: user@helix.apache.org
> >
> > I will take a look at 0.7 branch and help out with the exception
> > hierarchy. How do you guys approach/discuss design? Is it the dev
> > mailing list or some other means? Does it simply start with a mail with
> > the design/approach on the dev mail list?
> >
> > Let me know, in the meantime I will start by taking a look at 0.7 if
> > there is an existing exception hierarchy being put in place.
> >
> > Thanks,
> >
> > Sandeep
> >
> >
> > On Tue, Feb 18, 2014 at 10:31 PM, kishore g
> > <g....@gmail.com>> wrote:
> > 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
> > <os...@gmail.com>> 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
> > <ka...@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
> > 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<ma...@gmail.com>
> >> To: user@helix.apache.org<ma...@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
> >
> >
> >
>

RE: HelixAdmin API Usage

Posted by Kanak Biscuitwala <ka...@hotmail.com>.
Just to clarify, by 0.7 I mean the master branch. Generally we use the dev@helix.apache.org mailing list in conjunction with the wiki (https://cwiki.apache.org/confluence/display/HELIX/Apache+Helix). Kishore may need to give you write access if you intend to use it.

Kanak

________________________________
> Date: Tue, 18 Feb 2014 22:39:19 -0800 
> Subject: Re: HelixAdmin API Usage 
> From: osgigeek@gmail.com 
> To: user@helix.apache.org 
> 
> I will take a look at 0.7 branch and help out with the exception 
> hierarchy. How do you guys approach/discuss design? Is it the dev 
> mailing list or some other means? Does it simply start with a mail with 
> the design/approach on the dev mail list? 
> 
> Let me know, in the meantime I will start by taking a look at 0.7 if 
> there is an existing exception hierarchy being put in place. 
> 
> Thanks, 
> 
> Sandeep 
> 
> 
> On Tue, Feb 18, 2014 at 10:31 PM, kishore g 
> <g....@gmail.com>> wrote: 
> 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 
> <os...@gmail.com>> 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 
> <ka...@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 
> 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<ma...@gmail.com> 
>> To: user@helix.apache.org<ma...@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 
> 
> 
> 		 	   		  

Re: HelixAdmin API Usage

Posted by Sandeep Nayak <os...@gmail.com>.
I will take a look at 0.7 branch and help out with the exception hierarchy.
How do you guys approach/discuss design? Is it the dev mailing list or some
other means? Does it simply start with a mail with the design/approach on
the dev mail list?

Let me know, in the meantime I will start by taking a look at 0.7 if there
is an existing exception hierarchy being put in place.

Thanks,

Sandeep


On Tue, Feb 18, 2014 at 10:31 PM, kishore g <g....@gmail.com> wrote:

> 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 <os...@gmail.com>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 <ka...@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 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
>>>
>>
>>
>

Re: HelixAdmin API Usage

Posted by kishore g <g....@gmail.com>.
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 <os...@gmail.com> 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 <ka...@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 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
>>
>
>

RE: HelixAdmin API Usage

Posted by Kanak Biscuitwala <ka...@hotmail.com>.
Agreed. Work on a more Java-friendly admin API is already underway in the 0.7 branch and it's something that's high on the list for the next release.

Kanak

________________________________
> Date: Tue, 18 Feb 2014 22:27:56 -0800 
> Subject: Re: HelixAdmin API Usage 
> From: osgigeek@gmail.com 
> To: user@helix.apache.org 
> 
> 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 
> <ka...@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 
> 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<ma...@gmail.com> 
>> To: user@helix.apache.org<ma...@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 
> 		 	   		  

Re: HelixAdmin API Usage

Posted by Sandeep Nayak <os...@gmail.com>.
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 <ka...@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 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
>

RE: HelixAdmin API Usage

Posted by Kanak Biscuitwala <ka...@hotmail.com>.
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