2_0/Direct/Nodes.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 10 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Licensed to Elasticsearch B.V under one or more agreements.
2 # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3 # See the LICENSE file in the project root for more information
4  
5 package Search::Elasticsearch::Client::2_0::Direct::Nodes;
6 $Search::Elasticsearch::Client::2_0::Direct::Nodes::VERSION = '7.30_1'; # TRIAL
7  
8 $Search::Elasticsearch::Client::2_0::Direct::Nodes::VERSION = '7.301';
9 use Moo;
10 with 'Search::Elasticsearch::Client::2_0::Role::API';
11 with 'Search::Elasticsearch::Role::Client::Direct';
12 __PACKAGE__->_install_api('nodes');
13  
14 1;
15  
16 =pod
17  
18 =encoding UTF-8
19  
20 =head1 NAME
21  
22 Search::Elasticsearch::Client::2_0::Direct::Nodes - A client for running node-level requests
23  
24 =head1 VERSION
25  
26 version 7.30_1
27  
28 =head1 DESCRIPTION
29  
30 This module provides methods to make node-level requests, such as
31 retrieving node info and stats.
32  
33 It does L<Search::Elasticsearch::Role::Client::Direct>.
34  
35 =head1 METHODS
36  
37 =head2 C<info()>
38  
39 $response = $e->nodes->info(
40 node_id => $node_id | \@node_ids # optional
41 metric => $metric | \@metrics # optional
42 );
43  
44 The C<info()> method returns static information about the nodes in the
45 cluster, such as the configured maximum number of file handles, the maximum
46 configured heap size or the threadpool settings.
47  
48 Allowed metrics are:
49 C<http>,
50 C<jvm>,
51 C<network>,
52 C<os>,
53 C<plugin>,
54 C<process>,
55 C<settings>,
56 C<thread_pool>,
57 C<timeout>,
58 C<transport>
59  
60 Query string parameters:
61 C<flat_settings>,
62 C<human>
63  
64 See the L<node_info docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html>
65 for more information.
66  
67 =head2 C<stats()>
68  
69 $response = $e->nodes->stats(
70 node_id => $node_id | \@node_ids # optional
71 metric => $metric | \@metrics # optional
72 index_metric => $ind_metric | \@ind_metrics # optional
73 );
74  
75 The C<stats()> method returns statistics about the nodes in the
76 cluster, such as the number of currently open file handles, the current
77 heap memory usage or the current number of threads in use.
78  
79 Stats can be returned for all nodes, or limited to particular nodes
80 with the C<node_id> parameter. By default all metrics are returned, but
81 these can be limited to those specified in the C<metric> parameter.
82  
83 Allowed metrics are:
84 C<_all>,
85 C<breaker>,
86 C<fs>,
87 C<http>,
88 C<indices>,
89 C<jvm>,
90 C<network>,
91 C<os>,
92 C<process>,
93 C<thread_pool>,
94 C<timeout>,
95 C<transport>
96  
97 If the C<indices> metric (or C<_all>) is specified, then
98 L<indices_stats|Search::Elasticsearch::Client::2_0::Direct::Indices/indices_stats()>
99 information is returned on a per-node basis. Which indices stats are
100 returned can be controlled with the C<index_metric> parameter:
101  
102 $response = $e->cluster->node_stats(
103 node_id => 'node_1',
104 metric => ['indices','fs']
105 index_metric => ['docs','fielddata']
106 );
107  
108 Allowed index metrics are:
109 C<_all>,
110 C<completion>
111 C<docs>,
112 C<fielddata>,
113 C<filter_cache>,
114 C<flush>,
115 C<get>,
116 C<id_cache>,
117 C<indexing>,
118 C<merge>,
119 C<percolate>,
120 C<query_cache>,
121 C<refresh>,
122 C<search>,
123 C<segments>,
124 C<store>,
125 C<warmer>
126  
127 Query string parameters:
128 C<completion_fields>,
129 C<fielddata_fields>,
130 C<fields>,
131 C<groups>,
132 C<human>,
133 C<level>,
134 C<types>
135  
136 See the L<node_stats docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html>
137 for more information.
138  
139 =head2 C<hot_threads()>
140  
141 $response = $e->nodes->hot_threads(
142 node_id => $node_id | \@node_ids # optional
143 )
144  
145 The C<hot_threads()> method is a useful tool for diagnosing busy nodes. It
146 takes a snapshot of which threads are consuming the most CPU.
147  
148 Query string parameters:
149 C<ignore_idle_threads>,
150 C<interval>,
151 C<snapshots>,
152 C<threads>,
153 C<timeout>,
154 C<type>
155  
156 See the L<hot_threads docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html>
157 for more information.
158  
159 =head1 AUTHOR
160  
161 Enrico Zimuel <enrico.zimuel@elastic.co>
162  
163 =head1 COPYRIGHT AND LICENSE
164  
165 This software is Copyright (c) 2020 by Elasticsearch BV.
166  
167 This is free software, licensed under:
168  
169 The Apache License, Version 2.0, January 2004
170  
171 =cut
172  
173 __END__