aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient-java/src/main/java/com/yahoo/vespastat
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2018-02-02 13:10:30 +0100
committerGeir Storli <geirst@oath.com>2018-02-02 13:50:00 +0100
commit0c29fb32d7263487ce5d722e95e2fb89166b00c8 (patch)
treea36bb045c70c7281b30d839ae46814bba5106500 /vespaclient-java/src/main/java/com/yahoo/vespastat
parent711bf1a14c15796e7be2fa96f30d0ad816465288 (diff)
Define and use fixed bucket spaces in Java code.
Diffstat (limited to 'vespaclient-java/src/main/java/com/yahoo/vespastat')
-rw-r--r--vespaclient-java/src/main/java/com/yahoo/vespastat/ClientParameters.java6
-rw-r--r--vespaclient-java/src/main/java/com/yahoo/vespastat/CommandLineOptions.java5
2 files changed, 7 insertions, 4 deletions
diff --git a/vespaclient-java/src/main/java/com/yahoo/vespastat/ClientParameters.java b/vespaclient-java/src/main/java/com/yahoo/vespastat/ClientParameters.java
index a05e4ed1e48..3a51e9c858f 100644
--- a/vespaclient-java/src/main/java/com/yahoo/vespastat/ClientParameters.java
+++ b/vespaclient-java/src/main/java/com/yahoo/vespastat/ClientParameters.java
@@ -1,6 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespastat;
+import com.yahoo.document.FixedBucketSpaces;
+
/**
* This class contains the program parameters.
*
@@ -25,7 +27,7 @@ public class ClientParameters {
String route,
SelectionType selectionType,
String id) {
- this(help, dumpData, route, selectionType, id, "default");
+ this(help, dumpData, route, selectionType, id, FixedBucketSpaces.defaultSpace());
}
public ClientParameters(
@@ -51,7 +53,7 @@ public class ClientParameters {
private String route;
private SelectionType selectionType;
private String id;
- private String bucketSpace = "default"; // TODO repo etc etc
+ private String bucketSpace = FixedBucketSpaces.defaultSpace();
public Builder setHelp(boolean help) {
this.help = help;
diff --git a/vespaclient-java/src/main/java/com/yahoo/vespastat/CommandLineOptions.java b/vespaclient-java/src/main/java/com/yahoo/vespastat/CommandLineOptions.java
index b6783efb25b..6c54dd5106b 100644
--- a/vespaclient-java/src/main/java/com/yahoo/vespastat/CommandLineOptions.java
+++ b/vespaclient-java/src/main/java/com/yahoo/vespastat/CommandLineOptions.java
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespastat;
+import com.yahoo.document.FixedBucketSpaces;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
@@ -54,7 +55,7 @@ public class CommandLineOptions {
options.addOption(Option.builder("s")
.hasArg(true)
- .desc("Stat buckets within the given bucket space. If not provided, 'default' is used.")
+ .desc("Stat buckets within the given bucket space. If not provided, '" + FixedBucketSpaces.defaultSpace() + "' is used.")
.argName("space")
.longOpt(BUCKET_SPACE_OPTION)
.build());
@@ -117,7 +118,7 @@ public class CommandLineOptions {
builder.setHelp(cl.hasOption(HELP_OPTION));
builder.setDumpData(cl.hasOption(DUMP_OPTION));
builder.setRoute(cl.getOptionValue(ROUTE_OPTION, "default"));
- builder.setBucketSpace(cl.getOptionValue(BUCKET_SPACE_OPTION, "default"));
+ builder.setBucketSpace(cl.getOptionValue(BUCKET_SPACE_OPTION, FixedBucketSpaces.defaultSpace()));
if (cl.hasOption(USER_OPTION)) {
builder.setSelectionType(ClientParameters.SelectionType.USER);