helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kishore g <g.kish...@gmail.com>
Subject Re: How to Dynamically increase the number of locks in Distributed Lock Manager
Date Wed, 01 Feb 2017 04:55:42 GMT
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 <tejeswar@gmail.com> 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

Mime
View raw message