You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@helix.apache.org by Vinayak Borkar <vi...@gmail.com> on 2013/05/07 08:13:58 UTC
HelixAdmin.addResource() and State Model Factory
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
Re: HelixAdmin.addResource() and State Model Factory
Posted by Santiago Perez <sa...@santip.com.ar>.
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....@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 <vi...@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
>>
>
>
Re: HelixAdmin.addResource() and State Model Factory
Posted by kishore g <g....@gmail.com>.
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 <vi...@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
>