diff options
author | HÃ¥kon Hallingstad <hakon@oath.com> | 2019-02-16 00:23:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-16 00:23:07 +0100 |
commit | 7aa9b0b36fea51875e0937c3d3106fdeb60154c6 (patch) | |
tree | b59d7e36ed14eae0e75019cffd1d7b16bf537d84 | |
parent | 46a566b2c016da895b3ad94828627508b2dc38c4 (diff) | |
parent | 95f9b0d2a85dbbeb6a87948dfc45f6fd54e2ad03 (diff) |
Merge pull request #8524 from vespa-engine/hakonhall/remove-withreadtimeout-and-dockerdef
Remove docker.def.
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | docker-api/CMakeLists.txt | 2 | ||||
-rw-r--r-- | docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java | 16 | ||||
-rw-r--r-- | docker-api/src/main/resources/configdefinitions/docker.def | 9 |
4 files changed, 8 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 476915d44a9..32129a464c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,6 @@ add_subdirectory(clustercontroller-apputil) add_subdirectory(clustercontroller-utils) add_subdirectory(clustercontroller-core) add_subdirectory(defaults) -add_subdirectory(docker-api) add_subdirectory(docproc) add_subdirectory(docprocs) add_subdirectory(document) diff --git a/docker-api/CMakeLists.txt b/docker-api/CMakeLists.txt deleted file mode 100644 index 25957c81e4c..00000000000 --- a/docker-api/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -install_config_definition(src/main/resources/configdefinitions/docker.def vespa.hosted.dockerapi.docker.def) diff --git a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java index 1c2e6f44339..73bf1a9edc8 100644 --- a/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java +++ b/docker-api/src/main/java/com/yahoo/vespa/hosted/dockerapi/DockerImpl.java @@ -59,8 +59,8 @@ public class DockerImpl implements Docker { private final CounterWrapper numberOfDockerDaemonFails; @Inject - public DockerImpl(DockerConfig config, MetricReceiverWrapper metricReceiverWrapper) { - this(createDockerClient(config), metricReceiverWrapper); + public DockerImpl(MetricReceiverWrapper metricReceiverWrapper) { + this(createDockerClient(), metricReceiverWrapper); } DockerImpl(DockerClient dockerClient, MetricReceiverWrapper metricReceiver) { @@ -390,15 +390,15 @@ public class DockerImpl implements Docker { } } - private static DockerClient createDockerClient(DockerConfig config) { + private static DockerClient createDockerClient() { JerseyDockerCmdExecFactory dockerFactory = new JerseyDockerCmdExecFactory() - .withMaxPerRouteConnections(config.maxPerRouteConnections()) - .withMaxTotalConnections(config.maxTotalConnections()) - .withConnectTimeout(config.connectTimeoutMillis()) - .withReadTimeout(config.readTimeoutMillis()); + .withMaxPerRouteConnections(10) + .withMaxTotalConnections(100) + .withConnectTimeout((int) Duration.ofSeconds(100).toMillis()) + .withReadTimeout((int) Duration.ofMinutes(30).toMillis()); DockerClientConfig dockerClientConfig = new DefaultDockerClientConfig.Builder() - .withDockerHost(config.uri()) + .withDockerHost("unix:///var/run/docker.sock") .build(); return DockerClientImpl.getInstance(dockerClientConfig) diff --git a/docker-api/src/main/resources/configdefinitions/docker.def b/docker-api/src/main/resources/configdefinitions/docker.def deleted file mode 100644 index 5bc40da135f..00000000000 --- a/docker-api/src/main/resources/configdefinitions/docker.def +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -namespace=vespa.hosted.dockerapi - -uri string default = "unix:///var/run/docker.sock" - -maxPerRouteConnections int default = 10 -maxTotalConnections int default = 100 -connectTimeoutMillis int default = 100000 # 100 sec -readTimeoutMillis int default = 1800000 # 30 min |