diff options
author | Harald Musum <musum@yahoo-inc.com> | 2017-11-14 17:20:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-14 17:20:15 +0100 |
commit | 6be6eb658bf8fe99a019309f12e3331acc4cb0f2 (patch) | |
tree | 1dfc35571fc672a8acfb100f6d7b3496cc120400 /filedistribution | |
parent | 55a922d6af49b8d5337dc2249e07c33c8d00e61e (diff) |
Revert "Move filedistribution config definitions to configdefinitions module"
Diffstat (limited to 'filedistribution')
5 files changed, 48 insertions, 1 deletions
diff --git a/filedistribution/pom.xml b/filedistribution/pom.xml index e63b85a22b8..0a4b75788bc 100644 --- a/filedistribution/pom.xml +++ b/filedistribution/pom.xml @@ -13,4 +13,34 @@ <version>6-SNAPSHOT</version> <packaging>jar</packaging> <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa</groupId> + <artifactId>config-lib</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>com.yahoo.vespa</groupId> + <artifactId>config-class-plugin</artifactId> + <version>${project.version}</version> + <configuration> + <defFilesDirectories> + src/vespa/filedistribution/distributor, + src/vespa/filedistribution/model + </defFilesDirectories> + </configuration> + <executions> + <execution> + <id>config-gen</id> + <goals> + <goal>config-gen</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> diff --git a/filedistribution/src/vespa/filedistribution/distributor/CMakeLists.txt b/filedistribution/src/vespa/filedistribution/distributor/CMakeLists.txt index 6b575dc5526..f85ab85fb39 100644 --- a/filedistribution/src/vespa/filedistribution/distributor/CMakeLists.txt +++ b/filedistribution/src/vespa/filedistribution/distributor/CMakeLists.txt @@ -11,3 +11,5 @@ vespa_add_library(filedistribution_distributor STATIC DEPENDS ) target_compile_options(filedistribution_distributor PRIVATE -DTORRENT_DISABLE_ENCRYPTION -DTORRENT_DISABLE_DHT -DWITH_SHIPPED_GEOIP_H -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_DYN_LINK -DTORRENT_LINKING_SHARED) +vespa_generate_config(filedistribution_distributor filedistributor.def) +install_config_definition(filedistributor.def cloud.config.filedistribution.filedistributor.def) diff --git a/filedistribution/src/vespa/filedistribution/distributor/filedistributor.def b/filedistribution/src/vespa/filedistribution/distributor/filedistributor.def new file mode 100644 index 00000000000..13dd373eac6 --- /dev/null +++ b/filedistribution/src/vespa/filedistribution/distributor/filedistributor.def @@ -0,0 +1,10 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +namespace=cloud.config.filedistribution + +torrentport int +stateport int default = 0 +hostname string +filedbpath string + +maxdownloadspeed double +maxuploadspeed double diff --git a/filedistribution/src/vespa/filedistribution/model/CMakeLists.txt b/filedistribution/src/vespa/filedistribution/model/CMakeLists.txt index 51af6b106dc..5b92aa4086d 100644 --- a/filedistribution/src/vespa/filedistribution/model/CMakeLists.txt +++ b/filedistribution/src/vespa/filedistribution/model/CMakeLists.txt @@ -14,5 +14,7 @@ vespa_add_library(filedistribution_filedistributionmodel STATIC zkfiledbmodel.cpp DEPENDS ) -vespa_add_target_external_dependency(filedistribution_filedistributionmodel zookeeper_mt) +vespa_generate_config(filedistribution_filedistributionmodel filereferences.def) +vespa_add_target_external_dependency(filedistribution_filedistributionmodel zookeeper_mt) +install_config_definition(filereferences.def cloud.config.filedistribution.filereferences.def) diff --git a/filedistribution/src/vespa/filedistribution/model/filereferences.def b/filedistribution/src/vespa/filedistribution/model/filereferences.def new file mode 100644 index 00000000000..03e071959ce --- /dev/null +++ b/filedistribution/src/vespa/filedistribution/model/filereferences.def @@ -0,0 +1,3 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +namespace=cloud.config.filedistribution +filereferences[] string |