Author: thomasm
Date: Tue Nov 29 14:29:28 2016
New Revision: 1771911
URL: http://svn.apache.org/viewvc?rev=1771911&view=rev
Log:
OAK-5185 Improved JMX descriptions for the query engine
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/jmx/QueryEngineSettingsMBean.java
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/counter/jmx/NodeCounterMBean.java
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/jmx/QueryEngineSettingsMBean.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/jmx/QueryEngineSettingsMBean.java?rev=1771911&r1=1771910&r2=1771911&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/jmx/QueryEngineSettingsMBean.java
(original)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/jmx/QueryEngineSettingsMBean.java
Tue Nov 29 14:29:28 2016
@@ -16,6 +16,8 @@
*/
package org.apache.jackrabbit.oak.api.jmx;
+import org.apache.jackrabbit.oak.commons.jmx.Description;
+
import aQute.bnd.annotation.ProviderType;
@ProviderType
@@ -29,6 +31,8 @@ public interface QueryEngineSettingsMBea
*
* @return the limit
*/
+ @Description("Get the limit on how many nodes a query may read at most
into memory, for " +
+ "\"order by\" and \"distinct\" queries. If this limit is exceeded,
the query throws an exception.")
long getLimitInMemory();
/**
@@ -45,6 +49,9 @@ public interface QueryEngineSettingsMBea
*
* @return the limit
*/
+ @Description("Get the limit on how many nodes a query may read at most
(raw read " +
+ "operations, including skipped nodes). If this limit is exceeded,
the " +
+ "query throws an exception.")
long getLimitReads();
/**
@@ -60,6 +67,8 @@ public interface QueryEngineSettingsMBea
*
* @return true if they fail
*/
+ @Description("Whether queries that don't use an index will fail (throw an
exception). " +
+ "The default is false.")
boolean getFailTraversal();
/**
@@ -70,10 +79,11 @@ public interface QueryEngineSettingsMBea
void setFailTraversal(boolean failTraversal);
/**
- * Whether the query result size should return an estimation (or -1 if
disabled) for large queries
+ * Whether the query result size should return an estimation for large
queries.
*
* @return true if enabled
*/
+ @Description("Whether the query result size should return an estimation
for large queries.")
boolean isFastQuerySize();
void setFastQuerySize(boolean fastQuerySize);
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/counter/jmx/NodeCounterMBean.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/counter/jmx/NodeCounterMBean.java?rev=1771911&r1=1771910&r2=1771911&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/counter/jmx/NodeCounterMBean.java
(original)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/counter/jmx/NodeCounterMBean.java
Tue Nov 29 14:29:28 2016
@@ -18,6 +18,9 @@
*/
package org.apache.jackrabbit.oak.plugins.index.counter.jmx;
+import org.apache.jackrabbit.oak.commons.jmx.Description;
+import org.apache.jackrabbit.oak.commons.jmx.Name;
+
/**
* An MBean that provides an approximate node count for a given path.
*/
@@ -32,7 +35,11 @@ public interface NodeCounterMBean {
* @return the estimated number of nodes, or -1 if unknown (if not index is
* available)
*/
- long getEstimatedNodeCount(String path);
+ @Description("Get the estimated number of nodes below a given path.")
+ long getEstimatedNodeCount(
+ @Description("the path")
+ @Name("path")
+ String path);
/**
* Get the estimated number of nodes for the child nodes of a given path.
@@ -42,6 +49,13 @@ public interface NodeCounterMBean {
* @return a comma separated list of child nodes with the respective
* estimated counts
*/
- String getEstimatedChildNodeCounts(String path, int level);
+ @Description("Get the estimated number of nodes below a given path.")
+ String getEstimatedChildNodeCounts(
+ @Description("the path")
+ @Name("path")
+ String path,
+ @Description("the depth of the child nodes to list (the higher the
number, the slower)")
+ @Name("level")
+ int level);
}