aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java')
-rw-r--r--vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java22
1 files changed, 21 insertions, 1 deletions
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 9a5df96b705..c022713cbb6 100644
--- a/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java
+++ b/vespaclient-java/src/main/java/com/yahoo/vespavisit/VdsVisit.java
@@ -348,6 +348,13 @@ public class VdsVisit {
FixedBucketSpaces.defaultSpace(), FixedBucketSpaces.globalSpace(), FixedBucketSpaces.defaultSpace()))
.build());
+ // TODO Vespa 9 replace with --tensor-long-form ?
+ options.addOption(Option.builder()
+ .longOpt("tensor-short-form")
+ .desc("Output JSON tensors in short form. Will be the default on Vespa 9")
+ .hasArg(false)
+ .build());
+
return options;
}
@@ -363,6 +370,7 @@ public class VdsVisit {
private int processTime = 0;
private int fullTimeout = 7 * 24 * 60 * 60 * 1000;
private boolean jsonOutput = false;
+ private boolean tensorShortForm = false; // TODO Vespa 9: change default to true
public VisitorParameters getVisitorParameters() {
return visitorParameters;
@@ -431,6 +439,14 @@ public class VdsVisit {
public void setJsonOutput(boolean jsonOutput) {
this.jsonOutput = jsonOutput;
}
+
+ public boolean tensorShortForm() {
+ return tensorShortForm;
+ }
+
+ public void setTensorShortForm(boolean tensorShortForm) {
+ this.tensorShortForm = tensorShortForm;
+ }
}
protected static class ArgumentParser {
@@ -553,6 +569,9 @@ public class VdsVisit {
throttlePolicy.setMaxPendingCount(((Number)line.getParsedOptionValue("maxpendingsuperbuckets")).intValue());
params.setThrottlePolicy(throttlePolicy);
}
+ if (line.hasOption("tensor-short-form")) {
+ allParams.setTensorShortForm(true);
+ }
boolean jsonOutput = line.hasOption("jsonoutput");
boolean xmlOutput = line.hasOption("xmloutput");
@@ -723,7 +742,8 @@ public class VdsVisit {
params.getStatisticsParts() != null,
params.getAbortOnClusterDown(),
params.getProcessTime(),
- params.jsonOutput);
+ params.jsonOutput,
+ params.tensorShortForm);
if (visitorParameters.getResumeFileName() != null) {
handler.setProgressFileName(visitorParameters.getResumeFileName());