Filtered out non data-nodes in relevant cat api
Closes #9214 Closes #9287
This commit is contained in:
parent
240155b4ea
commit
931b9f9c74
|
@ -58,7 +58,7 @@ public class RestAllocationAction extends AbstractCatAction {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doRequest(final RestRequest request, final RestChannel channel, final Client client) {
|
public void doRequest(final RestRequest request, final RestChannel channel, final Client client) {
|
||||||
final String[] nodes = Strings.splitStringByCommaToArray(request.param("nodes"));
|
final String[] nodes = Strings.splitStringByCommaToArray(request.param("nodes", "data:true"));
|
||||||
final ClusterStateRequest clusterStateRequest = new ClusterStateRequest();
|
final ClusterStateRequest clusterStateRequest = new ClusterStateRequest();
|
||||||
clusterStateRequest.clear().routingTable(true);
|
clusterStateRequest.clear().routingTable(true);
|
||||||
clusterStateRequest.local(request.paramAsBoolean("local", clusterStateRequest.local()));
|
clusterStateRequest.local(request.paramAsBoolean("local", clusterStateRequest.local()));
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class RestFielddataAction extends AbstractCatAction {
|
||||||
@Override
|
@Override
|
||||||
void doRequest(final RestRequest request, final RestChannel channel, final Client client) {
|
void doRequest(final RestRequest request, final RestChannel channel, final Client client) {
|
||||||
|
|
||||||
final NodesStatsRequest nodesStatsRequest = new NodesStatsRequest();
|
final NodesStatsRequest nodesStatsRequest = new NodesStatsRequest("data:true");
|
||||||
nodesStatsRequest.clear();
|
nodesStatsRequest.clear();
|
||||||
nodesStatsRequest.indices(true);
|
nodesStatsRequest.indices(true);
|
||||||
String[] fields = request.paramAsStringArray("fields", null);
|
String[] fields = request.paramAsStringArray("fields", null);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[[cat-allocation]]
|
[[cat-allocation]]
|
||||||
== cat allocation
|
== cat allocation
|
||||||
|
|
||||||
`allocation` provides a snapshot of how shards have located around the
|
`allocation` provides a snapshot of how many shards are allocated to each data node
|
||||||
cluster and the state of disk usage.
|
and how much disk space they are using.
|
||||||
|
|
||||||
[source,shell]
|
[source,shell]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[[cat-fielddata]]
|
[[cat-fielddata]]
|
||||||
== cat fielddata
|
== cat fielddata
|
||||||
|
|
||||||
`fielddata` shows information about currently loaded fielddata on a per-node
|
`fielddata` shows how much heap memory is currently being used by fielddata
|
||||||
basis.
|
on every data node in the cluster.
|
||||||
|
|
||||||
[source,shell]
|
[source,shell]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
|
@ -61,9 +61,9 @@
|
||||||
( \s* #allow leading spaces to account for right-justified text
|
( \s* #allow leading spaces to account for right-justified text
|
||||||
\d+ \s+
|
\d+ \s+
|
||||||
\d+(\.\d+)?[kmgt]?b \s+
|
\d+(\.\d+)?[kmgt]?b \s+
|
||||||
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
|
(\d+(\.\d+)?[kmgt]b \s+) #always should return value since we filter out non data nodes by default
|
||||||
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
|
(\d+(\.\d+)?[kmgt]b \s+) #always should return value since we filter out non data nodes by default
|
||||||
(\d+ \s+)? #no value from client nodes
|
(\d+ \s+) #always should return value since we filter out non data nodes by default
|
||||||
[-\w.]+ \s+
|
[-\w.]+ \s+
|
||||||
\d+(\.\d+){3} \s+
|
\d+(\.\d+){3} \s+
|
||||||
\w.*
|
\w.*
|
||||||
|
@ -110,6 +110,37 @@
|
||||||
/^
|
/^
|
||||||
$/
|
$/
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
"All Nodes":
|
||||||
|
|
||||||
|
- do:
|
||||||
|
cat.allocation:
|
||||||
|
node_id: "*"
|
||||||
|
v: false
|
||||||
|
|
||||||
|
- match:
|
||||||
|
$body: |
|
||||||
|
/^
|
||||||
|
( \s* #allow leading spaces to account for right-justified text
|
||||||
|
\d+ \s+
|
||||||
|
\d+(\.\d+)?[kmgt]?b \s+
|
||||||
|
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
|
||||||
|
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
|
||||||
|
(\d+ \s+)? #no value from client nodes
|
||||||
|
[-\w.]+ \s+
|
||||||
|
\d+(\.\d+){3} \s+
|
||||||
|
\w.*
|
||||||
|
\n
|
||||||
|
)+
|
||||||
|
(
|
||||||
|
\s* #allow leading spaces to account for right-justified text
|
||||||
|
\d+ \s+
|
||||||
|
UNASSIGNED \s+
|
||||||
|
\n
|
||||||
|
)?
|
||||||
|
$/
|
||||||
|
|
||||||
---
|
---
|
||||||
"Column headers":
|
"Column headers":
|
||||||
|
|
||||||
|
@ -132,9 +163,9 @@
|
||||||
( \s* #allow leading spaces to account for right-justified text
|
( \s* #allow leading spaces to account for right-justified text
|
||||||
0 \s+
|
0 \s+
|
||||||
\d+(\.\d+)?[kmgt]?b \s+
|
\d+(\.\d+)?[kmgt]?b \s+
|
||||||
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
|
(\d+(\.\d+)?[kmgt]b \s+) #always should return value since we filter out non data nodes by default
|
||||||
(\d+(\.\d+)?[kmgt]b \s+)? #no value from client nodes
|
(\d+(\.\d+)?[kmgt]b \s+) #always should return value since we filter out non data nodes by default
|
||||||
(\d+ \s+)? #no value from client nodes
|
(\d+ \s+) #always should return value since we filter out non data nodes by default
|
||||||
[-\w.]+ \s+
|
[-\w.]+ \s+
|
||||||
\d+(\.\d+){3} \s+
|
\d+(\.\d+){3} \s+
|
||||||
\w.*
|
\w.*
|
||||||
|
@ -192,9 +223,9 @@
|
||||||
/^
|
/^
|
||||||
( 0 \s+
|
( 0 \s+
|
||||||
\d+ \s+
|
\d+ \s+
|
||||||
(\d+ \s+)? #no value from client nodes
|
(\d+ \s+) #always should return value since we filter out non data nodes by default
|
||||||
(\d+ \s+)? #no value from client nodes
|
(\d+ \s+) #always should return value since we filter out non data nodes by default
|
||||||
(\d+ \s+)? #no value from client nodes
|
(\d+ \s+) #always should return value since we filter out non data nodes by default
|
||||||
[-\w.]+ \s+
|
[-\w.]+ \s+
|
||||||
\d+(\.\d+){3} \s+
|
\d+(\.\d+){3} \s+
|
||||||
\w.*
|
\w.*
|
||||||
|
|
Loading…
Reference in New Issue