diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2022-01-19 13:01:11 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2022-01-19 13:03:18 +0100 |
commit | 983849fd28c3ddac80a26400ba1703e419cb6612 (patch) | |
tree | ae122b57326a62ce83af601363d90b1569eed3a8 /vespa-http-client | |
parent | f2bd1f3efdfbf4250e731f62dccf31adc7251dca (diff) |
Output deprecation warning on vespa-http-client usage
Diffstat (limited to 'vespa-http-client')
-rw-r--r-- | vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/api/FeedClientImpl.java | 9 |
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 |