diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-08 13:27:29 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-08 13:28:18 +0200 |
commit | a222a37083bf74b4b2992e91a4ec90921b0cc2bf (patch) | |
tree | 1cac7aa9d5b476b4ec03c1e43866baa9b34b2393 /memfilepersistence | |
parent | 25809a32e2a9227d92e355483984e9ba592358f4 (diff) |
Only include what you really need
Diffstat (limited to 'memfilepersistence')
5 files changed, 15 insertions, 27 deletions
diff --git a/memfilepersistence/src/vespa/memfilepersistence/common/environment.cpp b/memfilepersistence/src/vespa/memfilepersistence/common/environment.cpp index 11577542573..e70e03b9442 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/common/environment.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/common/environment.cpp @@ -5,12 +5,12 @@ #include <vespa/vespalib/util/random.h> #include <vespa/vespalib/util/vstringfmt.h> #include <vespa/config/helper/configgetter.hpp> +#include <vespa/config/subscription/configuri.h> #include <vespa/vespalib/stllike/asciistream.h> using config::ConfigGetter; -namespace storage { -namespace memfile { +namespace storage::memfile { namespace { @@ -117,5 +117,4 @@ Environment::swapModifiedBuckets(document::BucketId::List & ids) _modifiedBuckets.swap(ids); } -} // memfile -} // storage +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/common/environment.h b/memfilepersistence/src/vespa/memfilepersistence/common/environment.h index 93ef0768148..3798e24f329 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/common/environment.h +++ b/memfilepersistence/src/vespa/memfilepersistence/common/environment.h @@ -22,9 +22,9 @@ #include <vespa/document/bucket/bucketidfactory.h> #include <vespa/config/helper/configfetcher.h> +namespace config { class ConfigUri; } -namespace storage { -namespace memfile { +namespace storage::memfile { class MemFileMapper; class MemFileCache; @@ -129,6 +129,4 @@ struct DefaultLazyFileFactory vespalib::LazyFile::UP createFile(const std::string& fileName) const override; }; -} // storage -} // memfile - +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.cpp b/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.cpp index 614d399ca22..cf66fe691da 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.cpp @@ -5,11 +5,11 @@ #include <vespa/persistence/spi/exceptions.h> #include <vespa/vdslib/state/nodestate.h> #include <vespa/config/helper/configfetcher.h> +#include <vespa/config/common/exceptions.h> #include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/util/guard.h> #include <vespa/vespalib/text/stringtokenizer.h> #include <fstream> -#include <sstream> #include <vespa/log/log.h> LOG_SETUP(".persistence.mountpointlist"); @@ -39,9 +39,7 @@ MountPointList::getPartitionStates() const for (uint32_t i=0; i<_mountPoints.size(); ++i) { if (!(_mountPoints[i]->isOk())) { const IOEvent* event = _mountPoints[i]->getLastEvent(); - - list[i] = spi::PartitionState(spi::PartitionState::DOWN, - event->getDescription()); + list[i] = spi::PartitionState(spi::PartitionState::DOWN, event->getDescription()); } } diff --git a/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.cpp b/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.cpp index e8fff0facd0..0e3a66e8b25 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.cpp @@ -4,12 +4,12 @@ #include <vespa/memfilepersistence/common/environment.h> #include <vespa/memfilepersistence/mapper/memfilemapper.h> #include <vespa/memfilepersistence/spi/memfilepersistenceprovidermetrics.h> +#include <vespa/vespalib/util/exception.h> #include <vespa/log/log.h> LOG_SETUP(".persistence.memfile.cache"); -namespace storage { -namespace memfile { +namespace storage::memfile { void MemFileCache::Entry::setInUse(bool inUse) { @@ -517,7 +517,4 @@ MemFileCache::printCacheEntriesHtml(std::ostream& out) const out << "</ol>\n"; } -} // memfile - -} // storage - +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.cpp b/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.cpp index 072b3e9fae0..bd54efcb57c 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.cpp @@ -14,16 +14,14 @@ #include <vespa/storageframework/defaultimplementation/memory/nomemorymanager.h> #include <vespa/vespalib/util/programoptions.h> #include <vespa/config/helper/configgetter.hpp> -#include <sstream> - +#include <vespa/config/subscription/configuri.h> using config::ConfigGetter; using document::DocumenttypesConfig; using config::FileSpec; using document::DocumentTypeRepo; -namespace storage { -namespace memfile { +namespace storage::memfile { namespace { std::ostream* cout; @@ -347,8 +345,7 @@ int SlotFileDumper::dump(int argc, const char * const * argv, if (doc.get()) { printDoc(*doc, o); } else { - printFailure("Unable to get document in " + - it->toString(true)); + printFailure("Unable to get document in " + it->toString(true)); } } } @@ -361,5 +358,4 @@ int SlotFileDumper::dump(int argc, const char * const * argv, return 0; } -} // memfile -} // storage +} |