diff options
author | Geir Storli <geirst@oath.com> | 2018-02-02 12:54:29 +0000 |
---|---|---|
committer | Geir Storli <geirst@oath.com> | 2018-02-02 12:54:29 +0000 |
commit | 4d2fc52cfa76096c81253565874ed33b6b2fe565 (patch) | |
tree | c707f24a3619e914620d075b7c7ac85713b65bf2 /documentapi | |
parent | 0c29fb32d7263487ce5d722e95e2fb89166b00c8 (diff) |
Define and use fixed bucket spaces names.
Diffstat (limited to 'documentapi')
5 files changed, 27 insertions, 14 deletions
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistmessage.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistmessage.cpp index 418d152d6bc..02b94bc8426 100644 --- a/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistmessage.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/messages/getbucketlistmessage.cpp @@ -2,14 +2,17 @@ #include "getbucketlistmessage.h" #include "getbucketlistreply.h" +#include <vespa/document/bucket/fixed_bucket_spaces.h> #include <vespa/documentapi/messagebus/documentprotocol.h> +using document::FixedBucketSpaces; + namespace documentapi { GetBucketListMessage::GetBucketListMessage(const document::BucketId &bucketId) : DocumentMessage(), _bucketId(bucketId), - _bucketSpace("default") // TODO repo + _bucketSpace(FixedBucketSpaces::default_space_name()) { } diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/statbucketmessage.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/statbucketmessage.cpp index 8c968ce46e6..0bd037b6386 100644 --- a/documentapi/src/vespa/documentapi/messagebus/messages/statbucketmessage.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/messages/statbucketmessage.cpp @@ -1,22 +1,25 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "statbucketmessage.h" #include "statbucketreply.h" +#include <vespa/document/bucket/fixed_bucket_spaces.h> #include <vespa/documentapi/messagebus/documentprotocol.h> +using document::FixedBucketSpaces; + namespace documentapi { StatBucketMessage::StatBucketMessage() : DocumentMessage(), _bucketId(document::BucketId()), _documentSelection(), - _bucketSpace("default") // TODO repo + _bucketSpace(FixedBucketSpaces::default_space_name()) {} StatBucketMessage::StatBucketMessage(document::BucketId bucketId, const string& documentSelection) : DocumentMessage(), _bucketId(bucketId), _documentSelection(documentSelection), - _bucketSpace("default") // TODO repo + _bucketSpace(FixedBucketSpaces::default_space_name()) {} StatBucketMessage::~StatBucketMessage() { diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/visitor.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/visitor.cpp index 44ec234b75e..3cea95dbd39 100644 --- a/documentapi/src/vespa/documentapi/messagebus/messages/visitor.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/messages/visitor.cpp @@ -2,6 +2,9 @@ #include "visitor.h" #include <climits> +#include <vespa/document/bucket/fixed_bucket_spaces.h> + +using document::FixedBucketSpaces; namespace documentapi { @@ -11,7 +14,7 @@ CreateVisitorMessage::CreateVisitorMessage() : _instanceId(), _controlDestination(), _dataDestination(), - _bucketSpace("default"), // TODO repo + _bucketSpace(FixedBucketSpaces::default_space_name()), _docSelection(), _maxPendingReplyCount(8), _buckets(), @@ -35,7 +38,7 @@ CreateVisitorMessage::CreateVisitorMessage(const string& libraryName, _instanceId(instanceId), _controlDestination(controlDestination), _dataDestination(dataDestination), - _bucketSpace("default"), // TODO repo + _bucketSpace(FixedBucketSpaces::default_space_name()), _docSelection(), _maxPendingReplyCount(8), _buckets(), diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp b/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp index 2530e9a5770..7eb227cd382 100644 --- a/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories50.cpp @@ -1,12 +1,14 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "routablefactories50.h" +#include <vespa/document/bucket/bucketidfactory.h> +#include <vespa/document/bucket/fixed_bucket_spaces.h> +#include <vespa/document/select/parser.h> #include <vespa/documentapi/documentapi.h> #include <vespa/documentapi/loadtypes/loadtypeset.h> #include <vespa/vespalib/objects/nbostream.h> -#include <vespa/document/bucket/bucketidfactory.h> -#include <vespa/document/select/parser.h> +using document::FixedBucketSpaces; using vespalib::nbostream; using std::make_unique; using std::make_shared; @@ -408,11 +410,11 @@ bool RoutableFactories50::GetBucketListMessageFactory::encodeBucketSpace( vespalib::stringref bucketSpace, vespalib::GrowableByteBuffer& buf) const { (void) buf; - return (bucketSpace == "default"); // TODO used fixed repo here + return (bucketSpace == FixedBucketSpaces::default_space_name()); } string RoutableFactories50::GetBucketListMessageFactory::decodeBucketSpace(document::ByteBuffer&) const { - return "default"; // TODO fixed bucket repo + return FixedBucketSpaces::default_space_name(); } DocumentMessage::UP @@ -846,11 +848,11 @@ bool RoutableFactories50::StatBucketMessageFactory::encodeBucketSpace( vespalib::stringref bucketSpace, vespalib::GrowableByteBuffer& buf) const { (void) buf; - return (bucketSpace == "default"); // TODO used fixed repo here + return (bucketSpace == FixedBucketSpaces::default_space_name()); } string RoutableFactories50::StatBucketMessageFactory::decodeBucketSpace(document::ByteBuffer&) const { - return "default"; // TODO fixed bucket repo + return FixedBucketSpaces::default_space_name(); } DocumentMessage::UP diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories51.cpp b/documentapi/src/vespa/documentapi/messagebus/routablefactories51.cpp index 15d485e6181..ee51bd306a6 100644 --- a/documentapi/src/vespa/documentapi/messagebus/routablefactories51.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories51.cpp @@ -1,11 +1,13 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "routablefactories51.h" +#include <vespa/document/bucket/fixed_bucket_spaces.h> +#include <vespa/document/document.h> #include <vespa/documentapi/documentapi.h> #include <vespa/documentapi/loadtypes/loadtypeset.h> -#include <vespa/document/document.h> #include <vespa/vespalib/objects/nbostream.h> +using document::FixedBucketSpaces; using vespalib::nbostream; namespace documentapi { @@ -132,11 +134,11 @@ bool RoutableFactories51::CreateVisitorMessageFactory::encodeBucketSpace( vespalib::stringref bucketSpace, vespalib::GrowableByteBuffer& buf) const { (void) buf; - return (bucketSpace == "default"); // TODO used fixed repo here + return (bucketSpace == FixedBucketSpaces::default_space_name()); } string RoutableFactories51::CreateVisitorMessageFactory::decodeBucketSpace(document::ByteBuffer&) const { - return "default"; // TODO fixed bucket repo + return FixedBucketSpaces::default_space_name(); } DocumentMessage::UP |