diff options
3 files changed, 10 insertions, 4 deletions
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/controller/RetryingClusterControllerClientFactory.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/controller/RetryingClusterControllerClientFactory.java index e0f5b0ecf4f..c7aae6ea93d 100644 --- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/controller/RetryingClusterControllerClientFactory.java +++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/controller/RetryingClusterControllerClientFactory.java @@ -20,6 +20,7 @@ public class RetryingClusterControllerClientFactory implements ClusterController // TODO: Figure this port out dynamically. public static final int HARDCODED_CLUSTERCONTROLLER_PORT = 19050; public static final String CLUSTERCONTROLLER_API_PATH = "/"; + public static final String CLUSTERCONTROLLER_SCHEME = "http"; private static final int CLUSTER_CONTROLLER_CONNECT_TIMEOUT_MS = 1000; private static final int CLUSTER_CONTROLLER_READ_TIMEOUT_MS = 1000; @@ -39,7 +40,7 @@ public class RetryingClusterControllerClientFactory implements ClusterController String clusterName) { Set<HostName> clusterControllerSet = clusterControllers.stream().collect(Collectors.toSet()); JaxRsStrategy<ClusterControllerJaxRsApi> jaxRsApi - = new JaxRsStrategyFactory(clusterControllerSet, HARDCODED_CLUSTERCONTROLLER_PORT, jaxRsClientFactory) + = new JaxRsStrategyFactory(clusterControllerSet, HARDCODED_CLUSTERCONTROLLER_PORT, jaxRsClientFactory, CLUSTERCONTROLLER_SCHEME) .apiWithRetries(ClusterControllerJaxRsApi.class, CLUSTERCONTROLLER_API_PATH); return new ClusterControllerClientImpl(jaxRsApi, clusterName); } diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/controller/SingleInstanceClusterControllerClientFactory.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/controller/SingleInstanceClusterControllerClientFactory.java index ca757adfea3..7459f0a6b11 100644 --- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/controller/SingleInstanceClusterControllerClientFactory.java +++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/controller/SingleInstanceClusterControllerClientFactory.java @@ -16,6 +16,7 @@ import java.util.logging.Logger; public class SingleInstanceClusterControllerClientFactory implements ClusterControllerClientFactory { public static final int CLUSTERCONTROLLER_HARDCODED_PORT = 19050; + public static final String CLUSTERCONTROLLER_HARDCODED_SCHEME = "http"; public static final String CLUSTERCONTROLLER_API_PATH = "/"; private static final Logger log = Logger.getLogger(SingleInstanceClusterControllerClientFactory.class.getName()); @@ -44,7 +45,8 @@ public class SingleInstanceClusterControllerClientFactory implements ClusterCont port, jaxRsClientFactory, ClusterControllerJaxRsApi.class, - CLUSTERCONTROLLER_API_PATH); + CLUSTERCONTROLLER_API_PATH, + CLUSTERCONTROLLER_HARDCODED_SCHEME); return new ClusterControllerClientImpl(strategy, clusterName); } diff --git a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/controller/SingleInstanceClusterControllerClientFactoryTest.java b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/controller/SingleInstanceClusterControllerClientFactoryTest.java index aaddb01197c..b26d11a113f 100644 --- a/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/controller/SingleInstanceClusterControllerClientFactoryTest.java +++ b/orchestrator/src/test/java/com/yahoo/vespa/orchestrator/controller/SingleInstanceClusterControllerClientFactoryTest.java @@ -43,6 +43,7 @@ public class SingleInstanceClusterControllerClientFactoryTest { eq(ClusterControllerJaxRsApi.class), any(HostName.class), anyInt(), + anyString(), anyString())) .thenReturn(mockApi); } @@ -70,7 +71,8 @@ public class SingleInstanceClusterControllerClientFactoryTest { ClusterControllerJaxRsApi.class, HOST_NAME_1, PORT, - PATH); + PATH, + "http"); } @Test @@ -99,7 +101,8 @@ public class SingleInstanceClusterControllerClientFactoryTest { equalTo(HOST_NAME_2), equalTo(HOST_NAME_3)))), eq(PORT), - eq(PATH)); + eq(PATH), + eq("http")); } private static ConfigId clusterControllerConfigId(final int index) { |