helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Santiago Perez <san...@santip.com.ar>
Subject Re: HelixAdmin.addResource() and State Model Factory
Date Tue, 07 May 2013 12:54:44 GMT
We actually have the exact same problem, we need to make two calls to
create a resource. One to addResource and the other to
setResourceIdealState() in order to set stateModelFactoryName and replica
count. This lead to several bugs since the spectators could possibly see an
incomplete resource.

We work around it by having our listeners ignore resources with replica
count = 0

I like the IdealStateBuilder approach.

Santi


On Tue, May 7, 2013 at 4:05 AM, kishore g <g.kishore@gmail.com> wrote:

> Hi Vinayak,
>
> I prefer not to add methods with soo many arguments. Infact we should
> remove many of the existing ones. Can you try using IdealstateBuilder and
> use addResource(String clusterName,String resourceName, IdealState
> idealstate).
>
> thanks,
> Kishore G
>
>
>
>
> On Mon, May 6, 2013 at 11:13 PM, Vinayak Borkar <vinayakb@gmail.com>wrote:
>
>> Hi,
>>
>> I see that HelixAdmin has a call to add resources, but even the most
>> detailed call:
>>
>>   public void addResource(String clusterName, String resourceName,
>>       int partitions, String stateModelRef, String idealStateMode,
>>       int bucketSize, int maxPartitionsPerInstance)
>>
>> does not allow the setting of the state model factory name.
>>
>> Should I file a JIRA and provide a patch to add another call:
>>
>>   public void addResource(String clusterName, String resourceName,
>>       int partitions, String stateModelRef, String stateModelFactoryName,
>> String idealStateMode,
>>       int bucketSize, int maxPartitionsPerInstance)
>>
>>
>> Thanks,
>> Vinayak
>>
>
>

Mime
View raw message