[jira] [Comment Edited] (ZOOKEEPER-2644) contrib/rest does not include rest.sh when packaged

2016-12-16 Thread Minoru Osuka (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15756493#comment-15756493
 ] 

Minoru Osuka edited comment on ZOOKEEPER-2644 at 12/17/16 6:46 AM:
---

Hi, [~eribeiro], thanks for your comment! 

I opened a pull request. Please see following URL:

https://github.com/apache/zookeeper/pull/129

Thanks!


was (Author: minoru):
Hi, [~eribeiro]], thanks for your comment! 

I opened a pull request. Please see following URL:

https://github.com/apache/zookeeper/pull/129

Thanks!

> contrib/rest does not include rest.sh when packaged
> ---
>
> Key: ZOOKEEPER-2644
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2644
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: contrib
>Affects Versions: 3.4.9, 3.5.2
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2644.patch
>
>
> contrib/rest does not include rest.sh when packaged. I propose to add rest.sh 
> into tar.gz that it make ZooKeeper REST easier to use.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2644) contrib/rest does not include rest.sh when packaged

2016-12-16 Thread Minoru Osuka (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15756493#comment-15756493
 ] 

Minoru Osuka commented on ZOOKEEPER-2644:
-

Hi, [~eribeiro]], thanks for your comment! 

I opened a pull request. Please see following URL:

https://github.com/apache/zookeeper/pull/129

Thanks!

> contrib/rest does not include rest.sh when packaged
> ---
>
> Key: ZOOKEEPER-2644
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2644
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: contrib
>Affects Versions: 3.4.9, 3.5.2
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2644.patch
>
>
> contrib/rest does not include rest.sh when packaged. I propose to add rest.sh 
> into tar.gz that it make ZooKeeper REST easier to use.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (ZOOKEEPER-2644) contrib/rest does not include rest.sh when packaged

