aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-01-04 14:41:05 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2017-01-04 14:41:05 +0000
commitfcf446ba7473aad4a37b91bd94c2ac352559e17a (patch)
treeebe7ebd2e622bed74ef2f37c1b98e2889d6c1a99 /searchcore
parent22ab2050882f0bf9ea0635674e18de5a18024667 (diff)
Include only only what you need, no more, no less.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h27
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.h18
4 files changed, 23 insertions, 33 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
index 212f843a6f4..196a5081769 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
@@ -124,7 +124,7 @@ getStoreConfig(const ProtonConfig::Summary::Cache & cache)
}
-SummaryManager::SummaryManager(vespalib::ThreadStackExecutorBase & executor,
+SummaryManager::SummaryManager(vespalib::ThreadExecutor & executor,
const ProtonConfig::Summary & summary,
const search::GrowStrategy & growStrategy,
const vespalib::string &baseDir,
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
index cef714f024e..81bd64df624 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h
@@ -14,20 +14,15 @@
#include "fieldcacherepo.h"
#include "isummarymanager.h"
-namespace search
-{
+namespace search {
-namespace common
-{
+class IBucketizer;
-class FileHeaderContext;
+namespace common { class FileHeaderContext; }
}
-}
-
-namespace proton
-{
+namespace proton {
class SummaryManager : public ISummaryManager
{
@@ -69,15 +64,15 @@ public:
};
private:
- vespalib::string _baseDir;
- DocTypeName _docTypeName;
- search::IDocumentStore::SP _docStore;
- const search::TuneFileSummary _tuneFileSummary;
- uint64_t _currentSerial;
+ vespalib::string _baseDir;
+ DocTypeName _docTypeName;
+ search::IDocumentStore::SP _docStore;
+ const search::TuneFileSummary _tuneFileSummary;
+ uint64_t _currentSerial;
public:
typedef std::shared_ptr<SummaryManager> SP;
- SummaryManager(vespalib::ThreadStackExecutorBase & executor,
+ SummaryManager(vespalib::ThreadExecutor & executor,
const vespa::config::search::core::ProtonConfig::Summary & summary,
const search::GrowStrategy & growStrategy,
const vespalib::string &baseDir,
@@ -85,7 +80,7 @@ public:
const search::TuneFileSummary &tuneFileSummary,
const search::common::FileHeaderContext &fileHeaderContext,
search::transactionlog::SyncProxy &tlSyncer,
- const search::IBucketizer::SP & bucketizer);
+ const std::shared_ptr<search::IBucketizer> & bucketizer);
void putDocument(uint64_t syncToken, const document::Document & doc,
search::DocumentIdT lid);
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.cpp
index 1a6c9c8a093..b49b2692aeb 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.cpp
@@ -1,12 +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 "summarymanagerinitializer.h"
#include <vespa/searchcore/proton/common/eventlogger.h>
#include <vespa/vespalib/io/fileutil.h>
-namespace proton
-{
+namespace proton {
SummaryManagerInitializer::
SummaryManagerInitializer(const search::GrowStrategy &grow,
@@ -20,7 +18,7 @@ SummaryManagerInitializer(const search::GrowStrategy &grow,
const search::common::FileHeaderContext &
fileHeaderContext,
search::transactionlog::SyncProxy &tlSyncer,
- search::IBucketizer::SP bucketizer,
+ IBucketizerSP bucketizer,
std::shared_ptr<SummaryManager::SP> result)
: proton::initializer::InitializerTask(),
_grow(grow),
@@ -34,8 +32,7 @@ SummaryManagerInitializer(const search::GrowStrategy &grow,
_tlSyncer(tlSyncer),
_bucketizer(bucketizer),
_result(result)
-{
-}
+{ }
void
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.h b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.h
index c67b0f48a10..05a2cdbc52e 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.h
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanagerinitializer.h
@@ -7,8 +7,7 @@
#include <vespa/searchcommon/common/growstrategy.h>
#include <vespa/vespalib/stllike/string.h>
-namespace proton
-{
+namespace proton {
/*
* Class representing an initializer task for constructing summary manager
@@ -16,17 +15,18 @@ namespace proton
*/
class SummaryManagerInitializer : public initializer::InitializerTask
{
+ using IBucketizerSP = std::shared_ptr<search::IBucketizer>;
using ProtonConfig = vespa::config::search::core::ProtonConfig;
const search::GrowStrategy _grow;
const vespalib::string _baseDir;
const vespalib::string _subDbName;
const DocTypeName _docTypeName;
- vespalib::ThreadStackExecutorBase &_summaryExecutor;
+ vespalib::ThreadExecutor &_summaryExecutor;
const ProtonConfig::Summary _protonSummaryCfg;
const search::TuneFileSummary _tuneFile;
const search::common::FileHeaderContext &_fileHeaderContext;
search::transactionlog::SyncProxy &_tlSyncer;
- const search::IBucketizer::SP _bucketizer;
+ const IBucketizerSP _bucketizer;
std::shared_ptr<SummaryManager::SP> _result;
public:
@@ -37,16 +37,14 @@ public:
const vespalib::string baseDir,
const vespalib::string &subDbName,
const DocTypeName &docTypeName,
- vespalib::ThreadStackExecutorBase &
- summaryExecutor,
+ vespalib::ThreadStackExecutorBase & summaryExecutor,
const ProtonConfig::Summary protonSummaryCfg,
const search::TuneFileSummary &tuneFile,
- const search::common::FileHeaderContext &
- fileHeaderContext,
+ const search::common::FileHeaderContext & fileHeaderContext,
search::transactionlog::SyncProxy &tlSyncer,
- search::IBucketizer::SP bucketizer,
+ IBucketizerSP bucketizer,
std::shared_ptr<SummaryManager::SP> result);
- virtual void run() override;
+ void run() override;
};
} // namespace proton