summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java44
-rwxr-xr-xconfig-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java7
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/xml/DocumentApiOptionsBuilder.java57
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerDocumentApiBuilderTest.java22
-rw-r--r--vespaclient-java/src/main/java/com/yahoo/vespafeeder/Arguments.java4
-rw-r--r--vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java2
6 files changed, 4 insertions, 132 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 e664ba56d01..58f03bffb30 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
@@ -6,7 +6,6 @@ import com.yahoo.container.bundle.BundleInstantiationSpecification;
import com.yahoo.osgi.provider.model.ComponentModel;
import com.yahoo.vespa.model.container.ContainerCluster;
import com.yahoo.vespa.model.container.component.Handler;
-import com.yahoo.vespaclient.config.FeederConfig;
import java.util.Collection;
import java.util.Collections;
@@ -14,7 +13,7 @@ import java.util.Collections;
/**
* @author Einar M R Rosenvinge
*/
-public class ContainerDocumentApi implements FeederConfig.Producer {
+public class ContainerDocumentApi {
private static final String vespaClientBundleSpecification = "vespaclient-container-plugin";
private final Options options;
@@ -40,51 +39,12 @@ public class ContainerDocumentApi implements FeederConfig.Producer {
return handler;
}
- @Override
- public void getConfig(FeederConfig.Builder builder) {
- if (options.abortondocumenterror != null)
- builder.abortondocumenterror(options.abortondocumenterror);
- if (options.route!= null)
- builder.route(options.route);
- if (options.maxpendingdocs != null)
- builder.maxpendingdocs(options.maxpendingdocs);
- if (options.retryenabled != null)
- builder.retryenabled(options.retryenabled);
- if (options.timeout != null)
- builder.timeout(options.timeout);
- if (options.tracelevel != null)
- builder.tracelevel(options.tracelevel);
- if (options.mbusport != null)
- builder.mbusport(options.mbusport);
- }
-
public static final class Options {
private final Collection<String> bindings;
- private final Boolean abortondocumenterror;
- private final String route;
- private final Integer maxpendingdocs;
- private final Boolean retryenabled;
- private final Double timeout;
- private final Integer tracelevel;
- private final Integer mbusport;
- public Options(Collection<String> bindings,
- Boolean abortondocumenterror,
- String route,
- Integer maxpendingdocs,
- Boolean retryenabled,
- Double timeout,
- Integer tracelevel,
- Integer mbusport) {
+ public Options(Collection<String> bindings) {
this.bindings = Collections.unmodifiableCollection(bindings);
- this.abortondocumenterror = abortondocumenterror;
- this.route = route;
- this.maxpendingdocs = maxpendingdocs;
- this.retryenabled = retryenabled;
- this.timeout = timeout;
- this.tracelevel = tracelevel;
- this.mbusport = mbusport;
}
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
index 446169c0ed2..ad087288799 100755
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
@@ -58,7 +58,6 @@ import com.yahoo.vespa.model.container.search.ContainerSearch;
import com.yahoo.vespa.model.container.search.searchchain.SearchChains;
import com.yahoo.vespa.model.content.Content;
import com.yahoo.vespa.model.search.AbstractSearchCluster;
-import com.yahoo.vespaclient.config.FeederConfig;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
@@ -93,7 +92,6 @@ public abstract class ContainerCluster<CONTAINER extends Container>
HealthMonitorConfig.Producer,
ApplicationMetadataConfig.Producer,
BundlesConfig.Producer,
- FeederConfig.Producer,
IndexInfoConfig.Producer,
IlscriptsConfig.Producer,
SchemamappingConfig.Producer,
@@ -557,11 +555,6 @@ public abstract class ContainerCluster<CONTAINER extends Container>
}
@Override
- public void getConfig(FeederConfig.Builder builder) {
- if (containerDocumentApi != null) containerDocumentApi.getConfig(builder);
- }
-
- @Override
public void getConfig(ContainerMbusConfig.Builder builder) {
if (mbusParams != null) {
if (mbusParams.maxConcurrentFactor != null)
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/DocumentApiOptionsBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/DocumentApiOptionsBuilder.java
index 4602e09eed4..ae74dbdb4a7 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/DocumentApiOptionsBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/DocumentApiOptionsBuilder.java
@@ -21,15 +21,7 @@ public class DocumentApiOptionsBuilder {
private static final String[] DEFAULT_BINDINGS = {"http://*/"};
public static ContainerDocumentApi.Options build(Element spec) {
- return new ContainerDocumentApi.Options(
- getBindings(spec),
- getAbortOnDocumentError(spec),
- getRoute(spec),
- getMaxPendingDocs(spec),
- getRetryEnabled(spec),
- getTimeout(spec),
- getTracelevel(spec),
- getMbusPort(spec));
+ return new ContainerDocumentApi.Options(getBindings(spec));
}
private static List<String> getBindings(Element spec) {
@@ -54,51 +46,4 @@ public class DocumentApiOptionsBuilder {
return binding;
}
- private static String getCleanValue(Element spec, String name) {
- Element elem = XML.getChild(spec, name);
- if (elem == null) {
- return null;
- }
- String value = elem.getFirstChild().getNodeValue();
- if (value == null) {
- return null;
- }
- value = value.trim();
- return value.isEmpty() ? null : value;
- }
-
- private static Integer getMbusPort(Element spec) {
- String value = getCleanValue(spec, "mbusport");
- return value == null ? null : Integer.parseInt(value);
- }
-
- private static Integer getTracelevel(Element spec) {
- String value = getCleanValue(spec, "tracelevel");
- return value == null ? null : Integer.parseInt(value);
- }
-
- private static Double getTimeout(Element spec) {
- String value = getCleanValue(spec, "timeout");
- return value == null ? null : Double.parseDouble(value);
- }
-
- private static Boolean getRetryEnabled(Element spec) {
- String value = getCleanValue(spec, "retryenabled");
- return value == null ? null : Boolean.parseBoolean(value);
- }
-
- private static Integer getMaxPendingDocs(Element spec) {
- String value = getCleanValue(spec, "maxpendingdocs");
- return value == null ? null : Integer.parseInt(value);
- }
-
- private static String getRoute(Element spec) {
- return getCleanValue(spec, "route");
- }
-
- private static Boolean getAbortOnDocumentError(Element spec) {
- String value = getCleanValue(spec, "abortondocumenterror");
- return value == null ? null : Boolean.parseBoolean(value);
- }
-
}
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 c36114edc5c..7e5106b1a71 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
@@ -4,7 +4,6 @@ package com.yahoo.vespa.model.container.xml;
import com.yahoo.config.model.builder.xml.test.DomBuilderTest;
import com.yahoo.vespa.model.container.ContainerCluster;
import com.yahoo.vespa.model.container.component.Handler;
-import com.yahoo.vespaclient.config.FeederConfig;
import org.junit.Test;
import org.w3c.dom.Element;
@@ -36,27 +35,6 @@ public class ContainerDocumentApiBuilderTest extends ContainerModelBuilderTestBa
}
@Test
- public void document_api_config_is_added_to_container_cluster() {
- Element elem = DomBuilderTest.parse(
- "<jdisc id='cluster1' version='1.0'>",
- " <document-api>",
- " <abortondocumenterror>false</abortondocumenterror>",
- " <maxpendingdocs>4321</maxpendingdocs>",
- " <route>non-default</route>",
- " </document-api>",
- nodesXml,
- "</jdisc>");
- createModel(root, elem);
- ContainerCluster cluster = (ContainerCluster)root.getProducer("cluster1");
- FeederConfig.Builder builder = new FeederConfig.Builder();
- cluster.getDocumentApi().getConfig(builder);
- FeederConfig config = new FeederConfig(builder);
- assertThat(config.abortondocumenterror(), is(false));
- assertThat(config.maxpendingdocs(), is(4321));
- assertThat(config.route(), is("non-default"));
- }
-
- @Test
public void custom_bindings_are_allowed() {
Element elem = DomBuilderTest.parse(
"<jdisc id='cluster1' version='1.0'>",
diff --git a/vespaclient-java/src/main/java/com/yahoo/vespafeeder/Arguments.java b/vespaclient-java/src/main/java/com/yahoo/vespafeeder/Arguments.java
index 712ae7cf7fc..a231582fb5d 100644
--- a/vespaclient-java/src/main/java/com/yahoo/vespafeeder/Arguments.java
+++ b/vespaclient-java/src/main/java/com/yahoo/vespafeeder/Arguments.java
@@ -68,14 +68,10 @@ public class Arguments {
" -h [ --help ] Shows this help page.\n" +
" --maxpending arg The maximum number of operations that are allowed\n" +
" to be pending at any given time. NOTE: This disables dynamic throttling. Use with care.\n" +
- " --maxpendingsize arg The maximum size (in bytes) of operations that \n" +
- " are allowed to be pending at any given time. \n" +
" --maxfeedrate arg Limits the feed rate to the given number (operations/second). You may still want to increase\n" +
" the max pending size if your feed rate doesn't reach the desired number.\n" +
" --mode arg (=standard) The mode to run vespa-feeder in (standard | benchmark).\n" +
" --noretry Turns off retries of recoverable failures.\n" +
- " --retrydelay arg (=1) The time (in seconds) to wait between retries of \n" +
- " a failed operation.\n" +
" --route arg (=default) The route to send the data to.\n" +
" --timeout arg (=180) The time (in seconds) allowed for sending \n" +
" operations.\n" +
diff --git a/vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java b/vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java
index 1122c0e9acb..39b3fa894fd 100644
--- a/vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java
+++ b/vespaclient-java/src/test/java/com/yahoo/vespafeeder/VespaFeederTestCase.java
@@ -38,7 +38,7 @@ public class VespaFeederTestCase {
@Test
public void testParseArgs() throws Exception {
String argsS="--abortondataerror false --abortonsenderror false --file foo.xml --maxpending 10" +
- " --maxpendingsize 11 --maxfeedrate 29 --mode benchmark --noretry --retrydelay 12 --route e6 --timeout 13 --trace 4" +
+ " --maxfeedrate 29 --mode benchmark --noretry --route e6 --timeout 13 --trace 4" +
" --validate -v bar.xml --priority LOW_1";
Arguments arguments = new Arguments(argsS.split(" "), DummySessionFactory.createWithAutoReply());