Examples of LoadBalancerEchoServer


Examples of com.linkedin.d2.balancer.util.LoadBalancerEchoServer

      {
        String[] serviceNames =
            new String[] { "service-1-" + clusterName, "service-2-" + clusterName,
                "service-3-" + clusterName };

        servers.add(new LoadBalancerEchoServer(_zookeeperHost, _zookeeperPort, InetAddress.getLocalHost().getHostName(), port++, "http", _basePath, clusterName, serviceNames));
      }

      _clusters.put(clusterName, servers);
    }
  }
View Full Code Here

Examples of com.linkedin.d2.balancer.util.LoadBalancerEchoServer

    }
  }

  private static LoadBalancerEchoServer startEchoServer(int echoServerPort, String cluster,String... services) throws Exception
  {
    LoadBalancerEchoServer echoServer = new LoadBalancerEchoServer(ZK_HOST, ZK_PORT, ECHO_SERVER_HOST, echoServerPort, "http","/d2", cluster, services);
    echoServer.startServer();
    echoServer.markUp();

    return echoServer;
  }
View Full Code Here

Examples of com.linkedin.d2.balancer.util.LoadBalancerEchoServer

    return echoServer;
  }

  private static LoadBalancerEchoServer startEchoServer(int echoServerPort, String cluster, Map<Integer, Double> partitionWeight, String... services) throws Exception
  {
    LoadBalancerEchoServer echoServer = new LoadBalancerEchoServer(ZK_HOST, ZK_PORT, ECHO_SERVER_HOST, echoServerPort, "http", "/d2", cluster, partitionWeight, services);
    echoServer.startServer();
    echoServer.markUp();
    return echoServer;
  }
View Full Code Here

Examples of com.linkedin.d2.balancer.util.LoadBalancerEchoServer

                                                          String echoServerHost,
                                                          int echoServerPort,
                                                          String cluster,
                                                          String... services) throws Exception
  {
    LoadBalancerEchoServer echoServer = new LoadBalancerEchoServer(zkHost, zkPort, echoServerHost, echoServerPort, "http","/d2", cluster, services);
    echoServer.startServer();
    echoServer.markUp();

    assertFalse(echoServer.isStopped());

    return echoServer;
  }
View Full Code Here

Examples of com.linkedin.d2.balancer.util.LoadBalancerEchoServer

                                                          String cluster,
                                                          Map<Integer, Double> partitionWeight,
                                                          String... services) throws Exception
  {
    _log.debug("Starting echo server " + echoServerHost + " " + echoServerPort + " in cluster " + cluster);
    LoadBalancerEchoServer echoServer = new LoadBalancerEchoServer(zkHost, zkPort, echoServerHost, echoServerPort, "http","/d2", cluster, services);
    echoServer.startServer();
    echoServer.markUp(partitionWeight);

    assertFalse(echoServer.isStopped());

    return echoServer;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.