summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2021-09-13 17:04:54 +0200
committergjoranv <gv@verizonmedia.com>2021-09-23 15:46:04 +0200
commit59b641c0d3a4ba74baadb26045f27da058821199 (patch)
tree0d64ce2a3a8dbf248892839731e69654296b0822 /config-model
parent4d21c53e72e87db23c3ce528f38ee3ce962660ef (diff)
Install common Vespa bundles via config-model instead of disc pom
Diffstat (limited to 'config-model')
-rwxr-xr-xconfig-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java9
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/PlatformBundles.java171
2 files changed, 102 insertions, 78 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
index 532ac78f17e..f5b168958c0 100755
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
@@ -171,6 +171,8 @@ public abstract class ContainerCluster<CONTAINER extends Container>
componentGroup = new ComponentGroup<>(this, "component");
+ addCommonVespaBundles();
+
addComponent(new StatisticsComponent());
addSimpleComponent(AccessLog.class);
addComponent(new DefaultThreadpoolProvider(this, deployState.featureFlags().metricsproxyNumThreads()));
@@ -459,6 +461,13 @@ public abstract class ContainerCluster<CONTAINER extends Container>
}
/**
+ * Adds the Vespa bundles that are necessary for all container types.
+ */
+ public void addCommonVespaBundles() {
+ PlatformBundles.commonVespaBundles().forEach(this::addPlatformBundle);
+ }
+
+ /**
* Adds a bundle present at a known location at the target container nodes.
* Note that the set of platform bundles cannot change during the jdisc container's lifetime.
*
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/PlatformBundles.java b/config-model/src/main/java/com/yahoo/vespa/model/container/PlatformBundles.java
index de2da0dfaed..24412027e63 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/PlatformBundles.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/PlatformBundles.java
@@ -5,6 +5,8 @@ import com.yahoo.vespa.defaults.Defaults;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.util.Collections;
+import java.util.LinkedHashSet;
import java.util.Set;
/**
@@ -26,93 +28,106 @@ public class PlatformBundles {
public static final Path LIBRARY_PATH = Paths.get(Defaults.getDefaults().underVespaHome("lib/jars"));
public static final String searchAndDocprocBundle = "container-search-and-docproc";
- private static final Set<String> searchAndDocprocComponents;
+
+ public static Set<Path> commonVespaBundles() {
+ var bundles = new LinkedHashSet<Path>();
+ commonVespaBundles.stream().map(PlatformBundles::absoluteBundlePath).forEach(bundles::add);
+ return Collections.unmodifiableSet(bundles);
+ }
public static Path absoluteBundlePath(String fileName) {
+ return absoluteBundlePath(fileName, JarSuffix.JAR_WITH_DEPS);
+ }
+
+ public static Path absoluteBundlePath(String fileName, JarSuffix jarSuffix) {
if (fileName == null) return null;
- return LIBRARY_PATH.resolve(Paths.get(fileName + JarSuffix.JAR_WITH_DEPS.suffix));
+ return LIBRARY_PATH.resolve(Paths.get(fileName + jarSuffix.suffix));
}
public static boolean isSearchAndDocprocClass(String className) {
return searchAndDocprocComponents.contains(className);
}
+ // Bundles that must be loaded for all container types.
+ private static final Set<String> commonVespaBundles = Set.of(
+ "zkfacade",
+ "zookeeper-server" // TODO: not necessary in metrics-proxy.
+ );
+
// This is a hack to allow users to declare components from the search-and-docproc bundle without naming the bundle.
- static {
- searchAndDocprocComponents = Set.of(
- "com.yahoo.docproc.AbstractConcreteDocumentFactory",
- "com.yahoo.docproc.DocumentProcessor",
- "com.yahoo.docproc.SimpleDocumentProcessor",
- "com.yahoo.docproc.util.JoinerDocumentProcessor",
- "com.yahoo.docproc.util.SplitterDocumentProcessor",
- "com.yahoo.example.TimingSearcher",
- "com.yahoo.language.simple.SimpleLinguistics",
- "com.yahoo.prelude.cluster.ClusterSearcher",
- "com.yahoo.prelude.fastsearch.FastSearcher",
- "com.yahoo.prelude.fastsearch.VespaBackEndSearcher",
- "com.yahoo.prelude.querytransform.CJKSearcher",
- "com.yahoo.prelude.querytransform.CollapsePhraseSearcher",
- "com.yahoo.prelude.querytransform.LiteralBoostSearcher",
- "com.yahoo.prelude.querytransform.NoRankingSearcher",
- "com.yahoo.prelude.querytransform.NonPhrasingSearcher",
- "com.yahoo.prelude.querytransform.NormalizingSearcher",
- "com.yahoo.prelude.querytransform.PhrasingSearcher",
- "com.yahoo.prelude.querytransform.RecallSearcher",
- "com.yahoo.prelude.querytransform.StemmingSearcher",
- "com.yahoo.prelude.searcher.BlendingSearcher",
- "com.yahoo.prelude.searcher.FieldCollapsingSearcher",
- "com.yahoo.prelude.searcher.FillSearcher",
- "com.yahoo.prelude.searcher.JSONDebugSearcher",
- "com.yahoo.prelude.searcher.JuniperSearcher",
- "com.yahoo.prelude.searcher.MultipleResultsSearcher",
- "com.yahoo.prelude.searcher.PosSearcher",
- "com.yahoo.prelude.searcher.QuotingSearcher",
- "com.yahoo.prelude.searcher.ValidateSortingSearcher",
- "com.yahoo.prelude.semantics.SemanticSearcher",
- "com.yahoo.prelude.statistics.StatisticsSearcher",
- "com.yahoo.prelude.templates.SearchRendererAdaptor",
- "com.yahoo.search.Searcher",
- "com.yahoo.search.cluster.ClusterSearcher",
- "com.yahoo.search.cluster.PingableSearcher",
- "com.yahoo.search.federation.FederationSearcher",
- "com.yahoo.search.federation.ForwardingSearcher",
- "com.yahoo.search.federation.http.ConfiguredHTTPClientSearcher",
- "com.yahoo.search.federation.http.ConfiguredHTTPProviderSearcher",
- "com.yahoo.search.federation.http.HTTPClientSearcher",
- "com.yahoo.search.federation.http.HTTPProviderSearcher",
- "com.yahoo.search.federation.http.HTTPSearcher",
- "com.yahoo.search.federation.news.NewsSearcher",
- "com.yahoo.search.federation.vespa.VespaSearcher",
- "com.yahoo.search.grouping.GroupingQueryParser",
- "com.yahoo.search.grouping.GroupingValidator",
- "com.yahoo.search.grouping.vespa.GroupingExecutor",
- "com.yahoo.search.handler.SearchWithRendererHandler",
- "com.yahoo.search.pagetemplates.PageTemplate",
- "com.yahoo.search.pagetemplates.PageTemplateSearcher",
- "com.yahoo.search.pagetemplates.engine.Resolver",
- "com.yahoo.search.pagetemplates.engine.resolvers.DeterministicResolver",
- "com.yahoo.search.pagetemplates.engine.resolvers.RandomResolver",
- "com.yahoo.search.pagetemplates.model.Renderer",
- "com.yahoo.search.query.rewrite.QueryRewriteSearcher",
- "com.yahoo.search.query.rewrite.SearchChainDispatcherSearcher",
- "com.yahoo.search.query.rewrite.rewriters.GenericExpansionRewriter",
- "com.yahoo.search.query.rewrite.rewriters.MisspellRewriter",
- "com.yahoo.search.query.rewrite.rewriters.NameRewriter",
- "com.yahoo.search.querytransform.AllLowercasingSearcher",
- "com.yahoo.search.querytransform.DefaultPositionSearcher",
- "com.yahoo.search.querytransform.LowercasingSearcher",
- "com.yahoo.search.querytransform.NGramSearcher",
- "com.yahoo.search.querytransform.VespaLowercasingSearcher",
- "com.yahoo.search.rendering.Renderer",
- "com.yahoo.search.rendering.SectionedRenderer",
- "com.yahoo.search.searchchain.ForkingSearcher",
- "com.yahoo.search.searchchain.example.ExampleSearcher",
- "com.yahoo.search.searchers.CacheControlSearcher",
- "com.yahoo.search.statistics.PeakQpsSearcher",
- "com.yahoo.search.statistics.TimingSearcher",
- "com.yahoo.vespa.streamingvisitors.MetricsSearcher",
- "com.yahoo.vespa.streamingvisitors.VdsStreamingSearcher"
- );
- }
+ private static final Set<String> searchAndDocprocComponents = Set.of(
+ "com.yahoo.docproc.AbstractConcreteDocumentFactory",
+ "com.yahoo.docproc.DocumentProcessor",
+ "com.yahoo.docproc.SimpleDocumentProcessor",
+ "com.yahoo.docproc.util.JoinerDocumentProcessor",
+ "com.yahoo.docproc.util.SplitterDocumentProcessor",
+ "com.yahoo.example.TimingSearcher",
+ "com.yahoo.language.simple.SimpleLinguistics",
+ "com.yahoo.prelude.cluster.ClusterSearcher",
+ "com.yahoo.prelude.fastsearch.FastSearcher",
+ "com.yahoo.prelude.fastsearch.VespaBackEndSearcher",
+ "com.yahoo.prelude.querytransform.CJKSearcher",
+ "com.yahoo.prelude.querytransform.CollapsePhraseSearcher",
+ "com.yahoo.prelude.querytransform.LiteralBoostSearcher",
+ "com.yahoo.prelude.querytransform.NoRankingSearcher",
+ "com.yahoo.prelude.querytransform.NonPhrasingSearcher",
+ "com.yahoo.prelude.querytransform.NormalizingSearcher",
+ "com.yahoo.prelude.querytransform.PhrasingSearcher",
+ "com.yahoo.prelude.querytransform.RecallSearcher",
+ "com.yahoo.prelude.querytransform.StemmingSearcher",
+ "com.yahoo.prelude.searcher.BlendingSearcher",
+ "com.yahoo.prelude.searcher.FieldCollapsingSearcher",
+ "com.yahoo.prelude.searcher.FillSearcher",
+ "com.yahoo.prelude.searcher.JSONDebugSearcher",
+ "com.yahoo.prelude.searcher.JuniperSearcher",
+ "com.yahoo.prelude.searcher.MultipleResultsSearcher",
+ "com.yahoo.prelude.searcher.PosSearcher",
+ "com.yahoo.prelude.searcher.QuotingSearcher",
+ "com.yahoo.prelude.searcher.ValidateSortingSearcher",
+ "com.yahoo.prelude.semantics.SemanticSearcher",
+ "com.yahoo.prelude.statistics.StatisticsSearcher",
+ "com.yahoo.prelude.templates.SearchRendererAdaptor",
+ "com.yahoo.search.Searcher",
+ "com.yahoo.search.cluster.ClusterSearcher",
+ "com.yahoo.search.cluster.PingableSearcher",
+ "com.yahoo.search.federation.FederationSearcher",
+ "com.yahoo.search.federation.ForwardingSearcher",
+ "com.yahoo.search.federation.http.ConfiguredHTTPClientSearcher",
+ "com.yahoo.search.federation.http.ConfiguredHTTPProviderSearcher",
+ "com.yahoo.search.federation.http.HTTPClientSearcher",
+ "com.yahoo.search.federation.http.HTTPProviderSearcher",
+ "com.yahoo.search.federation.http.HTTPSearcher",
+ "com.yahoo.search.federation.news.NewsSearcher",
+ "com.yahoo.search.federation.vespa.VespaSearcher",
+ "com.yahoo.search.grouping.GroupingQueryParser",
+ "com.yahoo.search.grouping.GroupingValidator",
+ "com.yahoo.search.grouping.vespa.GroupingExecutor",
+ "com.yahoo.search.handler.SearchWithRendererHandler",
+ "com.yahoo.search.pagetemplates.PageTemplate",
+ "com.yahoo.search.pagetemplates.PageTemplateSearcher",
+ "com.yahoo.search.pagetemplates.engine.Resolver",
+ "com.yahoo.search.pagetemplates.engine.resolvers.DeterministicResolver",
+ "com.yahoo.search.pagetemplates.engine.resolvers.RandomResolver",
+ "com.yahoo.search.pagetemplates.model.Renderer",
+ "com.yahoo.search.query.rewrite.QueryRewriteSearcher",
+ "com.yahoo.search.query.rewrite.SearchChainDispatcherSearcher",
+ "com.yahoo.search.query.rewrite.rewriters.GenericExpansionRewriter",
+ "com.yahoo.search.query.rewrite.rewriters.MisspellRewriter",
+ "com.yahoo.search.query.rewrite.rewriters.NameRewriter",
+ "com.yahoo.search.querytransform.AllLowercasingSearcher",
+ "com.yahoo.search.querytransform.DefaultPositionSearcher",
+ "com.yahoo.search.querytransform.LowercasingSearcher",
+ "com.yahoo.search.querytransform.NGramSearcher",
+ "com.yahoo.search.querytransform.VespaLowercasingSearcher",
+ "com.yahoo.search.rendering.Renderer",
+ "com.yahoo.search.rendering.SectionedRenderer",
+ "com.yahoo.search.searchchain.ForkingSearcher",
+ "com.yahoo.search.searchchain.example.ExampleSearcher",
+ "com.yahoo.search.searchers.CacheControlSearcher",
+ "com.yahoo.search.statistics.PeakQpsSearcher",
+ "com.yahoo.search.statistics.TimingSearcher",
+ "com.yahoo.vespa.streamingvisitors.MetricsSearcher",
+ "com.yahoo.vespa.streamingvisitors.VdsStreamingSearcher"
+ );
}