Merge pull request #13180 from nik9000/cat_non_verbose

Default _cat verbose to false
This commit is contained in:
Nik Everett 2015-08-28 11:59:29 -04:00
commit 54639478c0
29 changed files with 39 additions and 96 deletions

View File

@ -68,7 +68,7 @@ public class RestTable {
public static RestResponse buildTextPlainResponse(Table table, RestChannel channel) throws IOException {
RestRequest request = channel.request();
boolean verbose = request.paramAsBoolean("v", true);
boolean verbose = request.paramAsBoolean("v", false);
List<DisplayHeader> headers = buildDisplayHeaders(table, request);
int[] width = buildWidths(table, request, verbose, headers);

View File

@ -45,16 +45,6 @@ used separately to control whether `routing_nodes` should be returned.
The deprecated index status API has been removed.
==== `cat` APIs verbose by default
The `cat` APIs now default to being verbose, which means they output column
headers by default. Verbosity can be turned off with the `v` parameter:
[source,sh]
-----------------
GET _cat/shards?v=0
-----------------
==== Nodes Stats API
Queue lengths are now reported as basic numeric so they can easily processed by code. Before we used a human

View File

@ -32,7 +32,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -37,7 +37,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -32,7 +32,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -37,7 +37,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
},
"fields": {
"type": "list",

View File

@ -33,7 +33,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -42,7 +42,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -28,7 +28,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -28,7 +28,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -28,7 +28,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -28,7 +28,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -26,7 +26,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -33,7 +33,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -24,7 +24,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -32,7 +32,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
}
}
},

View File

@ -28,7 +28,7 @@
"v": {
"type": "boolean",
"description": "Verbose mode. Display column headers",
"default": true
"default": false
},
"full_id": {
"type": "boolean",

View File

@ -17,8 +17,7 @@
"Empty cluster":
- do:
cat.aliases:
v: false
cat.aliases: {}
- match:
$body: |
@ -38,8 +37,7 @@
name: test_alias
- do:
cat.aliases:
v: false
cat.aliases: {}
- match:
$body: |
@ -75,8 +73,7 @@
term:
foo: bar
- do:
cat.aliases:
v: false
cat.aliases: {}
- match:
$body: |
@ -108,14 +105,12 @@
- do:
cat.aliases:
name: test_1
v: false
- match:
$body: /^test_1 .+ \n$/
- do:
cat.aliases:
v: false
name: test_2
- match:
@ -123,7 +118,6 @@
- do:
cat.aliases:
v: false
name: test_*
- match:
@ -178,7 +172,6 @@
- do:
cat.aliases:
v: false
h: [index, alias]
- match:
@ -195,9 +188,3 @@
index \s+ alias \s+ \n
test \s+ test_1 \s+ \n
$/

View File

@ -3,7 +3,6 @@
- do:
cat.allocation:
help: true
v: false
- match:
$body: |
@ -21,8 +20,7 @@
"Empty cluster":
- do:
cat.allocation:
v: false
cat.allocation: {}
- match:
$body: |
@ -51,8 +49,7 @@
wait_for_status: yellow
- do:
cat.allocation:
v: false
cat.allocation: {}
- match:
$body: |
@ -82,7 +79,6 @@
- do:
cat.allocation:
node_id: _master
v: false
- match:
$body: |
@ -102,7 +98,6 @@
- do:
cat.allocation:
node_id: non_existent
v: false
- match:
$body: |
@ -116,7 +111,6 @@
- do:
cat.allocation:
node_id: "*"
v: false
- match:
$body: |
@ -215,7 +209,6 @@
- do:
cat.allocation:
bytes: g
v: false
- match:
$body: |
@ -231,4 +224,3 @@
\n
)+
$/

View File

@ -14,8 +14,7 @@
"Test cat count output":
- do:
cat.count:
v: false
cat.count: {}
- match:
$body: |
@ -31,8 +30,7 @@
refresh: true
- do:
cat.count:
v: false
cat.count: {}
- match:
$body: |
@ -50,7 +48,6 @@
- do:
cat.count:
h: count
v: false
- match:
$body: |
@ -61,7 +58,6 @@
- do:
cat.count:
index: index1
v: false
- match:
$body: |
@ -77,4 +73,3 @@
$body: |
/^ epoch \s+ timestamp \s+ count \s+ \n
\d+ \s+ \d{2}:\d{2}:\d{2} \s+ \d+ \s+ \n $/

