2_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::2_0::Direct::Cat;
2 $Search::Elasticsearch::Client::2_0::Direct::Cat::VERSION = '6.80';
3 use Moo;
4 with 'Search::Elasticsearch::Client::2_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::2_0::Direct::Cat - A client for running cat debugging requests
28  
29 =head1 VERSION
30  
31 version 6.80
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<nodeattrs()>
213  
214 say $e->cat->nodeattrs();
215  
216 Returns the node attributes set per node.
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 nodeattrs docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodeattrs.html>
226 for more information.
227  
228 =head2 C<nodes()>
229  
230 say $e->cat->nodes();
231  
232 Provides a snapshot of all of the nodes in your cluster.
233  
234 Query string parameters:
235 C<h>,
236 C<help>,
237 C<local>,
238 C<master_timeout>,
239 C<v>
240  
241 See the L<cat nodes docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html>
242 for more information.
243  
244 =head2 C<pending_tasks()>
245  
246 say $e->cat->pending_tasks();
247  
248 Returns any cluster-level tasks which are queued on the master.
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 pending-tasks docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html>
258 for more information.
259  
260 =head2 C<plugins()>
261  
262 say $e->cat->plugins();
263  
264 Returns information about plugins installed on each node.
265  
266 Query string parameters:
267 C<local>,
268 C<master_timeout>,
269 C<h>,
270 C<help>,
271 C<v>
272  
273 See the L<cat plugins docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html>
274 for more information.
275  
276 =head2 C<recovery()>
277  
278 say $e->cat->recovery(
279 index => 'index' | \@indices # optional
280 );
281  
282 Provides a view of shard replication. It will show information
283 anytime data from at least one shard is copying to a different node.
284 It can also show up on cluster restarts. If your recovery process seems
285 stuck, try it to see if there’s any movement using C<recovery()>.
286  
287 Query string parameters:
288 C<bytes>,
289 C<h>,
290 C<help>,
291 C<master_timeout>,
292 C<v>
293  
294 See the L<cat recovery docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html>
295 for more information.
296  
297 =head2 C<repositories()>
298  
299 say $e->cat->repositories()
300  
301 Provides a list of registered snapshot repositories.
302  
303 Query string parameters:
304 C<h>,
305 C<help>,
306 C<local>,
307 C<master_timeout>,
308 C<v>
309  
310 See the L<cat repositories docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html>
311 for more information.
312  
313 =head2 C<segments()>
314  
315 say $e->cat->segments(
316 index => 'index' | \@indices # optional
317 );
318  
319 Provides low level information about the segments in the shards of an index.
320  
321 Query string parameters:
322 C<h>,
323 C<help>,
324 C<v>
325  
326 See the L<cat shards docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html>
327 for more information.
328  
329 =head2 C<shards()>
330  
331 say $e->cat->shards(
332 index => 'index' | \@indices # optional
333 );
334  
335 Provides a detailed view of what nodes contain which shards, the state and
336 size of each shard.
337  
338 Query string parameters:
339 C<h>,
340 C<help>,
341 C<local>,
342 C<master_timeout>,
343 C<v>
344  
345 See the L<cat shards docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html>
346 for more information.
347  
348 =head2 C<snapshots()>
349  
350 say $e->cat->snapshots(
351 repository => 'repository' | \@repositories # required
352 )
353  
354 Provides a list of all snapshots that belong to the specified repositories.
355  
356 Query string parameters:
357 C<h>,
358 C<help>,
359 C<ignore_unavailable>,
360 C<master_timeout>,
361 C<v>
362  
363 See the L<cat snapshots docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html>
364 for more information.
365  
366 =head2 C<thread_pool()>
367  
368 say $e->cat->thread_pool(
369 index => 'index' | \@indices # optional
370 );
371  
372 Shows cluster wide thread pool statistics per node. By default the C<active>,
373 C<queue> and C<rejected> statistics are returned for the C<bulk>, C<index> and
374 C<search> thread pools.
375  
376 Query string parameters:
377 C<full_id>,
378 C<h>,
379 C<help>,
380 C<local>,
381 C<master_timeout>,
382 C<v>
383  
384 See the L<cat thread_pool docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html>
385 for more information.
386  
387 =head1 AUTHOR
388  
389 Enrico Zimuel <enrico.zimuel@elastic.co>
390  
391 =head1 COPYRIGHT AND LICENSE
392  
393 This software is Copyright (c) 2020 by Elasticsearch BV.
394  
395 This is free software, licensed under:
396  
397 The Apache License, Version 2.0, January 2004
398  
399 =cut
400  
401 __END__