You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2017/07/25 09:06:23 UTC

[38/50] [abbrv] lucene-solr:feature/autoscaling: SOLR-11131: Document 'assert' as a command option in bin/solr, and bin/solr.cmd scripts

SOLR-11131: Document 'assert' as a command option in bin/solr, and bin/solr.cmd scripts


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/88218824
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/88218824
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/88218824

Branch: refs/heads/feature/autoscaling
Commit: 88218824004dcf75081ab71b1b8e08d3a44e4030
Parents: 7328e59
Author: Anshum Gupta <an...@apache.org>
Authored: Fri Jul 21 16:05:28 2017 -0700
Committer: Anshum Gupta <an...@apache.org>
Committed: Fri Jul 21 16:05:28 2017 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                   |  3 +++
 solr/bin/solr                                      |  2 +-
 solr/bin/solr.cmd                                  |  2 +-
 .../src/solr-control-script-reference.adoc         | 17 +++++++++++++++++
 4 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/88218824/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index c6c4050..fb5d946 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -109,6 +109,9 @@ Other Changes
 * SOLR-10916: Convert tests that extend LuceneTestCase and use MiniSolrCloudCluster 
   to instead extend SolrCloudTestCase. (Steve Rowe)
 
+* SOLR-11131: Document 'assert' as a command option in bin/solr, and bin/solr.cmd scripts.
+  (Jason Gerlowski via Anshum Gupta)
+
 ==================  7.0.0 ==================
 
 Versions of Major Components

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/88218824/solr/bin/solr
----------------------------------------------------------------------
diff --git a/solr/bin/solr b/solr/bin/solr
index 8e7c8d8..821bbf3 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -295,7 +295,7 @@ function print_usage() {
   if [ -z "$CMD" ]; then
     echo ""
     echo "Usage: solr COMMAND OPTIONS"
-    echo "       where COMMAND is one of: start, stop, restart, status, healthcheck, create, create_core, create_collection, delete, version, zk, auth"
+    echo "       where COMMAND is one of: start, stop, restart, status, healthcheck, create, create_core, create_collection, delete, version, zk, auth, assert"
     echo ""
     echo "  Standalone server example (start Solr running in the background on port 8984):"
     echo ""

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/88218824/solr/bin/solr.cmd
----------------------------------------------------------------------
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index cfc21b9..9a2ca9b 100644
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -268,7 +268,7 @@ goto done
 :script_usage
 @echo.
 @echo Usage: solr COMMAND OPTIONS
-@echo        where COMMAND is one of: start, stop, restart, healthcheck, create, create_core, create_collection, delete, version, zk, auth
+@echo        where COMMAND is one of: start, stop, restart, healthcheck, create, create_core, create_collection, delete, version, zk, auth, assert
 @echo.
 @echo   Standalone server example (start Solr running in the background on port 8984):
 @echo.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/88218824/solr/solr-ref-guide/src/solr-control-script-reference.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-control-script-reference.adoc b/solr/solr-ref-guide/src/solr-control-script-reference.adoc
index 368aacc..5888671 100644
--- a/solr/solr-ref-guide/src/solr-control-script-reference.adoc
+++ b/solr/solr-ref-guide/src/solr-control-script-reference.adoc
@@ -296,6 +296,23 @@ Solr process 39827 running on port 8865
     "collections":"2"}}
 ----
 
+=== Assert
+
+The `assert` command sanity-checks common issues with Solr installations.  These include checking the ownership/existence of particular directories, and ensuring Solr is available on the expected URL.  The command can either output a specified error message, or change its exit code to indicate errors.
+
+As an example:
+
+`bin/solr assert --exists /opt/bin/solr`
+
+Results in the output below:
+
+[source,plain]
+----
+
+ERROR: Directory /opt/bin/solr does not exist.
+
+----
+
 === Healthcheck
 
 The `healthcheck` command generates a JSON-formatted health report for a collection when running in SolrCloud mode. The health report provides information about the state of every replica for all shards in a collection, including the number of committed documents and its current state.