diff options
author | Tor Brede Vekterli <vekterli@oath.com> | 2018-06-12 16:18:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-12 16:18:54 +0200 |
commit | 6a6031784289940aeef513305662df9d88b7cdf3 (patch) | |
tree | f77b8bc8a56c518af5471077d3dab599cf6a7bff | |
parent | 22796dddd3dc025018093783328ac87535ffecd9 (diff) |
Revert "Remove deprecated and undocumented feed handlers from container model"
11 files changed, 20 insertions, 8 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java b/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java index b55cfb636ea..9801eab9f2b 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java @@ -41,6 +41,8 @@ public class ContainerDocumentApi implements FeederConfig.Producer { private void setupHandlers(ContainerCluster cluster) { cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandler", "feed")); + cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandlerRemove", "remove")); + cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation", "removelocation")); cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandlerGet", "get")); cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandlerVisit", "visit")); cluster.addComponent(newVespaClientHandler("com.yahoo.document.restapi.resource.RestApi", "document/v1/*")); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessControlTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessControlTest.java index c7e71c8c38d..c734addb8ce 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessControlTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessControlTest.java @@ -37,6 +37,8 @@ public class AccessControlTest extends ContainerModelBuilderTestBase { "/custom-handler/", "/search/", "/feed/", + "/remove/", + "/removelocation/", "/get/", "/visit/", "/document/", diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerDocumentApiBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerDocumentApiBuilderTest.java index e318d4d6828..8158db51271 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerDocumentApiBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerDocumentApiBuilderTest.java @@ -75,6 +75,8 @@ public class ContainerDocumentApiBuilderTest extends ContainerModelBuilderTestBa verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandler", "feed"); verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerCompatibility", "document"); verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerGet", "get"); + verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerRemove", "remove"); + verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation", "removelocation"); verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerStatus", "feedstatus"); verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerVisit", "visit"); verifyCustomBindings("com.yahoo.vespa.http.server.FeedHandler", ContainerCluster.RESERVED_URI_PREFIX + "/feedapi"); @@ -128,6 +130,20 @@ public class ContainerDocumentApiBuilderTest extends ContainerModelBuilderTestBa assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerGet").getServerBindings().contains("https://*/get/"), is(true)); assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerGet").getServerBindings().size(), equalTo(4)); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove"), not(nullValue())); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove").getServerBindings().contains("http://*/remove"), is(true)); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove").getServerBindings().contains("https://*/remove"), is(true)); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove").getServerBindings().contains("http://*/remove/"), is(true)); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove").getServerBindings().contains("https://*/remove/"), is(true)); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove").getServerBindings().size(), equalTo(4)); + + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation"), not(nullValue())); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation").getServerBindings().contains("http://*/removelocation"), is(true)); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation").getServerBindings().contains("https://*/removelocation"), is(true)); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation").getServerBindings().contains("http://*/removelocation/"), is(true)); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation").getServerBindings().contains("https://*/removelocation/"), is(true)); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation").getServerBindings().size(), equalTo(4)); + assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerStatus"), not(nullValue())); assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerStatus").getServerBindings().contains("http://*/feedstatus"), is(true)); assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerStatus").getServerBindings().contains("https://*/feedstatus"), is(true)); diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/StatusResponse.java b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/StatusResponse.java index e14144508c1..c6b5a6cb4fe 100755 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/StatusResponse.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/StatusResponse.java @@ -11,7 +11,6 @@ import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; -@Deprecated public class StatusResponse extends HttpResponse { MetricManager manager; diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerCompatibility.java b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerCompatibility.java index cced94d2d85..b1a7b6dbdeb 100755 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerCompatibility.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerCompatibility.java @@ -9,7 +9,6 @@ import com.yahoo.container.jdisc.HttpRequest; import com.yahoo.container.jdisc.HttpResponse; import com.yahoo.container.jdisc.ThreadedHttpRequestHandler; -@Deprecated public class VespaFeedHandlerCompatibility extends ThreadedHttpRequestHandler { private final VespaFeedHandlerGet getHandler; diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerGet.java b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerGet.java index b2108b74543..70631e0e66c 100755 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerGet.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerGet.java @@ -11,7 +11,6 @@ import com.yahoo.container.jdisc.HttpResponse; import com.yahoo.container.jdisc.ThreadedHttpRequestHandler; import com.yahoo.search.handler.SearchHandler; -@Deprecated public class VespaFeedHandlerGet extends ThreadedHttpRequestHandler { private final SearchHandler searchHandler; diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerRemove.java b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerRemove.java index ba78a9f4a0c..36ab8090e95 100755 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerRemove.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerRemove.java @@ -21,7 +21,6 @@ import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.concurrent.Executor; -@Deprecated public class VespaFeedHandlerRemove extends VespaFeedHandlerBase { @Inject diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerRemoveLocation.java b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerRemoveLocation.java index 72722a85ddd..04ca6798b4c 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerRemoveLocation.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerRemoveLocation.java @@ -20,7 +20,6 @@ import com.yahoo.vespaclient.config.FeederConfig; import java.util.concurrent.Executor; -@Deprecated public class VespaFeedHandlerRemoveLocation extends VespaFeedHandlerBase { @Inject diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerStatus.java b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerStatus.java index a209c1d6213..94ad18fbb51 100755 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerStatus.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerStatus.java @@ -15,7 +15,6 @@ import com.yahoo.metrics.MetricManager; import com.yahoo.metrics.MetricSet; import com.yahoo.vespaclient.config.FeederConfig; -@Deprecated public class VespaFeedHandlerStatus extends ThreadedHttpRequestHandler { private MetricManager manager; diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerVisit.java b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerVisit.java index bb5e8c056db..c9af0933799 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerVisit.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/feedhandler/VespaFeedHandlerVisit.java @@ -14,7 +14,6 @@ import com.yahoo.search.handler.SearchHandler; /** * @author thomasg */ -@Deprecated public class VespaFeedHandlerVisit extends ThreadedHttpRequestHandler { private final SearchHandler searchHandler; diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java b/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java index 08cc9c914eb..d1ed02209b2 100755 --- a/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java +++ b/vespaclient-container-plugin/src/test/java/com/yahoo/feedhandler/VespaFeedHandlerTestCase.java @@ -39,7 +39,6 @@ import java.util.zip.GZIPOutputStream; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -@SuppressWarnings("deprecation") // Tests a deprecated class public class VespaFeedHandlerTestCase { private VespaFeedHandler feedHandler; |