Author: reschke
Date: Fri May 24 07:52:22 2019
New Revision: 1859843

URL: http://svn.apache.org/viewvc?rev=1859843&view=rev
Log:
OAK-8146: oak-run support for inspecting clusterNodeInfo - add documentation 
and fix usage string for --clusterId

Modified:
    jackrabbit/oak/trunk/oak-run/README.md
    
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Utils.java

Modified: jackrabbit/oak/trunk/oak-run/README.md
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/README.md?rev=1859843&r1=1859842&r2=1859843&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/README.md (original)
+++ jackrabbit/oak/trunk/oak-run/README.md Fri May 24 07:52:22 2019
@@ -8,6 +8,7 @@ The following runmodes are currently ava
     * backup          : Backup an existing Oak repository.
     * check           : Check the FileStore for inconsistencies
     * checkpoints     : Manage checkpoints
+    * clusternodes    : Display DocumentMK cluster node information
     * compact         : Segment compaction on a TarMK repository.
     * console         : Start an interactive console.
     * datastorecacheupgrade : Upgrades the JR2 DataStore cache
@@ -368,6 +369,37 @@ Examples:
 See the documentation in the `oak-http` component for details about the 
available functionality.
 
 
+Cluster Nodes
+=============
+
+The clusternodes mode displays information about the status of the cluster 
nodes
+in a DocumentMK repository. It can be invoked like this:
+
+    $ java -jar oak-run-*.jar clusternodes [options] 
mongodb://host:port/database
+
+(or, for RDBMK instances, use "jdbc:...").
+
+The following clusternodes options (with default values) are currently 
supported:
+
+    --clusterId         - DocumentMK clusterId (no default)
+    --raw               - List raw entries in JSON format
+    --verbose           - Be more verbose
+
+Example output for `--verbose`:
+
+~~~
+Id    State          Started LeaseEnd Left RecoveryBy      LastRootRev    
OakVersion
+ 1 INACTIVE 20190125T110237Z        -    -          - r16884ad047c-0-1 
1.12-SNAPSHOT
+~~~
+
+Note that `RecoveryBy` will display the cluster node id of the node which
+currently recovers this node, or `!` when recovery is needed.
+
+`LeaseEnd` and `Left` will be displayed for active nodes (where `Left` is
+the remaining time for the lease update in seconds; when it gets negative,
+the system is in trouble).
+
+
 Recovery Mode
 =============
 

Modified: 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Utils.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Utils.java?rev=1859843&r1=1859842&r2=1859843&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Utils.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Utils.java
 Fri May 24 07:52:22 2019
@@ -102,7 +102,7 @@ class Utils {
                     .accepts("rdbtableprefix", "RDB table prefix")
                     .withOptionalArg();
             clusterId = parser
-                    .accepts("clusterId", "MongoMK clusterId")
+                    .accepts("clusterId", "DocumentMK clusterId")
                     .withRequiredArg().ofType(Integer.class).defaultsTo(0);
             disableBranchesSpec = parser.
                     accepts("disableBranches", "disable branches");


Reply via email to