Elasticsearch/Client/6_0/Direct/Cat.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 36 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::6_0::Direct::Cat;
2 $Search::Elasticsearch::Client::6_0::Direct::Cat::VERSION = '6.80';
3 use Moo;
4 with 'Search::Elasticsearch::Client::6_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 #===================================
20 around 'perform_request' => sub {
21 #===================================
22 my $orig = shift;
23 my $self = shift;
24 my ( $defn, $params ) = parse_params(@_);
25 if ( $params->{help} && $params->{help} ne 'false' ) {
26 $defn = { %$defn, parts => {} };
27 }
28  
29 return $orig->( $self, $defn, $params );
30  
31 };
32  
33 1;
34  
35 =pod
36  
37 =encoding UTF-8
38  
39 =head1 NAME
40  
41 Search::Elasticsearch::Client::6_0::Direct::Cat - A client for running cat debugging requests
42  
43 =head1 VERSION
44  
45 version 6.80
46  
47 =head1 DESCRIPTION
48  
49 The C<cat> API in Elasticsearch provides information about your
50 cluster and indices in a simple, easy to read text format, intended
51 for human consumption.
52  
53 These APIs have a number of parameters in common:
54  
55 =over
56  
57 =item * C<help>
58  
59 Returns help about the API, eg:
60  
61 say $e->cat->allocation(help => 1);
62  
63 =item * C<v>
64  
65 Includes the column headers in the output:
66  
67 say $e->cat->allocation(v => 1);
68  
69 =item * C<h>
70  
71 Accepts a list of column names to be output, eg:
72  
73 say $e->cat->indices(h => ['health','index']);
74  
75 =item * C<bytes>
76  
77 Formats byte-based values as bytes (C<b>), kilobytes (C<k>), megabytes
78 (C<m>) or gigabytes (C<g>)
79  
80 =back
81  
82 It does L<Search::Elasticsearch::Role::Client::Direct>.
83  
84 =head1 METHODS
85  
86 =head2 C<help()>
87  
88 say $e->cat->help;
89  
90 Returns the list of supported C<cat> APIs
91  
92 =head2 C<aliases()>
93  
94 say $e->cat->aliases(
95 name => 'name' | \@names # optional
96 );
97  
98 Returns information about index aliases, optionally limited to the specified
99 index/alias names.
100  
101 Query string parameters:
102 C<error_trace>,
103 C<format>,
104 C<h>,
105 C<help>,
106 C<human>,
107 C<local>,
108 C<master_timeout>,
109 C<s>,
110 C<v>
111  
112 See the L<cat aliases docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-aliases.html>
113 for more information.
114  
115 =head2 C<allocation()>
116  
117 say $e->cat->allocation(
118 node_id => 'node' | \@nodes # optional
119 );
120  
121 Provides a snapshot of how shards have located around the cluster and the
122 state of disk usage.
123  
124 Query string parameters:
125 C<bytes>,
126 C<error_trace>,
127 C<format>,
128 C<h>,
129 C<help>,
130 C<human>,
131 C<local>,
132 C<master_timeout>,
133 C<s>,
134 C<v>
135  
136 See the L<cat allocation docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html>
137 for more information.
138  
139 =head2 C<count()>
140  
141 say $e->cat->count(
142 index => 'index' | \@indices # optional
143 );
144  
145 Provides quick access to the document count of the entire cluster, or
146 individual indices.
147  
148 Query string parameters:
149 C<error_trace>,
150 C<format>,
151 C<h>,
152 C<help>,
153 C<human>,
154 C<local>,
155 C<master_timeout>,
156 C<s>,
157 C<v>
158  
159 See the L<cat count docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html>
160 for more information.
161  
162 =head2 C<fielddata()>
163  
164 say $e->cat->fielddata(
165 fields => 'field' | \@fields # optional
166 );
167  
168 Shows the amount of memory used by each of the specified `fields` (or all
169 fields) loaded into fielddata.
170  
171 Query string parameters:
172 C<bytes>,
173 C<error_trace>,
174 C<format>,
175 C<h>,
176 C<help>,
177 C<human>,
178 C<local>,
179 C<master_timeout>,
180 C<s>,
181 C<v>
182  
183 See the L<cat fielddata docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html>
184 for more information.
185  
186 =head2 C<health()>
187  
188 say $e->cat->health();
189  
190 Provides a snapshot of how shards have located around the cluster and the
191 state of disk usage.
192  
193 Query string parameters:
194 C<error_trace>,
195 C<format>,
196 C<h>,
197 C<help>,
198 C<human>,
199 C<local>,
200 C<master_timeout>,
201 C<ts>,
202 C<s>,
203 C<v>
204  
205 See the L<cat health docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html>
206 for more information.
207  
208 =head2 C<indices()>
209  
210 say $e->cat->indices(
211 index => 'index' | \@indices # optional
212 );
213  
214 Provides a summary of index size and health for the whole cluster
215 or individual indices
216  
217 Query string parameters:
218 C<bytes>,
219 C<error_trace>,
220 C<format>,
221 C<h>,
222 C<health>,
223 C<help>,
224 C<human>,
225 C<local>,
226 C<master_timeout>,
227 C<pri>,
228 C<s>,
229 C<v>
230  
231 See the L<cat indices docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html>
232 for more information.
233  
234 =head2 C<master()>
235  
236 say $e->cat->master();
237  
238 Displays the master’s node ID, bound IP address, and node name.
239  
240 Query string parameters:
241 C<error_trace>,
242 C<format>,
243 C<h>,
244 C<help>,
245 C<human>,
246 C<local>,
247 C<master_timeout>,
248 C<s>,
249 C<v>
250  
251 See the L<cat master docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-master.html>
252 for more information.
253  
254 =head2 C<nodeattrs()>
255  
256 say $e->cat->nodeattrs();
257  
258 Returns the node attributes set per node.
259  
260 Query string parameters:
261 C<error_trace>,
262 C<format>,
263 C<h>,
264 C<help>,
265 C<human>,
266 C<local>,
267 C<master_timeout>,
268 C<s>,
269 C<v>
270  
271 See the L<cat nodeattrs docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodeattrs.html>
272 for more information.
273  
274 =head2 C<nodes()>
275  
276 say $e->cat->nodes();
277  
278 Provides a snapshot of all of the nodes in your cluster.
279  
280 Query string parameters:
281 C<error_trace>,
282 C<format>,
283 C<h>,
284 C<help>,
285 C<human>,
286 C<local>,
287 C<master_timeout>,
288 C<s>,
289 C<v>
290  
291 See the L<cat nodes docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html>
292 for more information.
293  
294 =head2 C<pending_tasks()>
295  
296 say $e->cat->pending_tasks();
297  
298 Returns any cluster-level tasks which are queued on the master.
299  
300 Query string parameters:
301 C<error_trace>,
302 C<format>,
303 C<human>,
304 C<local>,
305 C<master_timeout>,
306 C<h>,
307 C<help>,
308 C<s>,
309 C<v>
310  
311 See the L<cat pending-tasks docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html>
312 for more information.
313  
314 =head2 C<plugins()>
315  
316 say $e->cat->plugins();
317  
318 Returns information about plugins installed on each node.
319  
320 Query string parameters:
321 C<error_trace>,
322 C<format>,
323 C<human>,
324 C<local>,
325 C<master_timeout>,
326 C<h>,
327 C<help>,
328 C<s>,
329 C<v>
330  
331 See the L<cat plugins docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html>
332 for more information.
333  
334 =head2 C<recovery()>
335  
336 say $e->cat->recovery(
337 index => 'index' | \@indices # optional
338 );
339  
340 Provides a view of shard replication. It will show information
341 anytime data from at least one shard is copying to a different node.
342 It can also show up on cluster restarts. If your recovery process seems
343 stuck, try it to see if there’s any movement using C<recovery()>.
344  
345 Query string parameters:
346 C<bytes>,
347 C<error_trace>,
348 C<format>,
349 C<h>,
350 C<help>,
351 C<human>,
352 C<master_timeout>,
353 C<s>,
354 C<v>
355  
356 See the L<cat recovery docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html>
357 for more information.
358  
359 =head2 C<repositories()>
360  
361 say $e->cat->repositories()
362  
363 Provides a list of registered snapshot repositories.
364  
365 Query string parameters:
366 C<error_trace>,
367 C<format>,
368 C<h>,
369 C<help>,
370 C<human>,
371 C<local>,
372 C<master_timeout>,
373 C<s>,
374 C<v>
375  
376 See the L<cat repositories docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html>
377 for more information.
378  
379 =head2 C<segments()>
380  
381 say $e->cat->segments(
382 index => 'index' | \@indices # optional
383 );
384  
385 Provides low level information about the segments in the shards of an index.
386  
387 Query string parameters:
388 C<bytes>,
389 C<error_trace>,
390 C<format>,
391 C<h>,
392 C<help>,
393 C<human>,
394 C<s>,
395 C<v>
396  
397 See the L<cat shards docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html>
398 for more information.
399  
400 =head2 C<shards()>
401  
402 say $e->cat->shards(
403 index => 'index' | \@indices # optional
404 );
405  
406 Provides a detailed view of what nodes contain which shards, the state and
407 size of each shard.
408  
409 Query string parameters:
410 C<bytes>,
411 C<error_trace>,
412 C<format>,
413 C<h>,
414 C<help>,
415 C<human>,
416 C<local>,
417 C<master_timeout>,
418 C<s>,
419 C<v>
420  
421 See the L<cat shards docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html>
422 for more information.
423  
424 =head2 C<snapshots()>
425  
426 say $e->cat->snapshots(
427 repository => 'repository' | \@repositories # optional
428 )
429  
430 Provides a list of all snapshots that belong to the specified repositories.
431  
432 Query string parameters:
433 C<error_trace>,
434 C<format>,
435 C<h>,
436 C<help>,
437 C<human>,
438 C<ignore_unavailable>,
439 C<master_timeout>,
440 C<s>,
441 C<v>
442  
443 See the L<cat snapshots docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html>
444 for more information.
445  
446 =head2 C<tasks()>
447  
448 say $e->cat->tasks()
449  
450 Provides a list of node-level tasks.
451  
452 Query string parameters:
453 C<actions>,
454 C<detailed>,
455 C<error_trace>,
456 C<format>,
457 C<h>,
458 C<help>,
459 C<human>,
460 C<node_id>,
461 C<parent_node>,
462 C<parent_task>,
463 C<s>,
464 C<v>
465  
466 See the L<cat tasks docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html>
467 for more information.
468  
469 =head2 C<templates()>
470  
471 say $e->cat->templates(
472 name => $name # optional
473 )
474  
475 Provides a list of index templates.
476  
477 Query string parameters:
478 C<error_trace>,
479 C<format>,
480 C<h>,
481 C<help>,
482 C<human>,
483 C<local>,
484 C<master_timeout>,
485 C<s>,
486 C<v>
487  
488 See the L<cat templates docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/templates.html>
489 for more information.
490  
491 =head2 C<thread_pool()>
492  
493 say $e->cat->thread_pool(
494 index => 'index' | \@indices # optional
495 );
496  
497 Shows cluster wide thread pool statistics per node. By default the C<active>,
498 C<queue> and C<rejected> statistics are returned for the C<bulk>, C<index> and
499 C<search> thread pools.
500  
501 Query string parameters:
502 C<error_trace>,
503 C<format>,
504 C<h>,
505 C<help>,
506 C<human>,
507 C<local>,
508 C<master_timeout>,
509 C<size>,
510 C<s>,
511 C<v>
512  
513 See the L<cat thread_pool docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html>
514 for more information.
515  
516 =head1 AUTHOR
517  
518 Enrico Zimuel <enrico.zimuel@elastic.co>
519  
520 =head1 COPYRIGHT AND LICENSE
521  
522 This software is Copyright (c) 2020 by Elasticsearch BV.
523  
524 This is free software, licensed under:
525  
526 The Apache License, Version 2.0, January 2004
527  
528 =cut
529  
530 __END__