aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2022-01-19 14:34:42 +0100
committerGitHub <noreply@github.com>2022-01-19 14:34:42 +0100
commitc1ef6231340552c83282dd300ff68c00245eea33 (patch)
tree06c954df72710d0c567d627262c61cffd52f8629
parent02aa747942ba9dcd03e97c5c1c0f9cbe0eeef55f (diff)
parent983849fd28c3ddac80a26400ba1703e419cb6612 (diff)
Merge pull request #20874 from vespa-engine/bjorncs/vespa-http-client
Output deprecation warning on vespa-http-client usage
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java
index 29ca1e2d4fd..fa214808ae3 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java
@@ -16,6 +16,8 @@ import java.time.Instant;
import java.util.Optional;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.logging.Logger;
/**
* Implementation of FeedClient. It is a thin layer on top of multiClusterHandler and multiClusterResultAggregator.
@@ -24,6 +26,9 @@ import java.util.concurrent.TimeUnit;
*/
public class FeedClientImpl implements FeedClient {
+ private static final Logger log = Logger.getLogger(FeedClientImpl.class.getName());
+ private static final AtomicBoolean warningPrinted = new AtomicBoolean(false);
+
private final Clock clock;
private final OperationProcessor operationProcessor;
private final long closeTimeoutMs;
@@ -46,6 +51,10 @@ public class FeedClientImpl implements FeedClient {
sessionParams,
timeoutExecutor,
clock);
+ if (warningPrinted.compareAndSet(false, true)) {
+ log.warning("The vespa-http-client is deprecated and will be removed in Vespa 8. " +
+ "See https://docs.vespa.ai/en/vespa8-release-notes.html");
+ }
}
@Override