diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-01 22:31:48 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-01 22:33:54 +0200 |
commit | 472020f814a996db403a694cfecf51d16142b861 (patch) | |
tree | 711032d17672cc092e6b5c1c731b058749bdabd3 | |
parent | 7db9ab26e5c26b0fcf4e56c1b23908ba83689a2d (diff) |
Removed storageframework.h from header files.
102 files changed, 206 insertions, 296 deletions
diff --git a/memfilepersistence/src/vespa/memfilepersistence/common/environment.h b/memfilepersistence/src/vespa/memfilepersistence/common/environment.h index 0f81d61a943..93ef0768148 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/common/environment.h +++ b/memfilepersistence/src/vespa/memfilepersistence/common/environment.h @@ -18,7 +18,6 @@ #include "config_lock_guard.h" #include "config_aliases.h" #include <vespa/memfilepersistence/device/mountpointlist.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/vespalib/io/fileutil.h> #include <vespa/document/bucket/bucketidfactory.h> #include <vespa/config/helper/configfetcher.h> diff --git a/memfilepersistence/src/vespa/memfilepersistence/common/options.h b/memfilepersistence/src/vespa/memfilepersistence/common/options.h index 6199bf59f37..29e46b29dce 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/common/options.h +++ b/memfilepersistence/src/vespa/memfilepersistence/common/options.h @@ -17,15 +17,13 @@ #pragma once -#include <vespa/storageframework/storageframework.h> #include <vespa/config-stor-memfilepersistence.h> #include <vespa/config-persistence.h> #include <vespa/vespalib/util/printable.h> #include <vespa/vespalib/stllike/string.h> +#include <vespa/storageframework/generic/clock/time.h> -namespace storage { - -namespace memfile { +namespace storage::memfile { struct Options : public vespalib::Printable { @@ -128,6 +126,3 @@ struct Options : public vespalib::Printable }; } - -} - diff --git a/memfilepersistence/src/vespa/memfilepersistence/common/types.h b/memfilepersistence/src/vespa/memfilepersistence/common/types.h index ab6ae1e52f8..7758e6091ac 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/common/types.h +++ b/memfilepersistence/src/vespa/memfilepersistence/common/types.h @@ -16,12 +16,11 @@ #pragma once -#include <vespa/storageframework/storageframework.h> #include <vespa/persistence/spi/bucketinfo.h> #include <vespa/document/fieldvalue/document.h> +#include <vespa/storageframework/generic/clock/time.h> -namespace storage { -namespace memfile { +namespace storage::memfile { /** * \class storage::slotfile::DataLocation @@ -193,6 +192,4 @@ protected: ~Types() {} // Noone should refer to objects as Types objects }; -} // memfile -} // storage - +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.cpp b/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.cpp index b3751cddbed..3ff816c55eb 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.cpp @@ -7,14 +7,13 @@ #include <vespa/config/helper/configfetcher.h> #include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/util/guard.h> +#include <vespa/vespalib/text/stringtokenizer.h> #include <fstream> #include <vespa/log/log.h> LOG_SETUP(".persistence.mountpointlist"); -namespace storage { - -namespace memfile { +namespace storage::memfile { using vespalib::getLastErrorString; using vespalib::DirPointer; @@ -642,5 +641,3 @@ MountPointList::reportXmlStatus(vespalib::xml::XmlOutputStream& xos, } } - -} // storage diff --git a/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.h b/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.h index f80829e8aed..08adb66f9f1 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.h +++ b/memfilepersistence/src/vespa/memfilepersistence/device/mountpointlist.h @@ -18,7 +18,7 @@ #include "devicemanager.h" #include "directory.h" -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/status/xmlstatusreporter.h> #include <vespa/persistence/spi/persistenceprovider.h> #include <vespa/vespalib/util/printable.h> diff --git a/memfilepersistence/src/vespa/memfilepersistence/init/filescanner.h b/memfilepersistence/src/vespa/memfilepersistence/init/filescanner.h index ff814eed19e..7d06e442400 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/init/filescanner.h +++ b/memfilepersistence/src/vespa/memfilepersistence/init/filescanner.h @@ -13,15 +13,15 @@ #include <vespa/memfilepersistence/device/mountpointlist.h> #include <vespa/memfilepersistence/mapper/bucketdirectorymapper.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/metrics/metrics.h> +#include <vespa/storageframework/generic/component/component.h> +#include <vespa/storageframework/generic/clock/timer.h> namespace document { class BucketId; } -namespace storage { -namespace memfile { +namespace storage::memfile { class FileScanner : private framework::Component { public: @@ -102,6 +102,4 @@ private: std::vector<uint32_t>& path); }; -} // memfile -} // storage - +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/mapper/locationreadplanner.h b/memfilepersistence/src/vespa/memfilepersistence/mapper/locationreadplanner.h index d56f5f80441..55e815d88c3 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/mapper/locationreadplanner.h +++ b/memfilepersistence/src/vespa/memfilepersistence/mapper/locationreadplanner.h @@ -12,9 +12,9 @@ #pragma once #include <vespa/memfilepersistence/common/types.h> +#include <vespa/vespalib/util/printable.h> -namespace storage { -namespace memfile { +namespace storage::memfile { class MemSlot; @@ -53,10 +53,7 @@ private: const std::vector<DataLocation>& desiredLocations, uint32_t maxGap); - void scheduleLocation(DataLocation loc, - std::vector<DataLocation>&); + void scheduleLocation(DataLocation loc, std::vector<DataLocation>&); }; -} // memfile -} // storage - +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_serializer.cpp b/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_serializer.cpp index d9cc0c35cc4..2de4e062b5e 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_serializer.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_serializer.cpp @@ -8,12 +8,12 @@ #include <vespa/memfilepersistence/common/exceptions.h> #include <vespa/memfilepersistence/spi/memfilepersistenceprovidermetrics.h> #include <vespa/vespalib/stllike/asciistream.h> +#include <vespa/storageframework/generic/clock/timer.h> #include <vespa/log/log.h> LOG_SETUP(".persistence.memfilev1"); -namespace storage { -namespace memfile { +namespace storage::memfile { namespace { @@ -1023,4 +1023,3 @@ MemFileV1Serializer::verify(MemFile& file, Environment& env, } } -} diff --git a/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_verifier.cpp b/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_verifier.cpp index 4ba25a48950..236afdf9a77 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_verifier.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/mapper/memfile_v1_verifier.cpp @@ -3,15 +3,14 @@ #include "memfile_v1_verifier.h" #include "memfilemapper.h" #include "simplememfileiobuffer.h" +#include <vespa/storageframework/generic/clock/timer.h> #include <vespa/vespalib/stllike/asciistream.h> #include <vespa/vespalib/stllike/hash_set.hpp> #include <vespa/log/log.h> LOG_SETUP(".persistence.memfilev1.verifier"); -namespace storage { - -namespace memfile { +namespace storage::memfile { namespace { @@ -690,8 +689,4 @@ MemFileV1Verifier::verifyUniqueTimestamps( okSlots.swap(slots); } - } - -} - diff --git a/memfilepersistence/src/vespa/memfilepersistence/mapper/memfilemapper.cpp b/memfilepersistence/src/vespa/memfilepersistence/mapper/memfilemapper.cpp index 4888154d3bb..eaa20c66ca9 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/mapper/memfilemapper.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/mapper/memfilemapper.cpp @@ -6,12 +6,12 @@ #include <vespa/memfilepersistence/spi/memfilepersistenceprovidermetrics.h> #include <vespa/memfilepersistence/common/exceptions.h> #include <vespa/vdslib/distribution/distribution.h> +#include <vespa/storageframework/generic/clock/timer.h> #include <vespa/log/log.h> LOG_SETUP(".persistence.memfile.mapper"); -namespace storage { -namespace memfile { +namespace storage::memfile { // Repair defined in macro, such that log entries will be unique for the various // instances calling it (different file line numbers) @@ -335,5 +335,4 @@ MemFileMapper::removeAllSlotsExcept(MemFile& file, std::vector<Timestamp>& keep) file.removeSlots(slotsToRemove); } -} // storage -} // memfile +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.h b/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.h index 112c5e6c399..7b34b2eba9d 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.h +++ b/memfilepersistence/src/vespa/memfilepersistence/memfile/memfilecache.h @@ -22,10 +22,10 @@ #include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index/sequenced_index.hpp> #include <vespa/storageframework/generic/memory/memorymanagerinterface.h> +#include <vespa/storageframework/generic/component/component.h> -namespace storage { -namespace memfile { +namespace storage::memfile { class MemFilePersistenceCacheMetrics; class Environment; // Avoid cyclic dependency with environment @@ -298,6 +298,4 @@ public: void printCacheEntriesHtml(std::ostream& out) const; }; -} // storage -} // memfile - +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/spi/memfilepersistenceprovider.cpp b/memfilepersistence/src/vespa/memfilepersistence/spi/memfilepersistenceprovider.cpp index a4f10688feb..d17dfdc77a4 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/spi/memfilepersistenceprovider.cpp +++ b/memfilepersistence/src/vespa/memfilepersistence/spi/memfilepersistenceprovider.cpp @@ -3,10 +3,9 @@ #include "memfilepersistenceprovider.h" #include <vespa/memfilepersistence/common/exceptions.h> -#include <vespa/document/fieldvalue/document.h> #include <vespa/document/update/documentupdate.h> -#include <vespa/document/fieldset/fieldsetrepo.h> #include <vespa/config/helper/configgetter.hpp> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> #include <vespa/log/log.h> LOG_SETUP(".memfilepersistenceprovider"); @@ -28,8 +27,7 @@ if ((context).getTrace().shouldTrace(9)) { \ (context).getTrace().trace(9, messageToTrace); \ } -namespace storage { -namespace memfile { +namespace storage::memfile { namespace { @@ -888,5 +886,4 @@ MemFilePersistenceProvider::reportStatus(std::ostream& out, return true; } -} // memfile -} // storage +} diff --git a/memfilepersistence/src/vespa/memfilepersistence/spi/memfilepersistenceprovider.h b/memfilepersistence/src/vespa/memfilepersistence/spi/memfilepersistenceprovider.h index 724a77ec443..52e10737f33 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/spi/memfilepersistenceprovider.h +++ b/memfilepersistence/src/vespa/memfilepersistence/spi/memfilepersistenceprovider.h @@ -12,7 +12,6 @@ #include <vespa/memfilepersistence/mapper/memfilemapper.h> #include <vespa/memfilepersistence/init/filescanner.h> #include <vespa/persistence/spi/abstractpersistenceprovider.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/storageframework/generic/status/httpurlpath.h> #include <vespa/config/config.h> diff --git a/storage/src/tests/distributor/bucketdbupdatertest.cpp b/storage/src/tests/distributor/bucketdbupdatertest.cpp index e35f147d0c8..fba4ad255e0 100644 --- a/storage/src/tests/distributor/bucketdbupdatertest.cpp +++ b/storage/src/tests/distributor/bucketdbupdatertest.cpp @@ -10,9 +10,7 @@ #include <tests/distributor/distributortestutil.h> #include <vespa/storage/distributor/simpleclusterinformation.h> #include <vespa/storage/distributor/distributor.h> - -#include <iostream> -#include <fstream> +#include <vespa/vespalib/text/stringtokenizer.h> using namespace storage::api; using namespace storage::lib; diff --git a/storage/src/tests/distributor/distributortest.cpp b/storage/src/tests/distributor/distributortest.cpp index 298a4283bfa..ea2a23743fe 100644 --- a/storage/src/tests/distributor/distributortest.cpp +++ b/storage/src/tests/distributor/distributortest.cpp @@ -12,6 +12,7 @@ #include <vespa/storage/config/config-stor-distributormanager.h> #include <tests/common/dummystoragelink.h> #include <vespa/storage/distributor/distributor.h> +#include <vespa/vespalib/text/stringtokenizer.h> namespace storage { diff --git a/storage/src/tests/distributor/distributortestutil.cpp b/storage/src/tests/distributor/distributortestutil.cpp index 7c709eed097..182bdfd2196 100644 --- a/storage/src/tests/distributor/distributortestutil.cpp +++ b/storage/src/tests/distributor/distributortestutil.cpp @@ -2,6 +2,7 @@ #include "distributortestutil.h" #include <vespa/storage/distributor/distributor.h> #include <vespa/config-stor-distribution.h> +#include <vespa/vespalib/text/stringtokenizer.h> namespace storage::distributor { diff --git a/storage/src/tests/distributor/mergeoperationtest.cpp b/storage/src/tests/distributor/mergeoperationtest.cpp index 79c6acd5f4b..329776b2e09 100644 --- a/storage/src/tests/distributor/mergeoperationtest.cpp +++ b/storage/src/tests/distributor/mergeoperationtest.cpp @@ -9,6 +9,7 @@ #include <vespa/storage/distributor/bucketdbupdater.h> #include <tests/distributor/distributortestutil.h> #include <vespa/storage/distributor/distributor.h> +#include <vespa/vespalib/text/stringtokenizer.h> using std::shared_ptr; diff --git a/storage/src/tests/distributor/simplemaintenancescannertest.cpp b/storage/src/tests/distributor/simplemaintenancescannertest.cpp index 342d346b398..9da9f7efc8b 100644 --- a/storage/src/tests/distributor/simplemaintenancescannertest.cpp +++ b/storage/src/tests/distributor/simplemaintenancescannertest.cpp @@ -5,6 +5,7 @@ #include <vespa/storage/distributor/maintenance/simplebucketprioritydatabase.h> #include <vespa/storage/bucketdb/mapbucketdatabase.h> #include <tests/distributor/maintenancemocks.h> +#include <vespa/vespalib/text/stringtokenizer.h> namespace storage { diff --git a/storage/src/tests/frameworkimpl/status/statustest.cpp b/storage/src/tests/frameworkimpl/status/statustest.cpp index 43d13acb28b..d5ab61087fb 100644 --- a/storage/src/tests/frameworkimpl/status/statustest.cpp +++ b/storage/src/tests/frameworkimpl/status/statustest.cpp @@ -3,10 +3,11 @@ #include <vespa/storageframework/defaultimplementation/component/componentregisterimpl.h> #include <vespa/storage/frameworkimpl/status/statuswebserver.h> #include <vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> +#include <vespa/storageframework/generic/status/xmlstatusreporter.h> #include <tests/common/teststorageapp.h> #include <vespa/vdstestlib/cppunit/macros.h> #include <vespa/document/util/stringutil.h> -#include <sstream> namespace storage { diff --git a/storage/src/vespa/storage/bucketdb/bucketmanager.cpp b/storage/src/vespa/storage/bucketdb/bucketmanager.cpp index db4cfcc7ecb..0570d0a3e27 100644 --- a/storage/src/vespa/storage/bucketdb/bucketmanager.cpp +++ b/storage/src/vespa/storage/bucketdb/bucketmanager.cpp @@ -7,6 +7,9 @@ #include <iomanip> #include <vespa/storage/common/nodestateupdater.h> #include <vespa/storage/storageutil/distributorstatecache.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> +#include <vespa/storageframework/generic/status/xmlstatusreporter.h> +#include <vespa/storageframework/generic/clock/timer.h> #include <vespa/storageapi/message/multioperation.h> #include <vespa/storageapi/message/persistence.h> #include <vespa/storageapi/message/state.h> diff --git a/storage/src/vespa/storage/bucketdb/bucketmanager.h b/storage/src/vespa/storage/bucketdb/bucketmanager.h index e0f3ed5a556..d3a939d90c5 100644 --- a/storage/src/vespa/storage/bucketdb/bucketmanager.h +++ b/storage/src/vespa/storage/bucketdb/bucketmanager.h @@ -18,8 +18,10 @@ #include <vespa/storage/common/bucketmessages.h> #include <vespa/storage/common/servicelayercomponent.h> #include <vespa/storage/common/storagelinkqueued.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/storageframework/generic/memory/memorymanagerinterface.h> +#include <vespa/storageframework/generic/status/statusreporter.h> +#include <vespa/storageframework/generic/metric/metricupdatehook.h> + #include <vespa/storageapi/message/bucket.h> #include <vespa/config/subscription/configuri.h> #include <unordered_set> diff --git a/storage/src/vespa/storage/bucketdb/mapbucketdatabase.cpp b/storage/src/vespa/storage/bucketdb/mapbucketdatabase.cpp index 5fc4ece8191..9cee5b6acee 100644 --- a/storage/src/vespa/storage/bucketdb/mapbucketdatabase.cpp +++ b/storage/src/vespa/storage/bucketdb/mapbucketdatabase.cpp @@ -2,6 +2,7 @@ #include "mapbucketdatabase.h" #include <vespa/storage/common/bucketoperationlogger.h> +#include <ostream> namespace storage { diff --git a/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.h b/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.h index 4c87c39fdd2..f56b45c71b3 100644 --- a/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.h +++ b/storage/src/vespa/storage/bucketdb/storagebucketdbinitializer.h @@ -44,7 +44,8 @@ #include <vespa/storage/common/doneinitializehandler.h> #include <vespa/storage/common/servicelayercomponent.h> #include <vespa/storage/common/storagelink.h> -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> +#include <vespa/storageframework/generic/clock/timer.h> #include <vespa/vespalib/stllike/hash_map.h> #include <vespa/vespalib/util/sync.h> #include <vespa/vdslib/state/nodestate.h> diff --git a/storage/src/vespa/storage/bucketmover/bucketmover.h b/storage/src/vespa/storage/bucketmover/bucketmover.h index a3473f778c4..4219bc0dac6 100644 --- a/storage/src/vespa/storage/bucketmover/bucketmover.h +++ b/storage/src/vespa/storage/bucketmover/bucketmover.h @@ -20,9 +20,8 @@ #include <vespa/storage/common/storagelink.h> #include <vespa/storage/config/config-stor-bucketmover.h> #include <vespa/storage/common/servicelayercomponent.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> #include <vespa/storageapi/message/bucket.h> -#include <vespa/storageframework/storageframework.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/vdslib/distribution/distribution.h> #include <vespa/config/helper/ifetchercallback.h> #include <vespa/config/subscription/configuri.h> @@ -31,7 +30,6 @@ namespace storage { class BucketDiskMoveCommand; -class Clock; namespace bucketmover { diff --git a/storage/src/vespa/storage/bucketmover/run.cpp b/storage/src/vespa/storage/bucketmover/run.cpp index e202ddfba58..dbfa590bd43 100644 --- a/storage/src/vespa/storage/bucketmover/run.cpp +++ b/storage/src/vespa/storage/bucketmover/run.cpp @@ -3,6 +3,7 @@ #include "run.h" #include <vespa/storage/bucketdb/storbucketdb.h> #include <vespa/storage/bucketdb/lockablemap.hpp> +#include <vespa/storageframework/generic/clock/clock.h> #include <iomanip> #include <vespa/log/log.h> diff --git a/storage/src/vespa/storage/bucketmover/runstatistics.cpp b/storage/src/vespa/storage/bucketmover/runstatistics.cpp index 093d5290203..8daa0ffaee8 100644 --- a/storage/src/vespa/storage/bucketmover/runstatistics.cpp +++ b/storage/src/vespa/storage/bucketmover/runstatistics.cpp @@ -2,9 +2,10 @@ #include "runstatistics.h" #include "htmltable.h" +#include <vespa/storageframework/generic/clock/clock.h> -namespace storage { -namespace bucketmover { + +namespace storage::bucketmover { RunStatistics::DiskMatrix::DiskMatrix() : _bucketsMoved(0), @@ -185,5 +186,4 @@ RunStatistics::getBucketCount(uint16_t disk, bool includeWrongLocation) const return total; } -} // bucketmover -} // storage +} diff --git a/storage/src/vespa/storage/bucketmover/runstatistics.h b/storage/src/vespa/storage/bucketmover/runstatistics.h index 2494c45241f..d14ae161b75 100644 --- a/storage/src/vespa/storage/bucketmover/runstatistics.h +++ b/storage/src/vespa/storage/bucketmover/runstatistics.h @@ -36,18 +36,15 @@ } \ } -#include <vespa/storageframework/storageframework.h> #include <vespa/vdslib/state/nodestate.h> #include <vespa/vdslib/distribution/distribution.h> #include <vespa/document/bucket/bucketid.h> #include <vespa/vespalib/util/printable.h> -#include <vector> - -namespace storage { +#include <vespa/storageframework/generic/clock/time.h> -class Clock; +#include <vector> -namespace bucketmover { +namespace storage::bucketmover { struct RunStatistics : public document::Printable { using DiskDistribution = lib::Distribution::DiskDistribution; @@ -95,5 +92,4 @@ struct RunStatistics : public document::Printable { void print(std::ostream& out, bool verbose, const std::string& indent) const override; }; -} // bucketmover -} // storage +} diff --git a/storage/src/vespa/storage/common/bucketoperationlogger.h b/storage/src/vespa/storage/common/bucketoperationlogger.h index 12a07ccf539..d4e13cf4099 100644 --- a/storage/src/vespa/storage/common/bucketoperationlogger.h +++ b/storage/src/vespa/storage/common/bucketoperationlogger.h @@ -8,7 +8,6 @@ #include <vespa/vespalib/util/sync.h> #include <vespa/document/bucket/bucketid.h> #include <vespa/vespalib/util/vstringfmt.h> -#include <vespa/storageframework/storageframework.h> /** * Enable this to log most slotfile operations (such as all mutations) as diff --git a/storage/src/vespa/storage/common/statusmessages.cpp b/storage/src/vespa/storage/common/statusmessages.cpp index c42212f9a63..85a6690eb85 100644 --- a/storage/src/vespa/storage/common/statusmessages.cpp +++ b/storage/src/vespa/storage/common/statusmessages.cpp @@ -1,6 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "statusmessages.h" +#include <ostream> namespace storage { diff --git a/storage/src/vespa/storage/common/statusmessages.h b/storage/src/vespa/storage/common/statusmessages.h index 4299fefe773..9c432c62790 100644 --- a/storage/src/vespa/storage/common/statusmessages.h +++ b/storage/src/vespa/storage/common/statusmessages.h @@ -7,7 +7,7 @@ #pragma once #include <vespa/storageapi/message/internal.h> -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/status/httpurlpath.h> namespace storage { diff --git a/storage/src/vespa/storage/common/statusmetricconsumer.cpp b/storage/src/vespa/storage/common/statusmetricconsumer.cpp index 638ff54cbc7..3111508fddc 100644 --- a/storage/src/vespa/storage/common/statusmetricconsumer.cpp +++ b/storage/src/vespa/storage/common/statusmetricconsumer.cpp @@ -9,13 +9,11 @@ #include <vespa/metrics/jsonwriter.h> #include <vespa/metrics/textwriter.h> #include <vespa/metrics/xmlwriter.h> -#include <vespa/storage/storageserver/storagemetricsset.h> #include <vespa/storageapi/messageapi/storagemessage.h> -#include <vespa/vespalib/text/stringtokenizer.h> #include <vespa/vespalib/stllike/asciistream.h> - // For setlocale to print . separated numbers -#include <locale.h> -#include <stdio.h> +#include <vespa/storageframework/generic/memory/memorymanagerinterface.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> + LOG_SETUP(".status.metricreporter"); diff --git a/storage/src/vespa/storage/common/statusmetricconsumer.h b/storage/src/vespa/storage/common/statusmetricconsumer.h index 6a2c18f78bd..1812bed281c 100644 --- a/storage/src/vespa/storage/common/statusmetricconsumer.h +++ b/storage/src/vespa/storage/common/statusmetricconsumer.h @@ -10,11 +10,12 @@ #pragma once #include "storagecomponent.h" +#include <vespa/storageframework/generic/status/statusreporter.h> +#include <vespa/storageframework/generic/metric/metricupdatehook.h> #include <vespa/vespalib/util/document_runnable.h> #include <vespa/vespalib/util/sync.h> -#include <map> #include <vespa/metrics/metrics.h> -#include <vespa/storageframework/storageframework.h> +#include <map> namespace vespalib { class StringTokenizer; @@ -22,6 +23,8 @@ namespace vespalib { namespace storage { +namespace framework { class MemoryToken; } + class StatusMetricConsumer : public framework::StatusReporter, private framework::MetricUpdateHook, private vespalib::JsonStreamTypes @@ -50,7 +53,7 @@ private: vespalib::Monitor _waiter; framework::SecondTime _startTime; framework::SecondTime _processedTime; - framework::MemoryToken::UP _metricMemoryToken; + std::unique_ptr<framework::MemoryToken> _metricMemoryToken; void writeXmlTags(std::ostream& out, const vespalib::StringTokenizer& name, diff --git a/storage/src/vespa/storage/common/storagelinkqueued.h b/storage/src/vespa/storage/common/storagelinkqueued.h index c894b6196e8..b6935719cc5 100644 --- a/storage/src/vespa/storage/common/storagelinkqueued.h +++ b/storage/src/vespa/storage/common/storagelinkqueued.h @@ -15,13 +15,19 @@ #pragma once #include "storagelink.h" -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/thread/runnable.h> #include <vespa/vespalib/util/document_runnable.h> #include <deque> #include <limits> namespace storage { +namespace framework { + class ComponentRegister; + class Component; + class Thread; +} + class StorageLinkQueued : public StorageLink { public: StorageLinkQueued(const std::string& name, framework::ComponentRegister& cr); @@ -72,8 +78,8 @@ private: vespalib::Monitor _sync; std::deque< std::shared_ptr<Message> > _messages; bool _replyDispatcher; - framework::Component::UP _component; - framework::Thread::UP _thread; + std::unique_ptr<framework::Component> _component; + std::unique_ptr<framework::Thread> _thread; void terminate(); public: @@ -124,8 +130,8 @@ private: }; framework::ComponentRegister& _compReg; - framework::Thread::UP _replyThread; - framework::Thread::UP _commandThread; + std::unique_ptr<framework::Thread> _replyThread; + std::unique_ptr<framework::Thread> _commandThread; ReplyDispatcher _replyDispatcher; CommandDispatcher _commandDispatcher; uint16_t _closeState; diff --git a/storage/src/vespa/storage/common/storagelinkqueued.hpp b/storage/src/vespa/storage/common/storagelinkqueued.hpp index daca4bac5c5..d5a4c8fbdef 100644 --- a/storage/src/vespa/storage/common/storagelinkqueued.hpp +++ b/storage/src/vespa/storage/common/storagelinkqueued.hpp @@ -3,6 +3,8 @@ #pragma once #include "storagelinkqueued.h" +#include <vespa/storageframework/generic/thread/thread.h> +#include <vespa/storageframework/generic/component/component.h> #include <vespa/vespalib/util/stringfmt.h> #include <sstream> diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.h b/storage/src/vespa/storage/distributor/bucketdbupdater.h index a8f76c2c7a0..3f0989e9b4f 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.h +++ b/storage/src/vespa/storage/distributor/bucketdbupdater.h @@ -12,16 +12,13 @@ #include <vespa/storageapi/message/bucket.h> #include <vespa/vdslib/state/clusterstate.h> #include <vespa/storage/common/storagelink.h> -#include <vespa/storageframework/storageframework.h> - +#include <vespa/storageframework/generic/clock/timer.h> #include <vespa/storageframework/generic/memory/memorymanagerinterface.h> #include <vespa/storageapi/messageapi/messagehandler.h> #include <set> #include <deque> -namespace storage { - -namespace distributor { +namespace storage::distributor { class Distributor; @@ -264,5 +261,3 @@ private: }; } - -} diff --git a/storage/src/vespa/storage/distributor/delegatedstatusrequest.h b/storage/src/vespa/storage/distributor/delegatedstatusrequest.h index ca0fb239f76..d0c587f6691 100644 --- a/storage/src/vespa/storage/distributor/delegatedstatusrequest.h +++ b/storage/src/vespa/storage/distributor/delegatedstatusrequest.h @@ -1,10 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/status/statusreporter.h> -namespace storage { -namespace distributor { +namespace storage::distributor { struct DelegatedStatusRequest { @@ -25,5 +24,4 @@ private: DelegatedStatusRequest& operator=(const DelegatedStatusRequest&); }; -} // distributor -} // storage +} diff --git a/storage/src/vespa/storage/distributor/distributor.cpp b/storage/src/vespa/storage/distributor/distributor.cpp index 11ba7604684..944a93d5f04 100644 --- a/storage/src/vespa/storage/distributor/distributor.cpp +++ b/storage/src/vespa/storage/distributor/distributor.cpp @@ -11,6 +11,8 @@ #include <vespa/storage/distributor/maintenance/simplebucketprioritydatabase.h> #include <vespa/storage/common/nodestateupdater.h> #include <vespa/storage/common/hostreporter/hostinfo.h> +#include <vespa/storageframework/generic/status/xmlstatusreporter.h> + #include <vespa/log/log.h> LOG_SETUP(".distributor-main"); diff --git a/storage/src/vespa/storage/distributor/distributor.h b/storage/src/vespa/storage/distributor/distributor.h index 182988104a9..f47f4e4702c 100644 --- a/storage/src/vespa/storage/distributor/distributor.h +++ b/storage/src/vespa/storage/distributor/distributor.h @@ -19,6 +19,7 @@ #include <vespa/storage/common/messagesender.h> #include <vespa/storageapi/message/state.h> #include <vespa/storageframework/generic/thread/tickingthread.h> +#include <vespa/storageframework/generic/metric/metricupdatehook.h> #include <vespa/config/config.h> #include <vespa/vespalib/util/sync.h> #include <unordered_map> diff --git a/storage/src/vespa/storage/distributor/distributorcomponent.h b/storage/src/vespa/storage/distributor/distributorcomponent.h index 6f94d1bdf69..c91a7724eaa 100644 --- a/storage/src/vespa/storage/distributor/distributorcomponent.h +++ b/storage/src/vespa/storage/distributor/distributorcomponent.h @@ -6,7 +6,6 @@ #include "statechecker.h" #include <vespa/storage/common/distributorcomponent.h> #include <vespa/storage/storageutil/utils.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/storageapi/messageapi/storagecommand.h> #include <vespa/storageapi/buckets/bucketinfo.h> #include <vespa/vdslib/state/clusterstate.h> diff --git a/storage/src/vespa/storage/distributor/externaloperationhandler.h b/storage/src/vespa/storage/distributor/externaloperationhandler.h index 75ade3e2128..d5d7077c4c9 100644 --- a/storage/src/vespa/storage/distributor/externaloperationhandler.h +++ b/storage/src/vespa/storage/distributor/externaloperationhandler.h @@ -8,7 +8,6 @@ #include <vespa/storage/distributor/distributorcomponent.h> #include <vespa/storage/distributor/managed_bucket_space_component.h> #include <vespa/storageapi/messageapi/messagehandler.h> -#include <vespa/storageframework/storageframework.h> #include <chrono> namespace storage { diff --git a/storage/src/vespa/storage/distributor/idealstatemanager.h b/storage/src/vespa/storage/distributor/idealstatemanager.h index 3b468a64024..1245781a2c1 100644 --- a/storage/src/vespa/storage/distributor/idealstatemanager.h +++ b/storage/src/vespa/storage/distributor/idealstatemanager.h @@ -8,8 +8,6 @@ #include <vespa/storage/distributor/statechecker.h> #include <vespa/storage/distributor/maintenance/maintenanceprioritygenerator.h> #include <vespa/storage/distributor/maintenance/maintenanceoperationgenerator.h> -#include <vespa/storageframework/storageframework.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/vdslib/state/clusterstate.h> #include <vector> diff --git a/storage/src/vespa/storage/distributor/nodeinfo.cpp b/storage/src/vespa/storage/distributor/nodeinfo.cpp index 65163037cec..1fcb804647f 100644 --- a/storage/src/vespa/storage/distributor/nodeinfo.cpp +++ b/storage/src/vespa/storage/distributor/nodeinfo.cpp @@ -1,6 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "nodeinfo.h" +#include <vespa/storageframework/generic/clock/clock.h> namespace storage::distributor { diff --git a/storage/src/vespa/storage/distributor/nodeinfo.h b/storage/src/vespa/storage/distributor/nodeinfo.h index 59943ed494a..c7e4982c5b5 100644 --- a/storage/src/vespa/storage/distributor/nodeinfo.h +++ b/storage/src/vespa/storage/distributor/nodeinfo.h @@ -7,11 +7,10 @@ */ #pragma once -#include <vespa/storageframework/storageframework.h> #include <vector> +#include <vespa/storageframework/generic/clock/time.h> -namespace storage { -namespace distributor { +namespace storage::distributor { class NodeInfo { public: @@ -45,6 +44,4 @@ private: SingleNodeInfo& getNode(uint16_t idx); }; -} // distributor -} // storage - +} diff --git a/storage/src/vespa/storage/distributor/operationowner.cpp b/storage/src/vespa/storage/distributor/operationowner.cpp index 4ec21742cbf..2157d3aee9c 100644 --- a/storage/src/vespa/storage/distributor/operationowner.cpp +++ b/storage/src/vespa/storage/distributor/operationowner.cpp @@ -4,6 +4,7 @@ #include <vespa/storage/distributor/operations/operation.h> #include <vespa/storageapi/messageapi/storagecommand.h> #include <vespa/storageapi/messageapi/storagereply.h> +#include <vespa/storageframework/generic/clock/clock.h> #include <vespa/log/log.h> LOG_SETUP(".operationowner"); diff --git a/storage/src/vespa/storage/distributor/operations/external/getoperation.h b/storage/src/vespa/storage/distributor/operations/external/getoperation.h index 57a7c55fb81..c51291f1b7d 100644 --- a/storage/src/vespa/storage/distributor/operations/external/getoperation.h +++ b/storage/src/vespa/storage/distributor/operations/external/getoperation.h @@ -5,6 +5,7 @@ #include <vespa/storage/distributor/operations/operation.h> #include <vespa/storage/bucketdb/bucketcopy.h> #include <vespa/storageapi/messageapi/storagemessage.h> +#include <vespa/storageframework/generic/clock/timer.h> namespace document { class Document; } diff --git a/storage/src/vespa/storage/distributor/operations/external/visitoroperation.h b/storage/src/vespa/storage/distributor/operations/external/visitoroperation.h index 18ac302c019..feab573cb75 100644 --- a/storage/src/vespa/storage/distributor/operations/external/visitoroperation.h +++ b/storage/src/vespa/storage/distributor/operations/external/visitoroperation.h @@ -7,7 +7,7 @@ #include <vespa/storageapi/defs.h> #include <vespa/storageapi/messageapi/storagemessage.h> #include <vespa/storageapi/message/visitor.h> - +#include <vespa/storageframework/generic/clock/timer.h> namespace document { class Document; } @@ -183,5 +183,3 @@ private: } } - - diff --git a/storage/src/vespa/storage/distributor/operations/operation.h b/storage/src/vespa/storage/distributor/operations/operation.h index 50917334cfc..715ec88a2ba 100644 --- a/storage/src/vespa/storage/distributor/operations/operation.h +++ b/storage/src/vespa/storage/distributor/operations/operation.h @@ -4,14 +4,14 @@ #include <vespa/storageapi/messageapi/returncode.h> #include <vespa/vdslib/state/nodetype.h> #include <vespa/storage/distributor/distributormessagesender.h> -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/clock/time.h> -namespace storage -{ + +namespace storage { namespace api { -class StorageMessage; -class StorageReply; + class StorageMessage; + class StorageReply; } class StorageComponent; diff --git a/storage/src/vespa/storage/distributor/pendingmessagetracker.h b/storage/src/vespa/storage/distributor/pendingmessagetracker.h index a234ab683b3..29f57000c18 100644 --- a/storage/src/vespa/storage/distributor/pendingmessagetracker.h +++ b/storage/src/vespa/storage/distributor/pendingmessagetracker.h @@ -4,7 +4,9 @@ #include "nodeinfo.h" #include "latency_statistics_provider.h" #include <vespa/storage/common/storagelink.h> -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> +#include <vespa/storageframework/generic/component/componentregister.h> +#include <vespa/storageframework/generic/component/component.h> #include <vespa/storageapi/messageapi/returncode.h> #include <vespa/storageapi/message/bucket.h> #include <vespa/vespalib/stllike/hash_set.h> diff --git a/storage/src/vespa/storage/distributor/persistencemessagetracker.h b/storage/src/vespa/storage/distributor/persistencemessagetracker.h index f174ecc65b8..8050f185583 100644 --- a/storage/src/vespa/storage/distributor/persistencemessagetracker.h +++ b/storage/src/vespa/storage/distributor/persistencemessagetracker.h @@ -4,6 +4,7 @@ #include "distributormetricsset.h" #include "distributorcomponent.h" #include "messagetracker.h" +#include <vespa/storageframework/generic/clock/timer.h> #include <vespa/storageapi/messageapi/bucketinfocommand.h> #include <vespa/storageapi/messageapi/bucketinforeply.h> diff --git a/storage/src/vespa/storage/distributor/statusreporterdelegate.h b/storage/src/vespa/storage/distributor/statusreporterdelegate.h index 93a1fe1cd48..c8d17d227e7 100644 --- a/storage/src/vespa/storage/distributor/statusreporterdelegate.h +++ b/storage/src/vespa/storage/distributor/statusreporterdelegate.h @@ -3,7 +3,8 @@ #include "delegatedstatusrequest.h" #include "statusdelegator.h" -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/component/component.h> + namespace storage { namespace distributor { diff --git a/storage/src/vespa/storage/frameworkimpl/memory/memorystatusviewer.h b/storage/src/vespa/storage/frameworkimpl/memory/memorystatusviewer.h index dd7ecd7ae59..3ad378db78e 100644 --- a/storage/src/vespa/storage/frameworkimpl/memory/memorystatusviewer.h +++ b/storage/src/vespa/storage/frameworkimpl/memory/memorystatusviewer.h @@ -36,7 +36,7 @@ #include <vespa/storage/common/storagecomponent.h> #include <vespa/storageframework/defaultimplementation/memory/memorystate.h> -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> #include <vespa/vespalib/util/document_runnable.h> #include <vespa/vespalib/util/sync.h> #include <deque> @@ -134,5 +134,4 @@ public: }; -} // storage - +} diff --git a/storage/src/vespa/storage/frameworkimpl/thread/deadlockdetector.h b/storage/src/vespa/storage/frameworkimpl/thread/deadlockdetector.h index c8cb3f35ddf..34a345330b7 100644 --- a/storage/src/vespa/storage/frameworkimpl/thread/deadlockdetector.h +++ b/storage/src/vespa/storage/frameworkimpl/thread/deadlockdetector.h @@ -15,7 +15,8 @@ #include "appkiller.h" #include <vespa/storage/common/distributorcomponent.h> #include <vespa/storage/common/servicelayercomponent.h> -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> +#include <vespa/storageframework/generic/thread/threadpool.h> #include <vespa/vespalib/util/sync.h> #include <map> #include <atomic> diff --git a/storage/src/vespa/storage/persistence/diskthread.h b/storage/src/vespa/storage/persistence/diskthread.h index a1af83a65ef..c2982de3236 100644 --- a/storage/src/vespa/storage/persistence/diskthread.h +++ b/storage/src/vespa/storage/persistence/diskthread.h @@ -14,10 +14,12 @@ #include <vespa/vespalib/util/printable.h> #include <vespa/vespalib/util/document_runnable.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/config-stor-filestor.h> +#include <vespa/storageframework/generic/thread/runnable.h> + namespace storage { + namespace framework { class Thread; } diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h b/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h index b549aca35b6..41572042e35 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h @@ -29,6 +29,9 @@ namespace api { namespace spi { class PartitionStateList; } +namespace framework { + class HttpUrlPath; +} class FileStorHandlerImpl; class FileStorMetrics; diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h index dc2bb96d67b..a530b59d4d9 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h @@ -20,7 +20,7 @@ #include <vespa/document/bucket/bucketid.h> #include <vespa/metrics/metrics.h> #include <vespa/storage/common/servicelayercomponent.h> -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/metric/metricupdatehook.h> #include <boost/multi_index_container.hpp> #include <boost/multi_index/identity.hpp> #include <boost/multi_index/member.hpp> diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormanager.h b/storage/src/vespa/storage/persistence/filestorage/filestormanager.h index 39d9a60a950..38c735ac767 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestormanager.h +++ b/storage/src/vespa/storage/persistence/filestorage/filestormanager.h @@ -24,8 +24,9 @@ #include <vespa/storage/persistence/diskthread.h> #include <vespa/storage/persistence/providershutdownwrapper.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/storage/common/nodestateupdater.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> + #include <vespa/config/subscription/configuri.h> #include <vespa/config/helper/ifetchercallback.h> #include <vespa/config/config.h> diff --git a/storage/src/vespa/storage/persistence/filestorage/mergestatus.h b/storage/src/vespa/storage/persistence/filestorage/mergestatus.h index c5d2dcae65c..a395ec08b12 100644 --- a/storage/src/vespa/storage/persistence/filestorage/mergestatus.h +++ b/storage/src/vespa/storage/persistence/filestorage/mergestatus.h @@ -2,10 +2,10 @@ #pragma once #include <vespa/persistence/spi/context.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/storageapi/messageapi/storagemessage.h> #include <vespa/storageapi/messageapi/storagereply.h> #include <vespa/storageapi/message/bucket.h> +#include <vespa/storageframework/generic/clock/timer.h> #include <vector> #include <deque> diff --git a/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h b/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h index 04c8c7b2391..5e45e846337 100644 --- a/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h +++ b/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h @@ -8,7 +8,6 @@ #include <vespa/storage/config/config-stor-server.h> #include <vespa/storage/persistence/messages.h> #include <vespa/storage/persistence/types.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/vespalib/util/sync.h> #include <vespa/config/config.h> diff --git a/storage/src/vespa/storage/persistence/persistencethread.h b/storage/src/vespa/storage/persistence/persistencethread.h index d2c4dba3a5f..ed9cce8a54c 100644 --- a/storage/src/vespa/storage/persistence/persistencethread.h +++ b/storage/src/vespa/storage/persistence/persistencethread.h @@ -8,7 +8,6 @@ #include "diskmoveoperationhandler.h" #include "persistenceutil.h" #include "providershutdownwrapper.h" -#include <vespa/storageframework/storageframework.h> #include <vespa/storage/common/storagecomponent.h> #include <vespa/storage/common/statusmessages.h> diff --git a/storage/src/vespa/storage/persistence/persistenceutil.h b/storage/src/vespa/storage/persistence/persistenceutil.h index c917d4d0149..d06afb664f7 100644 --- a/storage/src/vespa/storage/persistence/persistenceutil.h +++ b/storage/src/vespa/storage/persistence/persistenceutil.h @@ -7,7 +7,6 @@ #include <vespa/storage/persistence/filestorage/filestormetrics.h> #include <vespa/storage/persistence/filestorage/pausehandler.h> #include <vespa/storage/persistence/types.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/vespalib/io/fileutil.h> #include <vespa/storage/storageutil/utils.h> #include <vespa/config-stor-filestor.h> diff --git a/storage/src/vespa/storage/persistence/types.h b/storage/src/vespa/storage/persistence/types.h index de31145f27b..234c3adfc02 100644 --- a/storage/src/vespa/storage/persistence/types.h +++ b/storage/src/vespa/storage/persistence/types.h @@ -9,8 +9,8 @@ #include <vespa/storageapi/buckets/bucketinfo.h> #include <vespa/storageapi/messageapi/returncode.h> #include <vespa/storageapi/defs.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/vespalib/stllike/string.h> +#include <vespa/storageframework/generic/clock/time.h> namespace storage { diff --git a/storage/src/vespa/storage/storageserver/bucketintegritychecker.h b/storage/src/vespa/storage/storageserver/bucketintegritychecker.h index fd9516a85aa..3add8c56e4b 100644 --- a/storage/src/vespa/storage/storageserver/bucketintegritychecker.h +++ b/storage/src/vespa/storage/storageserver/bucketintegritychecker.h @@ -14,7 +14,7 @@ #include <vespa/storage/common/storagelinkqueued.h> #include <vespa/storage/config/config-stor-integritychecker.h> #include <vespa/storageapi/message/bucket.h> -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> #include <vespa/config/config.h> namespace storage { diff --git a/storage/src/vespa/storage/storageserver/communicationmanager.cpp b/storage/src/vespa/storage/storageserver/communicationmanager.cpp index c2b9a438967..1c93cefefbc 100644 --- a/storage/src/vespa/storage/storageserver/communicationmanager.cpp +++ b/storage/src/vespa/storage/storageserver/communicationmanager.cpp @@ -2,6 +2,7 @@ #include "communicationmanager.h" #include "fnetlistener.h" #include "rpcrequestwrapper.h" +#include <vespa/storageframework/generic/clock/timer.h> #include <vespa/documentapi/messagebus/messages/wrongdistributionreply.h> #include <vespa/storageapi/message/state.h> #include <vespa/messagebus/emptyreply.h> diff --git a/storage/src/vespa/storage/storageserver/communicationmanager.h b/storage/src/vespa/storage/storageserver/communicationmanager.h index ab7ffcf936c..c5d17294dd7 100644 --- a/storage/src/vespa/storage/storageserver/communicationmanager.h +++ b/storage/src/vespa/storage/storageserver/communicationmanager.h @@ -16,7 +16,7 @@ #include <vespa/storage/common/storagelink.h> #include <vespa/storage/common/storagecomponent.h> #include <vespa/storage/config/config-stor-communicationmanager.h> -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/metric/metricupdatehook.h> #include <vespa/storageapi/mbusprot/storagecommand.h> #include <vespa/storageapi/mbusprot/storagereply.h> #include <vespa/messagebus/rpcmessagebus.h> diff --git a/storage/src/vespa/storage/storageserver/mergethrottler.h b/storage/src/vespa/storage/storageserver/mergethrottler.h index 03662cfadee..3dca5f6dbe0 100644 --- a/storage/src/vespa/storage/storageserver/mergethrottler.h +++ b/storage/src/vespa/storage/storageserver/mergethrottler.h @@ -10,8 +10,8 @@ #include <vespa/storage/config/config-stor-server.h> #include <vespa/storage/common/storagelink.h> #include <vespa/storage/common/storagecomponent.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/storage/distributor/messageguard.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> #include <vespa/storageapi/message/bucket.h> #include <vespa/document/bucket/bucketid.h> #include <vespa/vespalib/util/document_runnable.h> diff --git a/storage/src/vespa/storage/storageserver/statemanager.h b/storage/src/vespa/storage/storageserver/statemanager.h index bfe0418c929..703ebbc69c1 100644 --- a/storage/src/vespa/storage/storageserver/statemanager.h +++ b/storage/src/vespa/storage/storageserver/statemanager.h @@ -17,13 +17,14 @@ #include <vespa/storage/common/nodestateupdater.h> #include <vespa/storage/common/storagelink.h> #include <vespa/storage/common/storagecomponent.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> #include <vespa/storageapi/message/state.h> #include <vespa/storageapi/messageapi/storagemessage.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/vespalib/util/sync.h> #include <vespa/vespalib/objects/floatingpointtype.h> #include <deque> #include <map> +#include <list> #include <atomic> namespace metrics { diff --git a/storage/src/vespa/storage/storageserver/statereporter.h b/storage/src/vespa/storage/storageserver/statereporter.h index c46a878ef40..98a29c51d8a 100644 --- a/storage/src/vespa/storage/storageserver/statereporter.h +++ b/storage/src/vespa/storage/storageserver/statereporter.h @@ -12,7 +12,7 @@ #include "applicationgenerationfetcher.h" #include <vespa/storage/common/storagecomponent.h> -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/status/statusreporter.h> #include <vespa/metrics/metrics.h> #include <vespa/metrics/state_api_adapter.h> #include <vespa/vespalib/net/metrics_producer.h> diff --git a/storage/src/vespa/storage/storageserver/storagenode.h b/storage/src/vespa/storage/storageserver/storagenode.h index 5eea62a17ad..cf47b99164f 100644 --- a/storage/src/vespa/storage/storageserver/storagenode.h +++ b/storage/src/vespa/storage/storageserver/storagenode.h @@ -35,8 +35,8 @@ #include <vespa/storageframework/defaultimplementation/memory/memorymanager.h> #include <vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h> #include <vespa/storage/frameworkimpl/memory/memorystatusviewer.h> +#include <vespa/storageframework/generic/metric/metricupdatehook.h> #include <vespa/storage/visiting/visitormessagesessionfactory.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/storage/storageutil/resumeguard.h> #include <vespa/config-upgrading.h> #include <vespa/config-stor-distribution.h> diff --git a/storage/src/vespa/storage/visiting/commandqueue.h b/storage/src/vespa/storage/visiting/commandqueue.h index ba0141add45..070cc72e32f 100644 --- a/storage/src/vespa/storage/visiting/commandqueue.h +++ b/storage/src/vespa/storage/visiting/commandqueue.h @@ -17,8 +17,8 @@ #include <boost/multi_index/sequenced_index.hpp> #include <vespa/vespalib/util/printable.h> #include <vespa/fastos/timestamp.h> +#include <vespa/storageframework/generic/clock/clock.h> #include <list> -#include <vespa/storageframework/storageframework.h> namespace storage { diff --git a/storage/src/vespa/storage/visiting/dumpvisitor.cpp b/storage/src/vespa/storage/visiting/dumpvisitor.cpp index 388f9dc5e19..3eeee84e848 100644 --- a/storage/src/vespa/storage/visiting/dumpvisitor.cpp +++ b/storage/src/vespa/storage/visiting/dumpvisitor.cpp @@ -4,6 +4,7 @@ #include <vespa/documentapi/messagebus/messages/multioperationmessage.h> #include <vespa/document/update/documentupdate.h> #include <vespa/vdslib/container/mutabledocumentlist.h> +#include <vespa/vespalib/text/stringtokenizer.h> #include <vespa/vespalib/stllike/hash_map.hpp> #include <vespa/log/log.h> LOG_SETUP(".visitor.instance.dumpvisitor"); diff --git a/storage/src/vespa/storage/visiting/messages.h b/storage/src/vespa/storage/visiting/messages.h index b79fae0575f..d5b3c501aba 100644 --- a/storage/src/vespa/storage/visiting/messages.h +++ b/storage/src/vespa/storage/visiting/messages.h @@ -9,7 +9,6 @@ #include <vespa/storageapi/message/internal.h> #include <vespa/storage/visiting/config-stor-visitor.h> -#include <vespa/storageframework/storageframework.h> namespace storage { diff --git a/storage/src/vespa/storage/visiting/recoveryvisitor.cpp b/storage/src/vespa/storage/visiting/recoveryvisitor.cpp index 9ae18d7b05d..7fbe87cecad 100644 --- a/storage/src/vespa/storage/visiting/recoveryvisitor.cpp +++ b/storage/src/vespa/storage/visiting/recoveryvisitor.cpp @@ -4,6 +4,7 @@ #include "recoveryvisitor.h" #include <vespa/documentapi/messagebus/messages/visitor.h> +#include <vespa/vespalib/text/stringtokenizer.h> #include <vespa/vespalib/stllike/hash_map.hpp> #include <vespa/log/log.h> diff --git a/storage/src/vespa/storage/visiting/visitor.cpp b/storage/src/vespa/storage/visiting/visitor.cpp index 30bf3fe9757..704b523a3b6 100644 --- a/storage/src/vespa/storage/visiting/visitor.cpp +++ b/storage/src/vespa/storage/visiting/visitor.cpp @@ -2,6 +2,8 @@ #include "visitor.h" #include "visitormetrics.h" +#include <vespa/storageframework/generic/memory/memorymanagerinterface.h> +#include <vespa/storageframework/generic/clock/timer.h> #include <vespa/storageapi/message/datagram.h> #include <vespa/storage/persistence/messages.h> #include <vespa/documentapi/messagebus/messages/visitor.h> diff --git a/storage/src/vespa/storage/visiting/visitor.h b/storage/src/vespa/storage/visiting/visitor.h index 918d2d0e339..448de6d1381 100644 --- a/storage/src/vespa/storage/visiting/visitor.h +++ b/storage/src/vespa/storage/visiting/visitor.h @@ -22,34 +22,31 @@ #include <vespa/persistence/spi/docentry.h> #include <vespa/persistence/spi/selection.h> #include <vespa/persistence/spi/read_consistency.h> -#include <vespa/storageframework/storageframework.h> #include <list> #include <deque> namespace document { -class Document; -class DocumentId; -namespace select { -class Node; -} -} -namespace vdslib { -class Parameters; + class Document; + class DocumentId; + namespace select { class Node; } } +namespace vdslib { class Parameters; } namespace documentapi { -class DocumentMessage; -class VisitorInfoMessage; + class DocumentMessage; + class VisitorInfoMessage; } namespace storage { namespace api { -class ReturnCode; -class StorageCommand; -class StorageReply; + class ReturnCode; + class StorageCommand; + class StorageReply; } +namespace framework { class MemoryAllocationType; } + class GetIterReply; class CreateIteratorReply; class Visitor; @@ -62,8 +59,7 @@ class VisitorThreadMetrics; */ class VisitorMessageHandler { public: - virtual void send(const std::shared_ptr<api::StorageCommand>&, - Visitor& visitor) = 0; + virtual void send(const std::shared_ptr<api::StorageCommand>&, Visitor& visitor) = 0; virtual void send(const std::shared_ptr<api::StorageReply>&) = 0; /** * Called once when visitor shuts down and won't call this handler again. @@ -602,4 +598,3 @@ private: } // storage - diff --git a/storage/src/vespa/storage/visiting/visitormanager.cpp b/storage/src/vespa/storage/visiting/visitormanager.cpp index 33beae14c4c..7b8ce974ca9 100644 --- a/storage/src/vespa/storage/visiting/visitormanager.cpp +++ b/storage/src/vespa/storage/visiting/visitormanager.cpp @@ -7,6 +7,7 @@ #include "countvisitor.h" #include "testvisitor.h" #include "recoveryvisitor.h" +#include <vespa/storageframework/generic/memory/memorymanagerinterface.h> #include <vespa/storageapi/message/visitor.h> #include <vespa/storage/common/statusmessages.h> #include <vespa/storage/storageserver/storagemetricsset.h> diff --git a/storage/src/vespa/storage/visiting/visitormanager.h b/storage/src/vespa/storage/visiting/visitormanager.h index 119517d8d2a..5d7ec0caf1b 100644 --- a/storage/src/vespa/storage/visiting/visitormanager.h +++ b/storage/src/vespa/storage/visiting/visitormanager.h @@ -24,8 +24,8 @@ #include "visitormetrics.h" #include "visitorthread.h" #include <vespa/storage/visiting/config-stor-visitor.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/storage/common/storagelink.h> +#include <vespa/storageframework/generic/status/htmlstatusreporter.h> #include <vespa/storageapi/message/datagram.h> #include <vespa/storageapi/message/internal.h> #include <vespa/storageapi/message/visitor.h> @@ -33,9 +33,9 @@ #include <vespa/vespalib/util/document_runnable.h> namespace storage { -namespace api { - class BucketTimeInterval; -} + +namespace api { class BucketTimeInterval; } + class RequestStatusPageReply; class VisitorManager : public framework::Runnable, diff --git a/storage/src/vespa/storage/visiting/visitorthread.cpp b/storage/src/vespa/storage/visiting/visitorthread.cpp index 4b96faee14b..e57bcebf372 100644 --- a/storage/src/vespa/storage/visiting/visitorthread.cpp +++ b/storage/src/vespa/storage/visiting/visitorthread.cpp @@ -2,6 +2,7 @@ #include "visitorthread.h" #include "messages.h" +#include <vespa/storageframework/generic/memory/memorymanagerinterface.h> #include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/select/bodyfielddetector.h> #include <vespa/document/select/orderingselector.h> @@ -16,6 +17,7 @@ #include <locale> #include <vespa/vespalib/stllike/hash_map.hpp> #include <vespa/log/log.h> + LOG_SETUP(".visitor.thread"); using storage::api::ReturnCode; diff --git a/storage/src/vespa/storage/visiting/visitorthread.h b/storage/src/vespa/storage/visiting/visitorthread.h index 5f9d8897d9f..c5debcccafc 100644 --- a/storage/src/vespa/storage/visiting/visitorthread.h +++ b/storage/src/vespa/storage/visiting/visitorthread.h @@ -16,9 +16,9 @@ #include "visitor.h" #include "visitormetrics.h" #include "visitormessagesessionfactory.h" -#include <vespa/storageframework/storageframework.h> #include <vespa/storage/persistence/messages.h> #include <vespa/storage/common/storagecomponent.h> +#include <vespa/storageframework/generic/metric/metricupdatehook.h> #include <vespa/storageapi/messageapi/messagehandler.h> #include <vespa/metrics/metrictimer.h> #include <vespa/vespalib/util/document_runnable.h> @@ -27,6 +27,8 @@ namespace storage { +namespace framework { class HttpUrlPath; } + class VisitorThread : public framework::Runnable, private api::MessageHandler, private framework::MetricUpdateHook diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/clock/fakeclock.h b/storageframework/src/vespa/storageframework/defaultimplementation/clock/fakeclock.h index c4659bea21e..ae2ebda5fd3 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/clock/fakeclock.h +++ b/storageframework/src/vespa/storageframework/defaultimplementation/clock/fakeclock.h @@ -8,7 +8,6 @@ #pragma once #include <vespa/storageframework/generic/clock/clock.h> -#include <vespa/storageframework/storageframework.h> #include <vespa/vespalib/util/sync.h> namespace storage { diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/clock/realclock.h b/storageframework/src/vespa/storageframework/defaultimplementation/clock/realclock.h index a8fd5d597d7..a4c38d24fbd 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/clock/realclock.h +++ b/storageframework/src/vespa/storageframework/defaultimplementation/clock/realclock.h @@ -9,11 +9,9 @@ */ #pragma once -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/clock/clock.h> -namespace storage { -namespace framework { -namespace defaultimplementation { +namespace storage::framework::defaultimplementation { struct RealClock : public Clock { MicroSecTime getTimeInMicros() const override; @@ -22,7 +20,4 @@ struct RealClock : public Clock { MonotonicTimePoint getMonotonicTime() const override; }; -} // defaultimplementation -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorymanager.h b/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorymanager.h index 41fb819ae68..247970f62ef 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorymanager.h +++ b/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorymanager.h @@ -26,9 +26,7 @@ #include <vespa/vespalib/util/printable.h> #include <vespa/vespalib/util/sync.h> -namespace storage { -namespace framework { -namespace defaultimplementation { +namespace storage::framework::defaultimplementation { class MemoryManager; class AllocationLogic; @@ -155,7 +153,4 @@ public: }; -} // defaultimplementation -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.h b/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.h index 4cbc4da1ac5..5caf5a1d15b 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.h +++ b/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.h @@ -9,12 +9,10 @@ #pragma once #include "memorymanager.h" -#include <vespa/storageframework/storageframework.h> +#include <vespa/storageframework/generic/clock/clock.h> #include <vespa/vespalib/util/sync.h> -namespace storage { -namespace framework { -namespace defaultimplementation { +namespace storage::framework::defaultimplementation { class MemoryState : public vespalib::Printable { public: @@ -138,7 +136,4 @@ public: } }; -} // defaultimplementation -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.cpp b/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.cpp index 707f6a640a5..3e3785f67b1 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.cpp +++ b/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.cpp @@ -2,13 +2,12 @@ #include "threadimpl.h" #include "threadpoolimpl.h" +#include <vespa/storageframework/generic/clock/clock.h> #include <vespa/log/log.h> LOG_SETUP(".framework.thread.impl"); -namespace storage { -namespace framework { -namespace defaultimplementation { +namespace storage::framework::defaultimplementation { ThreadImpl::ThreadImpl(ThreadPoolImpl& pool, Runnable& runnable, @@ -143,6 +142,4 @@ ThreadImpl::AtomicThreadTickData::storeRelaxed( _maxWaitTimeSeenMs.store(newState._maxWaitTimeSeenMs, relaxed); } -} // defaultimplementation -} // framework -} // storage +} diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.h b/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.h index b31b4be3ce9..ad313f510ce 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.h +++ b/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadimpl.h @@ -2,14 +2,12 @@ #pragma once +#include <vespa/storageframework/generic/thread/threadpool.h> #include <vespa/vespalib/util/document_runnable.h> -#include <vespa/storageframework/storageframework.h> #include <array> #include <atomic> -namespace storage { -namespace framework { -namespace defaultimplementation { +namespace storage::framework::defaultimplementation { class ThreadPoolImpl; @@ -81,6 +79,4 @@ public: const ThreadProperties& getProperties() const { return _properties; } }; -} // defaultimplementation -} // framework -} // storage +} diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h b/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h index 7f88977bbc5..173ec54f097 100644 --- a/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h +++ b/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h @@ -6,9 +6,7 @@ #include <vespa/fastos/thread.h> #include <vespa/vespalib/util/sync.h> -namespace storage { -namespace framework { -namespace defaultimplementation { +namespace storage::framework::defaultimplementation { class ThreadImpl; @@ -34,7 +32,4 @@ public: Clock& getClock() { return _clock; } }; -} // defaultimplementation -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/clock/clock.h b/storageframework/src/vespa/storageframework/generic/clock/clock.h index c7fd02385ed..69e3cfdc2d0 100644 --- a/storageframework/src/vespa/storageframework/generic/clock/clock.h +++ b/storageframework/src/vespa/storageframework/generic/clock/clock.h @@ -16,8 +16,7 @@ #include "time.h" #include <memory> -namespace storage { -namespace framework { +namespace storage::framework { struct Clock { using UP = std::unique_ptr<Clock>; @@ -32,6 +31,4 @@ struct Clock { virtual MonotonicTimePoint getMonotonicTime() const = 0; }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/clock/timer.h b/storageframework/src/vespa/storageframework/generic/clock/timer.h index ea4568fc817..505d41ea23a 100644 --- a/storageframework/src/vespa/storageframework/generic/clock/timer.h +++ b/storageframework/src/vespa/storageframework/generic/clock/timer.h @@ -8,10 +8,9 @@ #pragma once -#include <vespa/storageframework/generic/clock/clock.h> +#include "clock.h" -namespace storage { -namespace framework { +namespace storage::framework { class MilliSecTimer { const Clock* _clock; @@ -37,6 +36,4 @@ public: } }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/component/managedcomponent.h b/storageframework/src/vespa/storageframework/generic/component/managedcomponent.h index 6934a9fab32..3abec2f3eb2 100644 --- a/storageframework/src/vespa/storageframework/generic/component/managedcomponent.h +++ b/storageframework/src/vespa/storageframework/generic/component/managedcomponent.h @@ -19,8 +19,7 @@ namespace metrics { class Metric; } -namespace storage { -namespace framework { +namespace storage::framework { class StatusReporter; class MemoryManagerInterface; @@ -75,6 +74,4 @@ struct ManagedComponent { }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/memory/memoryallocationtype.h b/storageframework/src/vespa/storageframework/generic/memory/memoryallocationtype.h index 94679212179..8bcd5f68c7c 100644 --- a/storageframework/src/vespa/storageframework/generic/memory/memoryallocationtype.h +++ b/storageframework/src/vespa/storageframework/generic/memory/memoryallocationtype.h @@ -20,8 +20,7 @@ #include <string> #include <memory> -namespace storage { -namespace framework { +namespace storage::framework { struct MemoryAllocationType { using UP = std::unique_ptr<MemoryAllocationType>; @@ -49,6 +48,4 @@ private: std::string _name; }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/memory/memorymanagerinterface.h b/storageframework/src/vespa/storageframework/generic/memory/memorymanagerinterface.h index b3f3c8ede21..3a9f15b5710 100644 --- a/storageframework/src/vespa/storageframework/generic/memory/memorymanagerinterface.h +++ b/storageframework/src/vespa/storageframework/generic/memory/memorymanagerinterface.h @@ -16,8 +16,7 @@ #include "reducememoryusageinterface.h" #include <vector> -namespace storage { -namespace framework { +namespace storage::framework { struct MemoryManagerInterface { @@ -61,6 +60,4 @@ struct MemoryManagerInterface virtual uint64_t getMemorySizeFreeForPriority(uint8_t priority) const = 0; }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/memory/memorytoken.h b/storageframework/src/vespa/storageframework/generic/memory/memorytoken.h index 102656aa4f5..2b132db4434 100644 --- a/storageframework/src/vespa/storageframework/generic/memory/memorytoken.h +++ b/storageframework/src/vespa/storageframework/generic/memory/memorytoken.h @@ -14,8 +14,7 @@ #include <memory> -namespace storage { -namespace framework { +namespace storage::framework { class MemoryToken { protected: @@ -27,6 +26,4 @@ public: virtual bool resize(uint64_t min, uint64_t max) = 0; }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/memory/reducememoryusageinterface.h b/storageframework/src/vespa/storageframework/generic/memory/reducememoryusageinterface.h index 5baaeb2c700..d16d0983bac 100644 --- a/storageframework/src/vespa/storageframework/generic/memory/reducememoryusageinterface.h +++ b/storageframework/src/vespa/storageframework/generic/memory/reducememoryusageinterface.h @@ -14,8 +14,7 @@ #pragma once -namespace storage { -namespace framework { +namespace storage::framework { struct ReduceMemoryUsageInterface { @@ -36,10 +35,7 @@ struct ReduceMemoryUsageInterface * @param reduceBy Always in the range 0 < reduceBy <= token.size() * @return The amount of memory no longer used. */ - virtual uint64_t reduceMemoryConsumption(const MemoryToken&, - uint64_t reduceBy) = 0; + virtual uint64_t reduceMemoryConsumption(const MemoryToken&, uint64_t reduceBy) = 0; }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/metric/metricupdatehook.h b/storageframework/src/vespa/storageframework/generic/metric/metricupdatehook.h index 07fdf1b5a6e..4efe00bfd9c 100644 --- a/storageframework/src/vespa/storageframework/generic/metric/metricupdatehook.h +++ b/storageframework/src/vespa/storageframework/generic/metric/metricupdatehook.h @@ -11,8 +11,7 @@ namespace vespalib { class MonitorGuard; } -namespace storage { -namespace framework { +namespace storage::framework { struct MetricUpdateHook { using MetricLockGuard = vespalib::MonitorGuard; @@ -21,6 +20,4 @@ struct MetricUpdateHook { virtual void updateMetrics(const MetricLockGuard &) = 0; }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/status/htmlstatusreporter.h b/storageframework/src/vespa/storageframework/generic/status/htmlstatusreporter.h index fb9248a97b9..6eedc054a4a 100644 --- a/storageframework/src/vespa/storageframework/generic/status/htmlstatusreporter.h +++ b/storageframework/src/vespa/storageframework/generic/status/htmlstatusreporter.h @@ -18,8 +18,7 @@ #include "statusreporter.h" -namespace storage { -namespace framework { +namespace storage::framework { struct HtmlStatusReporter : public StatusReporter { HtmlStatusReporter(vespalib::stringref id, vespalib::stringref name); @@ -62,6 +61,4 @@ struct PartlyHtmlStatusReporter : public HtmlStatusReporter { void reportHtmlStatus(std::ostream&, const HttpUrlPath&) const override {} }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/status/httpurlpath.cpp b/storageframework/src/vespa/storageframework/generic/status/httpurlpath.cpp index e29c66a8865..4c437eaa92e 100644 --- a/storageframework/src/vespa/storageframework/generic/status/httpurlpath.cpp +++ b/storageframework/src/vespa/storageframework/generic/status/httpurlpath.cpp @@ -1,9 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "httpurlpath.h" +#include <vespa/vespalib/text/stringtokenizer.h> -namespace storage { -namespace framework { +namespace storage::framework { HttpUrlPath::HttpUrlPath(const vespalib::string& urlpath) : _urlPath(urlpath), @@ -69,5 +69,4 @@ HttpUrlPath::print(std::ostream& out, bool, const std::string&) const out << _urlPath; } -} // framework -} // storage +} diff --git a/storageframework/src/vespa/storageframework/generic/status/httpurlpath.h b/storageframework/src/vespa/storageframework/generic/status/httpurlpath.h index 8c8c24c29dd..f7229a1d297 100644 --- a/storageframework/src/vespa/storageframework/generic/status/httpurlpath.h +++ b/storageframework/src/vespa/storageframework/generic/status/httpurlpath.h @@ -8,11 +8,9 @@ #include <vespa/vespalib/util/printable.h> #include <vespa/vespalib/stllike/string.h> -#include <vespa/vespalib/text/stringtokenizer.h> #include <map> -namespace storage { -namespace framework { +namespace storage::framework { class HttpUrlPath : public vespalib::Printable { vespalib::string _urlPath; @@ -56,6 +54,4 @@ T HttpUrlPath::get(const vespalib::string& id, const T& defaultValue) const return val; } -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/status/statusreporter.h b/storageframework/src/vespa/storageframework/generic/status/statusreporter.h index 0d9aa3a8e4a..8c9cd8c2a2c 100644 --- a/storageframework/src/vespa/storageframework/generic/status/statusreporter.h +++ b/storageframework/src/vespa/storageframework/generic/status/statusreporter.h @@ -18,8 +18,7 @@ #include <vespa/storageframework/generic/status/httpurlpath.h> #include <vespa/vespalib/stllike/string.h> -namespace storage { -namespace framework { +namespace storage::framework { struct StatusReporter { @@ -64,6 +63,4 @@ private: }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/status/xmlstatusreporter.h b/storageframework/src/vespa/storageframework/generic/status/xmlstatusreporter.h index 98002bf1113..522a6480a75 100644 --- a/storageframework/src/vespa/storageframework/generic/status/xmlstatusreporter.h +++ b/storageframework/src/vespa/storageframework/generic/status/xmlstatusreporter.h @@ -20,8 +20,7 @@ #include "statusreporter.h" #include <vespa/vespalib/util/xmlserializable.h> -namespace storage { -namespace framework { +namespace storage::framework { struct XmlStatusReporter : public StatusReporter { XmlStatusReporter(vespalib::stringref id, vespalib::stringref name); @@ -77,6 +76,4 @@ public: } }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/thread/thread.h b/storageframework/src/vespa/storageframework/generic/thread/thread.h index a40a209e980..ed0f34b9421 100644 --- a/storageframework/src/vespa/storageframework/generic/thread/thread.h +++ b/storageframework/src/vespa/storageframework/generic/thread/thread.h @@ -19,8 +19,7 @@ namespace vespalib { class Monitor; } -namespace storage { -namespace framework { +namespace storage::framework { class Thread : public ThreadHandle { vespalib::string _id; @@ -61,6 +60,4 @@ public: void interruptAndJoin(vespalib::Monitor* m); }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/thread/threadpool.h b/storageframework/src/vespa/storageframework/generic/thread/threadpool.h index 1cecd24bdc3..711b782e600 100644 --- a/storageframework/src/vespa/storageframework/generic/thread/threadpool.h +++ b/storageframework/src/vespa/storageframework/generic/thread/threadpool.h @@ -18,8 +18,7 @@ #include <vespa/storageframework/generic/clock/time.h> #include <vector> -namespace storage { -namespace framework { +namespace storage::framework { /** * Each thread may have different properties, as to how long they wait between @@ -94,6 +93,4 @@ struct ThreadPool { virtual void visitThreads(ThreadVisitor&) const = 0; }; -} // framework -} // storage - +} diff --git a/storageframework/src/vespa/storageframework/generic/thread/tickingthread.h b/storageframework/src/vespa/storageframework/generic/thread/tickingthread.h index 16a67cf709c..cf2389903f3 100644 --- a/storageframework/src/vespa/storageframework/generic/thread/tickingthread.h +++ b/storageframework/src/vespa/storageframework/generic/thread/tickingthread.h @@ -23,8 +23,7 @@ #include <vespa/vespalib/stllike/string.h> #include <vespa/vespalib/util/sync.h> -namespace storage { -namespace framework { +namespace storage::framework { class ThreadPool; typedef uint32_t ThreadIndex; @@ -102,5 +101,4 @@ struct TickingThreadPool : public ThreadLock { virtual vespalib::string getStatus() = 0; }; -} // framework -} // storage +} diff --git a/storageframework/src/vespa/storageframework/storageframework.h b/storageframework/src/vespa/storageframework/storageframework.h index 9ac5de9fafe..d6c39f5c217 100644 --- a/storageframework/src/vespa/storageframework/storageframework.h +++ b/storageframework/src/vespa/storageframework/storageframework.h @@ -1,6 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /** - * \file storageframework.h * * This file includes the most common parts used by the framework. */ |