helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Morel <mmo...@apache.org>
Subject Re: Restarting a participant with same configuration
Date Wed, 02 Oct 2013 17:21:56 GMT
For now I was trying to rely exclusively on the Helix API, without using the CLI tools. Preparing
the configuration first is indeed an option, but it might make more sense when all components
are managed through Helix. Not the case yet in our system.

Thanks for your suggestions!


On Oct 2, 2013, at 18:32 , Kanak Biscuitwala <kanak.b@hotmail.com> wrote:

> One current way to check for non-existence (other than catching HelixException on HelixAdmin#getInstanceConfig)
is to check if HelixDataAccessor#getProperty(keyBuilder.instanceConfig(instanceName) returns
> As Kishore said, we will support create if not exists, and it won't throw a RuntimeException.
> Kanak
> ________________________________
>> Date: Wed, 2 Oct 2013 09:06:37 -0700 
>> Subject: Re: Restarting a participant with same configuration 
>> From: g.kishore@gmail.com 
>> To: user@helix.incubator.apache.org 
>> Hi Matthieu, 
>> Looks like you setting up the configuration and adding the instance to 
>> Helix when the node starts?. Any reason why instances cannot be added 
>> to cluster upfront using Helix cli. This way the only thing needed by 
>> participant while connecting is instance id. 
>> If your application does not allow that, then you should able to check 
>> for existing instance before creating new one. 
>> We are adding new apis to atomically create if not exists cluster, 
>> resource and participant. 
>> thanks, 
>> Kishore G 
>> On Wed, Oct 2, 2013 at 1:49 AM, Matthieu Morel 
>> <mmorel@apache.org<mailto:mmorel@apache.org>> wrote: 
>> Hi, 
>> For a participant to register with Helix, we setup a configuration, 
>> then add an instance to Helix with "HelixAdmin#addInstance(clusterName, 
>> config);" 
>> When a given participant fails / stops and is restarted, it will reuse 
>> the same Helix configuration that the failed/stopped instance it 
>> replaces (it reads the same config file and runs on the same host 
>> etc...). However since Helix kept the previous instance and 
>> configuration, it will reject this one (throwing a runtime 
>> HelixException). 
>> One way to overcome this issue is to capture the exception, drop the 
>> instance from Helix (HelixAdmin#dropInstance) and add it again. I'm not 
>> sure that's a very appropriate solution though, and was wondering 
>> whether there was a better way? 
>> Thanks! 
>> Matthieu 

View raw message