diff options
author | Geir Storli <geirstorli@yahoo.no> | 2017-11-16 13:34:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-16 13:34:53 +0100 |
commit | 2e04500e627618ca4485be4cddda7437ba989468 (patch) | |
tree | a437aa0b3c9fee380bd7b650527d4107a10b3cdd /storageapi | |
parent | cb33c571fcc8a5b27b8a29aef2c236b837121c19 (diff) | |
parent | 8ae01c672040df699a612244f73c9638c15e3516 (diff) |
Merge pull request #4164 from vespa-engine/toregge/add-getbucket-method-to-storage-commands
Add getBucket() method to storage commands/replies.
Diffstat (limited to 'storageapi')
4 files changed, 14 insertions, 0 deletions
diff --git a/storageapi/src/vespa/storageapi/message/bucket.cpp b/storageapi/src/vespa/storageapi/message/bucket.cpp index 18ad95c2c02..0961a8f6edc 100644 --- a/storageapi/src/vespa/storageapi/message/bucket.cpp +++ b/storageapi/src/vespa/storageapi/message/bucket.cpp @@ -475,6 +475,12 @@ RequestBucketInfoCommand::RequestBucketInfoCommand( { } +document::Bucket +RequestBucketInfoCommand::getBucket() const +{ + return document::Bucket(_bucketSpace, document::BucketId()); +} + void RequestBucketInfoCommand::print(std::ostream& out, bool verbose, const std::string& indent) const diff --git a/storageapi/src/vespa/storageapi/message/bucket.h b/storageapi/src/vespa/storageapi/message/bucket.h index 05838600a24..5fba1a3bf65 100644 --- a/storageapi/src/vespa/storageapi/message/bucket.h +++ b/storageapi/src/vespa/storageapi/message/bucket.h @@ -363,6 +363,7 @@ public: const vespalib::string& getDistributionHash() const { return _distributionHash; } document::BucketSpace getBucketSpace() const { return _bucketSpace; } + document::Bucket getBucket() const override; void print(std::ostream& out, bool verbose, const std::string& indent) const override; diff --git a/storageapi/src/vespa/storageapi/message/visitor.cpp b/storageapi/src/vespa/storageapi/message/visitor.cpp index 7b5a614bd3e..3cb6f72d5d9 100644 --- a/storageapi/src/vespa/storageapi/message/visitor.cpp +++ b/storageapi/src/vespa/storageapi/message/visitor.cpp @@ -68,6 +68,12 @@ CreateVisitorCommand::CreateVisitorCommand(const CreateVisitorCommand& o) CreateVisitorCommand::~CreateVisitorCommand() {} +document::Bucket +CreateVisitorCommand::getBucket() const +{ + return document::Bucket(_bucketSpace, document::BucketId()); +} + void CreateVisitorCommand::print(std::ostream& out, bool verbose, const std::string& indent) const diff --git a/storageapi/src/vespa/storageapi/message/visitor.h b/storageapi/src/vespa/storageapi/message/visitor.h index f252ecd344f..e1850686222 100644 --- a/storageapi/src/vespa/storageapi/message/visitor.h +++ b/storageapi/src/vespa/storageapi/message/visitor.h @@ -86,6 +86,7 @@ public: VisitorId getVisitorId() const { return _visitorId; } uint32_t getVisitorCmdId() const { return _visitorCmdId; } document::BucketSpace getBucketSpace() const { return _bucketSpace; } + document::Bucket getBucket() const override; const vespalib::string & getLibraryName() const { return _libName; } const vespalib::string & getInstanceId() const { return _instanceId; } const vespalib::string & getControlDestination() const |