1_0/Direct/Cat.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
help
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Search::Elasticsearch::Client::1_0::Direct::Cat;
2 $Search::Elasticsearch::Client::1_0::Direct::Cat::VERSION = '6.81';
3 use Moo;
4 with 'Search::Elasticsearch::Client::1_0::Role::API';
5 with 'Search::Elasticsearch::Role::Client::Direct';
6 use Search::Elasticsearch::Util qw(parse_params);
7 use namespace::clean;
8 __PACKAGE__->_install_api('cat');
9  
10 #===================================
11 sub help {
12 #===================================
13 my ( $self, $params ) = parse_params(@_);
14 $params->{help} = 1;
15 my $defn = $self->api->{'cat.help'};
16 $self->perform_request( $defn, $params );
17 }
18  
19 1;
20  
21 =pod
22  
23 =encoding UTF-8
24  
25 =head1 NAME
26  
27 Search::Elasticsearch::Client::1_0::Direct::Cat - A client for running cat debugging requests
28  
29 =head1 VERSION
30  
31 version 6.81
32  
33 =head1 DESCRIPTION
34  
35 The C<cat> API in Elasticsearch provides information about your
36 cluster and indices in a simple, easy to read text format, intended
37 for human consumption.
38  
39 These APIs have a number of parameters in common:
40  
41 =over
42  
43 =item * C<help>
44  
45 Returns help about the API, eg:
46  
47 say $e->cat->allocation(help => 1);
48  
49 =item * C<v>
50  
51 Includes the column headers in the output:
52  
53 say $e->cat->allocation(v => 1);
54  
55 =item * C<h>
56  
57 Accepts a list of column names to be output, eg:
58  
59 say $e->cat->indices(h => ['health','index']);
60  
61 =item * C<bytes>
62  
63 Formats byte-based values as bytes (C<b>), kilobytes (C<k>), megabytes
64 (C<m>) or gigabytes (C<g>)
65  
66 =back
67  
68 It does L<Search::Elasticsearch::Role::Client::Direct>.
69  
70 =head1 METHODS
71  
72 =head2 C<help()>
73  
74 say $e->cat->help;
75  
76 Returns the list of supported C<cat> APIs
77  
78 =head2 C<aliases()>
79  
80 say $e->cat->aliases(
81 name => 'name' | \@names # optional
82 );
83  
84 Returns information about index aliases, optionally limited to the specified
85 index/alias names.
86  
87 Query string parameters:
88 C<h>,
89 C<help>,
90 C<local>,
91 C<master_timeout>,
92 C<v>
93  
94 See the L<cat aliases docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-aliases.html>
95 for more information.
96  
97 =head2 C<allocation()>
98  
99 say $e->cat->allocation(
100 node_id => 'node' | \@nodes # optional
101 );
102  
103 Provides a snapshot of how shards have located around the cluster and the
104 state of disk usage.
105  
106 Query string parameters:
107 C<bytes>,
108 C<h>,
109 C<help>,
110 C<local>,
111 C<master_timeout>,
112 C<v>
113  
114 See the L<cat allocation docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html>
115 for more information.
116  
117 =head2 C<count()>
118  
119 say $e->cat->count(
120 index => 'index' | \@indices # optional
121 );
122  
123 Provides quick access to the document count of the entire cluster, or
124 individual indices.
125  
126 Query string parameters:
127 C<h>,
128 C<help>,
129 C<local>,
130 C<master_timeout>,
131 C<v>
132  
133 See the L<cat count docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html>
134 for more information.
135  
136 =head2 C<fielddata()>
137  
138 say $e->cat->fielddata(
139 fields => 'field' | \@fields # optional
140 );
141  
142 Shows the amount of memory used by each of the specified `fields` (or all
143 fields) loaded into fielddata.
144  
145 Query string parameters:
146 C<bytes>,
147 C<h>,
148 C<help>,
149 C<local>,
150 C<master_timeout>,
151 C<v>
152  
153 See the L<cat fielddata docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html>
154 for more information.
155  
156 =head2 C<health()>
157  
158 say $e->cat->health();
159  
160 Provides a snapshot of how shards have located around the cluster and the
161 state of disk usage.
162  
163 Query string parameters:
164 C<bytes>,
165 C<h>,
166 C<help>,
167 C<local>,
168 C<master_timeout>,
169 C<ts>,
170 C<v>
171  
172 See the L<cat health docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html>
173 for more information.
174  
175 =head2 C<indices()>
176  
177 say $e->cat->indices(
178 index => 'index' | \@indices # optional
179 );
180  
181 Provides a summary of index size and health for the whole cluster
182 or individual indices
183  
184 Query string parameters:
185 C<bytes>,
186 C<h>,
187 C<help>,
188 C<local>,
189 C<master_timeout>,
190 C<pri>,
191 C<v>
192  
193 See the L<cat indices docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html>
194 for more information.
195  
196 =head2 C<master()>
197  
198 say $e->cat->master();
199  
200 Displays the master’s node ID, bound IP address, and node name.
201  
202 Query string parameters:
203 C<h>,
204 C<help>,
205 C<local>,
206 C<master_timeout>,
207 C<v>
208  
209 See the L<cat master docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-master.html>
210 for more information.
211  
212 =head2 C<nodes()>
213  
214 say $e->cat->nodes();
215  
216 Provides a snapshot of all of the nodes in your cluster.
217  
218 Query string parameters:
219 C<h>,
220 C<help>,
221 C<local>,
222 C<master_timeout>,
223 C<v>
224  
225 See the L<cat nodes docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html>
226 for more information.
227  
228 =head2 C<pending_tasks()>
229  
230 say $e->cat->pending_tasks();
231  
232 Returns any cluster-level tasks which are queued on the master.
233  
234 Query string parameters:
235 C<local>,
236 C<master_timeout>,
237 C<h>,
238 C<help>,
239 C<v>
240  
241 See the L<cat pending-tasks docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html>
242 for more information.
243  
244 =head2 C<plugins()>
245  
246 say $e->cat->plugins();
247  
248 Returns information about plugins installed on each node.
249  
250 Query string parameters:
251 C<local>,
252 C<master_timeout>,
253 C<h>,
254 C<help>,
255 C<v>
256  
257 See the L<cat plugins docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html>
258 for more information.
259  
260 =head2 C<recovery()>
261  
262 say $e->cat->recovery(
263 index => 'index' | \@indices # optional
264 );
265  
266 Provides a is a view of shard replication. It will show information
267 anytime data from at least one shard is copying to a different node.
268 It can also show up on cluster restarts. If your recovery process seems
269 stuck, try it to see if there’s any movement using C<recovery()>.
270  
271 Query string parameters:
272 C<bytes>,
273 C<h>,
274 C<help>,
275 C<master_timeout>,
276 C<v>
277  
278 See the L<cat recovery docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html>
279 for more information.
280  
281 =head2 C<segments()>
282  
283 say $e->cat->segments(
284 index => 'index' | \@indices # optional
285 );
286  
287 Provides low level information about the segments in the shards of an index.
288  
289 Query string parameters:
290 C<h>,
291 C<help>,
292 C<v>
293  
294 See the L<cat shards docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html>
295 for more information.
296  
297 =head2 C<shards()>
298  
299 say $e->cat->shards(
300 index => 'index' | \@indices # optional
301 );
302  
303 Provides a detailed view of what nodes contain which shards, the state and
304 size of each shard.
305  
306 Query string parameters:
307 C<h>,
308 C<help>,
309 C<local>,
310 C<master_timeout>,
311 C<v>
312  
313 See the L<cat shards docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html>
314 for more information.
315  
316 =head2 C<thread_pool()>
317  
318 say $e->cat->thread_pool(
319 index => 'index' | \@indices # optional
320 );
321  
322 Shows cluster wide thread pool statistics per node. By default the C<active>,
323 C<queue> and C<rejected> statistics are returned for the C<bulk>, C<index> and
324 C<search> thread pools.
325  
326 Query string parameters:
327 C<full_id>,
328 C<h>,
329 C<help>,
330 C<local>,
331 C<master_timeout>,
332 C<v>
333  
334 See the L<cat thread_pool docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html>
335 for more information.
336  
337 =head1 AUTHOR
338  
339 Enrico Zimuel <enrico.zimuel@elastic.co>
340  
341 =head1 COPYRIGHT AND LICENSE
342  
343 This software is Copyright (c) 2020 by Elasticsearch BV.
344  
345 This is free software, licensed under:
346  
347 The Apache License, Version 2.0, January 2004
348  
349 =cut
350  
351 __END__