Package org.apache.accumulo.server.monitor.ZooKeeperStatus

Examples of org.apache.accumulo.server.monitor.ZooKeeperStatus.ZooKeeperState


  public void zkHostSortingTest() {
    List<String> expectedHosts = Arrays.asList("rack1node1", "rack2node1", "rack4node1", "rack4node4");
   
    // Add the states in a not correctly sorted order
    TreeSet<ZooKeeperState> states = new TreeSet<ZooKeeperState>();
    states.add(new ZooKeeperState("rack4node4", "leader", 10));
    states.add(new ZooKeeperState("rack4node1", "follower", 10));
    states.add(new ZooKeeperState("rack1node1", "follower", 10));
    states.add(new ZooKeeperState("rack2node1", "follower", 10));
   
    List<String> actualHosts = new ArrayList<String>(4);
    for (ZooKeeperState state : states) {
      actualHosts.add(state.keeper);
    }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.server.monitor.ZooKeeperStatus.ZooKeeperState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.