summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2021-01-21 15:49:05 +0100
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2021-01-21 16:54:09 +0100
commit6cc469b7950f4f6f2b67596b162cd73e59c22336 (patch)
treeb19e9a8bf8c1bda395da8862494c3edafabf9b4e /vespaclient-container-plugin
parentbe7847731521fb516269b65905029c1639d4aec8 (diff)
Deprecate LoggingRequestHandler constructors taking AccessLog
Add replacement constructors without AccessLog. Remove use of deprecated constructors for internal handlers.
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java3
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandler.java6
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/vespa/http/server/FeedHandlerV3.java4
-rw-r--r--vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/FeedHandlerTest.java2
-rw-r--r--vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/FeedHandlerV3Test.java2
5 files changed, 5 insertions, 12 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java
index bd63a2ecbfc..abe791eed1b 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/RestApi.java
@@ -5,6 +5,7 @@ import com.google.inject.Inject;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.LoggingRequestHandler;
+import com.yahoo.jdisc.Metric;
/**
* Dummy for internal use.
@@ -15,7 +16,7 @@ public class RestApi extends LoggingRequestHandler {
@Inject
public RestApi() {
- super(ignored -> { throw new IllegalStateException("Not supposed to handle anything"); }, null, null);
+ super(ignored -> { throw new IllegalStateException("Not supposed to handle anything"); }, (Metric)null);
}
@Override
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 50806d7aa20..0a07e978868 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
@@ -7,7 +7,6 @@ import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.LoggingRequestHandler;
import com.yahoo.container.jdisc.messagebus.SessionCache;
-import com.yahoo.container.logging.AccessLog;
import com.yahoo.document.config.DocumentmanagerConfig;
import com.yahoo.documentapi.metrics.DocumentApiMetrics;
import com.yahoo.jdisc.Metric;
@@ -46,13 +45,12 @@ public class FeedHandler extends LoggingRequestHandler {
@Inject
public FeedHandler(ContainerThreadPool threadpool,
Metric metric,
- AccessLog accessLog,
DocumentmanagerConfig documentManagerConfig,
SessionCache sessionCache,
MetricReceiver metricReceiver) {
- super(threadpool.executor(), accessLog, metric);
+ super(threadpool.executor(), metric);
metricsHelper = new DocumentApiMetrics(metricReceiver, "vespa.http.server");
- feedHandlerV3 = new FeedHandlerV3(threadpool.executor(), metric, accessLog, documentManagerConfig, sessionCache, metricsHelper);
+ feedHandlerV3 = new FeedHandlerV3(threadpool.executor(), metric, documentManagerConfig, sessionCache, metricsHelper);
feedReplyHandler = new FeedReplyReader(metric, metricsHelper);
}
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 be432834d1b..3143b66e094 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
@@ -6,7 +6,6 @@ import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.LoggingRequestHandler;
import com.yahoo.container.jdisc.messagebus.SessionCache;
-import com.yahoo.container.logging.AccessLog;
import com.yahoo.document.DocumentTypeManager;
import com.yahoo.document.config.DocumentmanagerConfig;
import com.yahoo.documentapi.metrics.DocumentApiMetrics;
@@ -47,11 +46,10 @@ public class FeedHandlerV3 extends LoggingRequestHandler {
public FeedHandlerV3(Executor executor,
Metric metric,
- AccessLog accessLog,
DocumentmanagerConfig documentManagerConfig,
SessionCache sessionCache,
DocumentApiMetrics metricsHelper) {
- super(executor, accessLog, metric);
+ super(executor, metric);
docTypeManager = new DocumentTypeManager(documentManagerConfig);
this.sessionCache = sessionCache;
feedReplyHandler = new FeedReplyReader(metric, metricsHelper);
diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/FeedHandlerTest.java b/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/FeedHandlerTest.java
index d236ec1f7a0..ab7b224c7be 100644
--- a/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/FeedHandlerTest.java
+++ b/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/FeedHandlerTest.java
@@ -2,7 +2,6 @@ package com.yahoo.vespa.http.server;// Copyright Verizon Media. Licensed under t
import com.yahoo.container.handler.threadpool.ContainerThreadPool;
import com.yahoo.container.jdisc.RequestHandlerTestDriver;
-import com.yahoo.container.logging.AccessLog;
import com.yahoo.document.config.DocumentmanagerConfig;
import com.yahoo.jdisc.handler.OverloadException;
import com.yahoo.metrics.simple.MetricReceiver;
@@ -25,7 +24,6 @@ public class FeedHandlerTest {
FeedHandler handler = new FeedHandler(
new RejectingContainerThreadpool(),
new CollectingMetric(),
- AccessLog.voidAccessLog(),
new DocumentmanagerConfig(new DocumentmanagerConfig.Builder().enablecompression(true)),
null /* session cache */,
MetricReceiver.nullImplementation);
diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/FeedHandlerV3Test.java b/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/FeedHandlerV3Test.java
index 4d56448b587..1e835750039 100644
--- a/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/FeedHandlerV3Test.java
+++ b/vespaclient-container-plugin/src/test/java/com/yahoo/vespa/http/server/FeedHandlerV3Test.java
@@ -5,7 +5,6 @@ import com.google.common.base.Splitter;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.messagebus.SessionCache;
-import com.yahoo.container.logging.AccessLog;
import com.yahoo.document.DataType;
import com.yahoo.document.DocumentType;
import com.yahoo.document.DocumentTypeManager;
@@ -118,7 +117,6 @@ public class FeedHandlerV3Test {
FeedHandlerV3 feedHandlerV3 = new FeedHandlerV3(
threadPool,
metric,
- AccessLog.voidAccessLog(),
docMan,
null /* session cache */,
new DocumentApiMetrics(MetricReceiver.nullImplementation, "test")) {