You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whirr.apache.org by to...@apache.org on 2011/01/03 22:02:07 UTC

svn commit: r1054747 - in /incubator/whirr/trunk: CHANGES.txt services/zookeeper/src/main/java/org/apache/whirr/service/zookeeper/ZooKeeperCluster.java

Author: tomwhite
Date: Mon Jan  3 21:02:07 2011
New Revision: 1054747

URL: http://svn.apache.org/viewvc?rev=1054747&view=rev
Log:
WHIRR-185. [ZooKeeper] Fix selection of instances for getHosts() call. Contributed by Lars George.

Modified:
    incubator/whirr/trunk/CHANGES.txt
    incubator/whirr/trunk/services/zookeeper/src/main/java/org/apache/whirr/service/zookeeper/ZooKeeperCluster.java

Modified: incubator/whirr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/CHANGES.txt?rev=1054747&r1=1054746&r2=1054747&view=diff
==============================================================================
--- incubator/whirr/trunk/CHANGES.txt (original)
+++ incubator/whirr/trunk/CHANGES.txt Mon Jan  3 21:02:07 2011
@@ -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

Modified: incubator/whirr/trunk/services/zookeeper/src/main/java/org/apache/whirr/service/zookeeper/ZooKeeperCluster.java
URL: http://svn.apache.org/viewvc/incubator/whirr/trunk/services/zookeeper/src/main/java/org/apache/whirr/service/zookeeper/ZooKeeperCluster.java?rev=1054747&r1=1054746&r2=1054747&view=diff
==============================================================================
--- incubator/whirr/trunk/services/zookeeper/src/main/java/org/apache/whirr/service/zookeeper/ZooKeeperCluster.java (original)
+++ incubator/whirr/trunk/services/zookeeper/src/main/java/org/apache/whirr/service/zookeeper/ZooKeeperCluster.java Mon Jan  3 21:02:07 2011
@@ -21,10 +21,12 @@ package org.apache.whirr.service.zookeep
 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))));
   }
 }