Unfortunately you cannot changed the (in-memory) ZooKeeper instance that is launched alongside LocalCluster as of today -- you can't even prevent the ZooKeeper instance from starting at all.
During its own startup LocalCluster will try to launch its ZK instance on port 2000/tcp. If that should fail (e.g. a different process is already bound to that port) it will try incrementing the port -- 2001, 2002, etc. -- until it finds a free one or until it's running out of valid TCP ports. Again, you can't change the starting port (2000/tcp) nor can you modify the algorithm that tries to find a free port if the starting port is already taken. See how `daemon-conf` is configured in function `mk-local-storm-cluster` in testing.clj [1] as well as function `mk-inprocess-zookeeper` in zookeeper.clj [2]. There's an open JIRA ticket to decouple the in-memory ZK instance from LocalCluster: https://issues.apache.org/jira/browse/STORM-213 Best, Michael [1] https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/testing.clj [2] https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/zookeeper.clj On 02/21/2014 05:13 PM, Lin Zhao wrote: > I launch a LocalCluster for my unit tests, and I'd like to set > parameters to the config. In particular, storm.zookeeper.port such that > preoccupation of the default 2000 won't fail the test. > > Can someone advise? LocalCluster doesn't seem to take a storm Config > when launched. > > -- > Lin Zhao > > https://wiki.groupondev.com/Message_Bus > 3101 Park Blvd, Palo Alto, CA 94306 > > Temporarily based in NY > 33 W 19th St. >
