@Test public void testGetControllerHostName() { HostName host = VespaModelUtil.getControllerHostName(application, CONTENT_CLUSTER_ID); assertEquals(controller0Host, host); }
public static HostName getControllerHostName(ApplicationInstance application, ClusterId contentClusterId) { return getClusterControllerInstancesInOrder(application, contentClusterId).stream() .findFirst() .orElseThrow(() -> new IllegalArgumentException("No cluster controllers found in application " + application)); }
VespaModelUtil { public static HostName getControllerHostName(ApplicationInstance application, ClusterId contentClusterId) { return getClusterControllerInstancesInOrder(application, contentClusterId).stream() .findFirst() .orElseThrow(() -> new IllegalArgumentException("No cluster controllers found in application " + application)); } }
VespaModelUtil { public static HostName getControllerHostName(ApplicationInstance application, ClusterId contentClusterId) { return getClusterControllerInstancesInOrder(application, contentClusterId).stream() .findFirst() .orElseThrow(() -> new IllegalArgumentException("No cluster controllers found in application " + application)); }  }
VespaModelUtil { public static HostName getControllerHostName(ApplicationInstance application, ClusterId contentClusterId) { return getClusterControllerInstancesInOrder(application, contentClusterId).stream() .findFirst() .orElseThrow(() -> new IllegalArgumentException("No cluster controllers found in application " + application)); }  static boolean isClusterController(ServiceCluster cluster); static boolean isStorage(ServiceCluster cluster); static boolean isContent(ServiceCluster cluster); static List<HostName> getClusterControllerInstancesInOrder(ApplicationInstance application,
                                                                          ClusterId contentClusterId); static Set<ServiceCluster> getClusterControllerServiceClusters(ApplicationInstance application); static HostName getControllerHostName(ApplicationInstance application, ClusterId contentClusterId); static ClusterId getContentClusterName(ApplicationInstance application, HostName hostName); static int getStorageNodeIndex(ApplicationInstance application, HostName hostName); static Optional<ServiceInstance> getStorageNodeAtHost(ApplicationInstance application, 
                                                                        HostName hostName); static int getClusterControllerIndex(ConfigId configId); static int getStorageNodeIndex(ConfigId configId); }
VespaModelUtil { public static HostName getControllerHostName(ApplicationInstance application, ClusterId contentClusterId) { return getClusterControllerInstancesInOrder(application, contentClusterId).stream() .findFirst() .orElseThrow(() -> new IllegalArgumentException("No cluster controllers found in application " + application)); }  static boolean isClusterController(ServiceCluster cluster); static boolean isStorage(ServiceCluster cluster); static boolean isContent(ServiceCluster cluster); static List<HostName> getClusterControllerInstancesInOrder(ApplicationInstance application,
                                                                          ClusterId contentClusterId); static Set<ServiceCluster> getClusterControllerServiceClusters(ApplicationInstance application); static HostName getControllerHostName(ApplicationInstance application, ClusterId contentClusterId); static ClusterId getContentClusterName(ApplicationInstance application, HostName hostName); static int getStorageNodeIndex(ApplicationInstance application, HostName hostName); static Optional<ServiceInstance> getStorageNodeAtHost(ApplicationInstance application, 
                                                                        HostName hostName); static int getClusterControllerIndex(ConfigId configId); static int getStorageNodeIndex(ConfigId configId); static final ApplicationId TENANT_HOST_APPLICATION_ID; static final ClusterId ADMIN_CLUSTER_ID; static final ServiceType SLOBROK_SERVICE_TYPE; static final ServiceType CLUSTER_CONTROLLER_SERVICE_TYPE; static final ServiceType DISTRIBUTOR_SERVICE_TYPE; static final ServiceType SEARCHNODE_SERVICE_TYPE; static final ServiceType STORAGENODE_SERVICE_TYPE; static final ServiceType METRICS_PROXY_SERVICE_TYPE; }