we don't have any explicit API in the lock manager recipe to change the
number of shards. But increasing the number of shards is as simple as
updating the number of partitions in the idealstate.

IdealState is = helixAdmin.getResourceIdealState(cluster, resource);
is.setNumPartitions(X);
helixAdmin.setResourceIdealState(cluster, is);

Let us know if that works.


Thanks,
Kishore G


On Tue, Jan 31, 2017 at 3:29 PM, Tejeswar Das <[email protected]> wrote:

> Hi,
>
> I am using Helix’s Distributed Lock Manager recipe in my project, and each
> Lock represents a shard or partition. It has been working pretty well. I am
> able to run my service as a cluster of multiple  instances, and I see the
> shards getting evenly distributed, when a new service instance joins the
> cluster, or leaves cluster, etc.
>
> I have a use-case whereby I want to increase the number of shards in the
> cluster.
>
> Which means, I would like to be able to dynamically increase the number of
> locks that the Lock Manager is managing. Does the Lock Manager provide such
> capability?
>
> Please let me know.
>
> Thanks and regards
> Tej

Reply via email to