View File

@ -17,8 +17,7 @@
"Test cat fielddata output":
- do:
cat.fielddata:
v: false
cat.fielddata: {}
- do:
index:

View File

@ -28,8 +28,7 @@
"Empty cluster":
- do:
cat.health:
v: false
cat.health: {}
- match:
$body: |

View File

@ -2,8 +2,7 @@
"Test cat indices output":
- do:
cat.indices:
v: false
cat.indices: {}
- match:
$body: |
@ -20,8 +19,7 @@
cluster.health:
wait_for_status: yellow
- do:
cat.indices:
v: false
cat.indices: {}
- match:
$body: |

View File

@ -6,8 +6,7 @@
reason: "Waiting for #12558"
- do:
cat.nodeattrs:
v: false
cat.nodeattrs: {}
- match:
$body: |

View File

@ -2,8 +2,7 @@
"Test cat nodes output":
- do:
cat.nodes:
v: false
cat.nodes: {}
- match:
$body: |

View File

@ -2,8 +2,7 @@
"Test cat recovery output":
- do:
cat.recovery:
v: false
cat.recovery: {}
- match:
$body: |
@ -20,8 +19,7 @@
cluster.health:
wait_for_status: yellow
- do:
cat.recovery:
v: false
cat.recovery: {}
- match:
$body: |

View File

@ -26,8 +26,7 @@
"Test cat segments output":
- do:
cat.segments:
v: false
cat.segments: {}
- match:
$body: |
@ -50,8 +49,7 @@
cluster.health:
wait_for_status: green
- do:
cat.segments:
v: false
cat.segments: {}
- match:
$body: |
/^(index1 \s+ \d \s+ (p|r) \s+ \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} \s+ _\d (\s\d){3} \s+
@ -81,8 +79,7 @@
- do:
cat.segments:
v: false
cat.segments: {}
- match:
$body: |
/^(index(1|2) .+ \n?){2}$/
@ -90,7 +87,6 @@
- do:
cat.segments:
index: index2
v: false
- match:
$body: |
/^(index2 .+ \n?)$/
@ -118,4 +114,3 @@
catch: forbidden
cat.segments:
index: index1
v: false

View File

@ -77,8 +77,7 @@
"Test cat shards output":
- do:
cat.shards:
v: false
cat.shards: {}
- match:
$body: |
@ -95,8 +94,7 @@
cluster.health:
wait_for_status: yellow
- do:
cat.shards:
v: false
cat.shards: {}
- match:
$body: |
@ -115,8 +113,7 @@
wait_for_relocating_shards: 0
- do:
cat.shards:
v: false
cat.shards: {}
- match:
$body: |
/^(index(1|2) \s+ \d \s+ (p|r) \s+ ((STARTED|INITIALIZING|RELOCATING) \s+ (\d \s+ (\d+|\d+[.]\d+)(kb|b) \s+)? \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} \s+ .+|UNASSIGNED \s+) \n?){15}$/
@ -124,7 +121,6 @@
- do:
cat.shards:
index: index2
v: false
- match:
$body: |
/^(index2 \s+ \d \s+ (p|r) \s+ ((STARTED|INITIALIZING|RELOCATING) \s+ (\d \s+ (\d+|\d+[.]\d+)(kb|b) \s+)? \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} \s+ .+|UNASSIGNED \s+) \n?){5}$/
@ -146,8 +142,6 @@
- do:
cat.shards:
index: index3
v: false
- match:
$body: |
/^(index3 \s+ \d \s+ (p|s) \s+ ((STARTED|INITIALIZING|RELOCATING) \s+ (\d \s+ (\d+|\d+[.]\d+)(kb|b) \s+)? \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} \s+ .+|UNASSIGNED \s+) \n?){2}$/

View File

@ -2,8 +2,7 @@
"Test cat thread_pool output":
- do:
cat.thread_pool:
v: false
cat.thread_pool: {}
- match:
$body: |
@ -22,7 +21,6 @@
- do:
cat.thread_pool:
h: pid,id,h,i,po
v: false
- match:
$body: |