diff options
author | Arne H Juul <arnej@yahooinc.com> | 2021-12-02 08:07:30 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2021-12-02 09:35:08 +0000 |
commit | 98b760a33c142227cd88448bc6666eb9809aa4a2 (patch) | |
tree | b36c7e4cdd582267f5a605bb8a2ebeb55d734e8c /storage | |
parent | a7aa496c28792461b7e252a3046cf003ed0113b1 (diff) |
track namespace move in documenttypes.def
* For C++ code this introduces a "document::config" namespace, which will
sometimes conflict with the global "config" namespace.
* Move all forward-declarations of the types DocumenttypesConfig and
DocumenttypesConfigBuilder to a common header file.
Diffstat (limited to 'storage')
9 files changed, 14 insertions, 13 deletions
diff --git a/storage/src/tests/bucketdb/bucketmanagertest.cpp b/storage/src/tests/bucketdb/bucketmanagertest.cpp index aefda3660df..dd539c3daa5 100644 --- a/storage/src/tests/bucketdb/bucketmanagertest.cpp +++ b/storage/src/tests/bucketdb/bucketmanagertest.cpp @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/config/helper/configgetter.hpp> +#include <vespa/document/config/doctypecfg.h> #include <vespa/document/config/config-documenttypes.h> #include <vespa/document/datatype/documenttype.h> #include <vespa/document/fieldvalue/document.h> @@ -29,7 +30,6 @@ LOG_SETUP(".test.bucketdb.bucketmanager"); using config::ConfigGetter; -using document::DocumenttypesConfig; using config::FileSpec; using document::DocumentType; using document::DocumentTypeRepo; diff --git a/storage/src/tests/distributor/getoperationtest.cpp b/storage/src/tests/distributor/getoperationtest.cpp index 41f811a77a6..66c8969acc3 100644 --- a/storage/src/tests/distributor/getoperationtest.cpp +++ b/storage/src/tests/distributor/getoperationtest.cpp @@ -3,6 +3,7 @@ #include <tests/distributor/distributor_stripe_test_util.h> #include <vespa/config/helper/configgetter.h> #include <vespa/config/helper/configgetter.hpp> +#include <vespa/document/config/doctypecfg.h> #include <vespa/document/config/config-documenttypes.h> #include <vespa/document/fieldset/fieldsets.h> #include <vespa/document/repo/documenttyperepo.h> @@ -20,7 +21,6 @@ using std::shared_ptr; using config::ConfigGetter; -using document::DocumenttypesConfig; using config::FileSpec; using document::test::makeDocumentBucket; using document::BucketId; diff --git a/storage/src/tests/distributor/operationtargetresolvertest.cpp b/storage/src/tests/distributor/operationtargetresolvertest.cpp index dca54e22f0d..2d41b0f4d32 100644 --- a/storage/src/tests/distributor/operationtargetresolvertest.cpp +++ b/storage/src/tests/distributor/operationtargetresolvertest.cpp @@ -34,7 +34,7 @@ struct OperationTargetResolverTest : Test, DistributorStripeTestUtil { void SetUp() override { _repo.reset(new document::DocumentTypeRepo( - *config::ConfigGetter<document::DocumenttypesConfig>::getConfig( + *config::ConfigGetter<DocumenttypesConfig>::getConfig( "config-doctypes", config::FileSpec("../config-doctypes.cfg")))); _html_type = _repo->getDocumentType("text/html"); diff --git a/storage/src/tests/distributor/putoperationtest.cpp b/storage/src/tests/distributor/putoperationtest.cpp index 6ad67ab91c2..017207d0b56 100644 --- a/storage/src/tests/distributor/putoperationtest.cpp +++ b/storage/src/tests/distributor/putoperationtest.cpp @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <tests/distributor/distributor_stripe_test_util.h> +#include <vespa/document/config/doctypecfg.h> #include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/test/make_document_bucket.h> #include <vespa/storage/distributor/top_level_distributor.h> @@ -15,7 +16,6 @@ using std::shared_ptr; using config::ConfigGetter; -using document::DocumenttypesConfig; using config::FileSpec; using vespalib::string; using namespace document; diff --git a/storage/src/tests/distributor/twophaseupdateoperationtest.cpp b/storage/src/tests/distributor/twophaseupdateoperationtest.cpp index 9b229198043..c1aece58183 100644 --- a/storage/src/tests/distributor/twophaseupdateoperationtest.cpp +++ b/storage/src/tests/distributor/twophaseupdateoperationtest.cpp @@ -3,6 +3,7 @@ #include <tests/distributor/distributor_stripe_test_util.h> #include <vespa/config/helper/configgetter.h> #include <vespa/document/base/testdocrepo.h> +#include <vespa/document/config/doctypecfg.h> #include <vespa/document/fieldset/fieldsets.h> #include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/test/make_document_bucket.h> @@ -19,7 +20,6 @@ namespace storage::distributor { using document::test::makeDocumentBucket; using config::ConfigGetter; -using document::DocumenttypesConfig; using namespace document; using namespace storage; using namespace storage::distributor; diff --git a/storage/src/tests/distributor/updateoperationtest.cpp b/storage/src/tests/distributor/updateoperationtest.cpp index db974e2202c..f0cb30368cb 100644 --- a/storage/src/tests/distributor/updateoperationtest.cpp +++ b/storage/src/tests/distributor/updateoperationtest.cpp @@ -14,15 +14,15 @@ #include <vespa/storageapi/message/state.h> #include <vespa/vespalib/gtest/gtest.h> +using config::ConfigGetter; +using config::FileSpec; +using vespalib::string; +using document::test::makeDocumentBucket; using namespace document; using namespace storage::api; using namespace std; using namespace storage::lib; using namespace ::testing; -using config::ConfigGetter; -using config::FileSpec; -using vespalib::string; -using document::test::makeDocumentBucket; namespace storage::distributor { diff --git a/storage/src/tests/storageserver/documentapiconvertertest.cpp b/storage/src/tests/storageserver/documentapiconvertertest.cpp index ae4ff1c1b21..e6f5eec6bab 100644 --- a/storage/src/tests/storageserver/documentapiconvertertest.cpp +++ b/storage/src/tests/storageserver/documentapiconvertertest.cpp @@ -3,6 +3,7 @@ #include <vespa/config/subscription/configuri.h> #include <vespa/document/base/testdocrepo.h> #include <vespa/document/bucket/bucketidfactory.h> +#include <vespa/document/config/doctypecfg.h> #include <vespa/document/datatype/documenttype.h> #include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/select/parser.h> diff --git a/storage/src/vespa/storage/storageserver/storagenode.cpp b/storage/src/vespa/storage/storageserver/storagenode.cpp index 2e199db1f07..c19fca8c58c 100644 --- a/storage/src/vespa/storage/storageserver/storagenode.cpp +++ b/storage/src/vespa/storage/storageserver/storagenode.cpp @@ -485,7 +485,7 @@ void StorageNode::configure(std::unique_ptr<StorDistributionConfig> config) { } } void -StorageNode::configure(std::unique_ptr<document::DocumenttypesConfig> config, +StorageNode::configure(std::unique_ptr<document::config::DocumenttypesConfig> config, bool hasChanged, int64_t generation) { log_config_received(*config); diff --git a/storage/src/vespa/storage/storageserver/storagenode.h b/storage/src/vespa/storage/storageserver/storagenode.h index 74a070cb105..c49737af78b 100644 --- a/storage/src/vespa/storage/storageserver/storagenode.h +++ b/storage/src/vespa/storage/storageserver/storagenode.h @@ -133,7 +133,7 @@ private: void configure(std::unique_ptr<StorServerConfig> config) override; void configure(std::unique_ptr<UpgradingConfig> config) override; void configure(std::unique_ptr<StorDistributionConfig> config) override; - virtual void configure(std::unique_ptr<document::DocumenttypesConfig> config, + virtual void configure(std::unique_ptr<document::config::DocumenttypesConfig> config, bool hasChanged, int64_t generation); void configure(std::unique_ptr<BucketspacesConfig>) override; void updateUpgradeFlag(const UpgradingConfig&); @@ -148,13 +148,13 @@ protected: std::unique_ptr<StorServerConfig> _serverConfig; std::unique_ptr<UpgradingConfig> _clusterConfig; std::unique_ptr<StorDistributionConfig> _distributionConfig; - std::unique_ptr<document::DocumenttypesConfig> _doctypesConfig; + std::unique_ptr<document::config::DocumenttypesConfig> _doctypesConfig; std::unique_ptr<BucketspacesConfig> _bucketSpacesConfig; // New configs gotten that has yet to have been handled std::unique_ptr<StorServerConfig> _newServerConfig; std::unique_ptr<UpgradingConfig> _newClusterConfig; std::unique_ptr<StorDistributionConfig> _newDistributionConfig; - std::unique_ptr<document::DocumenttypesConfig> _newDoctypesConfig; + std::unique_ptr<document::config::DocumenttypesConfig> _newDoctypesConfig; std::unique_ptr<BucketspacesConfig> _newBucketSpacesConfig; std::unique_ptr<StorageComponent> _component; std::unique_ptr<NodeIdentity> _node_identity; |