zookeeper 3.5.3-beta reconf without admin client

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

zookeeper 3.5.3-beta reconf without admin client

Ansel Zandegran
Hi,
I’m using zookeeper 3.5.3-beta and I would like to use dynamic configuration to add and and remove peers. Is it possible to do without creating an admin client. I have access to the quorumPeer object as I am starting it from inside my java class.

Any pointers would be appreciated.

Best,
Ansel



Reply | Threaded
Open this post in threaded view
|

Re: zookeeper 3.5.3-beta reconf without admin client

Andor Molnar
Hi Ansel,

I don't think you can do this easily.

Processing of the reconfig() command is wired into
PrepRequestProcessor.pRequest2Txn(), you can find it if you look for the
case OpCode.reconfig in the switch block. There's a whole bunch of stuff
and maintenance is going on when reconfig is being performed which you
can't do with only the QuorumPeer object.

If you were able to inject ReconfigRequest into the pipeline somehow, you
could trigger the right logic, but I highly recommend considering using the
ZooKeeper API with an official client library instead.

Regards,
Andor



On Tue, Feb 6, 2018 at 11:26 AM, Ansel Zandegran <[hidden email]>
wrote:

> Hi,
> I’m using zookeeper 3.5.3-beta and I would like to use dynamic
> configuration to add and and remove peers. Is it possible to do without
> creating an admin client. I have access to the quorumPeer object as I am
> starting it from inside my java class.
>
> Any pointers would be appreciated.
>
> Best,
> Ansel
>
>
>
>