aboutsummaryrefslogtreecommitdiffstats
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
parentbe7847731521fb516269b65905029c1639d4aec8 (diff)
Deprecate LoggingRequestHandler constructors taking AccessLog
Add replacement constructors without AccessLog. Remove use of deprecated constructors for internal handlers.
-rw-r--r--container-core/abi-spec.json6
-rw-r--r--container-core/src/main/java/com/yahoo/container/handler/test/MockService.java7
-rw-r--r--container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java55
-rw-r--r--container-core/src/main/java/com/yahoo/processing/handler/AbstractProcessingHandler.java24
-rw-r--r--container-core/src/test/java/com/yahoo/container/handler/test/MockServiceTest.java3
-rw-r--r--container-core/src/test/java/com/yahoo/container/jdisc/LoggingRequestHandlerTestCase.java11
-rw-r--r--container-search/src/main/java/com/yahoo/search/handler/SearchHandler.java17
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandler.java3
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/systemflags/SystemFlagsHandler.java8
-rw-r--r--vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/TestRunnerHandler.java5
-rw-r--r--vespa-osgi-testrunner/src/test/java/com/yahoo/vespa/testrunner/TestRunnerHandlerTest.java5
-rw-r--r--vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunnerHandler.java5
-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
17 files changed, 71 insertions, 95 deletions
diff --git a/container-core/abi-spec.json b/container-core/abi-spec.json
index 06366250c09..4077a0742dc 100644
--- a/container-core/abi-spec.json
+++ b/container-core/abi-spec.json
@@ -515,13 +515,15 @@
"abstract"
],
"methods": [
- "public void <init>(java.util.concurrent.Executor, com.yahoo.container.logging.AccessLog)",
- "public void <init>(java.util.concurrent.Executor)",
"public static com.yahoo.container.jdisc.LoggingRequestHandler$Context testOnlyContext()",
"public void <init>(com.yahoo.container.jdisc.LoggingRequestHandler$Context)",
+ "public void <init>(java.util.concurrent.Executor, com.yahoo.container.logging.AccessLog)",
+ "public void <init>(java.util.concurrent.Executor)",
"public void <init>(com.yahoo.container.jdisc.LoggingRequestHandler$Context, boolean)",
+ "public void <init>(java.util.concurrent.Executor, com.yahoo.jdisc.Metric)",
"public void <init>(java.util.concurrent.Executor, com.yahoo.container.logging.AccessLog, com.yahoo.jdisc.Metric)",
"public void <init>(java.util.concurrent.Executor, com.yahoo.container.logging.AccessLog, com.yahoo.jdisc.Metric, boolean)",
+ "public void <init>(java.util.concurrent.Executor, com.yahoo.jdisc.Metric, boolean)",
"protected com.yahoo.container.jdisc.LoggingCompletionHandler createLoggingCompletionHandler(long, long, com.yahoo.container.jdisc.HttpResponse, com.yahoo.container.jdisc.HttpRequest, com.yahoo.container.jdisc.ContentChannelOutputStream)"
],
"fields": []
diff --git a/container-core/src/main/java/com/yahoo/container/handler/test/MockService.java b/container-core/src/main/java/com/yahoo/container/handler/test/MockService.java
index 0228bc06c51..625212bcfe9 100644
--- a/container-core/src/main/java/com/yahoo/container/handler/test/MockService.java
+++ b/container-core/src/main/java/com/yahoo/container/handler/test/MockService.java
@@ -5,7 +5,6 @@ import com.google.common.annotations.Beta;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.LoggingRequestHandler;
-import com.yahoo.container.logging.AccessLog;
import com.yahoo.filedistribution.fileacquirer.FileAcquirer;
import com.yahoo.jdisc.Metric;
@@ -19,7 +18,6 @@ import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
-import java.util.logging.Logger;
/**
* This is a generic http handler that can be used to mock a service when testing your application on jDISC.
@@ -50,14 +48,13 @@ public class MockService extends LoggingRequestHandler {
* A custom handler can be created by subclassing and overriding the createHandler method.
*
* @param executor used to create threads
- * @param accessLog where requests will be logged
* @param fileAcquirer used to fetch file from config
* @param config the mock config for this service
* @throws InterruptedException if unable to get data file within timeout
* @throws IOException if unable to create handler due to some IO errors
*/
- public MockService(Executor executor, AccessLog accessLog, FileAcquirer fileAcquirer, MockserviceConfig config, Metric metric) throws InterruptedException, IOException {
- super(executor, accessLog, metric);
+ public MockService(Executor executor, FileAcquirer fileAcquirer, MockserviceConfig config, Metric metric) throws InterruptedException, IOException {
+ super(executor, metric);
File dataFile = fileAcquirer.waitFor(config.file(), config.fileAcquirerTimeout(), TimeUnit.SECONDS);
this.handler = createHandler(dataFile);
}
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java b/container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java
index 9bb9819cd1f..0d20fc05586 100644
--- a/container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java
+++ b/container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java
@@ -26,43 +26,33 @@ import java.util.logging.Level;
*
* @author Steinar Knutsen
*/
-// TODO Vespa 8: Deprecate all constructors taking AccessLog as parameter
+// TODO Vespa 8: Remove deprecated constructors
public abstract class LoggingRequestHandler extends ThreadedHttpRequestHandler {
- public LoggingRequestHandler(Executor executor, AccessLog ignored) {
- this(executor, ignored, null);
- }
-
- public LoggingRequestHandler(Executor executor) {
- this(executor, null, null);
- }
-
public static class Context {
final Executor executor;
- final AccessLog ignored;
final Metric metric;
- @Inject
+ /** @deprecated Use {@link #Context(Executor, Metric)} instead */
+ @Deprecated(forRemoval = true, since = "7")
public Context(Executor executor, AccessLog ignored, Metric metric) {
- this.executor = executor;
- this.ignored = ignored;
- this.metric = metric;
+ this(executor, metric);
}
-
+ @Inject
public Context(Executor executor, Metric metric) {
- this(executor, null, metric);
+ this.executor = executor;
+ this.metric = metric;
}
public Context(Context other) {
this.executor = other.executor;
- this.ignored = other.ignored;
this.metric = other.metric;
}
public Executor getExecutor() { return executor; }
- public AccessLog getAccessLog() { return ignored; }
+ @Deprecated(forRemoval = true, since = "7") public AccessLog getAccessLog() { return null; }
public Metric getMetric() { return metric; }
}
@@ -74,24 +64,45 @@ public abstract class LoggingRequestHandler extends ThreadedHttpRequestHandler {
command.run();
}
},
- AccessLog.voidAccessLog(),
null);
}
@Inject
public LoggingRequestHandler(Context ctx) {
- this(ctx.executor, ctx.ignored, ctx.metric);
+ this(ctx.executor, ctx.metric);
+ }
+
+ /** @deprecated Use {@link #LoggingRequestHandler(Executor)} instead */
+ @Deprecated(forRemoval = true, since = "7")
+ public LoggingRequestHandler(Executor executor, AccessLog ignored) {
+ this(executor, (Metric)null);
+ }
+
+ public LoggingRequestHandler(Executor executor) {
+ this(executor, (Metric)null);
}
public LoggingRequestHandler(Context ctx, boolean allowAsyncResponse) {
- this(ctx.executor, ctx.ignored, ctx.metric, allowAsyncResponse);
+ this(ctx.executor, ctx.metric, allowAsyncResponse);
+ }
+
+ public LoggingRequestHandler(Executor executor, Metric metric) {
+ this(executor, metric, false);
}
+ /** @deprecated Use {@link #LoggingRequestHandler(Executor, Metric)} instead */
+ @Deprecated(forRemoval = true, since = "7")
public LoggingRequestHandler(Executor executor, AccessLog ignored, Metric metric) {
- this(executor, ignored, metric, false);
+ this(executor, metric, false);
}
+ /** @deprecated Use {@link #LoggingRequestHandler(Executor, Metric, boolean)} instead */
+ @Deprecated(forRemoval = true, since = "7")
public LoggingRequestHandler(Executor executor, AccessLog ignored, Metric metric, boolean allowAsyncResponse) {
+ this(executor, metric, allowAsyncResponse);
+ }
+
+ public LoggingRequestHandler(Executor executor, Metric metric, boolean allowAsyncResponse) {
super(executor, metric, allowAsyncResponse);
}
diff --git a/container-core/src/main/java/com/yahoo/processing/handler/AbstractProcessingHandler.java b/container-core/src/main/java/com/yahoo/processing/handler/AbstractProcessingHandler.java
index 6ab71c9a9dc..a4b2db74300 100644
--- a/container-core/src/main/java/com/yahoo/processing/handler/AbstractProcessingHandler.java
+++ b/container-core/src/main/java/com/yahoo/processing/handler/AbstractProcessingHandler.java
@@ -13,7 +13,6 @@ import com.yahoo.container.jdisc.ContentChannelOutputStream;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.LoggingRequestHandler;
-import com.yahoo.container.jdisc.VespaHeaders;
import com.yahoo.container.logging.AccessLog;
import com.yahoo.jdisc.Metric;
import com.yahoo.jdisc.handler.ContentChannel;
@@ -29,15 +28,8 @@ import com.yahoo.processing.rendering.Renderer;
import com.yahoo.processing.request.CompoundName;
import com.yahoo.processing.request.ErrorMessage;
import com.yahoo.processing.request.Properties;
-import com.yahoo.processing.response.Data;
-import com.yahoo.processing.response.DataList;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.concurrent.Executor;
import static com.yahoo.component.chain.ChainsConfigurer.prepareChainRegistry;
@@ -68,9 +60,9 @@ public abstract class AbstractProcessingHandler<COMPONENT extends Processor> ext
public AbstractProcessingHandler(ChainRegistry<COMPONENT> chainRegistry,
ComponentRegistry<Renderer> renderers,
Executor executor,
- AccessLog accessLog,
+ AccessLog ignored,
Metric metric) {
- super(executor, accessLog, metric, true);
+ super(executor, metric, true);
renderingExecutor = executor;
this.chainRegistry = chainRegistry;
this.renderers = renderers;
@@ -87,16 +79,16 @@ public abstract class AbstractProcessingHandler<COMPONENT extends Processor> ext
public AbstractProcessingHandler(ChainRegistry<COMPONENT> chainRegistry,
ComponentRegistry<Renderer> renderers,
Executor executor,
- AccessLog accessLog) {
- this(chainRegistry, renderers, executor, accessLog, null);
+ AccessLog ignored) {
+ this(chainRegistry, renderers, executor, ignored, null);
}
public AbstractProcessingHandler(ChainsConfig processingChainsConfig,
ComponentRegistry <COMPONENT> chainedComponents,
ComponentRegistry<Renderer> renderers,
Executor executor,
- AccessLog accessLog) {
- this(processingChainsConfig, chainedComponents, renderers, executor, accessLog, null);
+ AccessLog ignored) {
+ this(processingChainsConfig, chainedComponents, renderers, executor, ignored, null);
}
@Inject
@@ -104,9 +96,9 @@ public abstract class AbstractProcessingHandler<COMPONENT extends Processor> ext
ComponentRegistry<COMPONENT> chainedComponents,
ComponentRegistry<Renderer> renderers,
Executor executor,
- AccessLog accessLog,
+ AccessLog ignored,
Metric metric) {
- this(createChainRegistry(processingChainsConfig, chainedComponents), renderers, executor, accessLog, metric);
+ this(createChainRegistry(processingChainsConfig, chainedComponents), renderers, executor, ignored, metric);
}
/** Throws UnsupportedOperationException: Call handle(request, channel instead) */
diff --git a/container-core/src/test/java/com/yahoo/container/handler/test/MockServiceTest.java b/container-core/src/test/java/com/yahoo/container/handler/test/MockServiceTest.java
index f1a9fdcd0a3..cd5a3ce860a 100644
--- a/container-core/src/test/java/com/yahoo/container/handler/test/MockServiceTest.java
+++ b/container-core/src/test/java/com/yahoo/container/handler/test/MockServiceTest.java
@@ -3,7 +3,6 @@ package com.yahoo.container.handler.test;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
-import com.yahoo.container.logging.AccessLog;
import com.yahoo.filedistribution.fileacquirer.MockFileAcquirer;
import org.junit.Test;
@@ -75,7 +74,7 @@ public class MockServiceTest {
private HttpResponse runHandlerWithFile(com.yahoo.jdisc.http.HttpRequest.Method method, String path, File file) throws InterruptedException, IOException {
MockserviceConfig.Builder builder = new MockserviceConfig.Builder();
builder.file(file.getPath());
- MockService handler = new MockService(new MockExecutor(), AccessLog.voidAccessLog(), MockFileAcquirer.returnFile(file), new MockserviceConfig(builder), null);
+ MockService handler = new MockService(new MockExecutor(), MockFileAcquirer.returnFile(file), new MockserviceConfig(builder), null);
return handler.handle(HttpRequest.createTestRequest(path, method));
}
diff --git a/container-core/src/test/java/com/yahoo/container/jdisc/LoggingRequestHandlerTestCase.java b/container-core/src/test/java/com/yahoo/container/jdisc/LoggingRequestHandlerTestCase.java
index 734b3fa11af..34144ee8a59 100644
--- a/container-core/src/test/java/com/yahoo/container/jdisc/LoggingRequestHandlerTestCase.java
+++ b/container-core/src/test/java/com/yahoo/container/jdisc/LoggingRequestHandlerTestCase.java
@@ -2,12 +2,9 @@
package com.yahoo.container.jdisc;
import com.google.inject.Key;
-import com.yahoo.component.provider.ComponentRegistry;
import com.yahoo.container.handler.Coverage;
import com.yahoo.container.handler.Timing;
-import com.yahoo.container.logging.AccessLog;
import com.yahoo.container.logging.HitCounts;
-import com.yahoo.container.logging.RequestLogHandler;
import com.yahoo.jdisc.Container;
import com.yahoo.jdisc.References;
import com.yahoo.jdisc.ResourceReference;
@@ -102,8 +99,8 @@ public class LoggingRequestHandlerTestCase {
static final class AccessLogTestHandler extends LoggingRequestHandler {
- public AccessLogTestHandler(Executor executor, AccessLog accessLog) {
- super(executor, accessLog);
+ public AccessLogTestHandler(Executor executor) {
+ super(executor);
}
@Override
@@ -115,10 +112,8 @@ public class LoggingRequestHandlerTestCase {
@Before
public void setUp() throws Exception {
- ComponentRegistry<RequestLogHandler> implementers = new ComponentRegistry<>();
- implementers.freeze();
executor = Executors.newCachedThreadPool();
- handler = new AccessLogTestHandler(executor, new AccessLog(implementers));
+ handler = new AccessLogTestHandler(executor);
}
@After
diff --git a/container-search/src/main/java/com/yahoo/search/handler/SearchHandler.java b/container-search/src/main/java/com/yahoo/search/handler/SearchHandler.java
index 0337fe9eab9..2b27f60ef73 100644
--- a/container-search/src/main/java/com/yahoo/search/handler/SearchHandler.java
+++ b/container-search/src/main/java/com/yahoo/search/handler/SearchHandler.java
@@ -120,24 +120,23 @@ public class SearchHandler extends LoggingRequestHandler {
public SearchHandler(Statistics statistics,
Metric metric,
ContainerThreadPool threadpool,
- AccessLog accessLog,
+ AccessLog ignored,
CompiledQueryProfileRegistry queryProfileRegistry,
ContainerHttpConfig config,
ExecutionFactory executionFactory) {
- this(statistics, metric, threadpool.executor(), accessLog, queryProfileRegistry, config, executionFactory);
+ this(statistics, metric, threadpool.executor(), ignored, queryProfileRegistry, config, executionFactory);
}
public SearchHandler(Statistics statistics,
Metric metric,
Executor executor,
- AccessLog accessLog,
+ AccessLog ignored,
CompiledQueryProfileRegistry queryProfileRegistry,
ContainerHttpConfig containerHttpConfig,
ExecutionFactory executionFactory) {
this(statistics,
metric,
executor,
- accessLog,
queryProfileRegistry,
executionFactory,
containerHttpConfig.numQueriesToTraceOnDebugAfterConstruction(),
@@ -152,14 +151,13 @@ public class SearchHandler extends LoggingRequestHandler {
public SearchHandler(Statistics statistics,
Metric metric,
Executor executor,
- AccessLog accessLog,
+ AccessLog ignored,
QueryProfilesConfig queryProfileConfig,
ContainerHttpConfig containerHttpConfig,
ExecutionFactory executionFactory) {
this(statistics,
metric,
executor,
- accessLog,
QueryProfileConfigurer.createFromConfig(queryProfileConfig).compile(),
executionFactory,
containerHttpConfig.numQueriesToTraceOnDebugAfterConstruction(),
@@ -170,22 +168,21 @@ public class SearchHandler extends LoggingRequestHandler {
public SearchHandler(Statistics statistics,
Metric metric,
Executor executor,
- AccessLog accessLog,
+ AccessLog ignored,
CompiledQueryProfileRegistry queryProfileRegistry,
ExecutionFactory executionFactory,
Optional<String> hostResponseHeaderKey) {
- this(statistics, metric, executor, accessLog, queryProfileRegistry, executionFactory, 0, hostResponseHeaderKey);
+ this(statistics, metric, executor, queryProfileRegistry, executionFactory, 0, hostResponseHeaderKey);
}
private SearchHandler(Statistics statistics,
Metric metric,
Executor executor,
- AccessLog accessLog,
CompiledQueryProfileRegistry queryProfileRegistry,
ExecutionFactory executionFactory,
long numQueriesToTraceOnDebugAfterStartup,
Optional<String> hostResponseHeaderKey) {
- super(executor, accessLog, metric, true);
+ super(executor, metric, true);
log.log(Level.FINE, "SearchHandler.init " + System.identityHashCode(this));
this.queryProfileRegistry = queryProfileRegistry;
this.executionFactory = executionFactory;
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandler.java
index cedae5b5a46..88191bc836b 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandler.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/billing/BillingApiHandler.java
@@ -63,9 +63,8 @@ public class BillingApiHandler extends LoggingRequestHandler {
private final TenantController tenantController;
public BillingApiHandler(Executor executor,
- AccessLog accessLog,
Controller controller) {
- super(executor, accessLog);
+ super(executor);
this.billingController = controller.serviceRegistry().billingController();
this.applicationController = controller.applications();
this.tenantController = controller.tenants();
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/systemflags/SystemFlagsHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/systemflags/SystemFlagsHandler.java
index 43a03bf10f3..129f1e109df 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/systemflags/SystemFlagsHandler.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/systemflags/SystemFlagsHandler.java
@@ -5,8 +5,6 @@ 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.container.logging.AccessLog;
-import java.util.logging.Level;
import com.yahoo.restapi.ErrorResponse;
import com.yahoo.restapi.JacksonJsonResponse;
import com.yahoo.restapi.Path;
@@ -16,6 +14,7 @@ import com.yahoo.vespa.hosted.controller.api.systemflags.v1.FlagsTarget;
import com.yahoo.vespa.hosted.controller.api.systemflags.v1.SystemFlagsDataArchive;
import java.util.concurrent.Executor;
+import java.util.logging.Level;
/**
* Handler implementation for '/system-flags/v1', an API for controlling system-wide feature flags
@@ -32,9 +31,8 @@ public class SystemFlagsHandler extends LoggingRequestHandler {
@Inject
public SystemFlagsHandler(ZoneRegistry zoneRegistry,
ServiceIdentityProvider identityProvider,
- Executor executor,
- AccessLog accessLog) {
- super(executor, accessLog);
+ Executor executor) {
+ super(executor);
this.deployer = new SystemFlagsDeployer(identityProvider, zoneRegistry.system(), FlagsTarget.getAllTargetsInSystem(zoneRegistry));
}
diff --git a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/TestRunnerHandler.java b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/TestRunnerHandler.java
index 77c68012005..f32714ec4da 100644
--- a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/TestRunnerHandler.java
+++ b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/TestRunnerHandler.java
@@ -9,7 +9,6 @@ import com.yahoo.container.jdisc.EmptyResponse;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.container.jdisc.LoggingRequestHandler;
-import com.yahoo.container.logging.AccessLog;
import com.yahoo.slime.Cursor;
import com.yahoo.slime.JsonFormat;
import com.yahoo.slime.Slime;
@@ -47,8 +46,8 @@ public class TestRunnerHandler extends LoggingRequestHandler {
private final boolean useOsgiMode;
@Inject
- public TestRunnerHandler(Executor executor, AccessLog accessLog, TestRunner junitRunner, LegacyTestRunner testRunner) {
- super(executor, accessLog);
+ public TestRunnerHandler(Executor executor, TestRunner junitRunner, LegacyTestRunner testRunner) {
+ super(executor);
this.junitRunner = junitRunner;
this.testRunner = testRunner;
this.useOsgiMode = junitRunner.isSupported();
diff --git a/vespa-osgi-testrunner/src/test/java/com/yahoo/vespa/testrunner/TestRunnerHandlerTest.java b/vespa-osgi-testrunner/src/test/java/com/yahoo/vespa/testrunner/TestRunnerHandlerTest.java
index 2234bdff0a0..16f1c7de0ff 100644
--- a/vespa-osgi-testrunner/src/test/java/com/yahoo/vespa/testrunner/TestRunnerHandlerTest.java
+++ b/vespa-osgi-testrunner/src/test/java/com/yahoo/vespa/testrunner/TestRunnerHandlerTest.java
@@ -4,7 +4,6 @@ package com.yahoo.vespa.testrunner;
import ai.vespa.hosted.api.TestDescriptor;
import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
-import com.yahoo.container.logging.AccessLog;
import com.yahoo.test.json.JsonTestHelper;
import com.yahoo.vespa.testrunner.legacy.LegacyTestRunner;
import org.junit.jupiter.api.BeforeAll;
@@ -20,7 +19,6 @@ import java.util.logging.LogRecord;
import static com.yahoo.jdisc.http.HttpRequest.Method.GET;
import static org.junit.Assert.assertEquals;
-
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -49,7 +47,6 @@ public class TestRunnerHandlerTest {
testRunnerHandler = new TestRunnerHandler(
Executors.newSingleThreadExecutor(),
- AccessLog.voidAccessLog(),
new MockJunitRunner(LegacyTestRunner.Status.SUCCESS, testReport),
null);
}
@@ -85,7 +82,6 @@ public class TestRunnerHandlerTest {
when(testRunner.getReport()).thenReturn(null);
testRunnerHandler = new TestRunnerHandler(
Executors.newSingleThreadExecutor(),
- AccessLog.voidAccessLog(),
testRunner, null);
HttpResponse response = testRunnerHandler.handle(HttpRequest.createTestRequest("http://localhost:1234/tester/v1/log", GET));
@@ -103,7 +99,6 @@ public class TestRunnerHandlerTest {
testRunnerHandler = new TestRunnerHandler(
Executors.newSingleThreadExecutor(),
- AccessLog.voidAccessLog(),
testRunner, legacyTestRunner);
HttpResponse response = testRunnerHandler.handle(HttpRequest.createTestRequest("http://localhost:1234/tester/v1/log", GET));
diff --git a/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunnerHandler.java b/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunnerHandler.java
index 8f9966a898f..854a9aa1874 100644
--- a/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunnerHandler.java
+++ b/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunnerHandler.java
@@ -7,7 +7,6 @@ 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.container.logging.AccessLog;
import com.yahoo.io.IOUtils;
import com.yahoo.slime.Cursor;
import com.yahoo.slime.JsonFormat;
@@ -37,8 +36,8 @@ public class TestRunnerHandler extends LoggingRequestHandler {
private final TestRunner testRunner;
@Inject
- public TestRunnerHandler(Executor executor, AccessLog accessLog, TestRunner testRunner) {
- super(executor, accessLog);
+ public TestRunnerHandler(Executor executor, TestRunner testRunner) {
+ super(executor);
this.testRunner = testRunner;
}
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")) {