You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Drew Kutcharian <dr...@venarc.com> on 2013/04/23 00:23:50 UTC
Running a 3-node ensemble on a single machine
Hi Guys,
For development purposes I would like to run a 3 node Zookeeper ensemble on a single machine (Mac OS X). What's the cleanest way to do this?
Thanks,
Drew
Re: Running a 3-node ensemble on a single machine
Posted by Alexander Shraer <sh...@gmail.com>.
You can create 3 different data directories and point your configuration
files to them. You can then open 3 shells, and each shell will run its own
server - you can point it to the right config file by using the ZOOCFG
parameter, like: export ZOOCFG=zoo_replicated3.cfg
Or you can run them all in one shell and provide the config file path as a
parameter to zkServer.sh.
Here's an example of zoo_replicated3.cfg, pointing to the zookeeper3 data
directory:
tickTime=2000
dataDir=/Users/shralex/zookeeper-3.4/zookeeper3
initLimit=5
syncLimit=2
clientPort=2791
server.1=localhost:2780:2783:participant
server.2=localhost:2781:2784
server.3=localhost:2782:2785:participant
Alex
No, it's not for testing. I'm not familiar with Curator's TestingCluster. I
would like to simulate the production environment.
On Apr 22, 2013, at 3:25 PM, Jordan Zimmerman <jo...@jordanzimmerman.com>
wrote:
> If this is just for testing, use the TestingCluster from Curator.
>
> On Apr 22, 2013, at 3:23 PM, Drew Kutcharian <dr...@venarc.com> wrote:
>
>> Hi Guys,
>>
>> For development purposes I would like to run a 3 node Zookeeper ensemble
on a single machine (Mac OS X). What's the cleanest way to do this?
>>
>> Thanks,
>>
>> Drew
>
Re: Running a 3-node ensemble on a single machine
Posted by Drew Kutcharian <dr...@venarc.com>.
Thanks, this is very much what I was looking for. BTW, I think I should also pass -Dlog4j.configuration to set the logging directory per node too.
On Apr 22, 2013, at 3:50 PM, Michi Mutsuzaki <mi...@cs.stanford.edu> wrote:
> I don't know if there is any "clean" way to do it. You just need to
> prepare 3 config files, 3 data directories, and start the servers.
>
> http://pastebin.com/mx8mn5K3
>
> I recently added a C++ class to start multiple zookeeper servers on a
> single host for testing dynamic reconfiguration. It might be similar
> to what you are looking for.
>
> http://svn.apache.org/viewvc/zookeeper/trunk/src/c/tests/ZooKeeperQuorumServer.h?view=markup
> http://svn.apache.org/viewvc/zookeeper/trunk/src/c/tests/ZooKeeperQuorumServer.cc?revision=1455387&view=markup
>
> --Michi
>
> On Mon, Apr 22, 2013 at 3:28 PM, Drew Kutcharian <dr...@venarc.com> wrote:
>> No, it's not for testing. I'm not familiar with Curator's TestingCluster. I would like to simulate the production environment.
>>
>>
>> On Apr 22, 2013, at 3:25 PM, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
>>
>>> If this is just for testing, use the TestingCluster from Curator.
>>>
>>> On Apr 22, 2013, at 3:23 PM, Drew Kutcharian <dr...@venarc.com> wrote:
>>>
>>>> Hi Guys,
>>>>
>>>> For development purposes I would like to run a 3 node Zookeeper ensemble on a single machine (Mac OS X). What's the cleanest way to do this?
>>>>
>>>> Thanks,
>>>>
>>>> Drew
>>>
>>
Re: Running a 3-node ensemble on a single machine
Posted by Michi Mutsuzaki <mi...@cs.stanford.edu>.
I don't know if there is any "clean" way to do it. You just need to
prepare 3 config files, 3 data directories, and start the servers.
http://pastebin.com/mx8mn5K3
I recently added a C++ class to start multiple zookeeper servers on a
single host for testing dynamic reconfiguration. It might be similar
to what you are looking for.
http://svn.apache.org/viewvc/zookeeper/trunk/src/c/tests/ZooKeeperQuorumServer.h?view=markup
http://svn.apache.org/viewvc/zookeeper/trunk/src/c/tests/ZooKeeperQuorumServer.cc?revision=1455387&view=markup
--Michi
On Mon, Apr 22, 2013 at 3:28 PM, Drew Kutcharian <dr...@venarc.com> wrote:
> No, it's not for testing. I'm not familiar with Curator's TestingCluster. I would like to simulate the production environment.
>
>
> On Apr 22, 2013, at 3:25 PM, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
>
>> If this is just for testing, use the TestingCluster from Curator.
>>
>> On Apr 22, 2013, at 3:23 PM, Drew Kutcharian <dr...@venarc.com> wrote:
>>
>>> Hi Guys,
>>>
>>> For development purposes I would like to run a 3 node Zookeeper ensemble on a single machine (Mac OS X). What's the cleanest way to do this?
>>>
>>> Thanks,
>>>
>>> Drew
>>
>
Re: Running a 3-node ensemble on a single machine
Posted by Drew Kutcharian <dr...@venarc.com>.
No, it's not for testing. I'm not familiar with Curator's TestingCluster. I would like to simulate the production environment.
On Apr 22, 2013, at 3:25 PM, Jordan Zimmerman <jo...@jordanzimmerman.com> wrote:
> If this is just for testing, use the TestingCluster from Curator.
>
> On Apr 22, 2013, at 3:23 PM, Drew Kutcharian <dr...@venarc.com> wrote:
>
>> Hi Guys,
>>
>> For development purposes I would like to run a 3 node Zookeeper ensemble on a single machine (Mac OS X). What's the cleanest way to do this?
>>
>> Thanks,
>>
>> Drew
>
Re: Running a 3-node ensemble on a single machine
Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
If this is just for testing, use the TestingCluster from Curator.
On Apr 22, 2013, at 3:23 PM, Drew Kutcharian <dr...@venarc.com> wrote:
> Hi Guys,
>
> For development purposes I would like to run a 3 node Zookeeper ensemble on a single machine (Mac OS X). What's the cleanest way to do this?
>
> Thanks,
>
> Drew
Re: Running a 3-node ensemble on a single machine
Posted by shashwat shriparv <dw...@gmail.com>.
do it in Alexander Shraer way...
*Thanks & Regards *
∞
Shashwat Shriparv
On Tue, Apr 23, 2013 at 2:40 PM, Ivan Kelly <iv...@apache.org> wrote:
> > For development purposes I would like to run a 3 node Zookeeper
> > ensemble on a single machine (Mac OS X). What's the cleanest way to
> > do this?
> Why do you want a 3 node cluster for development? What advantage will
> 3 give over simply running a standalone zookeeper node?
>
> -Ivan
>
Re: Running a 3-node ensemble on a single machine
Posted by Ivan Kelly <iv...@apache.org>.
> For development purposes I would like to run a 3 node Zookeeper
> ensemble on a single machine (Mac OS X). What's the cleanest way to
> do this?
Why do you want a 3 node cluster for development? What advantage will
3 give over simply running a standalone zookeeper node?
-Ivan