diff options
author | Olli Virtanen <olli.virtanen@oath.com> | 2018-10-25 11:21:04 +0200 |
---|---|---|
committer | Olli Virtanen <olli.virtanen@oath.com> | 2018-10-25 11:21:04 +0200 |
commit | 418bab4e2cb402d1db6cfb3f004bfc12c790f719 (patch) | |
tree | 8c5548b0afed1ae4a8957822aea97b9b568d1838 | |
parent | baedadbd45bbf65f94d725b40656507b5404b14e (diff) |
Indentation & javadoc improvements
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java | 14 | ||||
-rw-r--r-- | container-search/src/main/java/com/yahoo/prelude/fastsearch/FS4InvokerFactory.java | 13 |
2 files changed, 20 insertions, 7 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java index b8ec7e88354..623a963f77a 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java @@ -409,13 +409,13 @@ public class IndexedSearchCluster extends SearchCluster if (tuning.dispatch.minGroupCoverage != null) builder.minGroupCoverage(tuning.dispatch.minGroupCoverage); if (tuning.dispatch.policy != null) { - switch(tuning.dispatch.policy) { - case RANDOM: - builder.distributionPolicy(DistributionPolicy.RANDOM); - break; - case ROUNDROBIN: - builder.distributionPolicy(DistributionPolicy.ROUNDROBIN); - break; + switch (tuning.dispatch.policy) { + case RANDOM: + builder.distributionPolicy(DistributionPolicy.RANDOM); + break; + case ROUNDROBIN: + builder.distributionPolicy(DistributionPolicy.ROUNDROBIN); + break; } } builder.maxNodesDownPerGroup(rootDispatch.getMaxNodesDownPerFixedRow()); diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/FS4InvokerFactory.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/FS4InvokerFactory.java index 012a0b3a7a9..f68bb718c8d 100644 --- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/FS4InvokerFactory.java +++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/FS4InvokerFactory.java @@ -46,6 +46,13 @@ public class FS4InvokerFactory { return new FS4SearchInvoker(searcher, query, backend.openChannel(), node); } + /** + * Create a {@link SearchInvoker} for a list of content nodes. + * + * @param query the search query being processed + * @param nodes pre-selected list of content nodes + * @return Optional containing the SearchInvoker or <i>empty</i> if some node in the list is invalid + */ public Optional<SearchInvoker> getSearchInvoker(Query query, List<SearchCluster.Node> nodes) { Map<Integer, SearchInvoker> invokers = new HashMap<>(); for (SearchCluster.Node node : nodes) { @@ -69,6 +76,12 @@ public class FS4InvokerFactory { return new FS4FillInvoker(searcher, query, fs4ResourcePool, node.hostname(), node.fs4port(), node.key()); } + /** + * Create a {@link FillInvoker} for a the hits in a {@link Result}. + * + * @param result the Result containing hits that need to be filled + * @return Optional containing the FillInvoker or <i>empty</i> if some hit is from an unknown content node + */ public Optional<FillInvoker> getFillInvoker(Result result) { Collection<Integer> requiredNodes = requiredFillNodes(result); |