diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-05-16 13:20:56 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2022-06-08 11:45:22 +0200 |
commit | 4639be4f03d58a0b8df7b1ecb573e7d344a53ed5 (patch) | |
tree | 236d8b271e2e51c5e15df08bc19c4c97860ca16a /vespaclient-core | |
parent | 1e03a00cd6f69cf63d942885e97ff7582778c7f5 (diff) |
Remove top-level <clients> element and LoadType concept
Load types have not been properly supported for some time, so remove
the remaining API surfaces exposing them. Since load type config was
the last remaining use of <clients> in services.xml, remove that one
as well.
Diffstat (limited to 'vespaclient-core')
-rwxr-xr-x | vespaclient-core/src/main/java/com/yahoo/feedapi/MessageBusSessionFactory.java | 3 | ||||
-rw-r--r-- | vespaclient-core/src/main/java/com/yahoo/feedapi/MessagePropertyProcessor.java | 53 |
2 files changed, 3 insertions, 53 deletions
diff --git a/vespaclient-core/src/main/java/com/yahoo/feedapi/MessageBusSessionFactory.java b/vespaclient-core/src/main/java/com/yahoo/feedapi/MessageBusSessionFactory.java index d9b1190aaed..13d6f5d3323 100755 --- a/vespaclient-core/src/main/java/com/yahoo/feedapi/MessageBusSessionFactory.java +++ b/vespaclient-core/src/main/java/com/yahoo/feedapi/MessageBusSessionFactory.java @@ -19,12 +19,11 @@ public class MessageBusSessionFactory implements SessionFactory { this(processor, null, null); } - @SuppressWarnings("removal") // TODO: Remove on Vespa 8 private MessageBusSessionFactory(MessagePropertyProcessor processor, DocumentmanagerConfig documentmanagerConfig, SlobroksConfig slobroksConfig) { this.processor = processor; - MessageBusParams params = new MessageBusParams(processor.getLoadTypes()); + MessageBusParams params = new MessageBusParams(); params.setTraceLevel(processor.getFeederOptions().getTraceLevel()); RPCNetworkParams rpcNetworkParams = processor.getFeederOptions().getNetworkParams(); if (slobroksConfig != null) // not set: will subscribe diff --git a/vespaclient-core/src/main/java/com/yahoo/feedapi/MessagePropertyProcessor.java b/vespaclient-core/src/main/java/com/yahoo/feedapi/MessagePropertyProcessor.java index 84fbe63a576..934e86fc14b 100644 --- a/vespaclient-core/src/main/java/com/yahoo/feedapi/MessagePropertyProcessor.java +++ b/vespaclient-core/src/main/java/com/yahoo/feedapi/MessagePropertyProcessor.java @@ -4,13 +4,10 @@ package com.yahoo.feedapi; import com.yahoo.concurrent.SystemTimer; import com.yahoo.config.subscription.ConfigSubscriber; import com.yahoo.container.jdisc.HttpRequest; -import com.yahoo.documentapi.messagebus.loadtypes.LoadType; -import com.yahoo.documentapi.messagebus.loadtypes.LoadTypeSet; import com.yahoo.documentapi.messagebus.protocol.DocumentMessage; import com.yahoo.documentapi.messagebus.protocol.DocumentProtocol; import com.yahoo.messagebus.Message; import com.yahoo.messagebus.routing.Route; -import com.yahoo.vespa.config.content.LoadTypeConfig; import com.yahoo.vespaclient.config.FeederConfig; import java.util.logging.Level; @@ -33,23 +30,12 @@ public class MessagePropertyProcessor implements ConfigSubscriber.SingleSubscrib private String defaultDocprocChain = null; private boolean defaultAbortOnDocumentError = true; private boolean defaultAbortOnSendError = true; - private final LoadTypeSet loadTypes; // TODO remove on Vespa 8 private boolean configChanged = false; public MessagePropertyProcessor(FeederConfig config) { - loadTypes = new LoadTypeSet(); configure(config); } - /** - * @deprecated load types are deprecated. Use constructor without LoadTypeConfig instead. - */ - @Deprecated(forRemoval = true) // TODO: Remove on Vespa 8 - public MessagePropertyProcessor(FeederConfig config, LoadTypeConfig loadTypeCfg) { - loadTypes = new LoadTypeSet(); - configure(config, loadTypeCfg); - } - public void setRoute(String routeOverride) { defaultRoute = Route.parse(routeOverride); } @@ -60,7 +46,6 @@ public class MessagePropertyProcessor implements ConfigSubscriber.SingleSubscrib String priorityParam = null; String abortOnDocErrorParam = null; String abortOnFeedErrorParam = null; - String loadTypeStr = null; String traceStr = null; String createIfNonExistentParam = null; Double totalTimeoutParam = null; @@ -81,7 +66,6 @@ public class MessagePropertyProcessor implements ConfigSubscriber.SingleSubscrib traceStr = request.getProperty("tracelevel"); abortOnDocErrorParam = request.getProperty("abortondocumenterror"); abortOnFeedErrorParam = request.getProperty("abortonfeederror"); - loadTypeStr = request.getProperty("loadtype"); createIfNonExistentParam = request.getProperty("createifnonexistent"); } @@ -109,16 +93,7 @@ public class MessagePropertyProcessor implements ConfigSubscriber.SingleSubscrib priority = DocumentProtocol.getPriorityByName(priorityParam); } - LoadType loadType = null; - if (loadTypes != null && loadTypeStr != null) { - loadType = loadTypes.getNameMap().get(loadTypeStr); - } - - if (loadType == null) { - loadType = LoadType.DEFAULT; - } - - return new PropertySetter(route, timeout, totalTimeout, priority, loadType, retry, abortOnDocumentError, abortOnFeedError, createIfNonExistent, traceStr != null ? Integer.parseInt(traceStr) : 0); + return new PropertySetter(route, timeout, totalTimeout, priority, retry, abortOnDocumentError, abortOnFeedError, createIfNonExistent, traceStr != null ? Integer.parseInt(traceStr) : 0); } public long getDefaultTimeoutMillis() { return defaultTimeoutMillis; } @@ -135,23 +110,6 @@ public class MessagePropertyProcessor implements ConfigSubscriber.SingleSubscrib return feederOptions; } - /** - * @deprecated load types are deprecated. configure without LoadTypeConfig instead. - */ - @Deprecated(forRemoval = true) // TODO: Remove on Vespa 8 - public synchronized void configure(FeederConfig config, LoadTypeConfig loadTypeConfig) { - loadTypes.configure(loadTypeConfig); - configure(config); - } - - /** - * @deprecated load types are deprecated - */ - @Deprecated(forRemoval = true) // TODO: Remove on Vespa 8 - LoadTypeSet getLoadTypes() { - return loadTypes; - } - public synchronized void configure(FeederConfig config) { if (feederOptions != null) { setConfigChanged(true); @@ -191,17 +149,15 @@ public class MessagePropertyProcessor implements ConfigSubscriber.SingleSubscrib private boolean abortOnDocumentError; private boolean abortOnFeedError; private boolean createIfNonExistent; - private LoadType loadType; // TODO remove on Vespa 8 private int traceLevel; - PropertySetter(Route route, long timeout, long totalTimeout, DocumentProtocol.Priority priority, LoadType loadType, + PropertySetter(Route route, long timeout, long totalTimeout, DocumentProtocol.Priority priority, boolean retryEnabled, boolean abortOnDocumentError, boolean abortOnFeedError, boolean createIfNonExistent, int traceLevel) { this.route = route; this.timeout = timeout; this.totalTimeout = totalTimeout; this.priority = priority; - this.loadType = loadType; this.retryEnabled = retryEnabled; this.abortOnDocumentError = abortOnDocumentError; this.abortOnFeedError = abortOnFeedError; @@ -253,11 +209,6 @@ public class MessagePropertyProcessor implements ConfigSubscriber.SingleSubscrib msg.setRetryEnabled(retryEnabled); msg.getTrace().setLevel(Math.max(getFeederOptions().getTraceLevel(), traceLevel)); - if (loadType != null) { - ((DocumentMessage) msg).setLoadType(loadType); - ((DocumentMessage) msg).setPriority(loadType.getPriority()); - } - if (priority != null) { ((DocumentMessage) msg).setPriority(priority); } |