From 24241ae843cdced8403b9aa86e5895d0460dc410 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Fri, 15 Mar 2019 13:47:06 +0000 Subject: remove "headersonly" command line option completely --- .../src/main/java/com/yahoo/vespaget/CommandLineOptions.java | 10 ---------- .../src/main/java/com/yahoo/vespavisit/VdsVisit.java | 2 -- .../test/java/com/yahoo/vespaget/CommandLineOptionsTest.java | 7 ------- 3 files changed, 19 deletions(-) (limited to 'vespaclient-java/src') diff --git a/vespaclient-java/src/main/java/com/yahoo/vespaget/CommandLineOptions.java b/vespaclient-java/src/main/java/com/yahoo/vespaget/CommandLineOptions.java index 5b006b9d1eb..0bfdcbe75ff 100644 --- a/vespaclient-java/src/main/java/com/yahoo/vespaget/CommandLineOptions.java +++ b/vespaclient-java/src/main/java/com/yahoo/vespaget/CommandLineOptions.java @@ -25,7 +25,6 @@ public class CommandLineOptions { public static final String HELP_OPTION = "help"; public static final String PRINTIDS_OPTION = "printids"; - public static final String HEADERSONLY_OPTION = "headersonly"; public static final String FIELDSET_OPTION = "fieldset"; public static final String CLUSTER_OPTION = "cluster"; public static final String ROUTE_OPTION = "route"; @@ -66,11 +65,6 @@ public class CommandLineOptions { .longOpt(PRINTIDS_OPTION) .build()); - options.addOption(Option.builder("e") - .hasArg(false) - .desc("Retrieve header fields only. [Removed in Vespa 7].") - .longOpt(HEADERSONLY_OPTION).build()); - options.addOption(Option.builder("f") .hasArg(true) .desc("Retrieve the specified fields only (see https://docs.vespa.ai/documentation/documents.html#fieldsets) (default '[all]')") @@ -160,7 +154,6 @@ public class CommandLineOptions { CommandLine cl = clp.parse(options, args); boolean printIdsOnly = cl.hasOption(PRINTIDS_OPTION); - boolean headersOnly = cl.hasOption(HEADERSONLY_OPTION); String fieldSet = cl.getOptionValue(FIELDSET_OPTION, ""); String cluster = cl.getOptionValue(CLUSTER_OPTION, ""); String route = cl.getOptionValue(ROUTE_OPTION, ""); @@ -180,9 +173,6 @@ public class CommandLineOptions { throw new IllegalArgumentException("Cannot combine both xml and json output"); } - if (headersOnly) { - throw new IllegalArgumentException("Headers only option has been removed."); - } if (printIdsOnly && !fieldSet.isEmpty()) { throw new IllegalArgumentException("Field set option can not be used in combination with print ids option."); } diff --git a/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java b/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java index 7b938e8ec3f..a92caa4466d 100644 --- a/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java +++ b/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java @@ -189,8 +189,6 @@ public class VdsVisit { .desc("Only visit up to the given timestamp (microseconds).") .type(Number.class).build()); - options.addOption("e", "headersonly", false, "Only visit headers of documents.[Removed in Vespa 7]"); - options.addOption(Option.builder("l") .longOpt("fieldset") .hasArg(true) diff --git a/vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java b/vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java index a9d8b85c480..50b499b8df2 100644 --- a/vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java +++ b/vespaclient-java/src/test/java/com/yahoo/vespaget/CommandLineOptionsTest.java @@ -141,13 +141,6 @@ public class CommandLineOptionsTest { assertEquals("[id]", params.fieldSet); } - @Test - public void testHeadersOnly() { - exception.expect(IllegalArgumentException.class); - exception.expectMessage("Headers only option has been removed."); - getParsedOptions("--headersonly"); - } - @Test public void testCluster() { ClientParameters params = getParsedOptions("--cluster", "dummycluster"); -- cgit v1.2.3