2016-12-12 Thread Minoru Osuka (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Minoru Osuka updated ZOOKEEPER-2644:

Attachment: ZOOKEEPER-2644.patch

Attach a patch file.

> contrib/rest does not include rest.sh when packaged
> ---
>
> Key: ZOOKEEPER-2644
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2644
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: contrib
>Affects Versions: 3.4.9, 3.5.2
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2644.patch
>
>
> contrib/rest does not include rest.sh when packaged. I propose to add rest.sh 
> into tar.gz that it make ZooKeeper REST easier to use.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (ZOOKEEPER-2644) contrib/rest does not include rest.sh when packaged

2016-12-12 Thread Minoru Osuka (JIRA)
Minoru Osuka created ZOOKEEPER-2644:
---

 Summary: contrib/rest does not include rest.sh when packaged
 Key: ZOOKEEPER-2644
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2644
 Project: ZooKeeper
  Issue Type: Improvement
  Components: contrib
Affects Versions: 3.5.2, 3.4.9
Reporter: Minoru Osuka
Priority: Minor


contrib/rest does not include rest.sh when packaged. I propose to add rest.sh 
into tar.gz that it make ZooKeeper REST easier to use.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (ZOOKEEPER-2350) Script that provide a way to build the ensemble with ease.

2016-02-26 Thread Minoru Osuka (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Minoru Osuka updated ZOOKEEPER-2350:

Attachment: ZOOKEEPER-2350.patch

code refactoring.

> Script that provide a way to build the ensemble with ease.
> --
>
> Key: ZOOKEEPER-2350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2350
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: scripts
>Affects Versions: 3.5.0
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, 
> ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, 
> ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch
>
>
> Starting with 3.5.0, ZooKeeper has already supported a very convenient 
> dynamic reconfiguration. However, the procedure is slightly complicated. So I 
> propose adding a script to build ensemble with ease.
> Usage:
> {noformat}
> $ ./bin/zkEnsemble.sh help
> usage: ./bin/zkEnsemble.sh {start|stop|status} 
>   Commadns:
> start   Start a node of ensemble.
>   Parameters:
> --seed  Specify the IP address and port of an existing 
> ensemble node that required for 2nd and subsequent nodes.
> This is not required for the 1st node. (Example: 
> 127.0.0.1:2181)
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> --peerport  The port is used to talk to each other (2888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2888 to 3142.
> --electionport  The port is used to leader election (3888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 3888 to 4142.
> --role  The role of node, it can be participant or 
> observer (participant by default).
> --clientip  The IP address for client connections (0.0.0.0 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2181 to 2435.
> --confdir   Specify a base conf directory 
> (/Users/mosuka/git/zookeeper/conf by default).
> --datadir   Specify a base data directory (/tmp/zookeeper by 
> default).
> --foregroundStart node in foreground.
> stopStop a node of ensemble.
>   Parameters:
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> status  Show ensemble nodes.
>   Parameters:
> --seed  Specify the IP address and port of a existing 
> ensemble node (Example: 127.0.0.1:2181).
> helpDisplay this message.
> {noformat}
> Example:
> 1. Start a 1st node of ensemble on host1(192.168.33.11)
> {noformat}
> $ ./bin/zkEnsemble.sh start
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.1.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 2. Start a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 3. Start a 3rd node of ensemble on host3(192.168.33.13).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.3.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 4. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> server.2=192.168.33.12:2888:3888:participant;0.0.0.0:2181
> server.3=192.168.33.13:2888:3888:participant;0.0.0.0:2181
> {noformat}
> 5. Stop a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh stop
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Stopping zookeeper ... STOPPED
> {noformat}
> 6. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status 

[jira] [Updated] (ZOOKEEPER-2350) Script that provide a way to build the ensemble with ease.

2016-02-25 Thread Minoru Osuka (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Minoru Osuka updated ZOOKEEPER-2350:

Attachment: ZOOKEEPER-2350.patch

Fixed "No such file or directory".

> Script that provide a way to build the ensemble with ease.
> --
>
> Key: ZOOKEEPER-2350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2350
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: scripts
>Affects Versions: 3.5.0
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, 
> ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, 
> ZOOKEEPER-2350.patch
>
>
> Starting with 3.5.0, ZooKeeper has already supported a very convenient 
> dynamic reconfiguration. However, the procedure is slightly complicated. So I 
> propose adding a script to build ensemble with ease.
> Usage:
> {noformat}
> $ ./bin/zkEnsemble.sh help
> usage: ./bin/zkEnsemble.sh {start|stop|status} 
>   Commadns:
> start   Start a node of ensemble.
>   Parameters:
> --seed  Specify the IP address and port of an existing 
> ensemble node that required for 2nd and subsequent nodes.
> This is not required for the 1st node. (Example: 
> 127.0.0.1:2181)
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> --peerport  The port is used to talk to each other (2888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2888 to 3142.
> --electionport  The port is used to leader election (3888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 3888 to 4142.
> --role  The role of node, it can be participant or 
> observer (participant by default).
> --clientip  The IP address for client connections (0.0.0.0 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2181 to 2435.
> --confdir   Specify a base conf directory 
> (/Users/mosuka/git/zookeeper/conf by default).
> --datadir   Specify a base data directory (/tmp/zookeeper by 
> default).
> --foregroundStart node in foreground.
> stopStop a node of ensemble.
>   Parameters:
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> status  Show ensemble nodes.
>   Parameters:
> --seed  Specify the IP address and port of a existing 
> ensemble node (Example: 127.0.0.1:2181).
> helpDisplay this message.
> {noformat}
> Example:
> 1. Start a 1st node of ensemble on host1(192.168.33.11)
> {noformat}
> $ ./bin/zkEnsemble.sh start
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.1.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 2. Start a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 3. Start a 3rd node of ensemble on host3(192.168.33.13).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.3.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 4. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> server.2=192.168.33.12:2888:3888:participant;0.0.0.0:2181
> server.3=192.168.33.13:2888:3888:participant;0.0.0.0:2181
> {noformat}
> 5. Stop a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh stop
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Stopping zookeeper ... STOPPED
> {noformat}
> 6. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status 

[jira] [Updated] (ZOOKEEPER-2350) Script that provide a way to build the ensemble with ease.

2016-02-02 Thread Minoru Osuka (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Minoru Osuka updated ZOOKEEPER-2350:

Attachment: ZOOKEEPER-2350.patch

Attach new patch file. Added support for Mac OS X.

> Script that provide a way to build the ensemble with ease.
> --
>
> Key: ZOOKEEPER-2350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2350
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: scripts
>Affects Versions: 3.5.0
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, 
> ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch
>
>
> Starting with 3.5.0, ZooKeeper has already supported a very convenient 
> dynamic reconfiguration. However, the procedure is slightly complicated. So I 
> propose adding a script to build ensemble with ease.
> Usage:
> {noformat}
> $ ./bin/zkEnsemble.sh help
> usage: ./bin/zkEnsemble.sh {start|stop|status} 
>   Commadns:
> start   Start a node of ensemble.
>   Parameters:
> --seed  Specify the IP address and port of an existing 
> ensemble node that required for 2nd and subsequent nodes.
> This is not required for the 1st node. (Example: 
> 127.0.0.1:2181)
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> --peerport  The port is used to talk to each other (2888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2888 to 3142.
> --electionport  The port is used to leader election (3888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 3888 to 4142.
> --role  The role of node, it can be participant or 
> observer (participant by default).
> --clientip  The IP address for client connections (0.0.0.0 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2181 to 2435.
> --confdir   Specify a base conf directory 
> (/Users/mosuka/git/zookeeper/conf by default).
> --datadir   Specify a base data directory (/tmp/zookeeper by 
> default).
> --foregroundStart node in foreground.
> stopStop a node of ensemble.
>   Parameters:
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> status  Show ensemble nodes.
>   Parameters:
> --seed  Specify the IP address and port of a existing 
> ensemble node (Example: 127.0.0.1:2181).
> helpDisplay this message.
> {noformat}
> Example:
> 1. Start a 1st node of ensemble on host1(192.168.33.11)
> {noformat}
> $ ./bin/zkEnsemble.sh start
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.1.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 2. Start a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 3. Start a 3rd node of ensemble on host3(192.168.33.13).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.3.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 4. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> server.2=192.168.33.12:2888:3888:participant;0.0.0.0:2181
> server.3=192.168.33.13:2888:3888:participant;0.0.0.0:2181
> {noformat}
> 5. Stop a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh stop
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Stopping zookeeper ... STOPPED
> {noformat}
> 6. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status 

[jira] [Updated] (ZOOKEEPER-2350) Script that provide a way to build the ensemble with ease.

2016-02-01 Thread Minoru Osuka (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Minoru Osuka updated ZOOKEEPER-2350:

Attachment: ZOOKEEPER-2350.patch

Attach new patch file.
Seed parameter is ignored if the seed node has not been started.

> Script that provide a way to build the ensemble with ease.
> --
>
> Key: ZOOKEEPER-2350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2350
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: scripts
>Affects Versions: 3.5.0
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, 
> ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch
>
>
> Starting with 3.5.0, ZooKeeper has already supported a very convenient 
> dynamic reconfiguration. However, the procedure is slightly complicated. So I 
> propose adding a script to build ensemble with ease.
> Usage:
> {noformat}
> $ ./bin/zkEnsemble.sh help
> usage: ./bin/zkEnsemble.sh {start|stop|status} 
>   Commadns:
> start   Start a node of ensemble.
>   Parameters:
> --seed  Specify the IP address and port of an existing 
> ensemble node that required for 2nd and subsequent nodes.
> This is not required for the 1st node. (Example: 
> 127.0.0.1:2181)
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> --peerport  The port is used to talk to each other (2888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2888 to 3142.
> --electionport  The port is used to leader election (3888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 3888 to 4142.
> --role  The role of node, it can be participant or 
> observer (participant by default).
> --clientip  The IP address for client connections (0.0.0.0 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2181 to 2435.
> --confdir   Specify a base conf directory 
> (/Users/mosuka/git/zookeeper/conf by default).
> --datadir   Specify a base data directory (/tmp/zookeeper by 
> default).
> --foregroundStart node in foreground.
> stopStop a node of ensemble.
>   Parameters:
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> status  Show ensemble nodes.
>   Parameters:
> --seed  Specify the IP address and port of a existing 
> ensemble node (Example: 127.0.0.1:2181).
> helpDisplay this message.
> {noformat}
> Example:
> 1. Start a 1st node of ensemble on host1(192.168.33.11)
> {noformat}
> $ ./bin/zkEnsemble.sh start
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.1.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 2. Start a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 3. Start a 3rd node of ensemble on host3(192.168.33.13).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.3.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 4. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> server.2=192.168.33.12:2888:3888:participant;0.0.0.0:2181
> server.3=192.168.33.13:2888:3888:participant;0.0.0.0:2181
> {noformat}
> 5. Stop a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh stop
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Stopping zookeeper ... STOPPED
> {noformat}
> 6. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status 

[jira] [Updated] (ZOOKEEPER-2350) Script that provide a way to build the ensemble with ease.

2015-12-30 Thread Minoru Osuka (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Minoru Osuka updated ZOOKEEPER-2350:

Attachment: ZOOKEEPER-2350.patch

> Script that provide a way to build the ensemble with ease.
> --
>
> Key: ZOOKEEPER-2350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2350
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: scripts
>Affects Versions: 3.5.0
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, 
> ZOOKEEPER-2350.patch
>
>
> Starting with 3.5.0, ZooKeeper has already supported a very convenient 
> dynamic reconfiguration. However, the procedure is slightly complicated. So I 
> propose adding a script to build ensemble with ease.
> Usage:
> {noformat}
> $ ./bin/zkEnsemble.sh help
> usage: ./bin/zkEnsemble.sh {start|stop|status} 
>   Commadns:
> start   Start a node of ensemble.
>   Parameters:
> --seed  Specify the IP address and port of an existing 
> ensemble node that required for 2nd and subsequent nodes.
> This is not required for the 1st node. (Example: 
> 127.0.0.1:2181)
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> --peerport  The port is used to talk to each other (2888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2888 to 3142.
> --electionport  The port is used to leader election (3888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 3888 to 4142.
> --role  The role of node, it can be participant or 
> observer (participant by default).
> --clientip  The IP address for client connections (0.0.0.0 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2181 to 2435.
> --confdir   Specify a base conf directory 
> (/Users/mosuka/git/zookeeper/conf by default).
> --datadir   Specify a base data directory (/tmp/zookeeper by 
> default).
> --foregroundStart node in foreground.
> stopStop a node of ensemble.
>   Parameters:
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> status  Show ensemble nodes.
>   Parameters:
> --seed  Specify the IP address and port of a existing 
> ensemble node (Example: 127.0.0.1:2181).
> helpDisplay this message.
> {noformat}
> Example:
> 1. Start a 1st node of ensemble on host1(192.168.33.11)
> {noformat}
> $ ./bin/zkEnsemble.sh start
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.1.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 2. Start a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 3. Start a 3rd node of ensemble on host3(192.168.33.13).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.3.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 4. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> server.2=192.168.33.12:2888:3888:participant;0.0.0.0:2181
> server.3=192.168.33.13:2888:3888:participant;0.0.0.0:2181
> {noformat}
> 5. Stop a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh stop
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Stopping zookeeper ... STOPPED
> {noformat}
> 6. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> 

[jira] [Commented] (ZOOKEEPER-2350) Script that provide a way to build the ensemble with ease.

2015-12-30 Thread Minoru Osuka (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15075062#comment-15075062
 ] 

Minoru Osuka commented on ZOOKEEPER-2350:
-

Hi Suda-san,

Thank you for your advice.
I added {{set -e}}.

> Script that provide a way to build the ensemble with ease.
> --
>
> Key: ZOOKEEPER-2350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2350
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: scripts
>Affects Versions: 3.5.0
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch, 
> ZOOKEEPER-2350.patch
>
>
> Starting with 3.5.0, ZooKeeper has already supported a very convenient 
> dynamic reconfiguration. However, the procedure is slightly complicated. So I 
> propose adding a script to build ensemble with ease.
> Usage:
> {noformat}
> $ ./bin/zkEnsemble.sh help
> usage: ./bin/zkEnsemble.sh {start|stop|status} 
>   Commadns:
> start   Start a node of ensemble.
>   Parameters:
> --seed  Specify the IP address and port of an existing 
> ensemble node that required for 2nd and subsequent nodes.
> This is not required for the 1st node. (Example: 
> 127.0.0.1:2181)
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> --peerport  The port is used to talk to each other (2888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2888 to 3142.
> --electionport  The port is used to leader election (3888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 3888 to 4142.
> --role  The role of node, it can be participant or 
> observer (participant by default).
> --clientip  The IP address for client connections (0.0.0.0 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2181 to 2435.
> --confdir   Specify a base conf directory 
> (/Users/mosuka/git/zookeeper/conf by default).
> --datadir   Specify a base data directory (/tmp/zookeeper by 
> default).
> --foregroundStart node in foreground.
> stopStop a node of ensemble.
>   Parameters:
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> status  Show ensemble nodes.
>   Parameters:
> --seed  Specify the IP address and port of a existing 
> ensemble node (Example: 127.0.0.1:2181).
> helpDisplay this message.
> {noformat}
> Example:
> 1. Start a 1st node of ensemble on host1(192.168.33.11)
> {noformat}
> $ ./bin/zkEnsemble.sh start
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.1.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 2. Start a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 3. Start a 3rd node of ensemble on host3(192.168.33.13).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.3.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 4. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> server.2=192.168.33.12:2888:3888:participant;0.0.0.0:2181
> server.3=192.168.33.13:2888:3888:participant;0.0.0.0:2181
> {noformat}
> 5. Stop a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh stop
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Stopping zookeeper ... STOPPED
> {noformat}
> 6. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> 

[jira] [Commented] (ZOOKEEPER-2350) Script that provide a way to build the ensemble with ease.

2015-12-29 Thread Minoru Osuka (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15074014#comment-15074014
 ] 

Minoru Osuka commented on ZOOKEEPER-2350:
-

Hi Suda-san,

Thank you for your comment.
I tried adding {{set -e}} . Unfortunately, the part of output messages in the 
script are ignored. Please see following example:

{noformat}
  RESPONSE=$(echo "ruok" | nc ${SEED_NODE} ${SEED_PORT} 2>/dev/null)
  if [ $? != 0 ] ; then
echo "${SEED_NODE}:${SEED_PORT} does not working."
exit 1
  fi
{noformat}

I'd like to check the exit code to return an appropriate message to user as in 
the example above. Do you know another better way to handle error messages?

> Script that provide a way to build the ensemble with ease.
> --
>
> Key: ZOOKEEPER-2350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2350
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: scripts
>Affects Versions: 3.5.0
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2350.patch
>
>
> Starting with 3.5.0, ZooKeeper has already supported a very convenient 
> dynamic reconfiguration. However, the procedure is slightly complicated. So I 
> propose adding a script to build ensemble with ease.
> Usage:
> {noformat}
> $ ./bin/zkEnsemble.sh help
> usage: ./bin/zkEnsemble.sh {start|stop|status} 
>   Commadns:
> start   Start a node of ensemble.
>   Parameters:
> --seed  Specify the IP address and port of an existing 
> ensemble node that required for 2nd and subsequent nodes.
> This is not required for the 1st node. (Example: 
> 127.0.0.1:2181)
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> --peerport  The port is used to talk to each other (2888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2888 to 3142.
> --electionport  The port is used to leader election (3888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 3888 to 4142.
> --role  The role of node, it can be participant or 
> observer (participant by default).
> --clientip  The IP address for client connections (0.0.0.0 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2181 to 2435.
> --confdir   Specify a base conf directory 
> (/Users/mosuka/git/zookeeper/conf by default).
> --datadir   Specify a base data directory (/tmp/zookeeper by 
> default).
> --foregroundStart node in foreground.
> stopStop a node of ensemble.
>   Parameters:
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> status  Show ensemble nodes.
>   Parameters:
> --seed  Specify the IP address and port of a existing 
> ensemble node (Example: 127.0.0.1:2181).
> helpDisplay this message.
> {noformat}
> Example:
> 1. Start a 1st node of ensemble on host1(192.168.33.11)
> {noformat}
> $ ./bin/zkEnsemble.sh start
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.1.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 2. Start a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 3. Start a 3rd node of ensemble on host3(192.168.33.13).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.3.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 4. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> server.2=192.168.33.12:2888:3888:participant;0.0.0.0:2181
> 

[jira] [Updated] (ZOOKEEPER-2350) Script that provide a way to build the ensemble with ease.

2015-12-29 Thread Minoru Osuka (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Minoru Osuka updated ZOOKEEPER-2350:

Attachment: ZOOKEEPER-2350.patch

> Script that provide a way to build the ensemble with ease.
> --
>
> Key: ZOOKEEPER-2350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2350
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: scripts
>Affects Versions: 3.5.0
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2350.patch, ZOOKEEPER-2350.patch
>
>
> Starting with 3.5.0, ZooKeeper has already supported a very convenient 
> dynamic reconfiguration. However, the procedure is slightly complicated. So I 
> propose adding a script to build ensemble with ease.
> Usage:
> {noformat}
> $ ./bin/zkEnsemble.sh help
> usage: ./bin/zkEnsemble.sh {start|stop|status} 
>   Commadns:
> start   Start a node of ensemble.
>   Parameters:
> --seed  Specify the IP address and port of an existing 
> ensemble node that required for 2nd and subsequent nodes.
> This is not required for the 1st node. (Example: 
> 127.0.0.1:2181)
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> --peerport  The port is used to talk to each other (2888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2888 to 3142.
> --electionport  The port is used to leader election (3888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 3888 to 4142.
> --role  The role of node, it can be participant or 
> observer (participant by default).
> --clientip  The IP address for client connections (0.0.0.0 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2181 to 2435.
> --confdir   Specify a base conf directory 
> (/Users/mosuka/git/zookeeper/conf by default).
> --datadir   Specify a base data directory (/tmp/zookeeper by 
> default).
> --foregroundStart node in foreground.
> stopStop a node of ensemble.
>   Parameters:
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> status  Show ensemble nodes.
>   Parameters:
> --seed  Specify the IP address and port of a existing 
> ensemble node (Example: 127.0.0.1:2181).
> helpDisplay this message.
> {noformat}
> Example:
> 1. Start a 1st node of ensemble on host1(192.168.33.11)
> {noformat}
> $ ./bin/zkEnsemble.sh start
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.1.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 2. Start a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 3. Start a 3rd node of ensemble on host3(192.168.33.13).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.3.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 4. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> server.2=192.168.33.12:2888:3888:participant;0.0.0.0:2181
> server.3=192.168.33.13:2888:3888:participant;0.0.0.0:2181
> {noformat}
> 5. Stop a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh stop
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Stopping zookeeper ... STOPPED
> {noformat}
> 6. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> 

[jira] [Updated] (ZOOKEEPER-2350) Script that provide a way to build the ensemble with ease.

2015-12-27 Thread Minoru Osuka (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Minoru Osuka updated ZOOKEEPER-2350:

Attachment: ZOOKEEPER-2350.patch

This is the patch file.

> Script that provide a way to build the ensemble with ease.
> --
>
> Key: ZOOKEEPER-2350
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2350
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: scripts
>Affects Versions: 3.5.0
>Reporter: Minoru Osuka
>Priority: Minor
> Attachments: ZOOKEEPER-2350.patch
>
>
> Starting with 3.5.0, ZooKeeper has already supported a very convenient 
> dynamic reconfiguration. However, the procedure is slightly complicated. So I 
> propose adding a script to build ensemble with ease.
> Usage:
> {noformat}
> $ ./bin/zkEnsemble.sh help
> usage: ./bin/zkEnsemble.sh {start|stop|status} 
>   Commadns:
> start   Start a node of ensemble.
>   Parameters:
> --seed  Specify the IP address and port of an existing 
> ensemble node that required for 2nd and subsequent nodes.
> This is not required for the 1st node. (Example: 
> 127.0.0.1:2181)
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> --peerport  The port is used to talk to each other (2888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2888 to 3142.
> --electionport  The port is used to leader election (3888 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 3888 to 4142.
> --role  The role of node, it can be participant or 
> observer (participant by default).
> --clientip  The IP address for client connections (0.0.0.0 by 
> default).
> If omitted, it will use the minimum port number 
> that is available between 2181 to 2435.
> --confdir   Specify a base conf directory 
> (/Users/mosuka/git/zookeeper/conf by default).
> --datadir   Specify a base data directory (/tmp/zookeeper by 
> default).
> --foregroundStart node in foreground.
> stopStop a node of ensemble.
>   Parameters:
> --ipNormally, you do not need to specify because it 
> is automatically detected.
> If it seems the wrong IP address is found 
> automatically, you can over ride the IP address with this option.
> --clientportThe port is used to client connections (2181 by 
> default).
> status  Show ensemble nodes.
>   Parameters:
> --seed  Specify the IP address and port of a existing 
> ensemble node (Example: 127.0.0.1:2181).
> helpDisplay this message.
> {noformat}
> Example:
> 1. Start a 1st node of ensemble on host1(192.168.33.11)
> {noformat}
> $ ./bin/zkEnsemble.sh start
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.1.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 2. Start a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 3. Start a 3rd node of ensemble on host3(192.168.33.13).
> {noformat}
> $ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
> ZooKeeper JMX enabled by default
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.3.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 4. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> server.2=192.168.33.12:2888:3888:participant;0.0.0.0:2181
> server.3=192.168.33.13:2888:3888:participant;0.0.0.0:2181
> {noformat}
> 5. Stop a 2nd node of ensemble on host2(192.168.33.12).
> {noformat}
> $ ./bin/zkEnsemble.sh stop
> Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
> Stopping zookeeper ... STOPPED
> {noformat}
> 6. Show ensemble nodes on host1(192.168.33.11).
> {noformat}
> $ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
> server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
> 

[jira] [Created] (ZOOKEEPER-2350) Script that provide a way to build the ensemble with ease.

2015-12-27 Thread Minoru Osuka (JIRA)
Minoru Osuka created ZOOKEEPER-2350:
---

 Summary: Script that provide a way to build the ensemble with ease.
 Key: ZOOKEEPER-2350
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2350
 Project: ZooKeeper
  Issue Type: New Feature
  Components: scripts
Affects Versions: 3.5.0
Reporter: Minoru Osuka
Priority: Minor


Starting with 3.5.0, ZooKeeper has already supported a very convenient dynamic 
reconfiguration. However, the procedure is slightly complicated. So I propose 
adding a script to build ensemble with ease.

Usage:
{noformat}
$ ./bin/zkEnsemble.sh help
usage: ./bin/zkEnsemble.sh {start|stop|status} 
  Commadns:
start   Start a node of ensemble.
  Parameters:
--seed  Specify the IP address and port of an existing 
ensemble node that required for 2nd and subsequent nodes.
This is not required for the 1st node. (Example: 
127.0.0.1:2181)
--ipNormally, you do not need to specify because it is 
automatically detected.
If it seems the wrong IP address is found 
automatically, you can over ride the IP address with this option.
--clientportThe port is used to client connections (2181 by 
default).
--peerport  The port is used to talk to each other (2888 by 
default).
If omitted, it will use the minimum port number 
that is available between 2888 to 3142.
--electionport  The port is used to leader election (3888 by 
default).
If omitted, it will use the minimum port number 
that is available between 3888 to 4142.
--role  The role of node, it can be participant or observer 
(participant by default).
--clientip  The IP address for client connections (0.0.0.0 by 
default).
If omitted, it will use the minimum port number 
that is available between 2181 to 2435.
--confdir   Specify a base conf directory 
(/Users/mosuka/git/zookeeper/conf by default).
--datadir   Specify a base data directory (/tmp/zookeeper by 
default).
--foregroundStart node in foreground.

stopStop a node of ensemble.
  Parameters:
--ipNormally, you do not need to specify because it is 
automatically detected.
If it seems the wrong IP address is found 
automatically, you can over ride the IP address with this option.
--clientportThe port is used to client connections (2181 by 
default).

status  Show ensemble nodes.
  Parameters:
--seed  Specify the IP address and port of a existing 
ensemble node (Example: 127.0.0.1:2181).

helpDisplay this message.
{noformat}

Example:
1. Start a 1st node of ensemble on host1(192.168.33.11)
{noformat}
$ ./bin/zkEnsemble.sh start
ZooKeeper JMX enabled by default
Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.1.cfg
Starting zookeeper ... STARTED
{noformat}

2. Start a 2nd node of ensemble on host2(192.168.33.12).
{noformat}
$ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
ZooKeeper JMX enabled by default
Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
Starting zookeeper ... STARTED
{noformat}

3. Start a 3rd node of ensemble on host3(192.168.33.13).
{noformat}
$ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
ZooKeeper JMX enabled by default
Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.3.cfg
Starting zookeeper ... STARTED
{noformat}

4. Show ensemble nodes on host1(192.168.33.11).
{noformat}
$ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
server.2=192.168.33.12:2888:3888:participant;0.0.0.0:2181
server.3=192.168.33.13:2888:3888:participant;0.0.0.0:2181
{noformat}

5. Stop a 2nd node of ensemble on host2(192.168.33.12).
{noformat}
$ ./bin/zkEnsemble.sh stop
Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
Stopping zookeeper ... STOPPED
{noformat}

6. Show ensemble nodes on host1(192.168.33.11).
{noformat}
$ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181
server.3=192.168.33.13:2888:3888:participant;0.0.0.0:2181
{noformat}

7. Start a 2nd node of ensemble on host2(192.168.33.12).
{noformat}
$ ./bin/zkEnsemble.sh start --seed=192.168.33.11:2181
ZooKeeper JMX enabled by default
Using config: /Users/minoru/zookeeper/zookeeper-3.5.0/conf/server.2.cfg
Starting zookeeper ... STARTED
{noformat}

8. Show ensemble nodes on host1(192.168.33.11).
{noformat}
$ ./bin/zkEnsemble.sh status --seed=192.168.33.11:2181
server.1=192.168.33.11:2888:3888:participant;0.0.0.0:2181