summaryrefslogtreecommitdiffstats
path: root/config-model/src/main
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2021-10-22 09:16:05 +0200
committerGitHub <noreply@github.com>2021-10-22 09:16:05 +0200
commit7ec9aa11869ffdba64a0009a7396a4483a045cf5 (patch)
tree9fafa5e5a00ef8a776a99916985399423c4855cc /config-model/src/main
parenta92cd931f68a3b852194b5ec45afa0a55d9d27b4 (diff)
parent89d7893c05825f79abe66682f00c65f7c8667bcc (diff)
Merge pull request #19687 from vespa-engine/jonmv/reapply-streamed-visits
Jonmv/reapply streamed visits
Diffstat (limited to 'config-model/src/main')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java b/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java
index 8534e1f65a7..0177aa6b2e8 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java
@@ -23,23 +23,24 @@ public class ContainerDocumentApi {
public static final String DOCUMENT_V1_PREFIX = "/document/v1";
public ContainerDocumentApi(ContainerCluster<?> cluster, Options options) {
- addRestApiHandler(cluster, options);
- addFeedHandler(cluster, options);
+ var executor = new Threadpool("feedapi-handler", cluster, options.feedApiThreadpoolOptions);
+ cluster.addComponent(executor);
+ addRestApiHandler(cluster, options, executor);
+ addFeedHandler(cluster, options, executor);
}
- private static void addFeedHandler(ContainerCluster<?> cluster, Options options) {
+ private static void addFeedHandler(ContainerCluster<?> cluster, Options options, Threadpool executor) {
String bindingSuffix = ContainerCluster.RESERVED_URI_PREFIX + "/feedapi";
var handler = newVespaClientHandler("com.yahoo.vespa.http.server.FeedHandler", bindingSuffix, options);
cluster.addComponent(handler);
- var executor = new Threadpool("feedapi-handler", cluster, options.feedApiThreadpoolOptions);
handler.inject(executor);
- handler.addComponent(executor);
}
- private static void addRestApiHandler(ContainerCluster<?> cluster, Options options) {
+ private static void addRestApiHandler(ContainerCluster<?> cluster, Options options, Threadpool executor) {
var handler = newVespaClientHandler("com.yahoo.document.restapi.resource.DocumentV1ApiHandler", DOCUMENT_V1_PREFIX + "/*", options);
cluster.addComponent(handler);
+ handler.inject(executor);
// We need to include a dummy implementation of the previous restapi handler (using the same class name).
// The internal legacy test framework requires that the name of the old handler is listed in /ApplicationStatus.