mirror of https://github.com/apache/lucene.git
SOLR-15123: Make all Tool option descriptions follow the same general pattern. (#2275)
* Make all Tool option descriptions follow the same general pattern for describing them. * Figure out a switch to determine level of either cluster or collections(s) * better wording on what cluster versus collection params mean Co-authored-by: epugh@opensourceconnections.com <>
This commit is contained in:
parent
825d8dbfd9
commit
573b442903
|
@ -223,6 +223,8 @@ Improvements
|
|||
* SOLR-13608: Backups are now done incrementally by default. Multiple backups can be stored at the same location, and each
|
||||
backup will only upload those files that are new since the last backup. (Jason Gerlowski, Shalin , Cao Manh Dat)
|
||||
|
||||
* SOLR-15123: Revamp SolrCLI tool's help descriptions for all commands for consistency and clarity. (Eric Pugh)
|
||||
|
||||
Optimizations
|
||||
---------------------
|
||||
* SOLR-15079: Block Collapse - Faster collapse code when groups are co-located via Block Join style nested doc indexing.
|
||||
|
|
|
@ -216,32 +216,32 @@ public class ExportTool extends SolrCLI.ToolBase {
|
|||
Option.builder("url")
|
||||
.hasArg()
|
||||
.required()
|
||||
.desc("Address of the collection, example http://localhost:8983/solr/gettingstarted")
|
||||
.desc("Address of the collection, example http://localhost:8983/solr/gettingstarted.")
|
||||
.build(),
|
||||
Option.builder("out")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("file name . defaults to collection-name.<format>")
|
||||
.desc("File name, defaults to 'collection-name.<format>'.")
|
||||
.build(),
|
||||
Option.builder("format")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("format json/javabin, default to json. file extension would be .json")
|
||||
.desc("Output format for exported docs (json or javabin), defaulting to json. File extension would be .json.")
|
||||
.build(),
|
||||
Option.builder("limit")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Max number of docs to download. default = 100, use -1 for all docs")
|
||||
.desc("Maximum number of docs to download. Default is 100, use -1 for all docs.")
|
||||
.build(),
|
||||
Option.builder("query")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("A custom query, default is *:*")
|
||||
.desc("A custom query, default is '*:*'.")
|
||||
.build(),
|
||||
Option.builder("fields")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Comma separated fields. By default all fields are fetched")
|
||||
.desc("Comma separated list of fields to export. By default all fields are fetched.")
|
||||
.build()
|
||||
};
|
||||
|
||||
|
|
|
@ -261,44 +261,44 @@ public class PackageTool extends SolrCLI.ToolBase {
|
|||
.argName("URL")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Address of the Solr Web application, defaults to: " + SolrCLI.DEFAULT_SOLR_URL)
|
||||
.desc("Address of the Solr Web application, defaults to: " + SolrCLI.DEFAULT_SOLR_URL + '.')
|
||||
.build(),
|
||||
|
||||
Option.builder("collections")
|
||||
.argName("COLLECTIONS")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("List of collections. Run './solr package help' for more details.")
|
||||
.desc("Specifies that this action should affect plugins for the given collections only, excluding cluster level plugins.")
|
||||
.build(),
|
||||
|
||||
Option.builder("cluster")
|
||||
.required(false)
|
||||
.desc("Needed to install cluster level plugins in a package. Run './solr package help' for more details.")
|
||||
.desc("Specifies that this action should affect cluster-level plugins only.")
|
||||
.build(),
|
||||
|
||||
Option.builder("p")
|
||||
.argName("PARAMS")
|
||||
.hasArgs()
|
||||
.required(false)
|
||||
.desc("List of parameters to be used with deploy command. Run './solr package help' for more details.")
|
||||
.desc("List of parameters to be used with deploy command.")
|
||||
.longOpt("param")
|
||||
.build(),
|
||||
|
||||
Option.builder("u")
|
||||
.required(false)
|
||||
.desc("If a deployment is an update over a previous deployment. Run './solr package help' for more details.")
|
||||
.desc("If a deployment is an update over a previous deployment.")
|
||||
.longOpt("update")
|
||||
.build(),
|
||||
|
||||
Option.builder("c")
|
||||
.required(false)
|
||||
.desc("Run './solr package help' for more details.")
|
||||
.desc("The collection to apply the package to, not required.")
|
||||
.longOpt("collection")
|
||||
.build(),
|
||||
|
||||
Option.builder("y")
|
||||
.required(false)
|
||||
.desc("Run './solr package help' for more details.")
|
||||
.desc("Don't prompt for input; accept all default choices, defaults to false.")
|
||||
.longOpt("noprompt")
|
||||
.build()
|
||||
};
|
||||
|
|
|
@ -236,13 +236,13 @@ public class SolrCLI implements CLIO {
|
|||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Address of the Zookeeper ensemble; defaults to: "+ZK_HOST)
|
||||
.desc("Address of the ZooKeeper ensemble; defaults to: "+ ZK_HOST + '.')
|
||||
.build(),
|
||||
Option.builder("c")
|
||||
.argName("COLLECTION")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Name of collection; no default")
|
||||
.desc("Name of collection; no default.")
|
||||
.longOpt("collection")
|
||||
.build(),
|
||||
Option.builder("verbose")
|
||||
|
@ -856,7 +856,7 @@ public class SolrCLI implements CLIO {
|
|||
.argName("URL")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Address of the Solr Web application, defaults to: "+DEFAULT_SOLR_URL)
|
||||
.desc("Address of the Solr Web application, defaults to: "+ DEFAULT_SOLR_URL + '.')
|
||||
.build(),
|
||||
Option.builder("maxWaitSecs")
|
||||
.argName("SECS")
|
||||
|
@ -1005,7 +1005,7 @@ public class SolrCLI implements CLIO {
|
|||
.argName("URL")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Send a GET request to a Solr API endpoint")
|
||||
.desc("Send a GET request to a Solr API endpoint.")
|
||||
.build()
|
||||
};
|
||||
}
|
||||
|
@ -1311,13 +1311,13 @@ public class SolrCLI implements CLIO {
|
|||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Address of the Zookeeper ensemble; defaults to: " + ZK_HOST)
|
||||
.desc("Address of the ZooKeeper ensemble; defaults to: " + ZK_HOST + '.')
|
||||
.build(),
|
||||
Option.builder("solrUrl")
|
||||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Base Solr URL, which can be used to determine the zkHost if that's not known")
|
||||
.desc("Base Solr URL, which can be used to determine the zkHost if that's not known.")
|
||||
.build(),
|
||||
Option.builder(NAME)
|
||||
.argName("NAME")
|
||||
|
@ -1329,25 +1329,25 @@ public class SolrCLI implements CLIO {
|
|||
.argName("#")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Number of shards; default is 1")
|
||||
.desc("Number of shards; default is 1.")
|
||||
.build(),
|
||||
Option.builder("replicationFactor")
|
||||
.argName("#")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Number of copies of each document across the collection (replicas per shard); default is 1")
|
||||
.desc("Number of copies of each document across the collection (replicas per shard); default is 1.")
|
||||
.build(),
|
||||
Option.builder("confdir")
|
||||
.argName("NAME")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Configuration directory to copy when creating the new collection; default is "+DEFAULT_CONFIG_SET)
|
||||
.desc("Configuration directory to copy when creating the new collection; default is "+ DEFAULT_CONFIG_SET + '.')
|
||||
.build(),
|
||||
Option.builder("confname")
|
||||
.argName("NAME")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Configuration name; default is the collection name")
|
||||
.desc("Configuration name; default is the collection name.")
|
||||
.build(),
|
||||
Option.builder("configsetsDir")
|
||||
.argName("DIR")
|
||||
|
@ -1615,7 +1615,7 @@ public class SolrCLI implements CLIO {
|
|||
.argName("URL")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Base Solr URL, default is " + DEFAULT_SOLR_URL)
|
||||
.desc("Base Solr URL, default is " + DEFAULT_SOLR_URL + '.')
|
||||
.build(),
|
||||
Option.builder(NAME)
|
||||
.argName("NAME")
|
||||
|
@ -1627,7 +1627,7 @@ public class SolrCLI implements CLIO {
|
|||
.argName("CONFIG")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Configuration directory to copy when creating the new core; default is "+DEFAULT_CONFIG_SET)
|
||||
.desc("Configuration directory to copy when creating the new core; default is "+ DEFAULT_CONFIG_SET + '.')
|
||||
.build(),
|
||||
Option.builder("configsetsDir")
|
||||
.argName("DIR")
|
||||
|
@ -1795,25 +1795,25 @@ public class SolrCLI implements CLIO {
|
|||
.argName("confname") // Comes out in help message
|
||||
.hasArg() // Has one sub-argument
|
||||
.required(true) // confname argument must be present
|
||||
.desc("Configset name on Zookeeper")
|
||||
.desc("Configset name in ZooKeeper.")
|
||||
.build(), // passed as -confname value
|
||||
Option.builder("confdir")
|
||||
.argName("confdir")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Local directory with configs")
|
||||
.desc("Local directory with configs.")
|
||||
.build(),
|
||||
Option.builder("configsetsDir")
|
||||
.argName("configsetsDir")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Parent directory of example configsets")
|
||||
.desc("Parent directory of example configsets.")
|
||||
.build(),
|
||||
Option.builder("zkHost")
|
||||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Address of the Zookeeper ensemble; defaults to: " + ZK_HOST)
|
||||
.desc("Address of the ZooKeeper ensemble; defaults to: " + ZK_HOST + '.')
|
||||
.build(),
|
||||
Option.builder("verbose")
|
||||
.required(false)
|
||||
|
@ -1867,19 +1867,19 @@ public class SolrCLI implements CLIO {
|
|||
.argName("confname")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Configset name on Zookeeper")
|
||||
.desc("Configset name in ZooKeeper.")
|
||||
.build(),
|
||||
Option.builder("confdir")
|
||||
.argName("confdir")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Local directory with configs")
|
||||
.desc("Local directory with configs.")
|
||||
.build(),
|
||||
Option.builder("zkHost")
|
||||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Address of the Zookeeper ensemble; defaults to: " + ZK_HOST)
|
||||
.desc("Address of the ZooKeeper ensemble; defaults to: " + ZK_HOST + '.')
|
||||
.build(),
|
||||
Option.builder("verbose")
|
||||
.required(false)
|
||||
|
@ -1942,19 +1942,19 @@ public class SolrCLI implements CLIO {
|
|||
.argName("path")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Path to remove")
|
||||
.desc("Path to remove.")
|
||||
.build(),
|
||||
Option.builder("recurse")
|
||||
.argName("recurse")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Recurse (true|false, default is false)")
|
||||
.desc("Recurse (true|false), default is false.")
|
||||
.build(),
|
||||
Option.builder("zkHost")
|
||||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Address of the Zookeeper ensemble; defaults to: " + ZK_HOST)
|
||||
.desc("Address of the ZooKeeper ensemble; defaults to: " + ZK_HOST + '.')
|
||||
.build(),
|
||||
Option.builder("verbose")
|
||||
.required(false)
|
||||
|
@ -1988,9 +1988,9 @@ public class SolrCLI implements CLIO {
|
|||
echoIfVerbose("\nConnecting to ZooKeeper at " + zkHost + " ...", cli);
|
||||
try (SolrZkClient zkClient = new SolrZkClient(zkHost, 30000)) {
|
||||
if (recurse == false && zkClient.getChildren(znode, null, true).size() != 0) {
|
||||
throw new SolrServerException("Zookeeper node " + znode + " has children and recurse has NOT been specified");
|
||||
throw new SolrServerException("ZooKeeper node " + znode + " has children and recurse has NOT been specified.");
|
||||
}
|
||||
echo("Removing Zookeeper node " + znode + " from ZooKeeper at " + zkHost +
|
||||
echo("Removing ZooKeeper node " + znode + " from ZooKeeper at " + zkHost +
|
||||
" recurse: " + Boolean.toString(recurse));
|
||||
zkClient.clean(znode);
|
||||
} catch (Exception e) {
|
||||
|
@ -2018,19 +2018,19 @@ public class SolrCLI implements CLIO {
|
|||
.argName("path")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Path to list")
|
||||
.desc("Path to list.")
|
||||
.build(),
|
||||
Option.builder("recurse")
|
||||
.argName("recurse")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Recurse (true|false, default is false)")
|
||||
.desc("Recurse (true|false), default is false.")
|
||||
.build(),
|
||||
Option.builder("zkHost")
|
||||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Address of the Zookeeper ensemble; defaults to: " + ZK_HOST)
|
||||
.desc("Address of the ZooKeeper ensemble; defaults to: " + ZK_HOST + '.')
|
||||
.build(),
|
||||
Option.builder("verbose")
|
||||
.required(false)
|
||||
|
@ -2058,7 +2058,7 @@ public class SolrCLI implements CLIO {
|
|||
|
||||
String znode = cli.getOptionValue("path");
|
||||
Boolean recurse = Boolean.parseBoolean(cli.getOptionValue("recurse"));
|
||||
echoIfVerbose("Getting listing for Zookeeper node " + znode + " from ZooKeeper at " + zkHost +
|
||||
echoIfVerbose("Getting listing for ZooKeeper node " + znode + " from ZooKeeper at " + zkHost +
|
||||
" recurse: " + Boolean.toString(recurse), cli);
|
||||
stdout.print(zkClient.listZnode(znode, recurse));
|
||||
} catch (Exception e) {
|
||||
|
@ -2085,13 +2085,13 @@ public class SolrCLI implements CLIO {
|
|||
.argName("path")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Path to create")
|
||||
.desc("Path to create.")
|
||||
.build(),
|
||||
Option.builder("zkHost")
|
||||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Address of the Zookeeper ensemble; defaults to: " + ZK_HOST)
|
||||
.desc("Address of the ZooKeeper ensemble; defaults to: " + ZK_HOST + '.')
|
||||
.build(),
|
||||
Option.builder("verbose")
|
||||
.required(false)
|
||||
|
@ -2118,7 +2118,7 @@ public class SolrCLI implements CLIO {
|
|||
echoIfVerbose("\nConnecting to ZooKeeper at " + zkHost + " ...", cli);
|
||||
|
||||
String znode = cli.getOptionValue("path");
|
||||
echo("Creating Zookeeper path " + znode + " on ZooKeeper at " + zkHost);
|
||||
echo("Creating ZooKeeper path " + znode + " on ZooKeeper at " + zkHost);
|
||||
zkClient.makePath(znode, true);
|
||||
} catch (Exception e) {
|
||||
log.error("Could not complete mkroot operation for reason: ", e);
|
||||
|
@ -2146,7 +2146,7 @@ public class SolrCLI implements CLIO {
|
|||
.argName("src")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Source file or directory, may be local or a Znode")
|
||||
.desc("Source file or directory, may be local or a Znode.")
|
||||
.build(),
|
||||
Option.builder("dst")
|
||||
.argName("dst")
|
||||
|
@ -2158,13 +2158,13 @@ public class SolrCLI implements CLIO {
|
|||
.argName("recurse")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Recurse (true|false, default is false)")
|
||||
.desc("Recurse (true|false), default is false.")
|
||||
.build(),
|
||||
Option.builder("zkHost")
|
||||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Address of the Zookeeper ensemble; defaults to: " + ZK_HOST)
|
||||
.desc("Address of the ZooKeeper ensemble; defaults to: " + ZK_HOST + '.')
|
||||
.build(),
|
||||
Option.builder("verbose")
|
||||
.required(false)
|
||||
|
@ -2235,7 +2235,7 @@ public class SolrCLI implements CLIO {
|
|||
.argName("src")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Source Znode to movej from.")
|
||||
.desc("Source Znode to move from.")
|
||||
.build(),
|
||||
Option.builder("dst")
|
||||
.argName("dst")
|
||||
|
@ -2247,7 +2247,7 @@ public class SolrCLI implements CLIO {
|
|||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Address of the Zookeeper ensemble; defaults to: " + ZK_HOST)
|
||||
.desc("Address of the ZooKeeper ensemble; defaults to: " + ZK_HOST + '.')
|
||||
.build(),
|
||||
Option.builder("verbose")
|
||||
.required(false)
|
||||
|
@ -2314,7 +2314,7 @@ public class SolrCLI implements CLIO {
|
|||
.argName("URL")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Base Solr URL, default is " + DEFAULT_SOLR_URL)
|
||||
.desc("Base Solr URL, default is " + DEFAULT_SOLR_URL + '.')
|
||||
.build(),
|
||||
Option.builder(NAME)
|
||||
.argName("NAME")
|
||||
|
@ -2326,17 +2326,17 @@ public class SolrCLI implements CLIO {
|
|||
.argName("true|false")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Flag to indicate if the underlying configuration directory for a collection should also be deleted; default is true")
|
||||
.desc("Flag to indicate if the underlying configuration directory for a collection should also be deleted; default is true.")
|
||||
.build(),
|
||||
Option.builder("forceDeleteConfig")
|
||||
.required(false)
|
||||
.desc("Skip safety checks when deleting the configuration directory used by a collection")
|
||||
.desc("Skip safety checks when deleting the configuration directory used by a collection.")
|
||||
.build(),
|
||||
Option.builder("zkHost")
|
||||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Address of the Zookeeper ensemble; defaults to: "+ZK_HOST)
|
||||
.desc("Address of the ZooKeeper ensemble; defaults to: "+ ZK_HOST + '.')
|
||||
.build(),
|
||||
Option.builder("verbose")
|
||||
.required(false)
|
||||
|
@ -2498,45 +2498,45 @@ public class SolrCLI implements CLIO {
|
|||
.argName("ACTION")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Config API action, one of: set-property, unset-property; default is set-property")
|
||||
.desc("Config API action, one of: set-property, unset-property; default is 'set-property'.")
|
||||
.build(),
|
||||
Option.builder("property")
|
||||
.argName("PROP")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Name of the Config API property to apply the action to, such as: updateHandler.autoSoftCommit.maxTime")
|
||||
.desc("Name of the Config API property to apply the action to, such as: 'updateHandler.autoSoftCommit.maxTime'.")
|
||||
.build(),
|
||||
Option.builder("value")
|
||||
.argName("VALUE")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Set the property to this value; accepts JSON objects and strings")
|
||||
.desc("Set the property to this value; accepts JSON objects and strings.")
|
||||
.build(),
|
||||
Option.builder("solrUrl")
|
||||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Base Solr URL, which can be used to determine the zkHost if that's not known")
|
||||
.desc("Base Solr URL, which can be used to determine the zkHost if that's not known.")
|
||||
.build(),
|
||||
Option.builder("z")
|
||||
.argName("HOST")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Address of the Zookeeper ensemble")
|
||||
.desc("Address of the ZooKeeper ensemble.")
|
||||
.longOpt("zkHost")
|
||||
.build(),
|
||||
Option.builder("p")
|
||||
.argName("PORT")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("The port of the Solr node to use when applying configuration change")
|
||||
.desc("The port of the Solr node to use when applying configuration change.")
|
||||
.longOpt("port")
|
||||
.build(),
|
||||
Option.builder("s")
|
||||
.argName("SCHEME")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("The scheme for accessing Solr. Accepted values: http or https. Default: http")
|
||||
.desc("The scheme for accessing Solr. Accepted values: http or https. Default is 'http'")
|
||||
.longOpt("scheme")
|
||||
.build()
|
||||
};
|
||||
|
@ -2635,20 +2635,20 @@ public class SolrCLI implements CLIO {
|
|||
return new Option[] {
|
||||
Option.builder("noprompt")
|
||||
.required(false)
|
||||
.desc("Don't prompt for input; accept all defaults when running examples that accept user input")
|
||||
.desc("Don't prompt for input; accept all defaults when running examples that accept user input.")
|
||||
.build(),
|
||||
Option.builder("e")
|
||||
.argName("NAME")
|
||||
.hasArg()
|
||||
.required(true)
|
||||
.desc("Name of the example to launch, one of: cloud, techproducts, schemaless")
|
||||
.desc("Name of the example to launch, one of: cloud, techproducts, schemaless.")
|
||||
.longOpt("example")
|
||||
.build(),
|
||||
Option.builder("script")
|
||||
.argName("PATH")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Path to the bin/solr script")
|
||||
.desc("Path to the bin/solr script.")
|
||||
.build(),
|
||||
Option.builder("d")
|
||||
.argName("DIR")
|
||||
|
@ -2659,7 +2659,7 @@ public class SolrCLI implements CLIO {
|
|||
.build(),
|
||||
Option.builder("force")
|
||||
.argName("FORCE")
|
||||
.desc("Force option in case Solr is run as root")
|
||||
.desc("Force option in case Solr is run as root.")
|
||||
.build(),
|
||||
Option.builder("exampleDir")
|
||||
.argName("DIR")
|
||||
|
@ -2671,46 +2671,46 @@ public class SolrCLI implements CLIO {
|
|||
.argName("SCHEME")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Solr URL scheme: http or https, defaults to http if not specified")
|
||||
.desc("Solr URL scheme: http or https, defaults to http if not specified.")
|
||||
.build(),
|
||||
Option.builder("p")
|
||||
.argName("PORT")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Specify the port to start the Solr HTTP listener on; default is 8983")
|
||||
.desc("Specify the port to start the Solr HTTP listener on; default is 8983.")
|
||||
.longOpt("port")
|
||||
.build(),
|
||||
Option.builder("h")
|
||||
.argName("HOSTNAME")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Specify the hostname for this Solr instance")
|
||||
.desc("Specify the hostname for this Solr instance.")
|
||||
.longOpt("host")
|
||||
.build(),
|
||||
Option.builder("z")
|
||||
.argName("ZKHOST")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("ZooKeeper connection string; only used when running in SolrCloud mode using -c")
|
||||
.desc("ZooKeeper connection string; only used when running in SolrCloud mode using -c.")
|
||||
.longOpt("zkhost")
|
||||
.build(),
|
||||
Option.builder("c")
|
||||
.required(false)
|
||||
.desc("Start Solr in SolrCloud mode; if -z not supplied, an embedded ZooKeeper instance is started on Solr port+1000, such as 9983 if Solr is bound to 8983")
|
||||
.desc("Start Solr in SolrCloud mode; if -z not supplied, an embedded ZooKeeper instance is started on Solr port+1000, such as 9983 if Solr is bound to 8983.")
|
||||
.longOpt("cloud")
|
||||
.build(),
|
||||
Option.builder("m")
|
||||
.argName("MEM")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m")
|
||||
.desc("Sets the min (-Xms) and max (-Xmx) heap size for the JVM, such as: -m 4g results in: -Xms4g -Xmx4g; by default, this script sets the heap size to 512m.")
|
||||
.longOpt("memory")
|
||||
.build(),
|
||||
Option.builder("a")
|
||||
.argName("OPTS")
|
||||
.hasArg()
|
||||
.required(false)
|
||||
.desc("Additional options to be passed to the JVM when starting example Solr server(s)")
|
||||
.desc("Additional options to be passed to the JVM when starting example Solr server(s).")
|
||||
.longOpt("addlopts")
|
||||
.build()
|
||||
};
|
||||
|
@ -3380,39 +3380,39 @@ public class SolrCLI implements CLIO {
|
|||
public Option[] getOptions() {
|
||||
return new Option[] {
|
||||
Option.builder("R")
|
||||
.desc("Asserts that we are NOT the root user")
|
||||
.desc("Asserts that we are NOT the root user.")
|
||||
.longOpt("not-root")
|
||||
.build(),
|
||||
Option.builder("r")
|
||||
.desc("Asserts that we are the root user")
|
||||
.desc("Asserts that we are the root user.")
|
||||
.longOpt("root")
|
||||
.build(),
|
||||
Option.builder("S")
|
||||
.desc("Asserts that Solr is NOT running on a certain URL. Default timeout is 1000ms")
|
||||
.desc("Asserts that Solr is NOT running on a certain URL. Default timeout is 1000ms.")
|
||||
.longOpt("not-started")
|
||||
.hasArg(true)
|
||||
.argName("url")
|
||||
.build(),
|
||||
Option.builder("s")
|
||||
.desc("Asserts that Solr is running on a certain URL. Default timeout is 1000ms")
|
||||
.desc("Asserts that Solr is running on a certain URL. Default timeout is 1000ms.")
|
||||
.longOpt("started")
|
||||
.hasArg(true)
|
||||
.argName("url")
|
||||
.build(),
|
||||
Option.builder("u")
|
||||
.desc("Asserts that we run as same user that owns <directory>")
|
||||
.desc("Asserts that we run as same user that owns <directory>.")
|
||||
.longOpt("same-user")
|
||||
.hasArg(true)
|
||||
.argName("directory")
|
||||
.build(),
|
||||
Option.builder("x")
|
||||
.desc("Asserts that directory <directory> exists")
|
||||
.desc("Asserts that directory <directory> exists.")
|
||||
.longOpt("exists")
|
||||
.hasArg(true)
|
||||
.argName("directory")
|
||||
.build(),
|
||||
Option.builder("X")
|
||||
.desc("Asserts that directory <directory> does NOT exist")
|
||||
.desc("Asserts that directory <directory> does NOT exist.")
|
||||
.longOpt("not-exists")
|
||||
.hasArg(true)
|
||||
.argName("directory")
|
||||
|
@ -3430,13 +3430,13 @@ public class SolrCLI implements CLIO {
|
|||
.argName("url")
|
||||
.build(),
|
||||
Option.builder("m")
|
||||
.desc("Exception message to be used in place of the default error message")
|
||||
.desc("Exception message to be used in place of the default error message.")
|
||||
.longOpt("message")
|
||||
.hasArg(true)
|
||||
.argName("message")
|
||||
.build(),
|
||||
Option.builder("t")
|
||||
.desc("Timeout in ms for commands supporting a timeout")
|
||||
.desc("Timeout in ms for commands supporting a timeout.")
|
||||
.longOpt("timeout")
|
||||
.hasArg(true)
|
||||
.type(Long.class)
|
||||
|
@ -3714,27 +3714,27 @@ public class SolrCLI implements CLIO {
|
|||
Option.builder("prompt")
|
||||
.argName("prompt")
|
||||
.hasArg()
|
||||
.desc("Prompts the user to provide the credentials. Use either -credentials or -prompt, not both")
|
||||
.desc("Prompts the user to provide the credentials. Use either -credentials or -prompt, not both.")
|
||||
.build(),
|
||||
Option.builder("config")
|
||||
.argName("config")
|
||||
.hasArgs()
|
||||
.desc("Configuration parameters (Solr startup parameters). Required for Kerberos authentication")
|
||||
.desc("Configuration parameters (Solr startup parameters). Required for Kerberos authentication.")
|
||||
.build(),
|
||||
Option.builder("blockUnknown")
|
||||
.argName("blockUnknown")
|
||||
.desc("Blocks all access for unknown users (requires authentication for all endpoints)")
|
||||
.desc("Blocks all access for unknown users (requires authentication for all endpoints).")
|
||||
.hasArg()
|
||||
.build(),
|
||||
Option.builder("solrIncludeFile")
|
||||
.argName("solrIncludeFile")
|
||||
.hasArg()
|
||||
.desc("The Solr include file which contains overridable environment variables for configuring Solr configurations")
|
||||
.desc("The Solr include file which contains overridable environment variables for configuring Solr configurations.")
|
||||
.build(),
|
||||
Option.builder("updateIncludeFileOnly")
|
||||
.argName("updateIncludeFileOnly")
|
||||
.desc("Only update the solr.in.sh or solr.in.cmd file, and skip actual enabling/disabling"
|
||||
+ " authentication (i.e. don't update security.json)")
|
||||
+ " authentication (i.e. don't update security.json).")
|
||||
.hasArg()
|
||||
.build(),
|
||||
Option.builder("authConfDir")
|
||||
|
@ -3746,12 +3746,12 @@ public class SolrCLI implements CLIO {
|
|||
Option.builder("solrUrl")
|
||||
.argName("solrUrl")
|
||||
.hasArg()
|
||||
.desc("Solr URL")
|
||||
.desc("Solr URL.")
|
||||
.build(),
|
||||
Option.builder("zkHost")
|
||||
.argName("zkHost")
|
||||
.hasArg()
|
||||
.desc("ZooKeeper host")
|
||||
.desc("ZooKeeper host to connect to.")
|
||||
.build(),
|
||||
Option.builder("verbose")
|
||||
.required(false)
|
||||
|
@ -3886,7 +3886,7 @@ public class SolrCLI implements CLIO {
|
|||
if (!updateIncludeFileOnly) {
|
||||
zkHost = getZkHost(cli);
|
||||
if (zkHost == null) {
|
||||
stdout.print("ZK Host not found. Solr should be running in cloud mode");
|
||||
stdout.print("ZK Host not found. Solr should be running in cloud mode.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -3910,7 +3910,7 @@ public class SolrCLI implements CLIO {
|
|||
return 0;
|
||||
|
||||
default:
|
||||
CLIO.out("Valid auth commands are: enable, disable");
|
||||
CLIO.out("Valid auth commands are: enable, disable.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -4036,7 +4036,7 @@ public class SolrCLI implements CLIO {
|
|||
if (!updateIncludeFileOnly) {
|
||||
zkHost = getZkHost(cli);
|
||||
if (zkHost == null) {
|
||||
stdout.print("ZK Host not found. Solr should be running in cloud mode");
|
||||
stdout.print("ZK Host not found. Solr should be running in cloud mode.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -4060,7 +4060,7 @@ public class SolrCLI implements CLIO {
|
|||
return 0;
|
||||
|
||||
default:
|
||||
CLIO.out("Valid auth commands are: enable, disable");
|
||||
CLIO.out("Valid auth commands are: enable, disable.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -4182,33 +4182,33 @@ public class SolrCLI implements CLIO {
|
|||
Option.builder("s")
|
||||
.argName("path")
|
||||
.hasArg()
|
||||
.desc("Path to server dir. Required if logs path is relative")
|
||||
.desc("Path to server dir. Required if logs path is relative.")
|
||||
.build(),
|
||||
Option.builder("l")
|
||||
.argName("path")
|
||||
.hasArg()
|
||||
.desc("Path to logs dir. If relative, also provide server dir with -s")
|
||||
.desc("Path to logs dir. If relative, also provide server dir with -s.")
|
||||
.build(),
|
||||
Option.builder("q")
|
||||
.desc("Be quiet, don't print to stdout, only return exit codes")
|
||||
.desc("Be quiet, don't print to stdout, only return exit codes.")
|
||||
.build(),
|
||||
Option.builder("remove_old_solr_logs")
|
||||
.argName("daysToKeep")
|
||||
.hasArg()
|
||||
.type(Integer.class)
|
||||
.desc("Path to logs directory")
|
||||
.desc("Path to logs directory.")
|
||||
.build(),
|
||||
Option.builder("rotate_solr_logs")
|
||||
.argName("generations")
|
||||
.hasArg()
|
||||
.type(Integer.class)
|
||||
.desc("Rotate solr.log to solr.log.1 etc")
|
||||
.desc("Rotate solr.log to solr.log.1 etc.")
|
||||
.build(),
|
||||
Option.builder("archive_gc_logs")
|
||||
.desc("Archive old garbage collection logs into archive/")
|
||||
.desc("Archive old garbage collection logs into archive/.")
|
||||
.build(),
|
||||
Option.builder("archive_console_logs")
|
||||
.desc("Archive old console logs into archive/")
|
||||
.desc("Archive old console logs into archive/.")
|
||||
.build()
|
||||
};
|
||||
}
|
||||
|
@ -4317,7 +4317,7 @@ public class SolrCLI implements CLIO {
|
|||
public int rotateSolrLogs(int generations) throws Exception {
|
||||
prepareLogsPath();
|
||||
if (logsPath.toFile().exists() && logsPath.resolve("solr.log").toFile().exists()) {
|
||||
out("Rotating solr logs, keeping a max of "+generations+" generations");
|
||||
out("Rotating solr logs, keeping a max of "+generations+" generations.");
|
||||
try (Stream<Path> files = Files.find(logsPath, 1,
|
||||
(f, a) -> a.isRegularFile() && String.valueOf(f.getFileName()).startsWith("solr.log."))
|
||||
.sorted((b,a) -> Integer.valueOf(a.getFileName().toString().substring(9))
|
||||
|
@ -4384,7 +4384,7 @@ public class SolrCLI implements CLIO {
|
|||
if (serverPath != null && serverPath.isAbsolute() && Files.exists(serverPath)) {
|
||||
logsPath = serverPath.resolve(logsPath);
|
||||
} else {
|
||||
throw new Exception("Logs directory must be an absolute path, or -s must be supplied");
|
||||
throw new Exception("Logs directory must be an absolute path, or -s must be supplied.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue