Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
WHIRR-185. [ZooKeeper] Fix selection of instances for getHosts() call…
Browse files Browse the repository at this point in the history
…. Contributed by Lars George.

git-svn-id: https://svn.apache.org/repos/asf/incubator/whirr/trunk@1054747 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
tomwhite committed Jan 3, 2011
1 parent 0e9e212 commit 47d1f95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -84,6 +84,9 @@ Trunk (unreleased changes)
WHIRR-179. [Hadoop] Guard $MOUNT/tmp mkdir call against existing directory.
(Lars George via tomwhite)

WHIRR-185. [ZooKeeper] Fix selection of instances for getHosts() call.
(Lars George via tomwhite)

Release 0.2.0 - 2010-11-04

NEW FEATURES
Expand Down
Expand Up @@ -21,10 +21,12 @@
import com.google.common.base.Joiner;

import org.apache.whirr.service.Cluster;
import org.apache.whirr.service.RolePredicates;

public class ZooKeeperCluster {
public static String getHosts(Cluster cluster) {
return Joiner.on(',').join(
ZooKeeperClusterActionHandler.getHosts(cluster.getInstances()));
ZooKeeperClusterActionHandler.getHosts(cluster.getInstancesMatching(
RolePredicates.role(ZooKeeperClusterActionHandler.ZOOKEEPER_ROLE))));
}
}

0 comments on commit 47d1f95

Please sign in to comment.