summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-12-01 20:58:52 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2016-12-12 02:55:44 +0100
commit72f152f08921eaa1c267d8ee50c1121a8919be48 (patch)
tree1cc1e3b8f744f747eb1c9975b81ae629c14ff32a /storage
parentfc3bb4c63879541776d98fa09beb7c644128e8a1 (diff)
Include asciistream in implementation only.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/bucketdb/bucketmanager.cpp11
-rw-r--r--storage/src/vespa/storage/bucketdb/lockablemap.cpp6
-rw-r--r--storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp13
-rw-r--r--storage/src/vespa/storage/bucketdb/storagebucketinfo.h37
-rw-r--r--storage/src/vespa/storage/bucketdb/storbucketdb.h40
-rw-r--r--storage/src/vespa/storage/bucketmover/run.cpp7
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp1
7 files changed, 62 insertions, 53 deletions
diff --git a/storage/src/vespa/storage/bucketdb/bucketmanager.cpp b/storage/src/vespa/storage/bucketdb/bucketmanager.cpp
index 8771d9cf174..7552a471256 100644
--- a/storage/src/vespa/storage/bucketdb/bucketmanager.cpp
+++ b/storage/src/vespa/storage/bucketdb/bucketmanager.cpp
@@ -1,10 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/storage/bucketdb/bucketmanager.h>
-
+#include "bucketmanager.h"
+#include "distribution_hash_normalizer.h"
+#include "minimumusedbitstracker.h"
+#include "lockablemap.hpp"
#include <iomanip>
-#include <vespa/log/log.h>
#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/multioperation.h>
#include <vespa/storageapi/message/persistence.h>
@@ -13,8 +13,6 @@
#include <vespa/vdslib/distribution/distribution.h>
#include <vespa/vdslib/state/clusterstate.h>
#include <vespa/vdslib/state/nodetype.h>
-#include <vespa/storage/bucketdb/minimumusedbitstracker.h>
-#include <vespa/storage/bucketdb/distribution_hash_normalizer.h>
#include <vespa/storage/common/nodestateupdater.h>
#include <vespa/storage/storageserver/storagemetricsset.h>
#include <vespa/storageframework/storageframework.h>
@@ -23,6 +21,7 @@
#include <vespa/storage/storageutil/distributorstatecache.h>
#include <vespa/config/config.h>
#include <unordered_map>
+#include <vespa/log/log.h>
LOG_SETUP(".storage.bucketdb.manager");
diff --git a/storage/src/vespa/storage/bucketdb/lockablemap.cpp b/storage/src/vespa/storage/bucketdb/lockablemap.cpp
index 6231e4c1e92..cc635a913d5 100644
--- a/storage/src/vespa/storage/bucketdb/lockablemap.cpp
+++ b/storage/src/vespa/storage/bucketdb/lockablemap.cpp
@@ -1,6 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "lockablemap.hpp"
+#include "storagebucketinfo.h"
+#include "judymultimap.h"
namespace storage {
+using bucketdb::StorageBucketInfo;
+
+template class LockableMap<storage::JudyMultiMap<StorageBucketInfo, StorageBucketInfo, StorageBucketInfo, StorageBucketInfo> >;
+
}
diff --git a/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp b/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp
index 58b07dd031b..1021cf7f212 100644
--- a/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp
+++ b/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.cpp
@@ -1,12 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/storage/bucketdb/storagebucketdbinitializer.h>
-
-#include <iomanip>
-#include <vespa/log/log.h>
-#include <vespa/storage/bucketdb/config-stor-bucket-init.h>
-#include <vespa/storage/bucketdb/storbucketdb.h>
+#include "storagebucketdbinitializer.h"
+#include "lockablemap.hpp"
+#include "config-stor-bucket-init.h"
+#include "bucketdb/storbucketdb.h"
#include <vespa/storage/common/nodestateupdater.h>
#include <vespa/storage/storageserver/storagemetricsset.h>
#include <vespa/vdslib/distribution/distribution.h>
@@ -14,6 +11,8 @@
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/config/config.h>
#include <vespa/vespalib/stllike/hash_set.h>
+#include <iomanip>
+#include <vespa/log/log.h>
LOG_SETUP(".storage.bucketdb.initializer");
diff --git a/storage/src/vespa/storage/bucketdb/storagebucketinfo.h b/storage/src/vespa/storage/bucketdb/storagebucketinfo.h
new file mode 100644
index 00000000000..1541322e1dd
--- /dev/null
+++ b/storage/src/vespa/storage/bucketdb/storagebucketinfo.h
@@ -0,0 +1,37 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#pragma once
+
+#include <vespa/storageapi/buckets/bucketinfo.h>
+
+namespace storage {
+namespace bucketdb {
+
+struct StorageBucketInfo {
+ api::BucketInfo info;
+ unsigned disk : 8; // The disk containing the bucket
+
+ StorageBucketInfo() : info(), disk(0xff) {}
+ static bool mayContain(const StorageBucketInfo&) { return true; }
+ void print(std::ostream&, bool verbose, const std::string& indent) const;
+ bool valid() const { return info.valid(); }
+ void setBucketInfo(const api::BucketInfo& i) { info = i; }
+ const api::BucketInfo& getBucketInfo() const { return info; }
+ void setEmptyWithMetaData() {
+ info.setChecksum(1);
+ info.setMetaCount(1);
+ info.setDocumentCount(0);
+ info.setTotalDocumentSize(0);
+ }
+ bool verifyLegal() const { return (disk != 0xff); }
+ uint32_t getMetaCount() { return info.getMetaCount(); }
+ void setChecksum(uint32_t crc) { info.setChecksum(crc); }
+ bool operator == (const StorageBucketInfo & b) const;
+ bool operator != (const StorageBucketInfo & b) const;
+ bool operator < (const StorageBucketInfo & b) const;
+};
+
+std::ostream& operator<<(std::ostream& out, const StorageBucketInfo& info);
+
+}
+}
diff --git a/storage/src/vespa/storage/bucketdb/storbucketdb.h b/storage/src/vespa/storage/bucketdb/storbucketdb.h
index e6f2b3aded2..7c83a0fa530 100644
--- a/storage/src/vespa/storage/bucketdb/storbucketdb.h
+++ b/storage/src/vespa/storage/bucketdb/storbucketdb.h
@@ -12,46 +12,14 @@
*/
#pragma once
-#include <map>
-#include <vespa/document/bucket/bucketid.h>
-#include <vespa/storage/bucketdb/judymultimap.h>
-#include <vespa/storage/bucketdb/lockablemap.h>
-#include <vespa/storage/bucketdb/stdmapwrapper.h>
-#include <vespa/storageapi/buckets/bucketinfo.h>
+#include "judymultimap.h"
+#include "lockablemap.h"
+#include "stdmapwrapper.h"
+#include "storagebucketinfo.h"
#include <vespa/storageapi/defs.h>
namespace storage {
-namespace bucketdb {
-
-struct StorageBucketInfo {
- api::BucketInfo info;
- unsigned disk : 8; // The disk containing the bucket
-
- StorageBucketInfo() : info(), disk(0xff) {}
- static bool mayContain(const StorageBucketInfo&) { return true; }
- void print(std::ostream&, bool verbose, const std::string& indent) const;
- bool valid() const { return info.valid(); }
- void setBucketInfo(const api::BucketInfo& i) { info = i; }
- const api::BucketInfo& getBucketInfo() const { return info; }
- void setEmptyWithMetaData() {
- info.setChecksum(1);
- info.setMetaCount(1);
- info.setDocumentCount(0);
- info.setTotalDocumentSize(0);
- }
- bool verifyLegal() const { return (disk != 0xff); }
- uint32_t getMetaCount() { return info.getMetaCount(); }
- void setChecksum(uint32_t crc) { info.setChecksum(crc); }
- bool operator == (const StorageBucketInfo & b) const;
- bool operator != (const StorageBucketInfo & b) const;
- bool operator < (const StorageBucketInfo & b) const;
-};
-
-std::ostream& operator<<(std::ostream& out, const StorageBucketInfo& info);
-
-} // bucketdb
-
class StorBucketDatabase
#if __WORDSIZE == 64
diff --git a/storage/src/vespa/storage/bucketmover/run.cpp b/storage/src/vespa/storage/bucketmover/run.cpp
index de5f954d8b9..8afaa5f8659 100644
--- a/storage/src/vespa/storage/bucketmover/run.cpp
+++ b/storage/src/vespa/storage/bucketmover/run.cpp
@@ -1,11 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/storage/bucketmover/run.h>
-
+#include "run.h"
+#include <vespa/storage/bucketdb/storbucketdb.h>
+#include <vespa/storage/bucketdb/lockablemap.hpp>
#include <iomanip>
#include <vespa/log/log.h>
-#include <vespa/storage/bucketdb/storbucketdb.h>
LOG_SETUP(".bucketmover.run");
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
index 68865c2dbbb..12d0e4738f9 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
@@ -26,6 +26,7 @@
#include <vespa/storageapi/message/batch.h>
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/storage/common/bucketoperationlogger.h>
+#include <vespa/storage/bucketdb/lockablemap.hpp>
LOG_SETUP(".persistence.filestor.manager");