Hi Anish,

When building a server for the first time, we can specify at most one
group.  When a server has multiple groups and it restarts, it will
reinitialize all the groups automatically.

Since multiple groups usually are dynamic (i.e. the number of groups is not
fixed), the server builder currently can specify at most one group.  If
there is a need, we may change the builder to support multiple groups.  It
should be a simple change.

Tsz-Wo

On Wed, Sep 11, 2024 at 2:43 AM Anish Sneh <[email protected]> wrote:

> Thanks Tsz,
>
> So there is no way to define multiple group during server startup. Other
> than connecting as a client and then creating.
>
> Regards
> Anish
>
> On Wed, Sep 11, 2024, 01:04 Tsz Wo Sze <[email protected]> wrote:
>
>> Hi Anish,
>>
>> On the client side, there is a GroupManagementApi which supports the
>> operations: add, remove, list, info.  A GroupManagementApi object can be
>> obtained by calling RaftClient.getGroupManagementApi();
>> see
>> https://github.com/apache/ratis/blob/19184326a00535d28f8c09dfcd37852c3a8b1266/ratis-client/src/main/java/org/apache/ratis/client/RaftClient.java#L63
>>
>> You may take a look at GroupManagementBaseTest as an example for how to
>> add/remove groups.
>>
>> Tsz-Wo
>>
>>
>> On Tue, Sep 10, 2024 at 6:13 AM Anish Sneh <[email protected]>
>> wrote:
>>
>>> Hi Team
>>>
>>> Need help to understand how to get more than one group on same Ratis
>>> Server. I am unable to find any API which will add more than one group.
>>> There is only one setter.
>>>
>>> However there is one method getGroups()
>>>
>>> Please suggest.
>>>
>>> Kind regards
>>> --
>>> Anish Sneh
>>>
>>

Reply via email to