summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2017-12-07 15:56:06 +0000
committerArne Juul <arnej@yahoo-inc.com>2017-12-14 14:46:48 +0000
commite5fa4cf948b1275fdca6e06f88740f601b8704dc (patch)
tree30ca48676bddf9907c946541a7829a19bc3a1fa2 /vespaclient-container-plugin
parentb27bada7c6b22d83557c6592d8c00fea2a6c35fe (diff)
add jdisc Metric wiring
rename metric (will be tagged as a "container" metric anyway)
Diffstat (limited to 'vespaclient-container-plugin')
-rwxr-xr-xvespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerCompatibility.java7
-rwxr-xr-xvespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerGet.java7
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerVisit.java7
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java2
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandlerV3.java2
5 files changed, 17 insertions, 8 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerCompatibility.java b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerCompatibility.java
index 7c3a0b03fcd..b1a7b6dbdeb 100755
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerCompatibility.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerCompatibility.java
@@ -2,7 +2,9 @@
package com.yahoo.feedhandler;
import java.util.concurrent.Executor;
+import javax.inject.Inject;
+import com.yahoo.jdisc.Metric;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.ThreadedHttpRequestHandler;
@@ -12,9 +14,10 @@ public class VespaFeedHandlerCompatibility extends ThreadedHttpRequestHandler {
private final VespaFeedHandlerGet getHandler;
private final VespaFeedHandler feedHandler;
- public VespaFeedHandlerCompatibility(Executor executor, VespaFeedHandlerGet getHandler,
+ @Inject
+ public VespaFeedHandlerCompatibility(Executor executor, Metric metric, VespaFeedHandlerGet getHandler,
VespaFeedHandler feedHandler) {
- super(executor);
+ super(executor, metric);
this.getHandler = getHandler;
this.feedHandler = feedHandler;
}
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerGet.java b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerGet.java
index 7229ea45b83..70631e0e66c 100755
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerGet.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerGet.java
@@ -3,7 +3,9 @@ package com.yahoo.feedhandler;
import java.util.Collections;
import java.util.concurrent.Executor;
+import javax.inject.Inject;
+import com.yahoo.jdisc.Metric;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.ThreadedHttpRequestHandler;
@@ -13,8 +15,9 @@ public class VespaFeedHandlerGet extends ThreadedHttpRequestHandler {
private final SearchHandler searchHandler;
- public VespaFeedHandlerGet(SearchHandler searchHandler, Executor executor) {
- super(executor, null, true);
+ @Inject
+ public VespaFeedHandlerGet(SearchHandler searchHandler, Executor executor, Metric metric) {
+ super(executor, metric, true);
this.searchHandler = searchHandler;
}
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerVisit.java b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerVisit.java
index 668ac972b3f..c9af0933799 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerVisit.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerVisit.java
@@ -3,7 +3,9 @@ package com.yahoo.feedhandler;
import java.util.Collections;
import java.util.concurrent.Executor;
+import javax.inject.Inject;
+import com.yahoo.jdisc.Metric;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.ThreadedHttpRequestHandler;
@@ -16,8 +18,9 @@ public class VespaFeedHandlerVisit extends ThreadedHttpRequestHandler {
private final SearchHandler searchHandler;
- public VespaFeedHandlerVisit(SearchHandler searchHandler, Executor executor) {
- super(executor, null, true);
+ @Inject
+ public VespaFeedHandlerVisit(SearchHandler searchHandler, Executor executor, Metric metric) {
+ super(executor, metric, true);
this.searchHandler = searchHandler;
}
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java
index 744a7313c50..ddc652dedbb 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java
@@ -68,7 +68,7 @@ public class FeedHandler extends LoggingRequestHandler {
AccessLog accessLog,
ThreadpoolConfig threadpoolConfig,
MetricReceiver metricReceiver) throws Exception {
- super(executor, accessLog);
+ super(executor, accessLog, metric);
DocumentApiMetrics metricsHelper = new DocumentApiMetrics(metricReceiver, "vespa.http.server");
feedHandlerV3 = new FeedHandlerV3(executor, documentManagerConfig, sessionCache, metric, accessLog, threadpoolConfig, metricsHelper);
docTypeManager = createDocumentManager(documentManagerConfig);
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandlerV3.java b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandlerV3.java
index 3c712f1e8e0..28bcb50a144 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandlerV3.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandlerV3.java
@@ -56,7 +56,7 @@ public class FeedHandlerV3 extends LoggingRequestHandler {
AccessLog accessLog,
ThreadpoolConfig threadpoolConfig,
DocumentApiMetrics metricsHelper) throws Exception {
- super(executor, accessLog);
+ super(executor, accessLog, metric);
docTypeManager = new DocumentTypeManager(documentManagerConfig);
this.sessionCache = sessionCache;
feedReplyHandler = new FeedReplyReader(metric, metricsHelper);