Author: reschke
Date: Fri May 24 08:03:00 2019
New Revision: 1859849
URL: http://svn.apache.org/viewvc?rev=1859849&view=rev
Log:
OAK-8146: oak-run support for inspecting clusterNodeInfo - add documentation
and fix usage string for --clusterId (ported to 1.10)
Modified:
jackrabbit/oak/branches/1.10/ (props changed)
jackrabbit/oak/branches/1.10/oak-run/README.md
jackrabbit/oak/branches/1.10/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Utils.java
Propchange: jackrabbit/oak/branches/1.10/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 24 08:03:00 2019
@@ -1,3 +1,3 @@
/jackrabbit/oak/branches/1.0:1665962
-/jackrabbit/oak/trunk:1850874,1850882,1851236,1851253,1851451,1851533-1851535,1851619,1852052,1852084,1852120,1852135,1852451,1852492-1852493,1852528,1852582,1852584,1852601,1852920,1853083,1853141,1853229,1853393,1853429,1853433,1853441,1853866,1853868,1853870,1853893,1853969,1853997,1854034,1854044,1854055,1854058,1854113,1854373,1854377,1854380,1854385,1854401,1854403,1854455,1854461-1854462,1854466,1854468,1854515,1854533,1854539,1854701,1854773-1854774,1854827,1854848,1854859,1854930,1854990-1854991,1855032,1855221,1855477-1855478,1855776,1855993,1856049,1856056,1856538,1856545,1857000,1857010,1857104,1857159,1857212,1857221,1857238,1857247,1857253,1857294,1857314,1857577,1857635,1857638,1857640,1857687,1857936,1858032,1858053,1858123,1858139,1858571,1858578,1858810,1858931,1859231,1859292,1859294,1859619,1859716,1859776,1859780
+/jackrabbit/oak/trunk:1850874,1850882,1851236,1851253,1851451,1851533-1851535,1851619,1852052,1852084,1852120,1852135,1852451,1852492-1852493,1852528,1852582,1852584,1852601,1852920,1853083,1853141,1853229,1853393,1853429,1853433,1853441,1853866,1853868,1853870,1853893,1853969,1853997,1854034,1854044,1854055,1854058,1854113,1854373,1854377,1854380,1854385,1854401,1854403,1854455,1854461-1854462,1854466,1854468,1854515,1854533,1854539,1854701,1854773-1854774,1854827,1854848,1854859,1854930,1854990-1854991,1855032,1855221,1855477-1855478,1855776,1855993,1856049,1856056,1856538,1856545,1857000,1857010,1857104,1857159,1857212,1857221,1857238,1857247,1857253,1857294,1857314,1857577,1857635,1857638,1857640,1857687,1857936,1858032,1858053,1858123,1858139,1858571,1858578,1858810,1858931,1859231,1859292,1859294,1859619,1859716,1859776,1859780,1859843
/jackrabbit/trunk:1345480
Modified: jackrabbit/oak/branches/1.10/oak-run/README.md
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.10/oak-run/README.md?rev=1859849&r1=1859848&r2=1859849&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.10/oak-run/README.md (original)
+++ jackrabbit/oak/branches/1.10/oak-run/README.md Fri May 24 08:03:00 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/branches/1.10/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Utils.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.10/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Utils.java?rev=1859849&r1=1859848&r2=1859849&view=diff
==============================================================================
---
jackrabbit/oak/branches/1.10/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Utils.java
(original)
+++
jackrabbit/oak/branches/1.10/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Utils.java
Fri May 24 08:03:00 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");