summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-09-25 11:35:34 +0200
committerJon Marius Venstad <venstad@gmail.com>2020-09-25 14:19:41 +0200
commitc12f4775a03f1d16420a689f0b9d50d35c32413b (patch)
tree965996858567a2179cb6e81ee246d2bea551a318 /vespaclient-container-plugin
parent9d5b7c9573bd2187bd95afe821b0d066b97a34af (diff)
Copyright header, one more catch, unused parameter GC
Diffstat (limited to 'vespaclient-container-plugin')
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutor.java6
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java11
2 files changed, 10 insertions, 7 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutor.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutor.java
index 05edfb6e95f..4700272de3c 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutor.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/DocumentOperationExecutor.java
@@ -1,3 +1,4 @@
+// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.document.restapi;
import com.yahoo.cloud.config.ClusterListConfig;
@@ -83,9 +84,8 @@ public class DocumentOperationExecutor {
private final Thread retryWorker;
private final Thread timeoutWorker;
- public DocumentOperationExecutor(DocumentmanagerConfig documentmanagerConfig, ClusterListConfig clustersConfig,
- AllClustersBucketSpacesConfig bucketsConfig, DocumentOperationExecutorConfig executorConfig,
- DocumentAccess access, Clock clock) {
+ public DocumentOperationExecutor(ClusterListConfig clustersConfig, AllClustersBucketSpacesConfig bucketsConfig,
+ DocumentOperationExecutorConfig executorConfig, DocumentAccess access, Clock clock) {
this(Duration.ofMillis(executorConfig.resendDelayMillis()),
Duration.ofSeconds(executorConfig.defaultTimeoutSeconds()),
Duration.ofSeconds(executorConfig.visitTimeoutSeconds()),
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java
index 64bc4913de0..3f2ac74c5ca 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/resource/DocumentV1ApiHandler.java
@@ -1,4 +1,4 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.document.restapi.resource;
import com.fasterxml.jackson.core.JsonFactory;
@@ -127,8 +127,7 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler {
AllClustersBucketSpacesConfig bucketSpacesConfig,
DocumentOperationExecutorConfig executorConfig) {
this(clock,
- new DocumentOperationExecutor(documentManagerConfig, clusterListConfig, bucketSpacesConfig, executorConfig,
- documentAccess, clock),
+ new DocumentOperationExecutor(clusterListConfig, bucketSpacesConfig, executorConfig, documentAccess, clock),
new DocumentOperationParser(documentManagerConfig),
metric,
metricReceiver);
@@ -446,8 +445,12 @@ public class DocumentV1ApiHandler extends AbstractRequestHandler {
log.log(FINE, () -> "Problems writing data to jDisc content channel: " + Exceptions.toMessageString(e));
}
finally {
- if (out != null)
+ if (out != null) try {
out.close(logException);
+ }
+ catch (Exception e) {
+ log.log(FINE, () -> "Problems closing jDisc content channel: " + Exceptions.toMessageString(e));
+ }
}
return ignoredContent;
}