1_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::1_0::Direct::Nodes;
6 $Search::Elasticsearch::Client::1_0::Direct::Nodes::VERSION = '7.30_1'; # TRIAL
7  
8 $Search::Elasticsearch::Client::1_0::Direct::Nodes::VERSION = '7.301';
9 use Moo;
10 with 'Search::Elasticsearch::Client::1_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::1_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<transport>
58  
59 Query string parameters:
60 C<flat_settings>,
61 C<human>
62  
63 See the L<node_info docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html>
64 for more information.
65  
66 =head2 C<stats()>
67  
68 $response = $e->nodes->stats(
69 node_id => $node_id | \@node_ids # optional
70 metric => $metric | \@metrics # optional
71 index_metric => $ind_metric | \@ind_metrics # optional
72 );
73  
74 The C<stats()> method returns statistics about the nodes in the
75 cluster, such as the number of currently open file handles, the current
76 heap memory usage or the current number of threads in use.
77  
78 Stats can be returned for all nodes, or limited to particular nodes
79 with the C<node_id> parameter. By default all metrics are returned, but
80 these can be limited to those specified in the C<metric> parameter.
81  
82 Allowed metrics are:
83 C<_all>,
84 C<breaker>,
85 C<fs>,
86 C<http>,
87 C<indices>,
88 C<jvm>,
89 C<network>,
90 C<os>,
91 C<process>,
92 C<thread_pool>,
93 C<transport>
94  
95 If the C<indices> metric (or C<_all>) is specified, then
96 L<indices_stats|Search::Elasticsearch::Client::1_0::Direct::Indices/indices_stats()>
97 information is returned on a per-node basis. Which indices stats are
98 returned can be controlled with the C<index_metric> parameter:
99  
100 $response = $e->cluster->node_stats(
101 node_id => 'node_1',
102 metric => ['indices','fs']
103 index_metric => ['docs','fielddata']
104 );
105  
106 Allowed index metrics are:
107 C<_all>,
108 C<completion>
109 C<docs>,
110 C<fielddata>,
111 C<filter_cache>,
112 C<flush>,
113 C<get>,
114 C<id_cache>,
115 C<indexing>,
116 C<merge>,
117 C<percolate>,
118 C<query_cache>,
119 C<refresh>,
120 C<search>,
121 C<segments>,
122 C<store>,
123 C<warmer>
124  
125 Query string parameters:
126 C<completion_fields>,
127 C<fielddata_fields>,
128 C<fields>,
129 C<groups>,
130 C<human>,
131 C<level>,
132 C<types>
133  
134 See the L<node_stats docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html>
135 for more information.
136  
137 =head2 C<hot_threads()>
138  
139 $response = $e->nodes->hot_threads(
140 node_id => $node_id | \@node_ids # optional
141 )
142  
143 The C<hot_threads()> method is a useful tool for diagnosing busy nodes. It
144 takes a snapshot of which threads are consuming the most CPU.
145  
146 Query string parameters:
147 C<ignore_idle_threads>,
148 C<interval>,
149 C<snapshots>,
150 C<threads>,
151 C<type>
152  
153 See the L<hot_threads docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html>
154 for more information.
155  
156 =head2 C<shutdown()>
157  
158 $e->nodes->shutdown(
159 node_id => $node_id | \@node_ids # optional
160 );
161  
162 The C<shutdown()> method is used to shutdown one or more nodes, or the whole
163 cluster.
164  
165 Query string parameters:
166 C<delay>,
167 C<exit>
168  
169 See the L<shutdown docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-shutdown.html>
170 for more information.
171  
172 =head1 AUTHOR
173  
174 Enrico Zimuel <enrico.zimuel@elastic.co>
175  
176 =head1 COPYRIGHT AND LICENSE
177  
178 This software is Copyright (c) 2020 by Elasticsearch BV.
179  
180 This is free software, licensed under:
181  
182 The Apache License, Version 2.0, January 2004
183  
184 =cut
185  
186 __END__