summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-10-22 11:39:04 +0200
committerJon Marius Venstad <venstad@gmail.com>2021-10-22 11:39:04 +0200
commit334ffa973320d8b90c077e8dabeaec49b3cf826e (patch)
treeb1b422b0661df3f7e972e678b534815ea6053434
parent4dfa0661972e0b42135727598658795995f34131 (diff)
Revert "Inject feed-handler thread pool to /doc/v1"
This reverts commit 8108b988add04d9f63c26f86b950796d60397e0e.
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java13
1 files changed, 6 insertions, 7 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 0177aa6b2e8..8534e1f65a7 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,24 +23,23 @@ public class ContainerDocumentApi {
public static final String DOCUMENT_V1_PREFIX = "/document/v1";
public ContainerDocumentApi(ContainerCluster<?> cluster, Options options) {
- var executor = new Threadpool("feedapi-handler", cluster, options.feedApiThreadpoolOptions);
- cluster.addComponent(executor);
- addRestApiHandler(cluster, options, executor);
- addFeedHandler(cluster, options, executor);
+ addRestApiHandler(cluster, options);
+ addFeedHandler(cluster, options);
}
- private static void addFeedHandler(ContainerCluster<?> cluster, Options options, Threadpool executor) {
+ private static void addFeedHandler(ContainerCluster<?> cluster, Options options) {
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, Threadpool executor) {
+ private static void addRestApiHandler(ContainerCluster<?> cluster, Options options) {
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.