summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chain/src/main/java/com/yahoo/component/chain/dependencies/ordering/ComponentNameProvider.java3
-rw-r--r--component/src/main/java/com/yahoo/component/ComponentId.java6
-rw-r--r--component/src/main/java/com/yahoo/component/ComponentSpecification.java6
-rw-r--r--component/src/main/java/com/yahoo/component/Spec.java3
-rw-r--r--component/src/main/java/com/yahoo/component/provider/FreezableClass.java3
-rw-r--r--component/src/main/java/com/yahoo/component/provider/FreezableComponent.java3
-rw-r--r--component/src/main/java/com/yahoo/component/provider/ListenableFreezableClass.java3
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/document/Ranking.java12
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/document/Sorting.java3
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java6
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java7
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/Dispatch.java3
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/NodeFlavorTuning.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/search/NodeFlavorTuningTest.java10
-rw-r--r--container-di/src/main/scala/com/yahoo/container/di/Container.scala14
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/query/TermType.java3
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/query/WordItem.java6
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/querytransform/PhraseMatcher.java6
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/searcher/MultipleResultsSearcher.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/Searcher.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/cluster/ClusterSearcher.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/federation/http/ConfiguredHTTPClientSearcher.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/federation/http/ConfiguredHTTPProviderSearcher.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/intent/model/Intent.java9
-rw-r--r--container-search/src/main/java/com/yahoo/search/intent/model/IntentNode.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/intent/model/InterpretationNode.java6
-rw-r--r--container-search/src/main/java/com/yahoo/search/intent/model/Source.java9
-rw-r--r--container-search/src/main/java/com/yahoo/search/intent/model/SourceNode.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/PageTemplate.java9
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderMappingVisitor.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderReferenceCreatingVisitor.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/engine/RelevanceComparator.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/engine/Resolution.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/engine/Resolver.java6
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/engine/SourceOrderComparator.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/model/Layout.java9
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/model/MapChoice.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/model/Placeholder.java9
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/model/Renderer.java9
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/model/Section.java9
-rw-r--r--container-search/src/main/java/com/yahoo/search/pagetemplates/model/Source.java15
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/AllValuesQueryProfileVisitor.java6
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileRegistry.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariant.java6
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariants.java6
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/SingleValueQueryProfileVisitor.java21
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/SubstituteString.java15
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/types/PrimitiveFieldType.java15
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileFieldType.java12
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/properties/PropertyAliases.java9
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/properties/PropertyMap.java6
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/rewrite/QueryRewriteSearcher.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/rewrite/SearchChainDispatcherSearcher.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/result/HitGroup.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/result/Relevance.java9
-rw-r--r--container-search/src/main/java/com/yahoo/search/searchchain/example/ExampleSearcher.java3
-rw-r--r--container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java6
-rw-r--r--container-search/src/main/java/com/yahoo/text/interpretation/Interpretation.java3
-rw-r--r--container-search/src/test/java/com/yahoo/prelude/templates/test/TilingTestCase.java6
-rw-r--r--container-search/src/test/java/com/yahoo/search/cluster/test/ClusterSearcherTestCase.java12
-rw-r--r--container-search/src/test/java/com/yahoo/search/cluster/test/ClusteredConnectionTestCase.java12
-rw-r--r--container-search/src/test/java/com/yahoo/search/query/profile/config/test/QueryProfileIntegrationTestCase.java12
-rw-r--r--container-search/src/test/java/com/yahoo/search/query/profile/test/CloningTestCase.java12
-rw-r--r--container-search/src/test/java/com/yahoo/search/searchchain/config/test/SearchChainConfigurerTestCase.java12
-rw-r--r--container-search/src/test/java/com/yahoo/search/searchchain/config/test/updatesearcher/UpdateSearcher.java3
-rw-r--r--container-search/src/test/java/com/yahoo/search/searchchain/test/ExecutionTestCase.java18
-rw-r--r--container-search/src/test/java/com/yahoo/vespa/streamingvisitors/MetricsSearcherTestCase.java3
-rw-r--r--eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp3
-rw-r--r--fastlib/src/vespa/fastlib/io/bufferedfile.cpp4
-rw-r--r--fastlib/src/vespa/fastlib/io/bufferedinputstream.cpp6
-rw-r--r--fastlib/src/vespa/fastlib/io/bufferedoutputstream.cpp8
-rw-r--r--fastlib/src/vespa/fastlib/io/fileinputstream.cpp6
-rw-r--r--fastlib/src/vespa/fastlib/io/fileoutputstream.cpp17
-rw-r--r--fastlib/src/vespa/fastlib/io/fileoutputstream.h10
-rw-r--r--fastlib/src/vespa/fastlib/io/outputstream.h7
-rw-r--r--fastlib/src/vespa/fastlib/net/httpchunkedinputstream.cpp6
-rw-r--r--fastlib/src/vespa/fastlib/net/httpchunkedoutputstream.cpp7
-rw-r--r--fastlib/src/vespa/fastlib/net/httpheaderparser.cpp6
-rw-r--r--fastlib/src/vespa/fastlib/net/httpheaderparser.h2
-rw-r--r--fastlib/src/vespa/fastlib/net/socket.cpp2
-rw-r--r--fastlib/src/vespa/fastlib/net/url.cpp5
-rw-r--r--fastlib/src/vespa/fastlib/text/apps/extcase.cpp1
-rw-r--r--fastlib/src/vespa/fastlib/text/apps/unicode_propertydump.cpp3
-rw-r--r--fastlib/src/vespa/fastlib/text/apps/unicode_tolowerdump.cpp3
-rw-r--r--fastlib/src/vespa/fastlib/text/unicodeutil.cpp7
-rw-r--r--fastlib/src/vespa/fastlib/text/wordfolder.cpp6
-rw-r--r--fastlib/src/vespa/fastlib/util/base64.cpp12
-rw-r--r--filedistribution/src/apps/status/status-filedistribution.cpp17
-rw-r--r--filedistribution/src/vespa/filedistribution/common/componentsdeleter.cpp1
-rw-r--r--filedistribution/src/vespa/filedistribution/common/exception.cpp1
-rw-r--r--filedistribution/src/vespa/filedistribution/distributor/filedownloader.cpp9
-rw-r--r--filedistribution/src/vespa/filedistribution/distributor/filedownloadermanager.cpp7
-rw-r--r--filedistribution/src/vespa/filedistribution/distributor/scheduler.cpp3
-rw-r--r--filedistribution/src/vespa/filedistribution/distributor/state_server_impl.cpp1
-rw-r--r--filedistribution/src/vespa/filedistribution/manager/createtorrent.cpp7
-rw-r--r--filedistribution/src/vespa/filedistribution/manager/filedb.cpp2
-rw-r--r--filedistribution/src/vespa/filedistribution/manager/filedistributionmanager.cpp12
-rw-r--r--filedistribution/src/vespa/filedistribution/manager/jnistring.h2
-rw-r--r--filedistribution/src/vespa/filedistribution/manager/stderr_logfwd.cpp6
-rw-r--r--filedistribution/src/vespa/filedistribution/model/deployedfilestodownload.cpp6
-rw-r--r--frtstream/src/example/test.cpp6
-rw-r--r--jrt/src/com/yahoo/jrt/DataArray.java3
-rw-r--r--jrt/src/com/yahoo/jrt/DataValue.java3
-rw-r--r--jrt/src/com/yahoo/jrt/DoubleArray.java3
-rw-r--r--jrt/src/com/yahoo/jrt/DoubleValue.java3
-rw-r--r--jrt/src/com/yahoo/jrt/FloatArray.java3
-rw-r--r--jrt/src/com/yahoo/jrt/FloatValue.java3
-rw-r--r--jrt/src/com/yahoo/jrt/Int16Array.java3
-rw-r--r--jrt/src/com/yahoo/jrt/Int16Value.java3
-rw-r--r--jrt/src/com/yahoo/jrt/Int32Array.java3
-rw-r--r--jrt/src/com/yahoo/jrt/Int32Value.java3
-rw-r--r--jrt/src/com/yahoo/jrt/Int64Array.java3
-rw-r--r--jrt/src/com/yahoo/jrt/Int64Value.java3
-rw-r--r--jrt/src/com/yahoo/jrt/Int8Array.java3
-rw-r--r--jrt/src/com/yahoo/jrt/Int8Value.java3
-rw-r--r--jrt/src/com/yahoo/jrt/Method.java3
-rw-r--r--jrt/src/com/yahoo/jrt/Request.java3
-rw-r--r--jrt/src/com/yahoo/jrt/StringArray.java3
-rw-r--r--jrt/src/com/yahoo/jrt/StringValue.java6
-rw-r--r--jrt/src/com/yahoo/jrt/Values.java3
-rw-r--r--juniper/src/test/appender_test.cpp1
-rw-r--r--juniper/src/test/fakerewriter.cpp1
-rw-r--r--juniper/src/test/matchobjectTest.cpp1
-rw-r--r--juniper/src/test/queryparserTest.cpp1
-rw-r--r--juniper/src/test/queryvisitor_test.cpp1
-rw-r--r--juniper/src/test/testenv.cpp1
-rw-r--r--messagebus/src/vespa/messagebus/network/rpcnetwork.cpp4
-rw-r--r--messagebus/src/vespa/messagebus/testlib/slobrok.cpp2
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java14
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRetirer.java10
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/search_context_params.cpp6
-rw-r--r--searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp6
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdb_test.cpp49
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/rpc.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp26
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp6
-rw-r--r--searchlib/src/main/java/com/yahoo/searchlib/ranking/features/fieldmatch/QueryTerm.java9
-rw-r--r--searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/MapContext.java12
-rw-r--r--searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/TensorValue.java2
-rw-r--r--searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TruthOperator.java3
-rw-r--r--searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/SemanticDistanceTestCase.java3
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.cpp4
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.cpp4
-rw-r--r--slobrok/src/apps/check_slobrok/check_slobrok.cpp6
-rw-r--r--slobrok/src/apps/sbcmd/sbcmd.cpp5
-rw-r--r--slobrok/src/tests/backoff/testbackoff.cpp7
-rw-r--r--slobrok/src/tests/configure/configure.cpp10
-rw-r--r--slobrok/src/tests/configure/gencfg.cpp5
-rw-r--r--slobrok/src/tests/mirrorapi/mirrorapi.cpp9
-rw-r--r--slobrok/src/tests/oldapi/mirror.cpp14
-rw-r--r--slobrok/src/tests/oldapi/mirror.h10
-rw-r--r--slobrok/src/tests/oldapi/old.cpp9
-rw-r--r--slobrok/src/tests/registerapi/registerapi.cpp8
-rw-r--r--slobrok/src/tests/standalone/standalone.cpp5
-rw-r--r--slobrok/src/tests/startsome/rpc_info.cpp5
-rw-r--r--slobrok/src/tests/startsome/tstdst.cpp5
-rw-r--r--slobrok/src/vespa/slobrok/cfg.cpp4
-rw-r--r--slobrok/src/vespa/slobrok/sblist.cpp12
-rw-r--r--slobrok/src/vespa/slobrok/sbmirror.cpp10
-rw-r--r--slobrok/src/vespa/slobrok/sbmirror.h13
-rw-r--r--slobrok/src/vespa/slobrok/sbregister.cpp8
-rw-r--r--slobrok/src/vespa/slobrok/sbregister.h15
-rw-r--r--slobrok/src/vespa/slobrok/server/cmd.cpp13
-rw-r--r--slobrok/src/vespa/slobrok/server/exchange_manager.cpp18
-rw-r--r--slobrok/src/vespa/slobrok/server/exchange_manager.h2
-rw-r--r--slobrok/src/vespa/slobrok/server/history.cpp5
-rw-r--r--slobrok/src/vespa/slobrok/server/history.h1
-rw-r--r--slobrok/src/vespa/slobrok/server/i_monitored_server.h2
-rw-r--r--slobrok/src/vespa/slobrok/server/i_rpc_server_manager.h6
-rw-r--r--slobrok/src/vespa/slobrok/server/managed_rpc_server.cpp3
-rw-r--r--slobrok/src/vespa/slobrok/server/managed_rpc_server.h7
-rw-r--r--slobrok/src/vespa/slobrok/server/metrics_producer.cpp3
-rw-r--r--slobrok/src/vespa/slobrok/server/metrics_producer.h3
-rw-r--r--slobrok/src/vespa/slobrok/server/monitor.cpp3
-rw-r--r--slobrok/src/vespa/slobrok/server/monitor.h7
-rw-r--r--slobrok/src/vespa/slobrok/server/named_service.cpp6
-rw-r--r--slobrok/src/vespa/slobrok/server/named_service.h1
-rw-r--r--slobrok/src/vespa/slobrok/server/random.h2
-rw-r--r--slobrok/src/vespa/slobrok/server/remote_check.cpp13
-rw-r--r--slobrok/src/vespa/slobrok/server/remote_slobrok.cpp4
-rw-r--r--slobrok/src/vespa/slobrok/server/remote_slobrok.h12
-rw-r--r--slobrok/src/vespa/slobrok/server/reserved_name.h4
-rw-r--r--slobrok/src/vespa/slobrok/server/rpc_server_manager.cpp14
-rw-r--r--slobrok/src/vespa/slobrok/server/rpc_server_manager.h9
-rw-r--r--slobrok/src/vespa/slobrok/server/rpc_server_map.cpp10
-rw-r--r--slobrok/src/vespa/slobrok/server/rpc_server_map.h4
-rw-r--r--slobrok/src/vespa/slobrok/server/rpchooks.cpp2
-rw-r--r--slobrok/src/vespa/slobrok/server/rpchooks.h5
-rw-r--r--slobrok/src/vespa/slobrok/server/rpcmirror.cpp4
-rw-r--r--slobrok/src/vespa/slobrok/server/rpcmirror.h4
-rw-r--r--slobrok/src/vespa/slobrok/server/sbenv.cpp6
-rw-r--r--slobrok/src/vespa/slobrok/server/sbenv.h2
-rw-r--r--slobrok/src/vespa/slobrok/server/selfcheck.cpp9
-rw-r--r--slobrok/src/vespa/slobrok/server/slobrokserver.cpp1
-rw-r--r--slobrok/src/vespa/slobrok/server/visible_map.h7
-rwxr-xr-xvespaclient-container-plugin/src/test/java/com/yahoo/storage/searcher/GetSearcherTestCase.java3
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java2
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java2
-rw-r--r--vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java2
-rw-r--r--vespalib/src/vespa/vespalib/data/input.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/data/input_reader.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/data/lz4_input_decoder.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/data/lz4_input_decoder.h1
-rw-r--r--vespalib/src/vespa/vespalib/data/lz4_output_encoder.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/data/lz4_output_encoder.h1
-rw-r--r--vespalib/src/vespa/vespalib/data/memory.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/data/memory_input.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/data/output.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/data/output_writer.cpp7
-rw-r--r--vespalib/src/vespa/vespalib/data/writable_memory.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/io/mapped_file_input.cpp5
-rw-r--r--vespalib/src/vespa/vespalib/net/selector.cpp7
-rw-r--r--vespalib/src/vespa/vespalib/util/hashmap.h6
-rw-r--r--vespalib/src/vespa/vespalib/util/hashmapdata.h2
-rw-r--r--vespalib/src/vespa/vespalib/websocket/acceptor.cpp7
-rw-r--r--vespalib/src/vespa/vespalib/websocket/buffer.cpp6
-rw-r--r--vespalib/src/vespa/vespalib/websocket/connection.cpp8
-rw-r--r--vespalib/src/vespa/vespalib/websocket/frame.cpp6
-rw-r--r--vespalib/src/vespa/vespalib/websocket/handler.cpp6
-rw-r--r--vespalib/src/vespa/vespalib/websocket/key.cpp6
-rw-r--r--vespalog/src/main/java/com/yahoo/log/VespaLevelControllerRepo.java3
222 files changed, 731 insertions, 590 deletions
diff --git a/chain/src/main/java/com/yahoo/component/chain/dependencies/ordering/ComponentNameProvider.java b/chain/src/main/java/com/yahoo/component/chain/dependencies/ordering/ComponentNameProvider.java
index 77e492395ce..5ae2765c074 100644
--- a/chain/src/main/java/com/yahoo/component/chain/dependencies/ordering/ComponentNameProvider.java
+++ b/chain/src/main/java/com/yahoo/component/chain/dependencies/ordering/ComponentNameProvider.java
@@ -48,7 +48,8 @@ class ComponentNameProvider extends NameProvider {
return 1;
}
- public @Override String toString() {
+ @Override
+ public String toString() {
StringBuilder b=new StringBuilder("components [");
for (@SuppressWarnings("rawtypes")
Iterator<ComponentNode> i=nodes.iterator(); i.hasNext(); ) {
diff --git a/component/src/main/java/com/yahoo/component/ComponentId.java b/component/src/main/java/com/yahoo/component/ComponentId.java
index 50417c15b5e..687d0da617a 100644
--- a/component/src/main/java/com/yahoo/component/ComponentId.java
+++ b/component/src/main/java/com/yahoo/component/ComponentId.java
@@ -111,7 +111,8 @@ public final class ComponentId implements Comparable<ComponentId> {
*/
public String stringValue() { return stringValue; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return spec.toString();
}
@@ -126,7 +127,8 @@ public final class ComponentId implements Comparable<ComponentId> {
return c.stringValue().equals(stringValue);
}
- public @Override int hashCode() {
+ @Override
+ public int hashCode() {
return stringValue.hashCode();
}
diff --git a/component/src/main/java/com/yahoo/component/ComponentSpecification.java b/component/src/main/java/com/yahoo/component/ComponentSpecification.java
index 9662eee0f66..af8fbdcdbe1 100644
--- a/component/src/main/java/com/yahoo/component/ComponentSpecification.java
+++ b/component/src/main/java/com/yahoo/component/ComponentSpecification.java
@@ -91,7 +91,8 @@ public final class ComponentSpecification {
*/
public String stringValue() { return stringValue; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return toId().toString();
}
@@ -102,7 +103,8 @@ public final class ComponentSpecification {
return c.stringValue.equals(this.stringValue());
}
- public @Override int hashCode() {
+ @Override
+ public int hashCode() {
return stringValue.hashCode();
}
diff --git a/component/src/main/java/com/yahoo/component/Spec.java b/component/src/main/java/com/yahoo/component/Spec.java
index a3259484b4a..54cf52a3887 100644
--- a/component/src/main/java/com/yahoo/component/Spec.java
+++ b/component/src/main/java/com/yahoo/component/Spec.java
@@ -51,7 +51,8 @@ final class Spec<VERSION> {
}
}
- public @Override String toString() {
+ @Override
+ public String toString() {
if (isNonEmpty(version) || (namespace != null)) {
StringBuilder builder = new StringBuilder(name);
if (isNonEmpty(version)) {
diff --git a/component/src/main/java/com/yahoo/component/provider/FreezableClass.java b/component/src/main/java/com/yahoo/component/provider/FreezableClass.java
index c94c8a0bbac..895f642e315 100644
--- a/component/src/main/java/com/yahoo/component/provider/FreezableClass.java
+++ b/component/src/main/java/com/yahoo/component/provider/FreezableClass.java
@@ -30,7 +30,8 @@ public class FreezableClass implements Freezable {
}
/** Clones this. The clone is <i>not</i> frozen */
- public @Override FreezableClass clone() {
+ @Override
+ public FreezableClass clone() {
try {
FreezableClass clone=(FreezableClass)super.clone();
clone.frozen = false;
diff --git a/component/src/main/java/com/yahoo/component/provider/FreezableComponent.java b/component/src/main/java/com/yahoo/component/provider/FreezableComponent.java
index 9d51b0b5819..d2189c3a48b 100644
--- a/component/src/main/java/com/yahoo/component/provider/FreezableComponent.java
+++ b/component/src/main/java/com/yahoo/component/provider/FreezableComponent.java
@@ -38,7 +38,8 @@ public class FreezableComponent extends AbstractComponent implements Freezable {
}
/** Clones this. The clone will <i>not</i> be frozen */
- public @Override FreezableComponent clone() {
+ @Override
+ public FreezableComponent clone() {
FreezableComponent clone=(FreezableComponent)super.clone();
clone.frozen = false;
return clone;
diff --git a/component/src/main/java/com/yahoo/component/provider/ListenableFreezableClass.java b/component/src/main/java/com/yahoo/component/provider/ListenableFreezableClass.java
index d1d82b2de79..7bb2eae10a5 100644
--- a/component/src/main/java/com/yahoo/component/provider/ListenableFreezableClass.java
+++ b/component/src/main/java/com/yahoo/component/provider/ListenableFreezableClass.java
@@ -34,7 +34,8 @@ public class ListenableFreezableClass extends FreezableClass implements Listenab
}
/** Clones this. The clone is <i>not</i> frozen and has no listeners. */
- public @Override ListenableFreezableClass clone() {
+ @Override
+ public ListenableFreezableClass clone() {
ListenableFreezableClass clone=(ListenableFreezableClass)super.clone();
clone.executionList = new ExecutionList();
return clone;
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/Ranking.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/Ranking.java
index 442673e3a46..37f18e44b91 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/document/Ranking.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/Ranking.java
@@ -42,7 +42,8 @@ public class Ranking implements Cloneable, Serializable {
public void setNormal(boolean n) { this.normal = n; }
/** Returns true if the given rank settings are the same */
- public @Override boolean equals(Object o) {
+ @Override
+ public boolean equals(Object o) {
if ( ! (o instanceof Ranking)) return false;
Ranking other=(Ranking)o;
@@ -52,15 +53,18 @@ public class Ranking implements Cloneable, Serializable {
return true;
}
- public @Override int hashCode() {
+ @Override
+ public int hashCode() {
return java.util.Objects.hash(filter, literal, normal);
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "rank settings [filter: " + filter + ", literal: " + literal + ", normal: "+normal+"]";
}
- public @Override Ranking clone() {
+ @Override
+ public Ranking clone() {
try {
return (Ranking)super.clone();
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/Sorting.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/Sorting.java
index 8c238c104fe..34db554773c 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/document/Sorting.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/Sorting.java
@@ -48,7 +48,8 @@ public final class Sorting implements Cloneable, Serializable {
(strength == other.strength);
}
- public @Override Sorting clone() {
+ @Override
+ public Sorting clone() {
try {
return (Sorting)super.clone();
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java b/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java
index 3eadd381508..b9d7a5953ab 100644
--- a/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java
+++ b/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java
@@ -74,10 +74,12 @@ public class SummaryField extends Field implements Cloneable, TypedKey {
}
public String getName() { return name; }
public String getValue() { return value; }
- public @Override int hashCode() {
+ @Override
+ public int hashCode() {
return name.hashCode() + 17*value.hashCode();
}
- public @Override boolean equals(Object obj) {
+ @Override
+ public boolean equals(Object obj) {
if (!(obj instanceof Property)) {
return false;
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java
index b1f44eb854f..073435a1d53 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java
@@ -28,10 +28,17 @@ public class VespaMetricSet extends MetricSet {
metrics.addAll(getQrserverMetrics());
metrics.addAll(getContainerMetrics());
metrics.addAll(getConfigServerMetrics());
+ metrics.addAll(getOtherMetrics());
return Collections.unmodifiableSet(metrics);
}
+ private static Set<Metric> getOtherMetrics() {
+ Set<Metric> metrics = new LinkedHashSet<>();
+ metrics.add(new Metric("slobrok.heartbeats.failed.count", "slobrok.heartbeats.failed"));
+ return metrics;
+ }
+
private static Set<Metric> getConfigServerMetrics() {
Set<Metric> metrics =new LinkedHashSet<>();
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/Dispatch.java b/config-model/src/main/java/com/yahoo/vespa/model/search/Dispatch.java
index 687531cbe11..2a1e5d70653 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/Dispatch.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/Dispatch.java
@@ -85,7 +85,8 @@ public class Dispatch extends AbstractService implements SearchInterface,
public int getFrtPort() { return getRelativePort(0); }
public int getDispatchPort() { return getRelativePort(1); }
- public @Override int getHealthPort() { return getRelativePort(2); }
+ @Override
+ public int getHealthPort() { return getRelativePort(2); }
/**
* Twice the default of the number of threads in the container.
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/NodeFlavorTuning.java b/config-model/src/main/java/com/yahoo/vespa/model/search/NodeFlavorTuning.java
index 20feab7dfd8..e4940997ac8 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/NodeFlavorTuning.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/NodeFlavorTuning.java
@@ -50,7 +50,7 @@ public class NodeFlavorTuning implements ProtonConfig.Producer {
}
private void tuneDocumentStoreNumThreads(ProtonConfig.Summary.Log.Builder builder) {
- builder.numthreads(max(1, (int)nodeFlavor.getMinCpuCores()/2));
+ builder.numthreads(max(8, (int)nodeFlavor.getMinCpuCores()/2));
}
private void tuneFlushStrategyMemoryLimits(ProtonConfig.Flush.Memory.Builder builder) {
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/NodeFlavorTuningTest.java b/config-model/src/test/java/com/yahoo/vespa/model/search/NodeFlavorTuningTest.java
index f5046194a0b..67e1221e61c 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/search/NodeFlavorTuningTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/search/NodeFlavorTuningTest.java
@@ -46,11 +46,11 @@ public class NodeFlavorTuningTest {
@Test
public void require_that_documentstore_numthreads_is_based_on_num_cores() {
- assertDocumentStoreNumThreads(1, 0);
- assertDocumentStoreNumThreads(1, 1.0);
- assertDocumentStoreNumThreads(1, 3.0);
- assertDocumentStoreNumThreads(2, 4.0);
- assertDocumentStoreNumThreads(4, 8.0);
+ assertDocumentStoreNumThreads(8, 0);
+ assertDocumentStoreNumThreads(8, 1.0);
+ assertDocumentStoreNumThreads(8, 3.0);
+ assertDocumentStoreNumThreads(8, 4.0);
+ assertDocumentStoreNumThreads(8, 8.0);
assertDocumentStoreNumThreads(12, 24.0);
assertDocumentStoreNumThreads(16, 32.0);
assertDocumentStoreNumThreads(24, 48.0);
diff --git a/container-di/src/main/scala/com/yahoo/container/di/Container.scala b/container-di/src/main/scala/com/yahoo/container/di/Container.scala
index 0bd5b8264d6..cdec5dca04d 100644
--- a/container-di/src/main/scala/com/yahoo/container/di/Container.scala
+++ b/container-di/src/main/scala/com/yahoo/container/di/Container.scala
@@ -6,6 +6,7 @@ import java.util.logging.{Level, Logger}
import com.google.inject.{Guice, Injector}
import com.yahoo.config._
+import com.yahoo.config.subscription.ConfigInterruptedException
import com.yahoo.container.bundle.BundleInstantiationSpecification
import com.yahoo.container.di.ConfigRetriever.{BootstrapConfigs, ComponentsConfigs}
import com.yahoo.container.di.Container._
@@ -62,6 +63,7 @@ class Container(
} catch {
case userException: ComponentConstructorException =>
invalidateGeneration(oldGraph.generation, userException)
+ // TODO: Wrap userException in an Error when generation==0 (+ unit test that Error is thrown)
throw userException
case t: Throwable =>
invalidateGeneration(oldGraph.generation, t)
@@ -92,6 +94,7 @@ class Container(
}
}
+ // TODO: move to ConfiguredApplication
def logAndDie(message: String, cause: Throwable): Unit = {
log.log(Level.SEVERE, message, cause)
try {
@@ -102,13 +105,10 @@ class Container(
Process.logAndDie("Exited for reason (repeated from above):", cause)
}
- val message = newGraphErrorMessage(generation, cause)
- generation match {
- // Disabled, as it breaks application based tests.
- // case 0 => logAndDie(message, cause)
- case _ =>
- log.log(Level.WARNING, message, cause)
- leastGeneration = max(configurer.getComponentsGeneration, configurer.getBootstrapGeneration) + 1
+ leastGeneration = max(configurer.getComponentsGeneration, configurer.getBootstrapGeneration) + 1
+ cause match {
+ case _: InterruptedException | _: ConfigInterruptedException => // Normal during shutdown, do not log anything.
+ case _ => log.log(Level.WARNING, newGraphErrorMessage(generation, cause), cause)
}
}
diff --git a/container-search/src/main/java/com/yahoo/prelude/query/TermType.java b/container-search/src/main/java/com/yahoo/prelude/query/TermType.java
index 7f88cfd2a9b..224fa8e92fc 100644
--- a/container-search/src/main/java/com/yahoo/prelude/query/TermType.java
+++ b/container-search/src/main/java/com/yahoo/prelude/query/TermType.java
@@ -87,6 +87,7 @@ public class TermType {
return name.hashCode();
}
- public @Override String toString() { return "term type '" + name + "'"; }
+ @Override
+ public String toString() { return "term type '" + name + "'"; }
}
diff --git a/container-search/src/main/java/com/yahoo/prelude/query/WordItem.java b/container-search/src/main/java/com/yahoo/prelude/query/WordItem.java
index a89231b30ae..29b4bce1046 100644
--- a/container-search/src/main/java/com/yahoo/prelude/query/WordItem.java
+++ b/container-search/src/main/java/com/yahoo/prelude/query/WordItem.java
@@ -93,10 +93,12 @@ public class WordItem extends TermItem {
* Returns this word as it should be used in executing the query.
* This is usually (but not always) a normalized and stemmed form
*/
- public @Override String stringValue() { return word; }
+ @Override
+ public String stringValue() { return word; }
/** Same as #setWord */
- public @Override void setValue(String value) { setWord(value); }
+ @Override
+ public void setValue(String value) { setWord(value); }
/**
* Get the word exactly as received in the request.
diff --git a/container-search/src/main/java/com/yahoo/prelude/querytransform/PhraseMatcher.java b/container-search/src/main/java/com/yahoo/prelude/querytransform/PhraseMatcher.java
index 86fdee2bad9..12a904a29e2 100644
--- a/container-search/src/main/java/com/yahoo/prelude/querytransform/PhraseMatcher.java
+++ b/container-search/src/main/java/com/yahoo/prelude/querytransform/PhraseMatcher.java
@@ -389,7 +389,8 @@ public class PhraseMatcher {
public int getLength() { return 1; }
- public @Override TermItem getItem(int index) {
+ @Override
+ public TermItem getItem(int index) {
if (index!=0) throw new IndexOutOfBoundsException("No word at " + index + " in " + this);
return item;
}
@@ -455,7 +456,8 @@ public class PhraseMatcher {
return startIndex==0 && length==owner.getItemCount();
}
- public @Override TermItem getItem(int index) {
+ @Override
+ public TermItem getItem(int index) {
adjustIfBackingChanged();
return (TermItem)owner.getItem(startIndex+index);
}
diff --git a/container-search/src/main/java/com/yahoo/prelude/searcher/MultipleResultsSearcher.java b/container-search/src/main/java/com/yahoo/prelude/searcher/MultipleResultsSearcher.java
index ac2196bb9f5..2baa4698145 100644
--- a/container-search/src/main/java/com/yahoo/prelude/searcher/MultipleResultsSearcher.java
+++ b/container-search/src/main/java/com/yahoo/prelude/searcher/MultipleResultsSearcher.java
@@ -26,7 +26,8 @@ public class MultipleResultsSearcher extends Searcher {
private static final CompoundName maxTimesRetrieveHeterogeneousHitsName=new CompoundName(propertyPrefix + "maxTimesRetrieveHeterogeneousHits");
private static final CompoundName numHits=new CompoundName(propertyPrefix + "numHits");
- public @Override Result search(Query query, Execution e) {
+ @Override
+ public Result search(Query query, Execution e) {
try {
Parameters parameters = new Parameters(query);
diff --git a/container-search/src/main/java/com/yahoo/search/Searcher.java b/container-search/src/main/java/com/yahoo/search/Searcher.java
index 69025271430..cf41b01144e 100644
--- a/container-search/src/main/java/com/yahoo/search/Searcher.java
+++ b/container-search/src/main/java/com/yahoo/search/Searcher.java
@@ -174,7 +174,8 @@ public abstract class Searcher extends Processor {
protected Logger getLogger() { return logger; }
/** Returns "searcher 'getId()'" */
- public @Override String toString() {
+ @Override
+ public String toString() {
return "searcher '" + getIdString() + "'";
}
diff --git a/container-search/src/main/java/com/yahoo/search/cluster/ClusterSearcher.java b/container-search/src/main/java/com/yahoo/search/cluster/ClusterSearcher.java
index f660f39656d..527d44b16ca 100644
--- a/container-search/src/main/java/com/yahoo/search/cluster/ClusterSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/cluster/ClusterSearcher.java
@@ -313,7 +313,8 @@ public abstract class ClusterSearcher<T> extends PingableSearcher implements Nod
getLogger().log(level, sb.toString());
}
- public @Override void deconstruct() {
+ @Override
+ public void deconstruct() {
super.deconstruct();
monitor.shutdown();
}
diff --git a/container-search/src/main/java/com/yahoo/search/federation/http/ConfiguredHTTPClientSearcher.java b/container-search/src/main/java/com/yahoo/search/federation/http/ConfiguredHTTPClientSearcher.java
index 66bb678e983..594481b667d 100644
--- a/container-search/src/main/java/com/yahoo/search/federation/http/ConfiguredHTTPClientSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/federation/http/ConfiguredHTTPClientSearcher.java
@@ -29,7 +29,8 @@ public abstract class ConfiguredHTTPClientSearcher extends HTTPClientSearcher {
}
/** Forwards to the next in chain fill(result,summaryName) */
- public @Override void fill(Result result,String summaryName, Execution execution,Connection connection) {
+ @Override
+ public void fill(Result result,String summaryName, Execution execution,Connection connection) {
execution.fill(result,summaryName);
}
diff --git a/container-search/src/main/java/com/yahoo/search/federation/http/ConfiguredHTTPProviderSearcher.java b/container-search/src/main/java/com/yahoo/search/federation/http/ConfiguredHTTPProviderSearcher.java
index 25253f768bd..8e3225703f6 100644
--- a/container-search/src/main/java/com/yahoo/search/federation/http/ConfiguredHTTPProviderSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/federation/http/ConfiguredHTTPProviderSearcher.java
@@ -62,7 +62,8 @@ public abstract class ConfiguredHTTPProviderSearcher extends HTTPProviderSearche
* Override this to provider multi-phase result filling towards a backend.
* This default implementation does nothing.
*/
- public @Override void fill(Result result,String summaryName, Execution execution,Connection connection) {
+ @Override
+ public void fill(Result result,String summaryName, Execution execution,Connection connection) {
}
}
diff --git a/container-search/src/main/java/com/yahoo/search/intent/model/Intent.java b/container-search/src/main/java/com/yahoo/search/intent/model/Intent.java
index 25962090a69..bdf0caaac6d 100644
--- a/container-search/src/main/java/com/yahoo/search/intent/model/Intent.java
+++ b/container-search/src/main/java/com/yahoo/search/intent/model/Intent.java
@@ -25,15 +25,18 @@ public class Intent {
/** Returns the id of this intent, never null */
public String getId() { return id; }
- public @Override int hashCode() { return id.hashCode(); }
+ @Override
+ public int hashCode() { return id.hashCode(); }
- public @Override boolean equals(Object other) {
+ @Override
+ public boolean equals(Object other) {
if (other==this) return true;
if ( ! (other instanceof Intent)) return false;
return this.id.equals(((Intent)other).id);
}
/** Returns the id of this intent */
- public @Override String toString() { return id; }
+ @Override
+ public String toString() { return id; }
}
diff --git a/container-search/src/main/java/com/yahoo/search/intent/model/IntentNode.java b/container-search/src/main/java/com/yahoo/search/intent/model/IntentNode.java
index 113bad46312..345c041d212 100644
--- a/container-search/src/main/java/com/yahoo/search/intent/model/IntentNode.java
+++ b/container-search/src/main/java/com/yahoo/search/intent/model/IntentNode.java
@@ -22,7 +22,8 @@ public class IntentNode extends ParentNode<SourceNode> {
public void setIntent(Intent intent) { this.intent=intent; }
/** Returns intent:probability */
- public @Override String toString() {
+ @Override
+ public String toString() {
return intent + ":" + getScore();
}
diff --git a/container-search/src/main/java/com/yahoo/search/intent/model/InterpretationNode.java b/container-search/src/main/java/com/yahoo/search/intent/model/InterpretationNode.java
index d54025bb0c6..9101d977e16 100644
--- a/container-search/src/main/java/com/yahoo/search/intent/model/InterpretationNode.java
+++ b/container-search/src/main/java/com/yahoo/search/intent/model/InterpretationNode.java
@@ -28,7 +28,8 @@ public class InterpretationNode extends ParentNode<IntentNode> {
}
/** Returns the probability of the interpretation of this */
- public @Override double getScore() {
+ @Override
+ public double getScore() {
return interpretation.getProbability();
}
@@ -38,7 +39,8 @@ public class InterpretationNode extends ParentNode<IntentNode> {
}
/** Returns interpretations toString() */
- public @Override String toString() {
+ @Override
+ public String toString() {
return interpretation.toString();
}
diff --git a/container-search/src/main/java/com/yahoo/search/intent/model/Source.java b/container-search/src/main/java/com/yahoo/search/intent/model/Source.java
index f224612f23f..cd6b8cca28d 100644
--- a/container-search/src/main/java/com/yahoo/search/intent/model/Source.java
+++ b/container-search/src/main/java/com/yahoo/search/intent/model/Source.java
@@ -23,15 +23,18 @@ public class Source {
/** Returns the id of this source, never null */
public String getId() { return id; }
- public @Override int hashCode() { return id.hashCode(); }
+ @Override
+ public int hashCode() { return id.hashCode(); }
- public @Override boolean equals(Object other) {
+ @Override
+ public boolean equals(Object other) {
if (other==this) return true;
if ( ! (other instanceof Source)) return false;
return this.id.equals(((Source)other).id);
}
/** Returns the id of this source */
- public @Override String toString() { return id; }
+ @Override
+ public String toString() { return id; }
}
diff --git a/container-search/src/main/java/com/yahoo/search/intent/model/SourceNode.java b/container-search/src/main/java/com/yahoo/search/intent/model/SourceNode.java
index 84c98b8c723..4fcf93809ef 100644
--- a/container-search/src/main/java/com/yahoo/search/intent/model/SourceNode.java
+++ b/container-search/src/main/java/com/yahoo/search/intent/model/SourceNode.java
@@ -34,7 +34,8 @@ public class SourceNode extends Node {
}
/** Returns source:appropriateness */
- public @Override String toString() {
+ @Override
+ public String toString() {
return source + ":" + getScore();
}
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/PageTemplate.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/PageTemplate.java
index 8c421feae47..915b44ce5e0 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/PageTemplate.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/PageTemplate.java
@@ -49,7 +49,8 @@ public final class PageTemplate extends FreezableComponent implements PageElemen
return Collections.unmodifiableSet(sourceVisitor.getSources());
}
- public @Override void freeze() {
+ @Override
+ public void freeze() {
if (isFrozen()) return;
resolvePlaceholders();
section.freeze();
@@ -70,12 +71,14 @@ public final class PageTemplate extends FreezableComponent implements PageElemen
}
/** Accepts a visitor to this structure */
- public @Override void accept(PageTemplateVisitor visitor) {
+ @Override
+ public void accept(PageTemplateVisitor visitor) {
visitor.visit(this);
section.accept(visitor);
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "page template '" + getId() + "'";
}
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderMappingVisitor.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderMappingVisitor.java
index de19e8ab747..8dcfde01d20 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderMappingVisitor.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderMappingVisitor.java
@@ -21,7 +21,8 @@ class PlaceholderMappingVisitor extends PageTemplateVisitor {
private Map<String, MapChoice> placeholderIdToChoice=new LinkedHashMap<>();
- public @Override void visit(MapChoice mapChoice) {
+ @Override
+ public void visit(MapChoice mapChoice) {
List<String> placeholderIds=mapChoice.placeholderIds();
for (String placeholderId : placeholderIds) {
MapChoice existingChoice=placeholderIdToChoice.put(placeholderId,mapChoice);
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderReferenceCreatingVisitor.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderReferenceCreatingVisitor.java
index c464dd3dedc..8f1413c8c63 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderReferenceCreatingVisitor.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/PlaceholderReferenceCreatingVisitor.java
@@ -20,7 +20,8 @@ class PlaceholderReferenceCreatingVisitor extends PageTemplateVisitor {
this.placeholderIdToChoice=placeholderIdToChoice;
}
- public @Override void visit(Placeholder placeholder) {
+ @Override
+ public void visit(Placeholder placeholder) {
MapChoice choice=placeholderIdToChoice.get(placeholder.getId());
if (choice==null)
throw new IllegalArgumentException(placeholder + " is not referenced by any choice");
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/RelevanceComparator.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/RelevanceComparator.java
index 5349d9f2aaa..2ae95dc97d1 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/RelevanceComparator.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/RelevanceComparator.java
@@ -19,7 +19,8 @@ class RelevanceComparator extends ChainableComparator {
super(secondaryComparator);
}
- public @Override int compare(Hit h1,Hit h2) {
+ @Override
+ public int compare(Hit h1,Hit h2) {
int relevanceComparison=h2.getRelevance().compareTo(h1.getRelevance());
if (relevanceComparison!=0) return relevanceComparison;
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/Resolution.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/Resolution.java
index 3ee3e3aeef0..6cfe8be50d3 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/Resolution.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/Resolution.java
@@ -59,7 +59,8 @@ public class Resolution {
return resolution;
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "a resolution of " + choiceResolutions.size() + " choices";
}
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/Resolver.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/Resolver.java
index 6415dad37ec..1bb46ac14a6 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/Resolver.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/Resolver.java
@@ -98,12 +98,14 @@ public abstract class Resolver extends AbstractComponent {
this.resolution=resolution;
}
- public @Override void visit(Choice choice) {
+ @Override
+ public void visit(Choice choice) {
if (choice.alternatives().size()<2) return; // No choice...
resolve(choice,query,result,resolution);
}
- public @Override void visit(MapChoice choice) {
+ @Override
+ public void visit(MapChoice choice) {
resolve(choice,query,result,resolution);
}
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/SourceOrderComparator.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/SourceOrderComparator.java
index e0185554066..a0db7c74ecd 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/SourceOrderComparator.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/engine/SourceOrderComparator.java
@@ -34,7 +34,8 @@ class SourceOrderComparator extends ChainableComparator {
this.sourceOrder=sourceOrder;
}
- public @Override int compare(Hit h1,Hit h2) {
+ @Override
+ public int compare(Hit h1,Hit h2) {
int primaryOrder=sourceOrderCompare(h1,h2);
if (primaryOrder!=0) return primaryOrder;
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Layout.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Layout.java
index 4100ca5504c..f7df75bffc2 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Layout.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Layout.java
@@ -27,9 +27,11 @@ public class Layout {
public String getName() { return name; }
- public @Override int hashCode() { return name.hashCode(); }
+ @Override
+ public int hashCode() { return name.hashCode(); }
- public @Override boolean equals(Object o) {
+ @Override
+ public boolean equals(Object o) {
if (o==this) return true;
if (! (o instanceof Layout)) return false;
Layout other=(Layout)o;
@@ -45,6 +47,7 @@ public class Layout {
return new Layout(layout);
}
- public @Override String toString() { return "layout '" + name + "'"; }
+ @Override
+ public String toString() { return "layout '" + name + "'"; }
}
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/MapChoice.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/MapChoice.java
index ccfad1673aa..bff04df2ee8 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/MapChoice.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/MapChoice.java
@@ -54,7 +54,8 @@ public class MapChoice extends AbstractChoice {
}
/** Accepts a visitor to this structure */
- public @Override void accept(PageTemplateVisitor visitor) {
+ @Override
+ public void accept(PageTemplateVisitor visitor) {
visitor.visit(this);
for (List<PageElement> valueEntry : values)
for (PageElement value : valueEntry)
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Placeholder.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Placeholder.java
index 0eb98f329cb..79743194c74 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Placeholder.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Placeholder.java
@@ -26,14 +26,17 @@ public class Placeholder implements PageElement {
public void setValueContainer(MapChoice valueContainer) { this.valueContainer=valueContainer; }
- public @Override void freeze() {}
+ @Override
+ public void freeze() {}
/** Accepts a visitor to this structure */
- public @Override void accept(PageTemplateVisitor visitor) {
+ @Override
+ public void accept(PageTemplateVisitor visitor) {
visitor.visit(this);
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "source placeholder '" + id + "'";
}
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Renderer.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Renderer.java
index c3a46dbee8b..261df787b80 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Renderer.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Renderer.java
@@ -71,17 +71,20 @@ public final class Renderer extends FreezableClass implements PageElement {
*/
public Map<String,String> parameters() { return parameters; }
- public @Override void freeze() {
+ @Override
+ public void freeze() {
if (isFrozen()) return;
super.freeze();
parameters = Collections.unmodifiableMap(parameters);
}
/** Accepts a visitor to this structure */
- public @Override void accept(PageTemplateVisitor visitor) {
+ @Override
+ public void accept(PageTemplateVisitor visitor) {
visitor.visit(this);
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "renderer '" + name + "'";
}
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Section.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Section.java
index 67f67cb8538..b0f49eddc83 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Section.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Section.java
@@ -149,7 +149,8 @@ public class Section extends FreezableClass implements PageElement {
this.min=min;
}
- public @Override void freeze() {
+ @Override
+ public void freeze() {
if (isFrozen()) return;
for (PageElement element : elements)
@@ -163,13 +164,15 @@ public class Section extends FreezableClass implements PageElement {
}
/** Accepts a visitor to this structure */
- public @Override void accept(PageTemplateVisitor visitor) {
+ @Override
+ public void accept(PageTemplateVisitor visitor) {
visitor.visit(this);
for (PageElement element : elements)
element.accept(visitor);
}
- public @Override String toString() {
+ @Override
+ public String toString() {
if (id==null || id.isEmpty()) return "a section";
return "section '" + id + "'";
}
diff --git a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Source.java b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Source.java
index de1cadff5db..7877aae5ca8 100644
--- a/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Source.java
+++ b/container-search/src/main/java/com/yahoo/search/pagetemplates/model/Source.java
@@ -75,7 +75,8 @@ public class Source extends FreezableClass implements PageElement {
*/
public Map<String,String> parameters() { return parameters; }
- public @Override void freeze() {
+ @Override
+ public void freeze() {
if (isFrozen()) return;
for (PageElement element : renderers) {
if (element instanceof Renderer) {
@@ -103,13 +104,15 @@ public class Source extends FreezableClass implements PageElement {
}
/** Accepts a visitor to this structure */
- public @Override void accept(PageTemplateVisitor visitor) {
+ @Override
+ public void accept(PageTemplateVisitor visitor) {
visitor.visit(this);
for (PageElement renderer : renderers)
renderer.accept(visitor);
}
- public @Override int hashCode() {
+ @Override
+ public int hashCode() {
if (isFrozen()) return hashCode;
int hashCode=name.hashCode();
int i=0;
@@ -118,7 +121,8 @@ public class Source extends FreezableClass implements PageElement {
return hashCode;
}
- public @Override boolean equals(Object other) {
+ @Override
+ public boolean equals(Object other) {
if (other==this) return true;
if (! (other instanceof Source)) return false;
Source otherSource=(Source)other;
@@ -130,7 +134,8 @@ public class Source extends FreezableClass implements PageElement {
return true;
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "source '" + name + "'";
}
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/AllValuesQueryProfileVisitor.java b/container-search/src/main/java/com/yahoo/search/query/profile/AllValuesQueryProfileVisitor.java
index ab8cd49047d..cedbd45e831 100644
--- a/container-search/src/main/java/com/yahoo/search/query/profile/AllValuesQueryProfileVisitor.java
+++ b/container-search/src/main/java/com/yahoo/search/query/profile/AllValuesQueryProfileVisitor.java
@@ -19,11 +19,13 @@ final class AllValuesQueryProfileVisitor extends PrefixQueryProfileVisitor {
super(prefix);
}
- public @Override void onValue(String localName, Object value, DimensionBinding binding, QueryProfile owner) {
+ @Override
+ public void onValue(String localName, Object value, DimensionBinding binding, QueryProfile owner) {
putValue(localName, value, values);
}
- public @Override void onQueryProfileInsidePrefix(QueryProfile profile, DimensionBinding binding, QueryProfile owner) {
+ @Override
+ public void onQueryProfileInsidePrefix(QueryProfile profile, DimensionBinding binding, QueryProfile owner) {
putValue("", profile.getValue(), values);
}
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileRegistry.java b/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileRegistry.java
index a4bca752d18..54b702720b2 100644
--- a/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileRegistry.java
+++ b/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileRegistry.java
@@ -77,7 +77,8 @@ public class QueryProfileRegistry extends ComponentRegistry<QueryProfile> {
}
/** Freezes this, and all owned query profiles and query profile types */
- public @Override void freeze() {
+ @Override
+ public void freeze() {
if (isFrozen()) return;
queryProfileTypeRegistry.freeze();
for (QueryProfile queryProfile : allComponents())
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariant.java b/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariant.java
index 05bf7055822..41b5331259d 100644
--- a/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariant.java
+++ b/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariant.java
@@ -88,7 +88,8 @@ public class QueryProfileVariant implements Cloneable, Comparable<QueryProfileVa
* <b>Note:</b> This ordering is not consistent with equals - it returns 0 when the same dimensions
* are <i>set</i>, regardless of what they are set <i>to</i>.
*/
- public @Override int compareTo(QueryProfileVariant other) {
+ @Override
+ public int compareTo(QueryProfileVariant other) {
return this.dimensionValues.compareTo(other.dimensionValues);
}
@@ -150,7 +151,8 @@ public class QueryProfileVariant implements Cloneable, Comparable<QueryProfileVa
}
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "query profile variant for " + dimensionValues;
}
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariants.java b/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariants.java
index 705ba7d3d29..4512168a046 100644
--- a/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariants.java
+++ b/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariants.java
@@ -390,7 +390,8 @@ public class QueryProfileVariants implements Freezable, Cloneable {
}
}
- public @Override FieldValues clone() {
+ @Override
+ public FieldValues clone() {
try {
if (frozen) return this;
FieldValues clone=(FieldValues)super.clone();
@@ -444,7 +445,8 @@ public class QueryProfileVariants implements Freezable, Cloneable {
* <b>Note:</b> This ordering is not consistent with equals - it returns 0 when the same dimensions
* are <i>set</i>, regardless of what they are set <i>to</i>.
*/
- public @Override int compareTo(FieldValue other) {
+ @Override
+ public int compareTo(FieldValue other) {
return this.dimensionValues.compareTo(other.dimensionValues);
}
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/SingleValueQueryProfileVisitor.java b/container-search/src/main/java/com/yahoo/search/query/profile/SingleValueQueryProfileVisitor.java
index c6af9e53494..c1bb6c8829e 100644
--- a/container-search/src/main/java/com/yahoo/search/query/profile/SingleValueQueryProfileVisitor.java
+++ b/container-search/src/main/java/com/yahoo/search/query/profile/SingleValueQueryProfileVisitor.java
@@ -30,11 +30,13 @@ final class SingleValueQueryProfileVisitor extends QueryProfileVisitor {
this.allowQueryProfileResult=allowQueryProfileResult;
}
- public @Override String getLocalKey() {
+ @Override
+ public String getLocalKey() {
return name.get(nameIndex);
}
- public @Override boolean enter(String name) {
+ @Override
+ public boolean enter(String name) {
if (nameIndex+1<this.name.size()) {
nameIndex++;
enteringContent=true;
@@ -45,16 +47,19 @@ final class SingleValueQueryProfileVisitor extends QueryProfileVisitor {
return enteringContent;
}
- public @Override void leave(String name) {
+ @Override
+ public void leave(String name) {
nameIndex--;
}
- public @Override void onValue(String key,Object value, DimensionBinding binding, QueryProfile owner) {
+ @Override
+ public void onValue(String key,Object value, DimensionBinding binding, QueryProfile owner) {
if (nameIndex==name.size()-1)
this.value=value;
}
- public @Override void onQueryProfile(QueryProfile profile,DimensionBinding binding, QueryProfile owner) {
+ @Override
+ public void onQueryProfile(QueryProfile profile,DimensionBinding binding, QueryProfile owner) {
if (enteringContent) return; // still waiting for content
if (allowQueryProfileResult)
this.value = profile;
@@ -62,14 +67,16 @@ final class SingleValueQueryProfileVisitor extends QueryProfileVisitor {
this.value = profile.getValue();
}
- public @Override boolean isDone() {
+ @Override
+ public boolean isDone() {
return value!=null;
}
/** Returns the value found during visiting, or null if none */
public Object getResult() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return "a single value visitor (hash " + hashCode() + ") with current value " + value;
}
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/SubstituteString.java b/container-search/src/main/java/com/yahoo/search/query/profile/SubstituteString.java
index d0d18d7ba85..e73dbedaab3 100644
--- a/container-search/src/main/java/com/yahoo/search/query/profile/SubstituteString.java
+++ b/container-search/src/main/java/com/yahoo/search/query/profile/SubstituteString.java
@@ -76,7 +76,8 @@ public class SubstituteString {
}
/** Returns this string in original (unsubstituted) form */
- public @Override String toString() {
+ @Override
+ public String toString() {
return stringValue;
}
@@ -94,11 +95,13 @@ public class SubstituteString {
this.value=value;
}
- public @Override String getValue(Map<String,String> context,Properties substitution) {
+ @Override
+ public String getValue(Map<String,String> context,Properties substitution) {
return value;
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return value;
}
@@ -112,13 +115,15 @@ public class SubstituteString {
this.propertyName=propertyName;
}
- public @Override String getValue(Map<String,String> context,Properties substitution) {
+ @Override
+ public String getValue(Map<String,String> context,Properties substitution) {
Object value=substitution.get(propertyName,context,substitution);
if (value==null) return "";
return String.valueOf(value);
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "%{" + propertyName + "}";
}
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/types/PrimitiveFieldType.java b/container-search/src/main/java/com/yahoo/search/query/profile/types/PrimitiveFieldType.java
index 76b3f78ac2f..887968dc64b 100644
--- a/container-search/src/main/java/com/yahoo/search/query/profile/types/PrimitiveFieldType.java
+++ b/container-search/src/main/java/com/yahoo/search/query/profile/types/PrimitiveFieldType.java
@@ -20,15 +20,19 @@ public class PrimitiveFieldType extends FieldType {
this.primitiveClass=primitiveClass;
}
- public @Override Class getValueClass() { return primitiveClass; }
+ @Override
+ public Class getValueClass() { return primitiveClass; }
- public @Override String stringValue() {
+ @Override
+ public String stringValue() {
return toLowerCase(primitiveClass.getSimpleName());
}
- public @Override String toString() { return "field type " + stringValue(); }
+ @Override
+ public String toString() { return "field type " + stringValue(); }
- public @Override String toInstanceDescription() {
+ @Override
+ public String toInstanceDescription() {
return toLowerCase(primitiveClass.getSimpleName());
}
@@ -37,7 +41,8 @@ public class PrimitiveFieldType extends FieldType {
return convertFrom(object, (QueryProfileRegistry)null);
}
- public @Override Object convertFrom(Object object, QueryProfileRegistry registry) {
+ @Override
+ public Object convertFrom(Object object, QueryProfileRegistry registry) {
if (primitiveClass == object.getClass()) return object;
if (object.getClass() == String.class) return convertFromString((String)object);
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileFieldType.java b/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileFieldType.java
index df52e78c6ef..724931b6c41 100644
--- a/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileFieldType.java
+++ b/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileFieldType.java
@@ -38,17 +38,21 @@ public class QueryProfileFieldType extends FieldType {
/** Returns the query profile type of this, or null if any type works */
public QueryProfileType getQueryProfileType() { return type; }
- public @Override Class<?> getValueClass() { return QueryProfile.class; }
+ @Override
+ public Class<?> getValueClass() { return QueryProfile.class; }
- public @Override String stringValue() {
+ @Override
+ public String stringValue() {
return "query-profile" + (type!=null ? ":" + type.getId().getName() : "");
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "field type " + stringValue();
}
- public @Override String toInstanceDescription() {
+ @Override
+ public String toInstanceDescription() {
return "reference to a query profile" + (type!=null ? " of type '" + type.getId().getName() + "'" : "");
}
diff --git a/container-search/src/main/java/com/yahoo/search/query/properties/PropertyAliases.java b/container-search/src/main/java/com/yahoo/search/query/properties/PropertyAliases.java
index 536e31ba26e..a6ed3427cca 100644
--- a/container-search/src/main/java/com/yahoo/search/query/properties/PropertyAliases.java
+++ b/container-search/src/main/java/com/yahoo/search/query/properties/PropertyAliases.java
@@ -41,17 +41,20 @@ public class PropertyAliases extends Properties {
return (properName != null) ? properName : nameOrAlias;
}
- public @Override Map<String, Object> listProperties(CompoundName property,Map<String,String> context,
+ @Override
+ public Map<String, Object> listProperties(CompoundName property,Map<String,String> context,
com.yahoo.processing.request.Properties substitution) {
return super.listProperties(unalias(property),context,substitution);
}
- public @Override Object get(CompoundName name,Map<String,String> context,
+ @Override
+ public Object get(CompoundName name,Map<String,String> context,
com.yahoo.processing.request.Properties substitution) {
return super.get(unalias(name),context,substitution);
}
- public @Override void set(CompoundName name,Object value,Map<String,String> context) {
+ @Override
+ public void set(CompoundName name,Object value,Map<String,String> context) {
super.set(unalias(name),value,context);
}
diff --git a/container-search/src/main/java/com/yahoo/search/query/properties/PropertyMap.java b/container-search/src/main/java/com/yahoo/search/query/properties/PropertyMap.java
index 76d94f3f0a2..456b0df3fe5 100644
--- a/container-search/src/main/java/com/yahoo/search/query/properties/PropertyMap.java
+++ b/container-search/src/main/java/com/yahoo/search/query/properties/PropertyMap.java
@@ -39,7 +39,8 @@ public class PropertyMap extends Properties {
*/
protected boolean shouldSet(CompoundName name,Object value) { return true; }
- public @Override Object get(CompoundName name, Map<String,String> context,
+ @Override
+ public Object get(CompoundName name, Map<String,String> context,
com.yahoo.processing.request.Properties substitution) {
if ( ! properties.containsKey(name)) return super.get(name,context,substitution);
return properties.get(name);
@@ -52,7 +53,8 @@ public class PropertyMap extends Properties {
return properties;
}
- public @Override PropertyMap clone() {
+ @Override
+ public PropertyMap clone() {
PropertyMap clone = (PropertyMap)super.clone();
clone.properties = new HashMap<>();
for (Map.Entry<CompoundName, Object> entry : this.properties.entrySet()) {
diff --git a/container-search/src/main/java/com/yahoo/search/query/rewrite/QueryRewriteSearcher.java b/container-search/src/main/java/com/yahoo/search/query/rewrite/QueryRewriteSearcher.java
index bb76c1006f2..9c39b93c4ec 100644
--- a/container-search/src/main/java/com/yahoo/search/query/rewrite/QueryRewriteSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/query/rewrite/QueryRewriteSearcher.java
@@ -258,7 +258,8 @@ public abstract class QueryRewriteSearcher extends Searcher {
* - Pass to the next rewriter the query to be used
* for dictionary retrieval<br>
*/
- public @Override Result search(Query query, Execution execution) {
+ @Override
+ public Result search(Query query, Execution execution) {
RewriterUtils.log(logger, query, "Executing " + getRewriterName());
// Check if rewriter is properly initialized
diff --git a/container-search/src/main/java/com/yahoo/search/query/rewrite/SearchChainDispatcherSearcher.java b/container-search/src/main/java/com/yahoo/search/query/rewrite/SearchChainDispatcherSearcher.java
index 589696c4e77..f7f9489174d 100644
--- a/container-search/src/main/java/com/yahoo/search/query/rewrite/SearchChainDispatcherSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/query/rewrite/SearchChainDispatcherSearcher.java
@@ -43,7 +43,8 @@ public class SearchChainDispatcherSearcher extends Searcher {
* param<br>
* - Execute specified search chain if exist
*/
- public @Override Result search(Query query, Execution execution) {
+ @Override
+ public Result search(Query query, Execution execution) {
RewriterUtils.log(logger, query, "Entering SearchChainDispatcherSearcher");
// Retrieve search chain specified by user through REWRITER_CHAIN
diff --git a/container-search/src/main/java/com/yahoo/search/result/HitGroup.java b/container-search/src/main/java/com/yahoo/search/result/HitGroup.java
index e58c3dc847e..3ce808eb75c 100644
--- a/container-search/src/main/java/com/yahoo/search/result/HitGroup.java
+++ b/container-search/src/main/java/com/yahoo/search/result/HitGroup.java
@@ -620,7 +620,8 @@ public class HitGroup extends Hit implements DataList<Hit>, Cloneable, Iterable<
* Returns true if all the hits recursively contained in this
* is cached
*/
- public @Override boolean isCached() {
+ @Override
+ public boolean isCached() {
if (notCachedCount<1) return true;
if (subgroupCount<1) return false; // No need to check below
diff --git a/container-search/src/main/java/com/yahoo/search/result/Relevance.java b/container-search/src/main/java/com/yahoo/search/result/Relevance.java
index df79b64585e..a6a83dc3c5b 100644
--- a/container-search/src/main/java/com/yahoo/search/result/Relevance.java
+++ b/container-search/src/main/java/com/yahoo/search/result/Relevance.java
@@ -45,7 +45,8 @@ public class Relevance implements Comparable<Relevance> {
/**
* Returns the score value as a string
*/
- public @Override String toString() {
+ @Override
+ public String toString() {
return DoubleFormatter.stringValue(score);
}
@@ -67,7 +68,8 @@ public class Relevance implements Comparable<Relevance> {
}
/** Compares relevancy values */
- public @Override boolean equals(Object object) {
+ @Override
+ public boolean equals(Object object) {
if (object==this) return true;
if (!(object instanceof Relevance)) { return false; }
@@ -77,7 +79,8 @@ public class Relevance implements Comparable<Relevance> {
}
/** Returns a hash from the relevancy value */
- public @Override int hashCode() {
+ @Override
+ public int hashCode() {
double hash=getScore()*335451367; // A largish prime
if (hash>-1 && hash<1) hash=1/hash;
return (int) hash;
diff --git a/container-search/src/main/java/com/yahoo/search/searchchain/example/ExampleSearcher.java b/container-search/src/main/java/com/yahoo/search/searchchain/example/ExampleSearcher.java
index 06a4096dc68..afcf5deede7 100644
--- a/container-search/src/main/java/com/yahoo/search/searchchain/example/ExampleSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/searchchain/example/ExampleSearcher.java
@@ -14,7 +14,8 @@ import com.yahoo.search.searchchain.Execution;
*/
public class ExampleSearcher extends Searcher {
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result=execution.search(query);
result.hits().add(new Hit("example",1.0,"examplesearcher"));
return result;
diff --git a/container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java b/container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java
index e59808bdf5d..448098f6f06 100644
--- a/container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java
@@ -94,7 +94,8 @@ public class DocumentSourceSearcher extends Searcher {
addResult(q, r);
}
- public @Override Result search(Query query, Execution execution) {
+ @Override
+ public Result search(Query query, Execution execution) {
queryCount++;
Result r;
r = unFilledResults.get(getQueryKeyClone(query));
@@ -119,7 +120,8 @@ public class DocumentSourceSearcher extends Searcher {
return key;
}
- public @Override void fill(Result result, String summaryClass, Execution execution) {
+ @Override
+ public void fill(Result result, String summaryClass, Execution execution) {
Result filledResult;
filledResult = completelyFilledResults.get(getQueryKeyClone(result.getQuery()));
diff --git a/container-search/src/main/java/com/yahoo/text/interpretation/Interpretation.java b/container-search/src/main/java/com/yahoo/text/interpretation/Interpretation.java
index d80ff80f172..ae328886ede 100644
--- a/container-search/src/main/java/com/yahoo/text/interpretation/Interpretation.java
+++ b/container-search/src/main/java/com/yahoo/text/interpretation/Interpretation.java
@@ -360,7 +360,8 @@ public class Interpretation {
return rootSpan.getTermSpans(term);
}
- public @Override String toString() {
+ @Override
+ public String toString() {
StringBuilder sb = new StringBuilder();
Map<AnnotationClass, List<Annotations>> annotations = getAll();
Iterator<Map.Entry<AnnotationClass,List<Annotations>>> mapIterator = annotations.entrySet().iterator();
diff --git a/container-search/src/test/java/com/yahoo/prelude/templates/test/TilingTestCase.java b/container-search/src/test/java/com/yahoo/prelude/templates/test/TilingTestCase.java
index 40d68a29a71..35beb5cb96c 100644
--- a/container-search/src/test/java/com/yahoo/prelude/templates/test/TilingTestCase.java
+++ b/container-search/src/test/java/com/yahoo/prelude/templates/test/TilingTestCase.java
@@ -112,7 +112,8 @@ public class TilingTestCase extends junit.framework.TestCase {
private static class TiledResultProducer extends Searcher {
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result=new Result(query);
result.setTotalHitCount(2800000000l);
@@ -256,7 +257,8 @@ public class TilingTestCase extends junit.framework.TestCase {
private static class TiledResultProducer2 extends Searcher {
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result=new Result(query);
result.setTotalHitCount(1);
diff --git a/container-search/src/test/java/com/yahoo/search/cluster/test/ClusterSearcherTestCase.java b/container-search/src/test/java/com/yahoo/search/cluster/test/ClusterSearcherTestCase.java
index 2dd3131eb6e..58107513ee2 100644
--- a/container-search/src/test/java/com/yahoo/search/cluster/test/ClusterSearcherTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/cluster/test/ClusterSearcherTestCase.java
@@ -31,7 +31,8 @@ public class ClusterSearcherTestCase extends TestCase {
this.hit = hit;
}
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result = execution.search(query);
result.hits().add(hit);
return result;
@@ -127,15 +128,18 @@ public class ClusterSearcherTestCase extends TestCase {
super(id,searchers,hasher,false);
}
- public @Override Result search(Query query,Execution execution,Searcher searcher) {
+ @Override
+ public Result search(Query query,Execution execution,Searcher searcher) {
return searcher.search(query,execution);
}
- public @Override void fill(Result result,String summaryName,Execution execution,Searcher searcher) {
+ @Override
+ public void fill(Result result,String summaryName,Execution execution,Searcher searcher) {
searcher.fill(result,summaryName,execution);
}
- public @Override Pong ping(Ping ping,Searcher searcher) {
+ @Override
+ public Pong ping(Ping ping,Searcher searcher) {
return new Execution(searcher, Execution.Context.createContextStub()).ping(ping);
}
diff --git a/container-search/src/test/java/com/yahoo/search/cluster/test/ClusteredConnectionTestCase.java b/container-search/src/test/java/com/yahoo/search/cluster/test/ClusteredConnectionTestCase.java
index 06686e8777a..01fea6f0842 100644
--- a/container-search/src/test/java/com/yahoo/search/cluster/test/ClusteredConnectionTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/cluster/test/ClusteredConnectionTestCase.java
@@ -161,17 +161,20 @@ public class ClusteredConnectionTestCase extends junit.framework.TestCase {
super(componentId,connections,false);
}
- public @Override Result search(Query query,Execution execution,Connection connection) {
+ @Override
+ public Result search(Query query,Execution execution,Connection connection) {
Result result=new Result(query);
result.hits().add(new Hit("from:" + connection.getResponse()));
return result;
}
- public @Override void fill(Result result,String summary,Execution execution,Connection connection) {
+ @Override
+ public void fill(Result result,String summary,Execution execution,Connection connection) {
result.hits().get(0).fields().put("filled",connection.getResponse());
}
- public @Override Pong ping(Ping ping,Connection connection) {
+ @Override
+ public Pong ping(Ping ping,Connection connection) {
Pong pong=new Pong();
if (connection.getResponse()==null)
pong.addError(ErrorMessage.createBackendCommunicationError("No ping response from '" + connection + "'"));
@@ -189,7 +192,8 @@ public class ClusteredConnectionTestCase extends junit.framework.TestCase {
this.hashValue = hashValue;
}
- public @Override int hashCode() {
+ @Override
+ public int hashCode() {
return hashValue;
}
diff --git a/container-search/src/test/java/com/yahoo/search/query/profile/config/test/QueryProfileIntegrationTestCase.java b/container-search/src/test/java/com/yahoo/search/query/profile/config/test/QueryProfileIntegrationTestCase.java
index 11698b2b70d..2dd46b54661 100644
--- a/container-search/src/test/java/com/yahoo/search/query/profile/config/test/QueryProfileIntegrationTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/query/profile/config/test/QueryProfileIntegrationTestCase.java
@@ -113,7 +113,8 @@ public class QueryProfileIntegrationTestCase extends junit.framework.TestCase {
public static class DefaultSearcher extends Searcher {
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result=execution.search(query);
result.hits().add(new Hit("from:default"));
return result;
@@ -123,7 +124,8 @@ public class QueryProfileIntegrationTestCase extends junit.framework.TestCase {
public static class TestSearcher extends Searcher {
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result=execution.search(query);
result.hits().add(new Hit("from:test"));
return result;
@@ -135,7 +137,8 @@ public class QueryProfileIntegrationTestCase extends junit.framework.TestCase {
@Provides("SomeObject")
public static class SettingSearcher extends Searcher {
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
SomeObject.setTo(query,new SomeObject());
return execution.search(query);
}
@@ -146,7 +149,8 @@ public class QueryProfileIntegrationTestCase extends junit.framework.TestCase {
@After("SomeObject")
public static class ReceivingSearcher extends Searcher {
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
assertNotNull(SomeObject.getFrom(query));
assertEquals(SomeObject.class,SomeObject.getFrom(query).getClass());
return execution.search(query);
diff --git a/container-search/src/test/java/com/yahoo/search/query/profile/test/CloningTestCase.java b/container-search/src/test/java/com/yahoo/search/query/profile/test/CloningTestCase.java
index 4e68ac92adc..7877e48ea50 100644
--- a/container-search/src/test/java/com/yahoo/search/query/profile/test/CloningTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/query/profile/test/CloningTestCase.java
@@ -194,11 +194,14 @@ public class CloningTestCase extends junit.framework.TestCase {
public void set(String string) { this.string=string; }
- public @Override String toString() { return string; }
+ @Override
+ public String toString() { return string; }
- public @Override int hashCode() { return string.hashCode(); }
+ @Override
+ public int hashCode() { return string.hashCode(); }
- public @Override boolean equals(Object other) {
+ @Override
+ public boolean equals(Object other) {
if (other==this) return true;
if ( ! (other instanceof MutableString)) return false;
return ((MutableString)other).string.equals(string);
@@ -212,7 +215,8 @@ public class CloningTestCase extends junit.framework.TestCase {
super(string);
}
- public @Override CloneableMutableString clone() {
+ @Override
+ public CloneableMutableString clone() {
try {
return (CloneableMutableString)super.clone();
}
diff --git a/container-search/src/test/java/com/yahoo/search/searchchain/config/test/SearchChainConfigurerTestCase.java b/container-search/src/test/java/com/yahoo/search/searchchain/config/test/SearchChainConfigurerTestCase.java
index 4d611e3e842..17475d20292 100644
--- a/container-search/src/test/java/com/yahoo/search/searchchain/config/test/SearchChainConfigurerTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/searchchain/config/test/SearchChainConfigurerTestCase.java
@@ -92,7 +92,8 @@ public class SearchChainConfigurerTestCase {
}
public static abstract class TestSearcher extends Searcher {
- public @Override Result search(Query query, Execution execution) {
+ @Override
+ public Result search(Query query, Execution execution) {
return execution.search(query);
}
}
@@ -234,7 +235,8 @@ public class SearchChainConfigurerTestCase {
this.intConfig = intConfig;
this.stringConfig = stringConfig;
}
- public @Override Result search(Query query, Execution execution) {
+ @Override
+ public Result search(Query query, Execution execution) {
return execution.search(query);
}
}
@@ -244,7 +246,8 @@ public class SearchChainConfigurerTestCase {
public IntSearcher(IntConfig intConfig) {
this.intConfig = intConfig;
}
- public @Override Result search(Query query, Execution execution) {
+ @Override
+ public Result search(Query query, Execution execution) {
return execution.search(query);
}
}
@@ -254,7 +257,8 @@ public class SearchChainConfigurerTestCase {
public StringSearcher(StringConfig stringConfig) {
this.stringConfig = stringConfig;
}
- public @Override Result search(Query query, Execution execution) {
+ @Override
+ public Result search(Query query, Execution execution) {
return execution.search(query);
}
}
diff --git a/container-search/src/test/java/com/yahoo/search/searchchain/config/test/updatesearcher/UpdateSearcher.java b/container-search/src/test/java/com/yahoo/search/searchchain/config/test/updatesearcher/UpdateSearcher.java
index 6c38df8fe08..92bc09c0162 100644
--- a/container-search/src/test/java/com/yahoo/search/searchchain/config/test/updatesearcher/UpdateSearcher.java
+++ b/container-search/src/test/java/com/yahoo/search/searchchain/config/test/updatesearcher/UpdateSearcher.java
@@ -13,7 +13,8 @@ public class UpdateSearcher extends com.yahoo.search.Searcher {
public String test = "update";
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result=execution.search(query);
if (result==null)
result=new Result(query);
diff --git a/container-search/src/test/java/com/yahoo/search/searchchain/test/ExecutionTestCase.java b/container-search/src/test/java/com/yahoo/search/searchchain/test/ExecutionTestCase.java
index 642d8d8cd7e..5b1d99363a3 100644
--- a/container-search/src/test/java/com/yahoo/search/searchchain/test/ExecutionTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/searchchain/test/ExecutionTestCase.java
@@ -219,7 +219,8 @@ public class ExecutionTestCase extends junit.framework.TestCase {
super(new ComponentId(id));
}
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result=execution.search(query);
result.hits().add(new Hit(getId().stringValue() + "-" + (counter++)));
return result;
@@ -229,7 +230,8 @@ public class ExecutionTestCase extends junit.framework.TestCase {
public static class ForwardingSearcher extends Searcher {
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Chain<Searcher> forwardTo=execution.context().searchChainRegistry().getChain("someChainId");
return new Execution(forwardTo,execution.context()).search(query);
@@ -245,7 +247,8 @@ public class ExecutionTestCase extends junit.framework.TestCase {
super(new ComponentId(id));
}
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result=execution.search(query);
Hit hit=new Hit(getId().stringValue() + "-" + counter);
hit.setFillable();
@@ -253,7 +256,8 @@ public class ExecutionTestCase extends junit.framework.TestCase {
return result;
}
- public @Override void fill(Result result,String summaryClass,Execution execution) {
+ @Override
+ public void fill(Result result,String summaryClass,Execution execution) {
result.hits().add(new Hit(getId().stringValue() + "-" + (counter++) + "-filled")); // Not something one would normally do in fill
}
@@ -270,7 +274,8 @@ public class ExecutionTestCase extends junit.framework.TestCase {
@After("com.yahoo.search.searchchain.test.ExecutionTestCase$TestSearcher")
public static class FillingSearcher extends Searcher {
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result=execution.search(query);
execution.fill(result);
return result;
@@ -282,7 +287,8 @@ public class ExecutionTestCase extends junit.framework.TestCase {
@Before("com.yahoo.search.searchchain.test.ExecutionTestCase$TestSearcher")
public static class WorkflowSearcher extends Searcher {
- public @Override Result search(Query query,Execution execution) {
+ @Override
+ public Result search(Query query,Execution execution) {
Result result1=execution.search(query);
Result result2=execution.search(query);
for (Iterator<Hit> i=result2.hits().iterator(); i.hasNext();)
diff --git a/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/MetricsSearcherTestCase.java b/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/MetricsSearcherTestCase.java
index 1fe62c2cd35..0932b202dac 100644
--- a/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/MetricsSearcherTestCase.java
+++ b/container-search/src/test/java/com/yahoo/vespa/streamingvisitors/MetricsSearcherTestCase.java
@@ -114,7 +114,8 @@ public class MetricsSearcherTestCase {
this.implicitlyCreateContext = implicitlyCreateContext;
}
- public @Override Result search(Query query, Execution execution) {
+ @Override
+ public Result search(Query query, Execution execution) {
if (implicitlyCreateContext) {
String loadType = query.properties().getString("streaming.loadtype");
assignContextProperties(query, loadType);
diff --git a/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp b/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp
index ac4c4e597ca..26c44e40467 100644
--- a/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp
+++ b/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp
@@ -627,6 +627,9 @@ struct InitializeNativeTarget {
llvm::InitializeNativeTargetAsmPrinter();
llvm::InitializeNativeTargetAsmParser();
}
+ ~InitializeNativeTarget() {
+ llvm::llvm_shutdown();
+ }
} initialize_native_target;
std::recursive_mutex LLVMWrapper::_global_llvm_lock;
diff --git a/fastlib/src/vespa/fastlib/io/bufferedfile.cpp b/fastlib/src/vespa/fastlib/io/bufferedfile.cpp
index ae498595e35..04376826139 100644
--- a/fastlib/src/vespa/fastlib/io/bufferedfile.cpp
+++ b/fastlib/src/vespa/fastlib/io/bufferedfile.cpp
@@ -1,8 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-// Copyright (C) 2000 Fast Search & Transfer
-#include <vespa/fastos/fastos.h>
-#include <vespa/fastlib/io/bufferedfile.h>
+#include "bufferedfile.h"
namespace {
diff --git a/fastlib/src/vespa/fastlib/io/bufferedinputstream.cpp b/fastlib/src/vespa/fastlib/io/bufferedinputstream.cpp
index 26bab632aeb..dd212ddfd08 100644
--- a/fastlib/src/vespa/fastlib/io/bufferedinputstream.cpp
+++ b/fastlib/src/vespa/fastlib/io/bufferedinputstream.cpp
@@ -1,11 +1,13 @@
// 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 "bufferedinputstream.h"
+#include <cstring>
+#include <cstdint>
Fast_BufferedInputStream::Fast_BufferedInputStream(Fast_InputStream &in, size_t bufferSize)
: Fast_FilterInputStream(in),
_buffer(new char[bufferSize]),
- _bufferSize((_buffer != NULL) ? bufferSize : 0),
+ _bufferSize((_buffer != nullptr) ? bufferSize : 0),
_bufferUsed(0),
_bufferRead(0),
_nextWillFail(false)
diff --git a/fastlib/src/vespa/fastlib/io/bufferedoutputstream.cpp b/fastlib/src/vespa/fastlib/io/bufferedoutputstream.cpp
index b025a5dba25..7377c666cf4 100644
--- a/fastlib/src/vespa/fastlib/io/bufferedoutputstream.cpp
+++ b/fastlib/src/vespa/fastlib/io/bufferedoutputstream.cpp
@@ -11,11 +11,9 @@
* ALL RIGHTS RESERVED
*
******************************************************************************/
-#include <vespa/fastos/fastos.h>
-#include "bufferedoutputstream.h"
-
-
+#include "bufferedoutputstream.h"
+#include <cstring>
Fast_BufferedOutputStream::Fast_BufferedOutputStream(Fast_OutputStream &out,
size_t bufferSize)
@@ -33,7 +31,7 @@ Fast_BufferedOutputStream::Fast_BufferedOutputStream(Fast_OutputStream &out,
Fast_BufferedOutputStream::~Fast_BufferedOutputStream(void)
{
delete [] _buffer;
-};
+}
diff --git a/fastlib/src/vespa/fastlib/io/fileinputstream.cpp b/fastlib/src/vespa/fastlib/io/fileinputstream.cpp
index d501a752cfe..2d00935df79 100644
--- a/fastlib/src/vespa/fastlib/io/fileinputstream.cpp
+++ b/fastlib/src/vespa/fastlib/io/fileinputstream.cpp
@@ -11,10 +11,8 @@
* ALL RIGHTS RESERVED
*
******************************************************************************/
-#include <vespa/fastos/fastos.h>
-#include <limits.h>
-#include <vespa/fastlib/io/fileinputstream.h>
+#include "fileinputstream.h"
Fast_FileInputStream::Fast_FileInputStream(const char *fileName)
: _theFile(new FastOS_File(fileName)),
@@ -23,7 +21,7 @@ Fast_FileInputStream::Fast_FileInputStream(const char *fileName)
_fileOpenedOk = _theFile->OpenReadOnly();
}
-Fast_FileInputStream::~Fast_FileInputStream(void)
+Fast_FileInputStream::~Fast_FileInputStream()
{
Close();
delete _theFile;
diff --git a/fastlib/src/vespa/fastlib/io/fileoutputstream.cpp b/fastlib/src/vespa/fastlib/io/fileoutputstream.cpp
index fddbea0fc41..7f5f6bed1eb 100644
--- a/fastlib/src/vespa/fastlib/io/fileoutputstream.cpp
+++ b/fastlib/src/vespa/fastlib/io/fileoutputstream.cpp
@@ -12,9 +12,8 @@
*
******************************************************************************/
-#include <vespa/fastos/fastos.h>
-#include <vespa/fastlib/io/fileoutputstream.h>
-
+#include "fileoutputstream.h"
+#include <vespa/fastos/file.h>
Fast_FileOutputStream::Fast_FileOutputStream(const char *fileName)
@@ -29,3 +28,15 @@ Fast_FileOutputStream::~Fast_FileOutputStream(void)
_theFile->Close();
delete _theFile;
}
+
+ssize_t
+Fast_FileOutputStream::Write(const void *sourceBuffer, size_t bufferSize) {
+ return _theFile->CheckedWrite(sourceBuffer, bufferSize) ?
+ static_cast<ssize_t>(bufferSize) :
+ static_cast<ssize_t>(-1);
+};
+
+bool
+Fast_FileOutputStream::Close() {
+ return _theFile->Close();
+} \ No newline at end of file
diff --git a/fastlib/src/vespa/fastlib/io/fileoutputstream.h b/fastlib/src/vespa/fastlib/io/fileoutputstream.h
index eb97b3f8207..af7db086ed9 100644
--- a/fastlib/src/vespa/fastlib/io/fileoutputstream.h
+++ b/fastlib/src/vespa/fastlib/io/fileoutputstream.h
@@ -4,6 +4,8 @@
#include "outputstream.h"
+class FastOS_FileInterface;
+
class Fast_FileOutputStream : public Fast_OutputStream
{
private:
@@ -19,12 +21,8 @@ public:
Fast_FileOutputStream(const char *fileName);
~Fast_FileOutputStream();
- ssize_t Write(const void *sourceBuffer, size_t bufferSize) override {
- return _theFile->CheckedWrite(sourceBuffer, bufferSize) ?
- static_cast<ssize_t>(bufferSize) :
- static_cast<ssize_t>(-1);
- };
+ ssize_t Write(const void *sourceBuffer, size_t bufferSize) override;
- bool Close() override { return _theFile->Close(); }
+ bool Close() override;
void Flush() override {}
};
diff --git a/fastlib/src/vespa/fastlib/io/outputstream.h b/fastlib/src/vespa/fastlib/io/outputstream.h
index d09aa6e436a..ba4d74f1a7a 100644
--- a/fastlib/src/vespa/fastlib/io/outputstream.h
+++ b/fastlib/src/vespa/fastlib/io/outputstream.h
@@ -13,8 +13,7 @@
******************************************************************************/
#pragma once
-
-
+#include <cstdlib>
class Fast_OutputStream
{
@@ -22,7 +21,7 @@ public:
virtual ~Fast_OutputStream() { }
- virtual bool Close(void) = 0;
- virtual void Flush(void) = 0;
+ virtual bool Close() = 0;
+ virtual void Flush() = 0;
virtual ssize_t Write(const void *sourceBuffer, size_t bufferSize) = 0;
};
diff --git a/fastlib/src/vespa/fastlib/net/httpchunkedinputstream.cpp b/fastlib/src/vespa/fastlib/net/httpchunkedinputstream.cpp
index e7d40ad9b75..e7386dcc3f4 100644
--- a/fastlib/src/vespa/fastlib/net/httpchunkedinputstream.cpp
+++ b/fastlib/src/vespa/fastlib/net/httpchunkedinputstream.cpp
@@ -12,9 +12,9 @@
*
******************************************************************************/
-#include <vespa/fastos/fastos.h>
-#include <string.h>
-#include <vespa/fastlib/net/httpchunkedinputstream.h>
+#include "httpchunkedinputstream.h"
+#include <cstring>
+#include <cstdlib>
Fast_HTTPChunkedInputStream::Fast_HTTPChunkedInputStream(Fast_InputStream &in)
: Fast_FilterInputStream(in), _chunkSize(0), _inChunk(false),
diff --git a/fastlib/src/vespa/fastlib/net/httpchunkedoutputstream.cpp b/fastlib/src/vespa/fastlib/net/httpchunkedoutputstream.cpp
index 048ac85c8db..915d8e69223 100644
--- a/fastlib/src/vespa/fastlib/net/httpchunkedoutputstream.cpp
+++ b/fastlib/src/vespa/fastlib/net/httpchunkedoutputstream.cpp
@@ -12,9 +12,10 @@
*
******************************************************************************/
-#include <vespa/fastos/fastos.h>
-#include <string.h>
-#include <vespa/fastlib/net/httpchunkedoutputstream.h>
+#include "httpchunkedoutputstream.h"
+#include <cassert>
+#include <cstdio>
+#include <cstring>
Fast_HTTPChunkedOutputStream::Fast_HTTPChunkedOutputStream(Fast_OutputStream &out,
size_t chunkSize)
diff --git a/fastlib/src/vespa/fastlib/net/httpheaderparser.cpp b/fastlib/src/vespa/fastlib/net/httpheaderparser.cpp
index 8f1dadef052..86fe3feabcf 100644
--- a/fastlib/src/vespa/fastlib/net/httpheaderparser.cpp
+++ b/fastlib/src/vespa/fastlib/net/httpheaderparser.cpp
@@ -1,7 +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 "httpheaderparser.h"
#include <vespa/fastlib/io/bufferedinputstream.h>
-#include <vespa/fastlib/net/httpheaderparser.h>
+#include <cstdio>
+#include <cstring>
Fast_HTTPHeaderParser::Fast_HTTPHeaderParser(Fast_BufferedInputStream &in)
: _pushBack(0),
diff --git a/fastlib/src/vespa/fastlib/net/httpheaderparser.h b/fastlib/src/vespa/fastlib/net/httpheaderparser.h
index ccd6c24ed37..94f6bccbdb4 100644
--- a/fastlib/src/vespa/fastlib/net/httpheaderparser.h
+++ b/fastlib/src/vespa/fastlib/net/httpheaderparser.h
@@ -2,6 +2,8 @@
#pragma once
+#include <cstddef>
+
class Fast_BufferedInputStream;
class Fast_HTTPHeaderParser
diff --git a/fastlib/src/vespa/fastlib/net/socket.cpp b/fastlib/src/vespa/fastlib/net/socket.cpp
index 1c7d915dc10..be463088bb3 100644
--- a/fastlib/src/vespa/fastlib/net/socket.cpp
+++ b/fastlib/src/vespa/fastlib/net/socket.cpp
@@ -1,5 +1,5 @@
// 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 "socket.h"
Fast_Socket::~Fast_Socket()
diff --git a/fastlib/src/vespa/fastlib/net/url.cpp b/fastlib/src/vespa/fastlib/net/url.cpp
index 13cb0a5e2a7..a62a5171983 100644
--- a/fastlib/src/vespa/fastlib/net/url.cpp
+++ b/fastlib/src/vespa/fastlib/net/url.cpp
@@ -12,12 +12,9 @@
*
*/
-/**
- * Encode and decode a URL
- */
-#include <vespa/fastos/fastos.h>
#include "url.h"
+#include <cstdio>
void
Fast_URL::decode(const char *encodedURL, char *decodedURL, int bufsize)
diff --git a/fastlib/src/vespa/fastlib/text/apps/extcase.cpp b/fastlib/src/vespa/fastlib/text/apps/extcase.cpp
index 1200465331c..5f7579287e0 100644
--- a/fastlib/src/vespa/fastlib/text/apps/extcase.cpp
+++ b/fastlib/src/vespa/fastlib/text/apps/extcase.cpp
@@ -14,7 +14,6 @@
* ALL RIGHTS RESERVED
*/
-#include <vespa/fastos/fastos.h>
#include <vespa/fastlib/io/bufferedfile.h>
unsigned int lowercase[65536];
diff --git a/fastlib/src/vespa/fastlib/text/apps/unicode_propertydump.cpp b/fastlib/src/vespa/fastlib/text/apps/unicode_propertydump.cpp
index a0ee05b9b5d..8a1260a5355 100644
--- a/fastlib/src/vespa/fastlib/text/apps/unicode_propertydump.cpp
+++ b/fastlib/src/vespa/fastlib/text/apps/unicode_propertydump.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 <vespa/fastos/fastos.h>
+
#include <vespa/fastlib/text/unicodeutil.h>
+#include <vespa/fastos/app.h>
class UnicodePropertyDumpApp : public FastOS_Application
{
diff --git a/fastlib/src/vespa/fastlib/text/apps/unicode_tolowerdump.cpp b/fastlib/src/vespa/fastlib/text/apps/unicode_tolowerdump.cpp
index ffea4d735ba..b000645295a 100644
--- a/fastlib/src/vespa/fastlib/text/apps/unicode_tolowerdump.cpp
+++ b/fastlib/src/vespa/fastlib/text/apps/unicode_tolowerdump.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 <vespa/fastos/fastos.h>
+
#include <vespa/fastlib/text/unicodeutil.h>
+#include <vespa/fastos/app.h>
class UnicodeToLowerDumpApp : public FastOS_Application
{
diff --git a/fastlib/src/vespa/fastlib/text/unicodeutil.cpp b/fastlib/src/vespa/fastlib/text/unicodeutil.cpp
index 822f8044ded..c0c88a61728 100644
--- a/fastlib/src/vespa/fastlib/text/unicodeutil.cpp
+++ b/fastlib/src/vespa/fastlib/text/unicodeutil.cpp
@@ -1,8 +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/fastlib/text/unicodeutil.h>
+#include "unicodeutil.h"
#include <cstdlib>
+#include <cstdint>
+#include <cassert>
#include "unicodeutil-charprops.cpp"
#include "unicodeutil-lowercase.cpp"
@@ -22,7 +23,7 @@ Initialize _G_Initializer;
}
void
-Fast_UnicodeUtil::InitTables(void)
+Fast_UnicodeUtil::InitTables()
{
/**
* Hack for Katakana accent marks (torgeir)
diff --git a/fastlib/src/vespa/fastlib/text/wordfolder.cpp b/fastlib/src/vespa/fastlib/text/wordfolder.cpp
index de4f0daae3e..221960e046c 100644
--- a/fastlib/src/vespa/fastlib/text/wordfolder.cpp
+++ b/fastlib/src/vespa/fastlib/text/wordfolder.cpp
@@ -1,7 +1,7 @@
// 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/fastlib/text/wordfolder.h>
-Fast_WordFolder::~Fast_WordFolder(void)
+#include "wordfolder.h"
+
+Fast_WordFolder::~Fast_WordFolder()
{
}
diff --git a/fastlib/src/vespa/fastlib/util/base64.cpp b/fastlib/src/vespa/fastlib/util/base64.cpp
index c87cba28e5d..7cd9b35edac 100644
--- a/fastlib/src/vespa/fastlib/util/base64.cpp
+++ b/fastlib/src/vespa/fastlib/util/base64.cpp
@@ -6,17 +6,9 @@
* Utility functions for base-64 encoding/decoding.
*****************************************************************************/
-#include <vespa/fastos/fastos.h>
-#include <stdio.h>
-#include <ctype.h>
#include "base64.h"
-
-/**
-*****************************************************************************
-* Define lookup table.
-*
-* @author Aleksander Øhrn
-*****************************************************************************/
+#include <cstdio>
+#include <cctype>
static const char _base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
diff --git a/filedistribution/src/apps/status/status-filedistribution.cpp b/filedistribution/src/apps/status/status-filedistribution.cpp
index 697c7b504af..256266efa54 100644
--- a/filedistribution/src/apps/status/status-filedistribution.cpp
+++ b/filedistribution/src/apps/status/status-filedistribution.cpp
@@ -1,18 +1,17 @@
// 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/log/log.h>
-LOG_SETUP("status-filedistribution");
-
-#include <iostream>
-#include <map>
-#include <thread>
-
-#include <boost/program_options.hpp>
#include <vespa/filedistribution/model/zkfacade.h>
#include <vespa/filedistribution/model/filedistributionmodel.h>
#include <vespa/filedistribution/model/filedistributionmodelimpl.h>
#include <zookeeper/zookeeper.h>
+#include <boost/program_options.hpp>
+
+#include <vespa/log/log.h>
+#include <iostream>
+#include <map>
+#include <thread>
+
+LOG_SETUP("status-filedistribution");
using namespace filedistribution;
using namespace std::literals;
diff --git a/filedistribution/src/vespa/filedistribution/common/componentsdeleter.cpp b/filedistribution/src/vespa/filedistribution/common/componentsdeleter.cpp
index 3c6a265941a..3cb5f4d008f 100644
--- a/filedistribution/src/vespa/filedistribution/common/componentsdeleter.cpp
+++ b/filedistribution/src/vespa/filedistribution/common/componentsdeleter.cpp
@@ -1,5 +1,4 @@
// 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 "componentsdeleter.h"
#include <vespa/log/log.h>
diff --git a/filedistribution/src/vespa/filedistribution/common/exception.cpp b/filedistribution/src/vespa/filedistribution/common/exception.cpp
index c9bb5f43ab0..93d07d69118 100644
--- a/filedistribution/src/vespa/filedistribution/common/exception.cpp
+++ b/filedistribution/src/vespa/filedistribution/common/exception.cpp
@@ -1,5 +1,4 @@
// 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 "exception.h"
namespace filedistribution {
diff --git a/filedistribution/src/vespa/filedistribution/distributor/filedownloader.cpp b/filedistribution/src/vespa/filedistribution/distributor/filedownloader.cpp
index e042ec28870..cbd93eb2e57 100644
--- a/filedistribution/src/vespa/filedistribution/distributor/filedownloader.cpp
+++ b/filedistribution/src/vespa/filedistribution/distributor/filedownloader.cpp
@@ -1,11 +1,7 @@
// 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/filedistribution/model/zkfacade.h>
#include "filedownloader.h"
#include "hostname.h"
-
-#include <iterator>
-#include <algorithm>
+#include <vespa/filedistribution/model/zkfacade.h>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
@@ -17,6 +13,9 @@
#include <libtorrent/torrent_handle.hpp>
#include <libtorrent/bencode.hpp>
+#include <iterator>
+#include <algorithm>
+
#include <vespa/log/log.h>
LOG_SETUP(".filedownloader");
diff --git a/filedistribution/src/vespa/filedistribution/distributor/filedownloadermanager.cpp b/filedistribution/src/vespa/filedistribution/distributor/filedownloadermanager.cpp
index 5b6ad4f83ff..2b143b9c083 100644
--- a/filedistribution/src/vespa/filedistribution/distributor/filedownloadermanager.cpp
+++ b/filedistribution/src/vespa/filedistribution/distributor/filedownloadermanager.cpp
@@ -1,14 +1,13 @@
// 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/log/log.h>
-LOG_SETUP(".filedownloadermanager");
-
#include "filedownloadermanager.h"
#include <iterator>
#include <sstream>
#include <thread>
+#include <vespa/log/log.h>
+LOG_SETUP(".filedownloadermanager");
+
using namespace std::literals;
using filedistribution::FileDownloaderManager;
diff --git a/filedistribution/src/vespa/filedistribution/distributor/scheduler.cpp b/filedistribution/src/vespa/filedistribution/distributor/scheduler.cpp
index 4f75afb4850..ac05a24ad36 100644
--- a/filedistribution/src/vespa/filedistribution/distributor/scheduler.cpp
+++ b/filedistribution/src/vespa/filedistribution/distributor/scheduler.cpp
@@ -1,7 +1,6 @@
// 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 "scheduler.h"
-#include <iostream>
namespace asio = boost::asio;
diff --git a/filedistribution/src/vespa/filedistribution/distributor/state_server_impl.cpp b/filedistribution/src/vespa/filedistribution/distributor/state_server_impl.cpp
index 95a0a1a64ca..6ec9c677687 100644
--- a/filedistribution/src/vespa/filedistribution/distributor/state_server_impl.cpp
+++ b/filedistribution/src/vespa/filedistribution/distributor/state_server_impl.cpp
@@ -1,6 +1,5 @@
// 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 "state_server_impl.h"
namespace filedistribution {
diff --git a/filedistribution/src/vespa/filedistribution/manager/createtorrent.cpp b/filedistribution/src/vespa/filedistribution/manager/createtorrent.cpp
index 52b05cd78be..551e6e0c1cb 100644
--- a/filedistribution/src/vespa/filedistribution/manager/createtorrent.cpp
+++ b/filedistribution/src/vespa/filedistribution/manager/createtorrent.cpp
@@ -1,7 +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 "createtorrent.h"
+#include <libtorrent/torrent_info.hpp>
+#include <boost/filesystem/convenience.hpp>
+
#include <iostream>
#include <fstream>
#include <cmath>
@@ -9,9 +11,6 @@
#include <sstream>
#include <string>
-#include <boost/filesystem/convenience.hpp>
-#include "libtorrent/torrent_info.hpp"
-
namespace fs = boost::filesystem;
namespace {
diff --git a/filedistribution/src/vespa/filedistribution/manager/filedb.cpp b/filedistribution/src/vespa/filedistribution/manager/filedb.cpp
index a5c440b93a0..fc8c8a95442 100644
--- a/filedistribution/src/vespa/filedistribution/manager/filedb.cpp
+++ b/filedistribution/src/vespa/filedistribution/manager/filedb.cpp
@@ -1,5 +1,5 @@
// 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 "filedb.h"
#include <boost/filesystem.hpp>
diff --git a/filedistribution/src/vespa/filedistribution/manager/filedistributionmanager.cpp b/filedistribution/src/vespa/filedistribution/manager/filedistributionmanager.cpp
index 6af340a0ff6..0da6588958f 100644
--- a/filedistribution/src/vespa/filedistribution/manager/filedistributionmanager.cpp
+++ b/filedistribution/src/vespa/filedistribution/manager/filedistributionmanager.cpp
@@ -1,16 +1,16 @@
// 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 "jnistring.h"
+#include "field.h"
+#include "createtorrent.h"
+#include "filedb.h"
#include <vespa/filedistribution/manager/com_yahoo_vespa_filedistribution_FileDistributionManager.h>
-#include <memory>
#include <vespa/filedistribution/model/filedistributionmodel.h>
#include <vespa/filedistribution/model/zkfiledbmodel.h>
#include <vespa/filedistribution/model/mockfiledistributionmodel.h>
#include <vespa/filedistribution/model/zkfacade.h>
-#include "jnistring.h"
-#include "field.h"
-#include "createtorrent.h"
-#include "filedb.h"
+#include <memory>
using namespace filedistribution;
diff --git a/filedistribution/src/vespa/filedistribution/manager/jnistring.h b/filedistribution/src/vespa/filedistribution/manager/jnistring.h
index aa5d459232e..295cfc0fe8b 100644
--- a/filedistribution/src/vespa/filedistribution/manager/jnistring.h
+++ b/filedistribution/src/vespa/filedistribution/manager/jnistring.h
@@ -3,7 +3,7 @@
#include <exception>
#include <string>
-
+#include <vector>
#include <jni.h>
namespace filedistribution {
diff --git a/filedistribution/src/vespa/filedistribution/manager/stderr_logfwd.cpp b/filedistribution/src/vespa/filedistribution/manager/stderr_logfwd.cpp
index a5041554114..0907509bbab 100644
--- a/filedistribution/src/vespa/filedistribution/manager/stderr_logfwd.cpp
+++ b/filedistribution/src/vespa/filedistribution/manager/stderr_logfwd.cpp
@@ -1,11 +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/filedistribution/common/logfwd.h>
-#include <stdarg.h>
#include <iostream>
-#include <stdio.h>
-
+#include <vector>
void filedistribution::logfwd::log_forward(LogLevel level, const char* file, int line, const char* fmt, ...)
diff --git a/filedistribution/src/vespa/filedistribution/model/deployedfilestodownload.cpp b/filedistribution/src/vespa/filedistribution/model/deployedfilestodownload.cpp
index 7829744949f..05ee8db9060 100644
--- a/filedistribution/src/vespa/filedistribution/model/deployedfilestodownload.cpp
+++ b/filedistribution/src/vespa/filedistribution/model/deployedfilestodownload.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 "deployedfilestodownload.h"
+#include "deployedfilestodownload.h"
+#include <vespa/filedistribution/common/logfwd.h>
#include <sstream>
#include <iterator>
-#include <vespa/filedistribution/common/logfwd.h>
-
using filedistribution::DeployedFilesToDownload;
using filedistribution::Path;
diff --git a/frtstream/src/example/test.cpp b/frtstream/src/example/test.cpp
index 5af115f9978..0c230f2d5bf 100644
--- a/frtstream/src/example/test.cpp
+++ b/frtstream/src/example/test.cpp
@@ -1,14 +1,12 @@
// 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/frtstream/frtclientstream.h>
+
#include <iostream>
#include <csignal>
#include <vector>
#include <string>
#include <set>
-#include <vespa/frtstream/frtclientstream.h>
-
-
using namespace std;
using frtstream::FrtClientStream;
using frtstream::Method;
diff --git a/jrt/src/com/yahoo/jrt/DataArray.java b/jrt/src/com/yahoo/jrt/DataArray.java
index 8871b5df6da..aac38d0ff64 100644
--- a/jrt/src/com/yahoo/jrt/DataArray.java
+++ b/jrt/src/com/yahoo/jrt/DataArray.java
@@ -57,7 +57,8 @@ public class DataArray extends Value
public byte[][] asDataArray() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return Arrays.toString(value);
}
diff --git a/jrt/src/com/yahoo/jrt/DataValue.java b/jrt/src/com/yahoo/jrt/DataValue.java
index 284bf2e6a2d..15c45ed62e7 100644
--- a/jrt/src/com/yahoo/jrt/DataValue.java
+++ b/jrt/src/com/yahoo/jrt/DataValue.java
@@ -44,7 +44,8 @@ public class DataValue extends Value
public byte[] asData() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return String.valueOf(value);
}
diff --git a/jrt/src/com/yahoo/jrt/DoubleArray.java b/jrt/src/com/yahoo/jrt/DoubleArray.java
index 3758abe9873..4dd6cf2ba4b 100644
--- a/jrt/src/com/yahoo/jrt/DoubleArray.java
+++ b/jrt/src/com/yahoo/jrt/DoubleArray.java
@@ -47,7 +47,8 @@ public class DoubleArray extends Value
public double[] asDoubleArray() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return Arrays.toString(value);
}
diff --git a/jrt/src/com/yahoo/jrt/DoubleValue.java b/jrt/src/com/yahoo/jrt/DoubleValue.java
index e7739e80150..8bd3caeb970 100644
--- a/jrt/src/com/yahoo/jrt/DoubleValue.java
+++ b/jrt/src/com/yahoo/jrt/DoubleValue.java
@@ -41,7 +41,8 @@ public class DoubleValue extends Value
public double asDouble() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return String.valueOf(value);
}
diff --git a/jrt/src/com/yahoo/jrt/FloatArray.java b/jrt/src/com/yahoo/jrt/FloatArray.java
index 05556e94276..1dd8cf9832b 100644
--- a/jrt/src/com/yahoo/jrt/FloatArray.java
+++ b/jrt/src/com/yahoo/jrt/FloatArray.java
@@ -47,7 +47,8 @@ public class FloatArray extends Value
public float[] asFloatArray() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return Arrays.toString(value);
}
diff --git a/jrt/src/com/yahoo/jrt/FloatValue.java b/jrt/src/com/yahoo/jrt/FloatValue.java
index bfba69f0965..65df64660aa 100644
--- a/jrt/src/com/yahoo/jrt/FloatValue.java
+++ b/jrt/src/com/yahoo/jrt/FloatValue.java
@@ -42,7 +42,8 @@ public class FloatValue extends Value
public float asFloat() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return String.valueOf(value);
}
diff --git a/jrt/src/com/yahoo/jrt/Int16Array.java b/jrt/src/com/yahoo/jrt/Int16Array.java
index fbb7f304872..895d85a5d59 100644
--- a/jrt/src/com/yahoo/jrt/Int16Array.java
+++ b/jrt/src/com/yahoo/jrt/Int16Array.java
@@ -47,7 +47,8 @@ public class Int16Array extends Value
public short[] asInt16Array() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return Arrays.toString(value);
}
diff --git a/jrt/src/com/yahoo/jrt/Int16Value.java b/jrt/src/com/yahoo/jrt/Int16Value.java
index 45c10e09f76..704d566d290 100644
--- a/jrt/src/com/yahoo/jrt/Int16Value.java
+++ b/jrt/src/com/yahoo/jrt/Int16Value.java
@@ -42,7 +42,8 @@ public class Int16Value extends Value
public short asInt16() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return String.valueOf(value);
}
diff --git a/jrt/src/com/yahoo/jrt/Int32Array.java b/jrt/src/com/yahoo/jrt/Int32Array.java
index dddcaf83ddc..bc003fa7246 100644
--- a/jrt/src/com/yahoo/jrt/Int32Array.java
+++ b/jrt/src/com/yahoo/jrt/Int32Array.java
@@ -47,7 +47,8 @@ public class Int32Array extends Value
public int[] asInt32Array() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return Arrays.toString(value);
}
diff --git a/jrt/src/com/yahoo/jrt/Int32Value.java b/jrt/src/com/yahoo/jrt/Int32Value.java
index 0a57014431a..c835181d344 100644
--- a/jrt/src/com/yahoo/jrt/Int32Value.java
+++ b/jrt/src/com/yahoo/jrt/Int32Value.java
@@ -41,7 +41,8 @@ public class Int32Value extends Value
public int asInt32() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return String.valueOf(value);
}
diff --git a/jrt/src/com/yahoo/jrt/Int64Array.java b/jrt/src/com/yahoo/jrt/Int64Array.java
index 00427b9eff4..49a10aa773c 100644
--- a/jrt/src/com/yahoo/jrt/Int64Array.java
+++ b/jrt/src/com/yahoo/jrt/Int64Array.java
@@ -47,7 +47,8 @@ public class Int64Array extends Value
public long[] asInt64Array() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return Arrays.toString(value);
}
diff --git a/jrt/src/com/yahoo/jrt/Int64Value.java b/jrt/src/com/yahoo/jrt/Int64Value.java
index 27c5cd5ff45..cf1de9c9db8 100644
--- a/jrt/src/com/yahoo/jrt/Int64Value.java
+++ b/jrt/src/com/yahoo/jrt/Int64Value.java
@@ -41,7 +41,8 @@ public class Int64Value extends Value
public long asInt64() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return String.valueOf(value);
}
diff --git a/jrt/src/com/yahoo/jrt/Int8Array.java b/jrt/src/com/yahoo/jrt/Int8Array.java
index 4dc18a75d8e..f6347f90b9e 100644
--- a/jrt/src/com/yahoo/jrt/Int8Array.java
+++ b/jrt/src/com/yahoo/jrt/Int8Array.java
@@ -45,7 +45,8 @@ public class Int8Array extends Value
public byte[] asInt8Array() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return Arrays.toString(value);
}
diff --git a/jrt/src/com/yahoo/jrt/Int8Value.java b/jrt/src/com/yahoo/jrt/Int8Value.java
index e62460f4bd8..044dbb131f9 100644
--- a/jrt/src/com/yahoo/jrt/Int8Value.java
+++ b/jrt/src/com/yahoo/jrt/Int8Value.java
@@ -41,7 +41,8 @@ public class Int8Value extends Value
public byte asInt8() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return String.valueOf(value);
}
diff --git a/jrt/src/com/yahoo/jrt/Method.java b/jrt/src/com/yahoo/jrt/Method.java
index d752e33b0d8..7883b20499f 100644
--- a/jrt/src/com/yahoo/jrt/Method.java
+++ b/jrt/src/com/yahoo/jrt/Method.java
@@ -283,7 +283,8 @@ public class Method {
}
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "method " + name + "(" + paramTypes + ")" + ( returnTypes.length()>0 ? ": " + returnTypes : "");
}
diff --git a/jrt/src/com/yahoo/jrt/Request.java b/jrt/src/com/yahoo/jrt/Request.java
index 4786124e56b..a4ba383653b 100644
--- a/jrt/src/com/yahoo/jrt/Request.java
+++ b/jrt/src/com/yahoo/jrt/Request.java
@@ -273,7 +273,8 @@ public class Request
return errorMessage;
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "request " + methodName + "(" + parameters + ")" + ( returnValues.size()>0 ? ": " + returnValues : "");
}
diff --git a/jrt/src/com/yahoo/jrt/StringArray.java b/jrt/src/com/yahoo/jrt/StringArray.java
index 8195a586f9d..aef0e052cc7 100644
--- a/jrt/src/com/yahoo/jrt/StringArray.java
+++ b/jrt/src/com/yahoo/jrt/StringArray.java
@@ -75,7 +75,8 @@ public class StringArray extends Value
return ret;
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return Arrays.toString(asStringArray());
}
diff --git a/jrt/src/com/yahoo/jrt/StringValue.java b/jrt/src/com/yahoo/jrt/StringValue.java
index 175884c435b..fe43ec0f609 100644
--- a/jrt/src/com/yahoo/jrt/StringValue.java
+++ b/jrt/src/com/yahoo/jrt/StringValue.java
@@ -59,9 +59,11 @@ public class StringValue extends Value
return value.toString();
}
- public @Override Utf8Array asUtf8Array() { return value; }
+ @Override
+ public Utf8Array asUtf8Array() { return value; }
- public @Override String toString() {
+ @Override
+ public String toString() {
return asString();
}
diff --git a/jrt/src/com/yahoo/jrt/Values.java b/jrt/src/com/yahoo/jrt/Values.java
index 05a444e4c6d..2a3213e7dcd 100644
--- a/jrt/src/com/yahoo/jrt/Values.java
+++ b/jrt/src/com/yahoo/jrt/Values.java
@@ -125,7 +125,8 @@ public class Values
}
}
- public @Override String toString() {
+ @Override
+ public String toString() {
if (values.size()==0) return "";
if (values.size()==1) return values.get(0).toString();
StringBuffer buffer=new StringBuffer();
diff --git a/juniper/src/test/appender_test.cpp b/juniper/src/test/appender_test.cpp
index 7887247d9f2..32a58a16bb0 100644
--- a/juniper/src/test/appender_test.cpp
+++ b/juniper/src/test/appender_test.cpp
@@ -1,5 +1,4 @@
// 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/vespalib/testkit/testapp.h>
#define _NEED_SUMMARY_CONFIG_IMPL
diff --git a/juniper/src/test/fakerewriter.cpp b/juniper/src/test/fakerewriter.cpp
index c02fc29b119..962f3d0e2f9 100644
--- a/juniper/src/test/fakerewriter.cpp
+++ b/juniper/src/test/fakerewriter.cpp
@@ -1,5 +1,4 @@
// 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 "fakerewriter.h"
#include <vespa/vespalib/util/stringfmt.h>
diff --git a/juniper/src/test/matchobjectTest.cpp b/juniper/src/test/matchobjectTest.cpp
index 81b3f0e1a79..32f249ae720 100644
--- a/juniper/src/test/matchobjectTest.cpp
+++ b/juniper/src/test/matchobjectTest.cpp
@@ -16,7 +16,6 @@
* ALL RIGHTS RESERVED
* </pre>
***************************************************************************/
-#include <vespa/fastos/fastos.h>
#include "matchobjectTest.h"
#include "fakerewriter.h"
diff --git a/juniper/src/test/queryparserTest.cpp b/juniper/src/test/queryparserTest.cpp
index c78af7a98c2..6f1065f279c 100644
--- a/juniper/src/test/queryparserTest.cpp
+++ b/juniper/src/test/queryparserTest.cpp
@@ -16,7 +16,6 @@
* ALL RIGHTS RESERVED
* </pre>
***************************************************************************/
-#include <vespa/fastos/fastos.h>
#include "queryparserTest.h"
#include "fakerewriter.h"
diff --git a/juniper/src/test/queryvisitor_test.cpp b/juniper/src/test/queryvisitor_test.cpp
index 18dda67f43f..612336ae78b 100644
--- a/juniper/src/test/queryvisitor_test.cpp
+++ b/juniper/src/test/queryvisitor_test.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <memory>
-#include <vespa/fastos/fastos.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/juniper/queryhandle.h>
diff --git a/juniper/src/test/testenv.cpp b/juniper/src/test/testenv.cpp
index 17187e33a28..ff4331148d3 100644
--- a/juniper/src/test/testenv.cpp
+++ b/juniper/src/test/testenv.cpp
@@ -3,7 +3,6 @@
* within test framework
*/
-#include <vespa/fastos/fastos.h>
#include "testenv.h"
#include <vespa/juniper/propreader.h>
diff --git a/messagebus/src/vespa/messagebus/network/rpcnetwork.cpp b/messagebus/src/vespa/messagebus/network/rpcnetwork.cpp
index 06cbef7b57b..2991c44c9d6 100644
--- a/messagebus/src/vespa/messagebus/network/rpcnetwork.cpp
+++ b/messagebus/src/vespa/messagebus/network/rpcnetwork.cpp
@@ -8,8 +8,10 @@
#include <vespa/messagebus/routing/routingnode.h>
#include <vespa/slobrok/sbregister.h>
#include <vespa/slobrok/sbmirror.h>
-#include <vespa/log/log.h>
+#include <vespa/vespalib/component/vtag.h>
+#include <vespa/fnet/scheduler.h>
+#include <vespa/log/log.h>
LOG_SETUP(".rpcnetwork");
namespace {
diff --git a/messagebus/src/vespa/messagebus/testlib/slobrok.cpp b/messagebus/src/vespa/messagebus/testlib/slobrok.cpp
index fa71cb9f9ad..10c501db854 100644
--- a/messagebus/src/vespa/messagebus/testlib/slobrok.cpp
+++ b/messagebus/src/vespa/messagebus/testlib/slobrok.cpp
@@ -2,6 +2,8 @@
#include "slobrok.h"
#include <vespa/slobrok/server/sbenv.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/transport.h>
#include <vespa/log/log.h>
LOG_SETUP(".slobrok");
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
index 4efa74dbd8e..b160b4ac364 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java
@@ -239,6 +239,8 @@ public class NodeAgentImpl implements NodeAgent {
dockerOperations.startContainer(containerName, nodeSpec);
lastCpuMetric = new CpuUsageReporter(clock.instant());
+ writeConfigs(nodeSpec);
+
addDebugMessage("startContainerIfNeeded: containerState " + containerState + " -> " +
RUNNING_HOWEVER_RESUME_SCRIPT_NOT_RUN);
containerState = RUNNING_HOWEVER_RESUME_SCRIPT_NOT_RUN;
@@ -410,10 +412,7 @@ public class NodeAgentImpl implements NodeAgent {
// TODO: Should be retried if writing fails
metricReceiver.unsetMetricsForContainer(hostname);
if (container.isPresent()) {
- storageMaintainer.ifPresent(maintainer -> {
- maintainer.writeMetricsConfig(containerName, nodeSpec);
- maintainer.writeFilebeatConfig(containerName, nodeSpec);
- });
+ writeConfigs(nodeSpec);
}
}
@@ -606,6 +605,13 @@ public class NodeAgentImpl implements NodeAgent {
}
}
+ private void writeConfigs(ContainerNodeSpec nodeSpec) {
+ storageMaintainer.ifPresent(maintainer -> {
+ maintainer.writeMetricsConfig(containerName, nodeSpec);
+ maintainer.writeFilebeatConfig(containerName, nodeSpec);
+ });
+ }
+
private Optional<Container> getContainer() {
if (containerState == ABSENT) return Optional.empty();
return dockerOperations.getContainer(containerName);
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRetirer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRetirer.java
index d662d3a5fef..835ca66bee2 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRetirer.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeRetirer.java
@@ -70,7 +70,15 @@ public class NodeRetirer extends Maintainer {
.filter(entry -> {
Set<Node> nodesThatShouldBeRetiredForFlavor = entry.getValue();
long numSpareReadyNodesForFlavor = numSpareNodesByFlavor.get(entry.getKey());
- return !limitedPark(nodesThatShouldBeRetiredForFlavor, numSpareReadyNodesForFlavor);
+ boolean parkedAll = limitedPark(nodesThatShouldBeRetiredForFlavor, numSpareReadyNodesForFlavor);
+ if (!parkedAll) {
+ String commaSeparatedHostnames = nodesThatShouldBeRetiredForFlavor.stream().map(Node::hostname)
+ .collect(Collectors.joining(", "));
+ log.info(String.format("Failed to retire %s, wanted to retire %d nodes (%s), but only %d spare " +
+ "nodes available for flavor cluster.",
+ entry.getKey(), nodesThatShouldBeRetiredForFlavor.size(), commaSeparatedHostnames, numSpareReadyNodesForFlavor));
+ }
+ return !parkedAll;
}).count();
return numFlavorsWithUnsuccessfullyRetiredNodes == 0;
diff --git a/searchcommon/src/vespa/searchcommon/attribute/search_context_params.cpp b/searchcommon/src/vespa/searchcommon/attribute/search_context_params.cpp
index dccfb6c6b27..8b58d2d50c2 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/search_context_params.cpp
+++ b/searchcommon/src/vespa/searchcommon/attribute/search_context_params.cpp
@@ -1,11 +1,10 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "search_context_params.h"
+#include <cstdint>
#include <limits>
-namespace search {
-namespace attribute {
+namespace search::attribute {
SearchContextParams::SearchContextParams()
: _diversityAttribute(nullptr),
@@ -16,4 +15,3 @@ SearchContextParams::SearchContextParams()
}
}
-}
diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
index 7f7a87c8084..633f7929a6d 100644
--- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
@@ -682,19 +682,20 @@ assertTarget(const vespalib::string &name,
TEST_F("require that flush targets can be retrieved", FastAccessFixture)
{
IFlushTarget::List targets = getFlushTargets(f);
- EXPECT_EQUAL(6u, targets.size());
+ EXPECT_EQUAL(7u, targets.size());
EXPECT_EQUAL("subdb.attribute.flush.attr1", targets[0]->getName());
EXPECT_EQUAL("subdb.attribute.shrink.attr1", targets[1]->getName());
EXPECT_EQUAL("subdb.documentmetastore.flush", targets[2]->getName());
EXPECT_EQUAL("subdb.documentmetastore.shrink", targets[3]->getName());
EXPECT_EQUAL("subdb.summary.compact", targets[4]->getName());
EXPECT_EQUAL("subdb.summary.flush", targets[5]->getName());
+ EXPECT_EQUAL("subdb.summary.shrink", targets[6]->getName());
}
TEST_F("require that flush targets can be retrieved", SearchableFixture)
{
IFlushTarget::List targets = getFlushTargets(f);
- EXPECT_EQUAL(8u, targets.size());
+ EXPECT_EQUAL(9u, targets.size());
EXPECT_TRUE(assertTarget("subdb.attribute.flush.attr1", FType::SYNC, FComponent::ATTRIBUTE, *targets[0]));
EXPECT_TRUE(assertTarget("subdb.attribute.shrink.attr1", FType::GC, FComponent::ATTRIBUTE, *targets[1]));
EXPECT_TRUE(assertTarget("subdb.documentmetastore.flush", FType::SYNC, FComponent::ATTRIBUTE, *targets[2]));
@@ -703,6 +704,7 @@ TEST_F("require that flush targets can be retrieved", SearchableFixture)
EXPECT_TRUE(assertTarget("subdb.memoryindex.fusion", FType::GC, FComponent::INDEX, *targets[5]));
EXPECT_TRUE(assertTarget("subdb.summary.compact", FType::GC, FComponent::DOCUMENT_STORE, *targets[6]));
EXPECT_TRUE(assertTarget("subdb.summary.flush", FType::SYNC, FComponent::DOCUMENT_STORE, *targets[7]));
+ EXPECT_TRUE(assertTarget("subdb.summary.shrink", FType::GC, FComponent::DOCUMENT_STORE, *targets[8]));
}
TEST_F("require that only fast-access attributes are instantiated", FastAccessOnlyFixture)
diff --git a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
index c191b7dc4b5..5b550f9c49d 100644
--- a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
@@ -1,47 +1,48 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <tests/proton/common/dummydbowner.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/messagebus/emptyreply.h>
#include <vespa/messagebus/testlib/receptor.h>
#include <vespa/searchcommon/common/schema.h>
#include <vespa/searchcore/proton/attribute/flushableattribute.h>
#include <vespa/searchcore/proton/common/feedtoken.h>
+#include <vespa/searchcore/proton/common/hw_info.h>
+#include <vespa/searchcore/proton/common/statusreport.h>
#include <vespa/searchcore/proton/docsummary/summaryflushtarget.h>
#include <vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.h>
+#include <vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.h>
#include <vespa/searchcore/proton/flushengine/threadedflushtarget.h>
-#include <vespa/searchcore/proton/common/statusreport.h>
#include <vespa/searchcore/proton/matching/querylimiter.h>
+#include <vespa/searchcore/proton/metrics/job_tracked_flush_target.h>
+#include <vespa/searchcore/proton/metrics/metricswireservice.h>
+#include <vespa/searchcore/proton/reference/document_db_reference_registry.h>
+#include <vespa/searchcore/proton/reference/i_document_db_reference.h>
#include <vespa/searchcore/proton/server/bootstrapconfig.h>
#include <vespa/searchcore/proton/server/document_db_explorer.h>
#include <vespa/searchcore/proton/server/documentdb.h>
#include <vespa/searchcore/proton/server/documentdbconfigmanager.h>
#include <vespa/searchcore/proton/server/memoryconfigstore.h>
-#include <vespa/searchcore/proton/metrics/job_tracked_flush_target.h>
-#include <vespa/searchcore/proton/metrics/metricswireservice.h>
-#include <vespa/searchcore/proton/reference/document_db_reference_registry.h>
-#include <vespa/searchcore/proton/reference/i_document_db_reference.h>
#include <vespa/searchcorespi/index/indexflushtarget.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/searchlib/transactionlog/translogserver.h>
-#include <tests/proton/common/dummydbowner.h>
-#include <vespa/vespalib/testkit/test_kit.h>
-#include <vespa/searchcore/proton/common/hw_info.h>
#include <vespa/vespalib/data/slime/slime.h>
+#include <vespa/vespalib/testkit/test_kit.h>
using document::DocumentType;
using document::DocumentTypeRepo;
-using search::index::Schema;
-using search::transactionlog::TransLogServer;
+using document::DocumenttypesConfig;
+using namespace cloud::config::filedistribution;
using namespace proton;
using namespace vespalib::slime;
-using namespace cloud::config::filedistribution;
using search::TuneFileDocumentDB;
-using document::DocumenttypesConfig;
using search::index::DummyFileHeaderContext;
+using search::index::Schema;
+using search::transactionlog::TransLogServer;
+using searchcorespi::IFlushTarget;
using searchcorespi::index::IndexFlushTarget;
using vespa::config::search::core::ProtonConfig;
using vespalib::Slime;
-using searchcorespi::IFlushTarget;
namespace {
@@ -146,7 +147,7 @@ extractRealFlushTarget(const IFlushTarget *target)
}
TEST_F("requireThatIndexFlushTargetIsUsed", Fixture) {
- std::vector<IFlushTarget::SP> targets = f._db->getFlushTargets();
+ auto targets = f._db->getFlushTargets();
ASSERT_TRUE(!targets.empty());
const IndexFlushTarget *index = 0;
for (size_t i = 0; i < targets.size(); ++i) {
@@ -176,7 +177,7 @@ size_t getNumTargets(const std::vector<IFlushTarget::SP> & targets)
}
TEST_F("requireThatFlushTargetsAreNamedBySubDocumentDB", Fixture) {
- std::vector<IFlushTarget::SP> targets = f._db->getFlushTargets();
+ auto targets = f._db->getFlushTargets();
ASSERT_TRUE(!targets.empty());
for (const IFlushTarget::SP & target : f._db->getFlushTargets()) {
vespalib::string name = target->getName();
@@ -187,7 +188,7 @@ TEST_F("requireThatFlushTargetsAreNamedBySubDocumentDB", Fixture) {
}
TEST_F("requireThatAttributeFlushTargetsAreUsed", Fixture) {
- std::vector<IFlushTarget::SP> targets = f._db->getFlushTargets();
+ auto targets = f._db->getFlushTargets();
ASSERT_TRUE(!targets.empty());
size_t numAttrs = getNumTargets<FlushableAttribute>(targets);
// attr1 defined in attributes.cfg
@@ -195,21 +196,27 @@ TEST_F("requireThatAttributeFlushTargetsAreUsed", Fixture) {
}
TEST_F("requireThatDocumentMetaStoreFlushTargetIsUsed", Fixture) {
- std::vector<IFlushTarget::SP> targets = f._db->getFlushTargets();
+ auto targets = f._db->getFlushTargets();
ASSERT_TRUE(!targets.empty());
- size_t numMetaStores =
- getNumTargets<DocumentMetaStoreFlushTarget>(targets);
- // document meta store
+ size_t numMetaStores = getNumTargets<DocumentMetaStoreFlushTarget>(targets);
EXPECT_EQUAL(3u, numMetaStores);
}
TEST_F("requireThatSummaryFlushTargetsIsUsed", Fixture) {
- std::vector<IFlushTarget::SP> targets = f._db->getFlushTargets();
+ auto targets = f._db->getFlushTargets();
ASSERT_TRUE(!targets.empty());
size_t num = getNumTargets<SummaryFlushTarget>(targets);
EXPECT_EQUAL(3u, num);
}
+TEST_F("require that shrink lid space flush targets are created", Fixture) {
+ auto targets = f._db->getFlushTargets();
+ ASSERT_TRUE(!targets.empty());
+ size_t num = getNumTargets<ShrinkLidSpaceFlushTarget>(targets);
+ // 1x attribute, 3x document meta store, 3x document store
+ EXPECT_EQUAL(1u + 3u + 3u, num);
+}
+
TEST_F("requireThatCorrectStatusIsReported", Fixture) {
StatusReport::UP report(f._db->reportStatus());
EXPECT_EQUAL("documentdb:typea", report->getComponent());
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/rpc.cpp b/searchcore/src/vespa/searchcore/fdispatch/common/rpc.cpp
index b2b7086c20a..39b2c74a4a9 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/rpc.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/rpc.cpp
@@ -3,6 +3,7 @@
#include "rpc.h"
#include "appcontext.h"
+#include <vespa/fnet/info.h>
extern char FastS_VersionTag[];
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
index a3282e9e3ec..67a02c5d3ee 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
@@ -4,10 +4,11 @@
#include "summarycompacttarget.h"
#include "summaryflushtarget.h"
#include "summarymanager.h"
-#include <vespa/searchlib/docstore/logdocumentstore.h>
-#include <vespa/searchsummary/docsummary/docsumconfig.h>
#include <vespa/config/print/ostreamconfigwriter.h>
#include <vespa/juniper/rpinterface.h>
+#include <vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.h>
+#include <vespa/searchlib/docstore/logdocumentstore.h>
+#include <vespa/searchsummary/docsummary/docsumconfig.h>
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/log/log.h>
@@ -22,6 +23,7 @@ using namespace vespa::config::search;
using vespalib::make_string;
using vespalib::IllegalArgumentException;
using search::DocumentStore;
+using search::IDocumentStore;
using search::LogDocumentStore;
using search::LogDataStore;
using search::WriteableFileChunk;
@@ -171,13 +173,29 @@ SummaryManager::removeDocument(uint64_t syncToken, search::DocumentIdT lid)
_currentSerial = syncToken;
}
+namespace {
+
+IFlushTarget::SP
+createShrinkLidSpaceFlushTarget(IDocumentStore::SP docStore)
+{
+ return std::make_shared<ShrinkLidSpaceFlushTarget>("summary.shrink",
+ IFlushTarget::Type::GC,
+ IFlushTarget::Component::DOCUMENT_STORE,
+ docStore->lastSyncToken(),
+ docStore->getLastFlushTime(),
+ docStore);
+}
+
+}
+
IFlushTarget::List SummaryManager::getFlushTargets()
{
IFlushTarget::List ret;
- ret.push_back(IFlushTarget::SP(new SummaryFlushTarget(getBackingStore())));
+ ret.push_back(std::make_shared<SummaryFlushTarget>(getBackingStore()));
if (dynamic_cast<LogDocumentStore *>(_docStore.get()) != NULL) {
- ret.push_back(IFlushTarget::SP(new SummaryCompactTarget(getBackingStore())));
+ ret.push_back(std::make_shared<SummaryCompactTarget>(getBackingStore()));
}
+ ret.push_back(createShrinkLidSpaceFlushTarget(_docStore));
return ret;
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index c7ae1e0c3d8..f9932deb641 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -282,7 +282,9 @@ Proton::init(const BootstrapConfig::SP & configSnapshot)
vespalib::string fileConfigId;
_warmupExecutor.reset(new vespalib::ThreadStackExecutor(4, 128*1024));
- const size_t summaryThreads = protonConfig.summary.log.numthreads;
+ // We need at least 1 guaranteed free worker in order to ensure progress so #documentsdbs + 1 should suffice,
+ // but we will not be cheap and give #documentsdbs * 2
+ const size_t summaryThreads = std::max(size_t(protonConfig.summary.log.numthreads), protonConfig.documentdb.size() * 2);
_summaryExecutor.reset(new vespalib::BlockingThreadStackExecutor(summaryThreads, 128*1024, summaryThreads*16));
InitializeThreads initializeThreads;
if (protonConfig.initialize.threads > 0) {
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
index b45c436933d..d09070f6124 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
@@ -178,6 +178,12 @@ StoreOnlyDocSubDB::onReplayDone()
{
_dms->constructFreeList();
_dms->shrinkLidSpace();
+ uint32_t docIdLimit = _dms->getCommittedDocIdLimit();
+ auto &docStore = _rSummaryMgr->getBackingStore();
+ if (docIdLimit < docStore.getDocIdLimit()) {
+ docStore.compactLidSpace(docIdLimit);
+ docStore.shrinkLidSpace();
+ }
}
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/ranking/features/fieldmatch/QueryTerm.java b/searchlib/src/main/java/com/yahoo/searchlib/ranking/features/fieldmatch/QueryTerm.java
index 47ffb276f70..be50b413eba 100644
--- a/searchlib/src/main/java/com/yahoo/searchlib/ranking/features/fieldmatch/QueryTerm.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/ranking/features/fieldmatch/QueryTerm.java
@@ -51,15 +51,18 @@ public final class QueryTerm {
/** The degree to which this is exactly the term the user specified (1), or a stemmed form (closer to 0) */
public float getExactness() { return exactness; }
- public @Override int hashCode() { return term.hashCode(); }
+ @Override
+ public int hashCode() { return term.hashCode(); }
- public @Override boolean equals(Object object) {
+ @Override
+ public boolean equals(Object object) {
if (! (object instanceof QueryTerm)) return false;
return this.term.equals(((QueryTerm)object).term);
}
- public @Override String toString() {
+ @Override
+ public String toString() {
if (connectedness==0.1f) return term;
return connectedness + ":" + term;
}
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/MapContext.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/MapContext.java
index 2dffe2a1100..2862a4783a2 100644
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/MapContext.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/MapContext.java
@@ -44,7 +44,8 @@ public class MapContext extends Context {
/**
* Returns the value of a key. 0 is returned if the given key is not bound in this.
*/
- public @Override Value get(String key) {
+ @Override
+ public Value get(String key) {
Value value=bindings.get(key);
if (value==null) return DoubleValue.zero;
return value;
@@ -56,7 +57,8 @@ public class MapContext extends Context {
*
* @since 5.1.5
*/
- public @Override void put(String key,Value value) {
+ @Override
+ public void put(String key,Value value) {
bindings.put(key,value.freeze());
}
@@ -70,12 +72,14 @@ public class MapContext extends Context {
public MapContext thawedCopy() { return new MapContext(new HashMap<>(bindings)); }
/** Returns an unmodifiable map of the names of this */
- public @Override Set<String> names() {
+ @Override
+ public Set<String> names() {
if (frozen) return bindings.keySet();
return Collections.unmodifiableMap(bindings).keySet();
}
- public @Override String toString() {
+ @Override
+ public String toString() {
return "a map context [" + bindings.size() + " bindings]";
}
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/TensorValue.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/TensorValue.java
index 6d038113691..082927456f4 100644
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/TensorValue.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/TensorValue.java
@@ -31,7 +31,7 @@ public class TensorValue extends Value {
@Override
public double asDouble() {
if (hasDouble())
- return value.get(TensorAddress.empty);
+ return value.get(TensorAddress.of());
throw new UnsupportedOperationException("Requires a double value, but " + this.value + " cannot be " +
"used as a double");
}
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TruthOperator.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TruthOperator.java
index 932975f3b63..234825eaa3d 100644
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TruthOperator.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TruthOperator.java
@@ -27,7 +27,8 @@ public enum TruthOperator implements Serializable {
/** Perform the truth operation on the input */
public abstract boolean evaluate(double x, double y);
- public @Override String toString() { return operatorString; }
+ @Override
+ public String toString() { return operatorString; }
public static TruthOperator fromString(String string) {
for (TruthOperator operator : values())
diff --git a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/SemanticDistanceTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/SemanticDistanceTestCase.java
index 14ea58961ba..2663fc26b1a 100644
--- a/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/SemanticDistanceTestCase.java
+++ b/searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/SemanticDistanceTestCase.java
@@ -22,7 +22,8 @@ public class SemanticDistanceTestCase extends junit.framework.TestCase {
super(name);
}
- public @Override void setUp() {
+ @Override
+ public void setUp() {
c=new FieldMatchMetricsComputer();
StringBuilder field=new StringBuilder();
for (int i=0; i<150; i++)
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.cpp b/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.cpp
index 124396aac5a..3513ab8918a 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/linguisticsannotation.cpp
@@ -1,9 +1,5 @@
// 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/log/log.h>
-LOG_SETUP(".searchsummary.docsummary.linguisticsannotation");
-
#include "linguisticsannotation.h"
#include <vespa/document/datatype/datatype.h>
#include <vespa/document/datatype/primitivedatatype.h>
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.cpp b/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.cpp
index 6e60628739a..0b8464c0100 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/searchdatatype.cpp
@@ -1,9 +1,5 @@
// 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/log/log.h>
-LOG_SETUP(".search.docsummary.searchdatatype");
-
#include "searchdatatype.h"
#include <vespa/document/base/field.h>
#include <vespa/document/datatype/primitivedatatype.h>
diff --git a/slobrok/src/apps/check_slobrok/check_slobrok.cpp b/slobrok/src/apps/check_slobrok/check_slobrok.cpp
index 9d588eab39f..f2b6fa0e71b 100644
--- a/slobrok/src/apps/check_slobrok/check_slobrok.cpp
+++ b/slobrok/src/apps/check_slobrok/check_slobrok.cpp
@@ -1,8 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fnet/frt/frt.h>
#include <vespa/fastos/app.h>
-#include <string>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+#include <vespa/fnet/frt/rpcrequest.h>
+
#include <sstream>
#include <vespa/log/log.h>
diff --git a/slobrok/src/apps/sbcmd/sbcmd.cpp b/slobrok/src/apps/sbcmd/sbcmd.cpp
index a96c4609137..927fab6ebff 100644
--- a/slobrok/src/apps/sbcmd/sbcmd.cpp
+++ b/slobrok/src/apps/sbcmd/sbcmd.cpp
@@ -1,8 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fnet/frt/frt.h>
#include <vespa/fastos/app.h>
-#include <string>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+#include <vespa/fnet/frt/rpcrequest.h>
#include <sstream>
#include <vespa/log/log.h>
diff --git a/slobrok/src/tests/backoff/testbackoff.cpp b/slobrok/src/tests/backoff/testbackoff.cpp
index af0dbd5bc81..f64ca79917c 100644
--- a/slobrok/src/tests/backoff/testbackoff.cpp
+++ b/slobrok/src/tests/backoff/testbackoff.cpp
@@ -1,10 +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/log/log.h>
-LOG_SETUP("backoff_test");
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/slobrok/backoff.h>
-#include <algorithm>
+
+#include <vespa/log/log.h>
+LOG_SETUP("backoff_test");
using slobrok::api::BackOff;
diff --git a/slobrok/src/tests/configure/configure.cpp b/slobrok/src/tests/configure/configure.cpp
index e8977f678e4..086917dd5d7 100644
--- a/slobrok/src/tests/configure/configure.cpp
+++ b/slobrok/src/tests/configure/configure.cpp
@@ -1,17 +1,19 @@
// 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/log/log.h>
-LOG_SETUP("configure_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/slobrok/sbmirror.h>
#include <vespa/slobrok/sbregister.h>
#include <vespa/slobrok/server/slobrokserver.h>
#include <vespa/config/config.h>
#include <vespa/config-slobroks.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/vespalib/util/host_name.h>
#include <sstream>
#include <algorithm>
#include <iostream>
-#include <vespa/vespalib/util/host_name.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("configure_test");
using slobrok::api::MirrorAPI;
using slobrok::api::RegisterAPI;
diff --git a/slobrok/src/tests/configure/gencfg.cpp b/slobrok/src/tests/configure/gencfg.cpp
index 85cc8629830..8e0de4abb8c 100644
--- a/slobrok/src/tests/configure/gencfg.cpp
+++ b/slobrok/src/tests/configure/gencfg.cpp
@@ -1,9 +1,6 @@
// 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 <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
#include <vespa/vespalib/util/host_name.h>
+#include <cstdio>
int
main(int, char **)
diff --git a/slobrok/src/tests/mirrorapi/mirrorapi.cpp b/slobrok/src/tests/mirrorapi/mirrorapi.cpp
index 4370931b785..4a1f4f023ca 100644
--- a/slobrok/src/tests/mirrorapi/mirrorapi.cpp
+++ b/slobrok/src/tests/mirrorapi/mirrorapi.cpp
@@ -1,12 +1,15 @@
// 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/log/log.h>
-LOG_SETUP("mirrorapi_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/slobrok/sbmirror.h>
#include <vespa/config-slobroks.h>
#include <algorithm>
#include <vespa/slobrok/server/slobrokserver.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("mirrorapi_test");
using slobrok::api::MirrorAPI;
using slobrok::SlobrokServer;
diff --git a/slobrok/src/tests/oldapi/mirror.cpp b/slobrok/src/tests/oldapi/mirror.cpp
index 22304091395..fb9fa167c32 100644
--- a/slobrok/src/tests/oldapi/mirror.cpp
+++ b/slobrok/src/tests/oldapi/mirror.cpp
@@ -1,13 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include "mirror.h"
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".slobrok.mirror");
-#include <vespa/fastos/fastos.h>
-#include <vespa/fnet/frt/frt.h>
-#include "mirror.h"
-#include <memory>
-namespace slobrok {
-namespace api {
+namespace slobrok::api {
MirrorOld::MirrorOld(FRT_Supervisor &orb, const std::vector<std::string> &slobroks)
@@ -171,5 +170,4 @@ MirrorOld::RequestDone(FRT_RPCRequest *req)
ScheduleNow();
}
-} // namespace api
-} // namespace slobrok
+} // namespace slobrok::api
diff --git a/slobrok/src/tests/oldapi/mirror.h b/slobrok/src/tests/oldapi/mirror.h
index b83392dec5e..b6259c76b7e 100644
--- a/slobrok/src/tests/oldapi/mirror.h
+++ b/slobrok/src/tests/oldapi/mirror.h
@@ -1,12 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fnet/frt/frt.h>
#include <vespa/vespalib/util/gencnt.h>
#include <vespa/slobrok/backoff.h>
+#include <vespa/fnet/frt/invoker.h>
-namespace slobrok {
-namespace api {
+class FRT_Target;
+
+namespace slobrok::api {
/**
* @brief Defines an interface for the name server lookup.
@@ -122,5 +123,4 @@ private:
FRT_RPCRequest *_req;
};
-} // namespace api
-} // namespace slobrok
+} // namespace slobrok::api
diff --git a/slobrok/src/tests/oldapi/old.cpp b/slobrok/src/tests/oldapi/old.cpp
index 8b620cda3b2..23cde98674f 100644
--- a/slobrok/src/tests/oldapi/old.cpp
+++ b/slobrok/src/tests/oldapi/old.cpp
@@ -1,12 +1,13 @@
// 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/log/log.h>
-LOG_SETUP("mirrorapi_test");
#include <vespa/vespalib/testkit/testapp.h>
#include "mirror.h"
#include <vespa/config-slobroks.h>
-#include <algorithm>
#include <vespa/slobrok/server/slobrokserver.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("mirrorapi_test");
using slobrok::api::MirrorOld;
using slobrok::SlobrokServer;
diff --git a/slobrok/src/tests/registerapi/registerapi.cpp b/slobrok/src/tests/registerapi/registerapi.cpp
index 8e4cb2404f9..e61a28e3c28 100644
--- a/slobrok/src/tests/registerapi/registerapi.cpp
+++ b/slobrok/src/tests/registerapi/registerapi.cpp
@@ -1,15 +1,17 @@
// 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/log/log.h>
-LOG_SETUP("registerapi_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/host_name.h>
#include <vespa/slobrok/sbmirror.h>
#include <vespa/slobrok/sbregister.h>
#include <vespa/slobrok/server/slobrokserver.h>
+#include <vespa/fnet/frt/supervisor.h>
#include <sstream>
#include <algorithm>
+#include <vespa/log/log.h>
+LOG_SETUP("registerapi_test");
+
using slobrok::api::MirrorAPI;
using slobrok::api::RegisterAPI;
using slobrok::SlobrokServer;
diff --git a/slobrok/src/tests/standalone/standalone.cpp b/slobrok/src/tests/standalone/standalone.cpp
index 7cae6eabbad..9d9ccbdeadd 100644
--- a/slobrok/src/tests/standalone/standalone.cpp
+++ b/slobrok/src/tests/standalone/standalone.cpp
@@ -1,9 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>
-#include <vespa/fnet/frt/frt.h>
#include <vespa/slobrok/server/slobrokserver.h>
-#include <string>
-
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
//-----------------------------------------------------------------------------
diff --git a/slobrok/src/tests/startsome/rpc_info.cpp b/slobrok/src/tests/startsome/rpc_info.cpp
index be5418ff1a8..40e4db46bf5 100644
--- a/slobrok/src/tests/startsome/rpc_info.cpp
+++ b/slobrok/src/tests/startsome/rpc_info.cpp
@@ -1,7 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fnet/frt/frt.h>
#include <vespa/fastos/app.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/rpcrequest.h>
+#include <vespa/fnet/frt/target.h>
+
class RPCInfo : public FastOS_Application
{
diff --git a/slobrok/src/tests/startsome/tstdst.cpp b/slobrok/src/tests/startsome/tstdst.cpp
index 7d3fcef8695..577bf6f59a1 100644
--- a/slobrok/src/tests/startsome/tstdst.cpp
+++ b/slobrok/src/tests/startsome/tstdst.cpp
@@ -1,8 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/util/host_name.h>
-#include <vespa/fnet/frt/frt.h>
#include <vespa/fastos/app.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/invoker.h>
+#include <vespa/fnet/transport.h>
+#include <vespa/fnet/frt/target.h>
#include <vespa/log/log.h>
LOG_SETUP("testrpcserver");
diff --git a/slobrok/src/vespa/slobrok/cfg.cpp b/slobrok/src/vespa/slobrok/cfg.cpp
index 50320f7dd23..733377d5e0c 100644
--- a/slobrok/src/vespa/slobrok/cfg.cpp
+++ b/slobrok/src/vespa/slobrok/cfg.cpp
@@ -1,9 +1,7 @@
// 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 "cfg.h"
-#include <vespa/log/log.h>
-#include <vespa/vespalib/util/sync.h>
+#include <vespa/log/log.h>
LOG_SETUP(".slobrok.configurator");
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/sblist.cpp b/slobrok/src/vespa/slobrok/sblist.cpp
index be702c6c5c2..de7795164d6 100644
--- a/slobrok/src/vespa/slobrok/sblist.cpp
+++ b/slobrok/src/vespa/slobrok/sblist.cpp
@@ -1,15 +1,13 @@
// 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 "sblist.h"
-#include <vespa/log/log.h>
-LOG_SETUP(".slobrok.list");
#include <vespa/vespalib/util/random.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".slobrok.list");
using vespalib::LockGuard;
-namespace slobrok {
-namespace api {
+namespace slobrok::api {
SlobrokList::SlobrokList()
: _lock(),
@@ -96,6 +94,4 @@ SlobrokList::setup(const std::vector<std::string> &specList)
}
}
-
-} // namespace api
-} // namespace slobrok
+} // namespace slobrok::api
diff --git a/slobrok/src/vespa/slobrok/sbmirror.cpp b/slobrok/src/vespa/slobrok/sbmirror.cpp
index 7b0974d5b0d..d828f64f1c1 100644
--- a/slobrok/src/vespa/slobrok/sbmirror.cpp
+++ b/slobrok/src/vespa/slobrok/sbmirror.cpp
@@ -1,11 +1,11 @@
// 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 "sbmirror.h"
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".slobrok.mirror");
-#include <vespa/fnet/frt/frt.h>
-#include <vespa/config-slobroks.h>
-#include "sbmirror.h"
-#include <memory>
using vespalib::LockGuard;
diff --git a/slobrok/src/vespa/slobrok/sbmirror.h b/slobrok/src/vespa/slobrok/sbmirror.h
index c9bca70885f..002cd43929f 100644
--- a/slobrok/src/vespa/slobrok/sbmirror.h
+++ b/slobrok/src/vespa/slobrok/sbmirror.h
@@ -4,13 +4,12 @@
#include "imirrorapi.h"
#include "backoff.h"
#include "sblist.h"
-#include "cfg.h"
-#include <vespa/fnet/frt/frt.h>
#include <vespa/vespalib/util/gencnt.h>
-#include <vespa/vespalib/util/sync.h>
+#include <vespa/fnet/frt/invoker.h>
-namespace slobrok {
-namespace api {
+class FRT_Target;
+
+namespace slobrok::api {
/**
* @brief A MirrorAPI object is used to keep track of the services registered
@@ -108,6 +107,4 @@ private:
FRT_RPCRequest *_req;
};
-} // namespace api
-} // namespace slobrok
-
+} // namespace slobrok::api
diff --git a/slobrok/src/vespa/slobrok/sbregister.cpp b/slobrok/src/vespa/slobrok/sbregister.cpp
index a904a49884a..c930c35f8bb 100644
--- a/slobrok/src/vespa/slobrok/sbregister.cpp
+++ b/slobrok/src/vespa/slobrok/sbregister.cpp
@@ -1,12 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fnet/frt/frt.h>
-#include <vespa/config-slobroks.h>
#include "sbregister.h"
-#include <memory>
-#include <sstream>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
#include <vespa/vespalib/util/host_name.h>
#include <vespa/vespalib/stllike/asciistream.h>
+#include <sstream>
+
#include <vespa/log/log.h>
LOG_SETUP(".slobrok.register");
diff --git a/slobrok/src/vespa/slobrok/sbregister.h b/slobrok/src/vespa/slobrok/sbregister.h
index 7a71db8d480..be6516ecdbc 100644
--- a/slobrok/src/vespa/slobrok/sbregister.h
+++ b/slobrok/src/vespa/slobrok/sbregister.h
@@ -1,16 +1,15 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fnet/frt/frt.h>
-#include <vespa/vespalib/util/gencnt.h>
#include "backoff.h"
#include "sblist.h"
#include "cfg.h"
-#include <string>
-#include <vector>
+#include <vespa/fnet/frt/invoker.h>
+#include <vespa/fnet/frt/invokable.h>
-namespace slobrok {
-namespace api {
+class FRT_Target;
+
+namespace slobrok::api {
/**
* @brief A RegisterAPI object is used to register and unregister
@@ -100,6 +99,4 @@ private:
FRT_RPCRequest *_req;
};
-} // namespace api
-} // namespace slobrok
-
+} // namespace slobrok::api
diff --git a/slobrok/src/vespa/slobrok/server/cmd.cpp b/slobrok/src/vespa/slobrok/server/cmd.cpp
index b83bcbe2fba..c22c9cdaebd 100644
--- a/slobrok/src/vespa/slobrok/server/cmd.cpp
+++ b/slobrok/src/vespa/slobrok/server/cmd.cpp
@@ -1,20 +1,15 @@
// 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/log/log.h>
-LOG_SETUP(".cmd");
-
-#include <vespa/fnet/frt/frt.h>
#include "cmd.h"
-#include "ok_state.h"
-#include "named_service.h"
-#include "reserved_name.h"
#include "rpc_server_map.h"
-#include "rpc_server_manager.h"
+#include "reserved_name.h"
#include "remote_slobrok.h"
#include "sbenv.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".cmd");
+
namespace slobrok {
//-----------------------------------------------------------------------------
diff --git a/slobrok/src/vespa/slobrok/server/exchange_manager.cpp b/slobrok/src/vespa/slobrok/server/exchange_manager.cpp
index 197a1dd8a18..b4086f03527 100644
--- a/slobrok/src/vespa/slobrok/server/exchange_manager.cpp
+++ b/slobrok/src/vespa/slobrok/server/exchange_manager.cpp
@@ -1,22 +1,12 @@
// 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/log/log.h>
-LOG_SETUP(".rpcserver");
-
-#include <vector>
-#include <deque>
-#include <stdlib.h>
#include "exchange_manager.h"
-
-#include "ok_state.h"
-#include "named_service.h"
#include "rpc_server_map.h"
-#include "rpc_server_manager.h"
-#include "remote_slobrok.h"
#include "sbenv.h"
-#include "cmd.h"
+#include <vespa/fnet/frt/supervisor.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP(".rpcserver");
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/exchange_manager.h b/slobrok/src/vespa/slobrok/server/exchange_manager.h
index 20cf03e921a..b3883ffd92d 100644
--- a/slobrok/src/vespa/slobrok/server/exchange_manager.h
+++ b/slobrok/src/vespa/slobrok/server/exchange_manager.h
@@ -4,8 +4,6 @@
#include <deque>
#include <string>
-#include <vespa/fnet/frt/frt.h>
-
#include <vespa/vespalib/util/hashmap.h>
#include "ok_state.h"
#include "cmd.h"
diff --git a/slobrok/src/vespa/slobrok/server/history.cpp b/slobrok/src/vespa/slobrok/server/history.cpp
index fa2bf9c9023..f542d718b1f 100644
--- a/slobrok/src/vespa/slobrok/server/history.cpp
+++ b/slobrok/src/vespa/slobrok/server/history.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 "history.h"
#include <vespa/log/log.h>
LOG_SETUP(".history");
-#include "history.h"
-
namespace slobrok {
void
diff --git a/slobrok/src/vespa/slobrok/server/history.h b/slobrok/src/vespa/slobrok/server/history.h
index 9898d5b21cc..9b0e629f7ab 100644
--- a/slobrok/src/vespa/slobrok/server/history.h
+++ b/slobrok/src/vespa/slobrok/server/history.h
@@ -2,7 +2,6 @@
#pragma once
#include <vespa/vespalib/util/gencnt.h>
-#include <vespa/vespalib/util/hashmap.h>
#include <vector>
#include <string>
#include <set>
diff --git a/slobrok/src/vespa/slobrok/server/i_monitored_server.h b/slobrok/src/vespa/slobrok/server/i_monitored_server.h
index 1bfe52387e0..bc66844e4cf 100644
--- a/slobrok/src/vespa/slobrok/server/i_monitored_server.h
+++ b/slobrok/src/vespa/slobrok/server/i_monitored_server.h
@@ -1,8 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fnet/frt/frt.h>
-
namespace slobrok {
//-----------------------------------------------------------------------------
diff --git a/slobrok/src/vespa/slobrok/server/i_rpc_server_manager.h b/slobrok/src/vespa/slobrok/server/i_rpc_server_manager.h
index b093acd7c2a..bca885661b9 100644
--- a/slobrok/src/vespa/slobrok/server/i_rpc_server_manager.h
+++ b/slobrok/src/vespa/slobrok/server/i_rpc_server_manager.h
@@ -1,12 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fnet/frt/frt.h>
-
-#include "monitor.h"
-
#include <string>
+class FRT_Supervisor;
+
namespace slobrok {
class ManagedRpcServer;
diff --git a/slobrok/src/vespa/slobrok/server/managed_rpc_server.cpp b/slobrok/src/vespa/slobrok/server/managed_rpc_server.cpp
index 0513f30c1dc..1003c239150 100644
--- a/slobrok/src/vespa/slobrok/server/managed_rpc_server.cpp
+++ b/slobrok/src/vespa/slobrok/server/managed_rpc_server.cpp
@@ -2,6 +2,9 @@
#include "managed_rpc_server.h"
#include "i_rpc_server_manager.h"
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+
#include <vespa/log/log.h>
LOG_SETUP(".rpcserver");
diff --git a/slobrok/src/vespa/slobrok/server/managed_rpc_server.h b/slobrok/src/vespa/slobrok/server/managed_rpc_server.h
index 4ade368e623..9b75671f1e2 100644
--- a/slobrok/src/vespa/slobrok/server/managed_rpc_server.h
+++ b/slobrok/src/vespa/slobrok/server/managed_rpc_server.h
@@ -1,12 +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/fnet/frt/frt.h>
-
-#include "monitor.h"
#include "named_service.h"
-
-#include <string>
+#include "monitor.h"
+#include <vespa/fnet/frt/invoker.h>
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/metrics_producer.cpp b/slobrok/src/vespa/slobrok/server/metrics_producer.cpp
index d566e757248..8752161505b 100644
--- a/slobrok/src/vespa/slobrok/server/metrics_producer.cpp
+++ b/slobrok/src/vespa/slobrok/server/metrics_producer.cpp
@@ -1,6 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
#include "metrics_producer.h"
#include <vespa/vespalib/data/slime/slime.h>
+#include <vespa/fnet/task.h>
+#include <vespa/fnet/transport.h>
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/metrics_producer.h b/slobrok/src/vespa/slobrok/server/metrics_producer.h
index d66a1d53071..65505a38c43 100644
--- a/slobrok/src/vespa/slobrok/server/metrics_producer.h
+++ b/slobrok/src/vespa/slobrok/server/metrics_producer.h
@@ -4,7 +4,8 @@
#include "rpchooks.h"
#include <vespa/vespalib/net/metrics_producer.h>
#include <vespa/vespalib/net/simple_metrics_producer.h>
-#include <vespa/fnet/frt/frt.h>
+
+class FNET_Transport;
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/monitor.cpp b/slobrok/src/vespa/slobrok/server/monitor.cpp
index 70df443af86..20afeb5ae23 100644
--- a/slobrok/src/vespa/slobrok/server/monitor.cpp
+++ b/slobrok/src/vespa/slobrok/server/monitor.cpp
@@ -1,6 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "monitor.h"
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
+#include <vespa/fnet/channel.h>
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/monitor.h b/slobrok/src/vespa/slobrok/server/monitor.h
index a71c6b69821..7d55a4ad4ee 100644
--- a/slobrok/src/vespa/slobrok/server/monitor.h
+++ b/slobrok/src/vespa/slobrok/server/monitor.h
@@ -1,9 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fnet/frt/frt.h>
-
#include "i_monitored_server.h"
+#include <vespa/fnet/task.h>
+#include <vespa/fnet/ipackethandler.h>
+
+class FRT_Supervisor;
+class FRT_Target;
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/named_service.cpp b/slobrok/src/vespa/slobrok/server/named_service.cpp
index f46acd700d2..33f0815772d 100644
--- a/slobrok/src/vespa/slobrok/server/named_service.cpp
+++ b/slobrok/src/vespa/slobrok/server/named_service.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 "named_service.h"
#include <vespa/log/log.h>
LOG_SETUP(".rpcserver");
-#include "named_service.h"
-#include "i_rpc_server_manager.h"
-
namespace slobrok {
//-----------------------------------------------------------------------------
diff --git a/slobrok/src/vespa/slobrok/server/named_service.h b/slobrok/src/vespa/slobrok/server/named_service.h
index 9d04475573a..db48bb6b80e 100644
--- a/slobrok/src/vespa/slobrok/server/named_service.h
+++ b/slobrok/src/vespa/slobrok/server/named_service.h
@@ -1,7 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fnet/frt/frt.h>
#include <string>
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/random.h b/slobrok/src/vespa/slobrok/server/random.h
index 0ab2597dd03..e8315db85a1 100644
--- a/slobrok/src/vespa/slobrok/server/random.h
+++ b/slobrok/src/vespa/slobrok/server/random.h
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <stdlib.h>
+#include <cstdlib>
namespace {
diff --git a/slobrok/src/vespa/slobrok/server/remote_check.cpp b/slobrok/src/vespa/slobrok/server/remote_check.cpp
index 96360daf873..eac452db88c 100644
--- a/slobrok/src/vespa/slobrok/server/remote_check.cpp
+++ b/slobrok/src/vespa/slobrok/server/remote_check.cpp
@@ -1,22 +1,17 @@
// 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/log/log.h>
-LOG_SETUP(".remcheck");
-
-#include <vespa/fnet/frt/frt.h>
#include "remote_check.h"
-#include "ok_state.h"
#include "named_service.h"
#include "rpc_server_map.h"
#include "rpc_server_manager.h"
#include "remote_slobrok.h"
-#include "sbenv.h"
#include "random.h"
+#include "exchange_manager.h"
-namespace slobrok {
+#include <vespa/log/log.h>
+LOG_SETUP(".remcheck");
+namespace slobrok {
RemoteCheck::RemoteCheck(FNET_Scheduler *sched,
RpcServerMap& rpcsrvmap,
diff --git a/slobrok/src/vespa/slobrok/server/remote_slobrok.cpp b/slobrok/src/vespa/slobrok/server/remote_slobrok.cpp
index 23b8fc75e50..35f2405f82a 100644
--- a/slobrok/src/vespa/slobrok/server/remote_slobrok.cpp
+++ b/slobrok/src/vespa/slobrok/server/remote_slobrok.cpp
@@ -2,7 +2,11 @@
#include "remote_slobrok.h"
#include "rpc_server_map.h"
+#include "rpc_server_manager.h"
+#include "exchange_manager.h"
#include "sbenv.h"
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/target.h>
#include <vespa/log/log.h>
LOG_SETUP(".rpcserver");
diff --git a/slobrok/src/vespa/slobrok/server/remote_slobrok.h b/slobrok/src/vespa/slobrok/server/remote_slobrok.h
index fdc4c6e492b..3989ab70237 100644
--- a/slobrok/src/vespa/slobrok/server/remote_slobrok.h
+++ b/slobrok/src/vespa/slobrok/server/remote_slobrok.h
@@ -1,29 +1,19 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <deque>
-#include <string>
-
-#include <vespa/fnet/frt/frt.h>
-
-#include <vespa/vespalib/util/hashmap.h>
#include "ok_state.h"
#include "cmd.h"
#include "i_rpc_server_manager.h"
-#include "rpc_server_manager.h"
#include "managed_rpc_server.h"
+#include <deque>
namespace slobrok {
//-----------------------------------------------------------------------------
-class SBEnv;
-class RpcServerMap;
class RpcServerManager;
class ExchangeManager;
-using vespalib::HashMap;
-
//-----------------------------------------------------------------------------
/**
diff --git a/slobrok/src/vespa/slobrok/server/reserved_name.h b/slobrok/src/vespa/slobrok/server/reserved_name.h
index b36e8e8ac50..8399c93380e 100644
--- a/slobrok/src/vespa/slobrok/server/reserved_name.h
+++ b/slobrok/src/vespa/slobrok/server/reserved_name.h
@@ -1,10 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fnet/frt/frt.h>
-#include <string>
-
#include "named_service.h"
+#include <vespa/fastos/time.h>
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/rpc_server_manager.cpp b/slobrok/src/vespa/slobrok/server/rpc_server_manager.cpp
index a4cb5c067ac..84ef6432f74 100644
--- a/slobrok/src/vespa/slobrok/server/rpc_server_manager.cpp
+++ b/slobrok/src/vespa/slobrok/server/rpc_server_manager.cpp
@@ -1,20 +1,14 @@
// 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/log/log.h>
-LOG_SETUP(".rpcserver");
-
-#include <string>
-#include <sstream>
-#include <vespa/vespalib/util/stringfmt.h>
#include "rpc_server_manager.h"
-#include "ok_state.h"
-#include "named_service.h"
#include "reserved_name.h"
#include "rpc_server_map.h"
#include "remote_slobrok.h"
#include "sbenv.h"
+#include <sstream>
+
+#include <vespa/log/log.h>
+LOG_SETUP(".rpcserver");
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/rpc_server_manager.h b/slobrok/src/vespa/slobrok/server/rpc_server_manager.h
index b355c39c77b..7866681feb1 100644
--- a/slobrok/src/vespa/slobrok/server/rpc_server_manager.h
+++ b/slobrok/src/vespa/slobrok/server/rpc_server_manager.h
@@ -1,17 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <string>
-#include <vector>
-
-#include <vespa/vespalib/util/hashmap.h>
-
-#include <vespa/fnet/frt/frt.h>
-
#include "ok_state.h"
#include "cmd.h"
#include "i_rpc_server_manager.h"
#include "named_service.h"
+#include <vespa/fnet/task.h>
+#include <vector>
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/rpc_server_map.cpp b/slobrok/src/vespa/slobrok/server/rpc_server_map.cpp
index 7c354874dc7..cf4ad69b819 100644
--- a/slobrok/src/vespa/slobrok/server/rpc_server_map.cpp
+++ b/slobrok/src/vespa/slobrok/server/rpc_server_map.cpp
@@ -1,17 +1,13 @@
// 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/log/log.h>
-LOG_SETUP(".rpcsrvmap");
-
-#include <vector>
#include "rpc_server_map.h"
-#include "named_service.h"
#include "reserved_name.h"
#include "rpc_server_manager.h"
#include "sbenv.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".rpcsrvmap");
+
namespace slobrok {
//-----------------------------------------------------------------------------
diff --git a/slobrok/src/vespa/slobrok/server/rpc_server_map.h b/slobrok/src/vespa/slobrok/server/rpc_server_map.h
index 5f08039057a..3cadab0632d 100644
--- a/slobrok/src/vespa/slobrok/server/rpc_server_map.h
+++ b/slobrok/src/vespa/slobrok/server/rpc_server_map.h
@@ -1,10 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fnet/frt/frt.h>
-#include <vespa/vespalib/util/hashmap.h>
-#include <vector>
-
#include "visible_map.h"
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/rpchooks.cpp b/slobrok/src/vespa/slobrok/server/rpchooks.cpp
index a79c0883cef..b3d8df33f6b 100644
--- a/slobrok/src/vespa/slobrok/server/rpchooks.cpp
+++ b/slobrok/src/vespa/slobrok/server/rpchooks.cpp
@@ -8,6 +8,8 @@
#include "remote_slobrok.h"
#include "sbenv.h"
#include "rpcmirror.h"
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/vespalib/component/vtag.h>
#include <vespa/log/log.h>
LOG_SETUP(".rpchooks");
diff --git a/slobrok/src/vespa/slobrok/server/rpchooks.h b/slobrok/src/vespa/slobrok/server/rpchooks.h
index 212f997a368..6a8fb1e0e9a 100644
--- a/slobrok/src/vespa/slobrok/server/rpchooks.h
+++ b/slobrok/src/vespa/slobrok/server/rpchooks.h
@@ -1,7 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fnet/frt/frt.h>
+#include <vespa/fnet/frt/invokable.h>
+
+class FNET_Task;
+class FRT_Supervisor;
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/rpcmirror.cpp b/slobrok/src/vespa/slobrok/server/rpcmirror.cpp
index 1ea6e3b4742..7c9d04fa9e5 100644
--- a/slobrok/src/vespa/slobrok/server/rpcmirror.cpp
+++ b/slobrok/src/vespa/slobrok/server/rpcmirror.cpp
@@ -1,8 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "rpcmirror.h"
-#include <vespa/log/log.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/frt/rpcrequest.h>
+#include <vespa/log/log.h>
LOG_SETUP(".rpcmirror");
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/rpcmirror.h b/slobrok/src/vespa/slobrok/server/rpcmirror.h
index 1bb31720db5..45458d646e5 100644
--- a/slobrok/src/vespa/slobrok/server/rpcmirror.h
+++ b/slobrok/src/vespa/slobrok/server/rpcmirror.h
@@ -2,6 +2,10 @@
#pragma once
#include "visible_map.h"
+#include <vespa/fnet/task.h>
+
+class FRT_RPCRequest;
+class FRT_Supervisor;
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/sbenv.cpp b/slobrok/src/vespa/slobrok/server/sbenv.cpp
index 0cc0b2467e2..88d34f228c4 100644
--- a/slobrok/src/vespa/slobrok/server/sbenv.cpp
+++ b/slobrok/src/vespa/slobrok/server/sbenv.cpp
@@ -7,6 +7,8 @@
#include <vespa/vespalib/net/state_server.h>
#include <vespa/vespalib/util/host_name.h>
#include <vespa/vespalib/stllike/asciistream.h>
+#include <vespa/fnet/frt/supervisor.h>
+#include <vespa/fnet/transport.h>
#include <vespa/log/log.h>
LOG_SETUP(".sbenv");
@@ -105,6 +107,10 @@ SBEnv::~SBEnv()
getTransport()->WaitFinished();
}
+FNET_Scheduler *
+SBEnv::getScheduler() {
+ return _transport->GetScheduler();
+}
void
SBEnv::shutdown()
diff --git a/slobrok/src/vespa/slobrok/server/sbenv.h b/slobrok/src/vespa/slobrok/server/sbenv.h
index def29359379..0d9a89c45d0 100644
--- a/slobrok/src/vespa/slobrok/server/sbenv.h
+++ b/slobrok/src/vespa/slobrok/server/sbenv.h
@@ -64,7 +64,7 @@ public:
~SBEnv();
FNET_Transport *getTransport() { return _transport.get(); }
- FNET_Scheduler *getScheduler() { return _transport->GetScheduler(); }
+ FNET_Scheduler *getScheduler();
FRT_Supervisor *getSupervisor() { return _supervisor.get(); }
void shutdown();
diff --git a/slobrok/src/vespa/slobrok/server/selfcheck.cpp b/slobrok/src/vespa/slobrok/server/selfcheck.cpp
index bb8cb930bae..bb38f4c93a8 100644
--- a/slobrok/src/vespa/slobrok/server/selfcheck.cpp
+++ b/slobrok/src/vespa/slobrok/server/selfcheck.cpp
@@ -1,10 +1,4 @@
// 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/log/log.h>
-LOG_SETUP(".selfcheck");
-
-#include <vespa/fnet/frt/frt.h>
#include "selfcheck.h"
#include "ok_state.h"
@@ -14,6 +8,9 @@ LOG_SETUP(".selfcheck");
#include "managed_rpc_server.h"
#include "random.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".selfcheck");
+
namespace slobrok {
diff --git a/slobrok/src/vespa/slobrok/server/slobrokserver.cpp b/slobrok/src/vespa/slobrok/server/slobrokserver.cpp
index 731a2a1da60..3574caa2553 100644
--- a/slobrok/src/vespa/slobrok/server/slobrokserver.cpp
+++ b/slobrok/src/vespa/slobrok/server/slobrokserver.cpp
@@ -1,5 +1,4 @@
// 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 "slobrokserver.h"
diff --git a/slobrok/src/vespa/slobrok/server/visible_map.h b/slobrok/src/vespa/slobrok/server/visible_map.h
index 11702ddb92a..a6cebd787ce 100644
--- a/slobrok/src/vespa/slobrok/server/visible_map.h
+++ b/slobrok/src/vespa/slobrok/server/visible_map.h
@@ -1,14 +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/fnet/frt/frt.h>
-#include <vespa/vespalib/util/hashmap.h>
-#include <vespa/vespalib/util/gencnt.h>
-#include <vector>
-#include <string>
-
#include "history.h"
#include "named_service.h"
+#include <vespa/vespalib/util/hashmap.h>
namespace slobrok {
diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/storage/searcher/GetSearcherTestCase.java b/vespaclient-container-plugin/src/test/java/com/yahoo/storage/searcher/GetSearcherTestCase.java
index bdd48949146..022360db54f 100755
--- a/vespaclient-container-plugin/src/test/java/com/yahoo/storage/searcher/GetSearcherTestCase.java
+++ b/vespaclient-container-plugin/src/test/java/com/yahoo/storage/searcher/GetSearcherTestCase.java
@@ -1022,7 +1022,8 @@ public class GetSearcherTestCase {
this.hitToReturn = hitToReturn;
}
- public @Override Result search(Query query, Execution execution) {
+ @Override
+ public Result search(Query query, Execution execution) {
Result result = new Result(query);
result.hits().add(hitToReturn);
return result;
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java b/vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java
index a4b1a02f95c..f007db48001 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/IndexedTensor.java
@@ -156,7 +156,7 @@ public class IndexedTensor implements Tensor {
@Override
public Map<TensorAddress, Double> cells() {
if (dimensionSizes.dimensions() == 0)
- return Collections.singletonMap(TensorAddress.empty, values[0]);
+ return Collections.singletonMap(TensorAddress.of(), values[0]);
ImmutableMap.Builder<TensorAddress, Double> builder = new ImmutableMap.Builder<>();
Indexes indexes = Indexes.of(dimensionSizes, dimensionSizes, values.length);
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java b/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java
index d62e7575358..30eeba8cc4f 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java
@@ -22,8 +22,6 @@ import java.util.Set;
@Beta
public abstract class TensorAddress implements Comparable<TensorAddress> {
- public static final TensorAddress empty = new TensorAddress.Builder(TensorType.empty).build();
-
public static TensorAddress of(String[] labels) {
return new StringTensorAddress(labels);
}
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java
index 09b6e79a101..51d2de6c11f 100644
--- a/vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java
+++ b/vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java
@@ -34,7 +34,7 @@ public class IndexedTensorTestCase {
@Test
public void testSingleValue() {
- Tensor singleValue = Tensor.Builder.of(TensorType.empty).cell(TensorAddress.empty, 3.5).build();
+ Tensor singleValue = Tensor.Builder.of(TensorType.empty).cell(TensorAddress.of(), 3.5).build();
assertTrue(singleValue instanceof IndexedTensor);
assertEquals("{3.5}", singleValue.toString());
Tensor singleValueFromString = Tensor.from(TensorType.empty, "{3.5}");
diff --git a/vespalib/src/vespa/vespalib/data/input.cpp b/vespalib/src/vespa/vespalib/data/input.cpp
index d0dc70eb107..d27e3d68c67 100644
--- a/vespalib/src/vespa/vespalib/data/input.cpp
+++ b/vespalib/src/vespa/vespalib/data/input.cpp
@@ -1,6 +1,5 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "input.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/data/input_reader.cpp b/vespalib/src/vespa/vespalib/data/input_reader.cpp
index b71935c795b..7b70acf0cef 100644
--- a/vespalib/src/vespa/vespalib/data/input_reader.cpp
+++ b/vespalib/src/vespa/vespalib/data/input_reader.cpp
@@ -1,6 +1,5 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "input_reader.h"
#include "input.h"
diff --git a/vespalib/src/vespa/vespalib/data/lz4_input_decoder.cpp b/vespalib/src/vespa/vespalib/data/lz4_input_decoder.cpp
index 39407449105..ed15af58f2c 100644
--- a/vespalib/src/vespa/vespalib/data/lz4_input_decoder.cpp
+++ b/vespalib/src/vespa/vespalib/data/lz4_input_decoder.cpp
@@ -1,8 +1,8 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "lz4_input_decoder.h"
#include <lz4frame.h>
+#include <cassert>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/data/lz4_input_decoder.h b/vespalib/src/vespa/vespalib/data/lz4_input_decoder.h
index f711aef30b5..5f03529a945 100644
--- a/vespalib/src/vespa/vespalib/data/lz4_input_decoder.h
+++ b/vespalib/src/vespa/vespalib/data/lz4_input_decoder.h
@@ -3,6 +3,7 @@
#pragma once
#include "input.h"
+#include <vector>
struct LZ4F_dctx_s;
diff --git a/vespalib/src/vespa/vespalib/data/lz4_output_encoder.cpp b/vespalib/src/vespa/vespalib/data/lz4_output_encoder.cpp
index 60f8546bde1..3ae16524a8e 100644
--- a/vespalib/src/vespa/vespalib/data/lz4_output_encoder.cpp
+++ b/vespalib/src/vespa/vespalib/data/lz4_output_encoder.cpp
@@ -1,8 +1,8 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "lz4_output_encoder.h"
#include <lz4frame.h>
+#include <cassert>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/data/lz4_output_encoder.h b/vespalib/src/vespa/vespalib/data/lz4_output_encoder.h
index 6936a9a0169..98005eacf60 100644
--- a/vespalib/src/vespa/vespalib/data/lz4_output_encoder.h
+++ b/vespalib/src/vespa/vespalib/data/lz4_output_encoder.h
@@ -3,6 +3,7 @@
#pragma once
#include "output.h"
+#include <vector>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/data/memory.cpp b/vespalib/src/vespa/vespalib/data/memory.cpp
index 71c8c6c8ced..3f76b86ebae 100644
--- a/vespalib/src/vespa/vespalib/data/memory.cpp
+++ b/vespalib/src/vespa/vespalib/data/memory.cpp
@@ -1,6 +1,5 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "memory.h"
#include <vespa/vespalib/util/stringfmt.h>
diff --git a/vespalib/src/vespa/vespalib/data/memory_input.cpp b/vespalib/src/vespa/vespalib/data/memory_input.cpp
index 485b438f33e..01d94f7f1b6 100644
--- a/vespalib/src/vespa/vespalib/data/memory_input.cpp
+++ b/vespalib/src/vespa/vespalib/data/memory_input.cpp
@@ -1,6 +1,5 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "memory_input.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/data/output.cpp b/vespalib/src/vespa/vespalib/data/output.cpp
index 27489da4179..667b5ed763f 100644
--- a/vespalib/src/vespa/vespalib/data/output.cpp
+++ b/vespalib/src/vespa/vespalib/data/output.cpp
@@ -1,6 +1,5 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "output.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/data/output_writer.cpp b/vespalib/src/vespa/vespalib/data/output_writer.cpp
index a04aba9c733..935af47bdbe 100644
--- a/vespalib/src/vespa/vespalib/data/output_writer.cpp
+++ b/vespalib/src/vespa/vespalib/data/output_writer.cpp
@@ -1,11 +1,10 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "output_writer.h"
#include "output.h"
-#include <stdarg.h>
-#include <stdio.h>
-#include <assert.h>
+#include <cstdarg>
+#include <cstdio>
+#include <cassert>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/data/writable_memory.cpp b/vespalib/src/vespa/vespalib/data/writable_memory.cpp
index b94c54e13cd..d8be1b6367f 100644
--- a/vespalib/src/vespa/vespalib/data/writable_memory.cpp
+++ b/vespalib/src/vespa/vespalib/data/writable_memory.cpp
@@ -1,6 +1,5 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "writable_memory.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/io/mapped_file_input.cpp b/vespalib/src/vespa/vespalib/io/mapped_file_input.cpp
index d9108456347..a52012b437e 100644
--- a/vespalib/src/vespa/vespalib/io/mapped_file_input.cpp
+++ b/vespalib/src/vespa/vespalib/io/mapped_file_input.cpp
@@ -1,7 +1,10 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "mapped_file_input.h"
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/net/selector.cpp b/vespalib/src/vespa/vespalib/net/selector.cpp
index 01027e5b762..05784cd07f6 100644
--- a/vespalib/src/vespa/vespalib/net/selector.cpp
+++ b/vespalib/src/vespa/vespalib/net/selector.cpp
@@ -1,7 +1,12 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "selector.h"
+#include <cassert>
+#include <cstdlib>
+#include <cerrno>
+#include <cstring>
+#include <unistd.h>
+#include <fcntl.h>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/hashmap.h b/vespalib/src/vespa/vespalib/util/hashmap.h
index f357ab6cf04..cbaa9540878 100644
--- a/vespalib/src/vespa/vespalib/util/hashmap.h
+++ b/vespalib/src/vespa/vespalib/util/hashmap.h
@@ -1,11 +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 <inttypes.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "hashmapdata.h"
+#include <cstring>
+#include <cstdlib>
/**
* @brief namespace for generic Vespa library
diff --git a/vespalib/src/vespa/vespalib/util/hashmapdata.h b/vespalib/src/vespa/vespalib/util/hashmapdata.h
index 42110246be2..e887e12d245 100644
--- a/vespalib/src/vespa/vespalib/util/hashmapdata.h
+++ b/vespalib/src/vespa/vespalib/util/hashmapdata.h
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <inttypes.h>
+#include <cstdint>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/websocket/acceptor.cpp b/vespalib/src/vespa/vespalib/websocket/acceptor.cpp
index d2217fb304d..830b82a8fa7 100644
--- a/vespalib/src/vespa/vespalib/websocket/acceptor.cpp
+++ b/vespalib/src/vespa/vespalib/websocket/acceptor.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 "acceptor.h"
-#include <functional>
#include <vespa/vespalib/net/socket_spec.h>
+#include <functional>
-namespace vespalib {
-namespace ws {
+namespace vespalib::ws {
void
Acceptor::accept_main(Handler<Socket> &socket_handler)
@@ -34,4 +32,3 @@ Acceptor::~Acceptor()
}
} // namespace vespalib::ws
-} // namespace vespalib
diff --git a/vespalib/src/vespa/vespalib/websocket/buffer.cpp b/vespalib/src/vespa/vespalib/websocket/buffer.cpp
index de4c61bf9d9..b7c41b960a7 100644
--- a/vespalib/src/vespa/vespalib/websocket/buffer.cpp
+++ b/vespalib/src/vespa/vespalib/websocket/buffer.cpp
@@ -1,11 +1,8 @@
// 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 "buffer.h"
-namespace vespalib {
-namespace ws {
+namespace vespalib::ws {
void
Buffer::ensure_free(size_t bytes)
@@ -19,4 +16,3 @@ Buffer::ensure_free(size_t bytes)
}
} // namespace vespalib::ws
-} // namespace vespalib
diff --git a/vespalib/src/vespa/vespalib/websocket/connection.cpp b/vespalib/src/vespa/vespalib/websocket/connection.cpp
index d0a0af8dd33..cb304060271 100644
--- a/vespalib/src/vespa/vespalib/websocket/connection.cpp
+++ b/vespalib/src/vespa/vespalib/websocket/connection.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 "connection.h"
+#include <cstdarg>
+#include <cassert>
-namespace vespalib {
-namespace ws {
+namespace vespalib::ws {
namespace {
@@ -205,4 +204,3 @@ Connection::flush()
}
} // namespace vespalib::ws
-} // namespace vespalib
diff --git a/vespalib/src/vespa/vespalib/websocket/frame.cpp b/vespalib/src/vespa/vespalib/websocket/frame.cpp
index 43aff81f599..76be06b1e1a 100644
--- a/vespalib/src/vespa/vespalib/websocket/frame.cpp
+++ b/vespalib/src/vespa/vespalib/websocket/frame.cpp
@@ -1,11 +1,7 @@
// 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 "frame.h"
-namespace vespalib {
-namespace ws {
+namespace vespalib::ws {
} // namespace vespalib::ws
-} // namespace vespalib
diff --git a/vespalib/src/vespa/vespalib/websocket/handler.cpp b/vespalib/src/vespa/vespalib/websocket/handler.cpp
index 28229e2816b..972154d0098 100644
--- a/vespalib/src/vespa/vespalib/websocket/handler.cpp
+++ b/vespalib/src/vespa/vespalib/websocket/handler.cpp
@@ -1,11 +1,8 @@
// 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 "handler.h"
-namespace vespalib {
-namespace ws {
+namespace vespalib::ws {
namespace {
@@ -16,4 +13,3 @@ struct DummyItem {};
template class Handler<DummyItem>;
} // namespace vespalib::ws
-} // namespace vespalib
diff --git a/vespalib/src/vespa/vespalib/websocket/key.cpp b/vespalib/src/vespa/vespalib/websocket/key.cpp
index 3091e924a48..12d8bd5cf4a 100644
--- a/vespalib/src/vespa/vespalib/websocket/key.cpp
+++ b/vespalib/src/vespa/vespalib/websocket/key.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 "key.h"
#include <vespa/vespalib/util/sha1.h>
-namespace vespalib {
-namespace ws {
+namespace vespalib::ws {
namespace {
@@ -49,4 +46,3 @@ Key::accept(const vespalib::string &key)
}
} // namespace vespalib::ws
-} // namespace vespalib
diff --git a/vespalog/src/main/java/com/yahoo/log/VespaLevelControllerRepo.java b/vespalog/src/main/java/com/yahoo/log/VespaLevelControllerRepo.java
index a3a69e8f4ed..5e75b10b302 100644
--- a/vespalog/src/main/java/com/yahoo/log/VespaLevelControllerRepo.java
+++ b/vespalog/src/main/java/com/yahoo/log/VespaLevelControllerRepo.java
@@ -155,6 +155,9 @@ public class VespaLevelControllerRepo implements LevelControllerRepo {
return ctrl;
}
synchronized(this) {
+ if (ctlFile == null) {
+ return defaultLevelCtrl;
+ }
LevelController inherit = null;
int lastdot = suffix.lastIndexOf('.');