/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/master/master_client.service.cc
Line | Count | Source (jump to first uncovered line) |
1 | | // THIS FILE IS AUTOGENERATED FROM yb/master/master_client.proto |
2 | | |
3 | | #include "yb/master/master_client.pb.h" |
4 | | #include "yb/master/master_client.service.h" |
5 | | |
6 | | #include <glog/logging.h> |
7 | | |
8 | | #include "yb/rpc/inbound_call.h" |
9 | | #include "yb/rpc/local_call.h" |
10 | | #include "yb/rpc/remote_method.h" |
11 | | #include "yb/rpc/rpc_context.h" |
12 | | #include "yb/rpc/rpc_service.h" |
13 | | #include "yb/rpc/service_if.h" |
14 | | #include "yb/util/metrics.h" |
15 | | |
16 | | METRIC_DEFINE_counter( |
17 | | server, service_request_bytes_yb_master_MasterClient_GetTabletLocations, |
18 | | "Bytes received by yb.master.MasterClient.GetTabletLocations() RPC requests", |
19 | | yb::MetricUnit::kBytes, |
20 | | "Bytes received by yb.master.MasterClient.GetTabletLocations() RPC requests"); |
21 | | |
22 | | METRIC_DEFINE_counter( |
23 | | server, service_response_bytes_yb_master_MasterClient_GetTabletLocations, |
24 | | "Bytes sent in response to yb.master.MasterClient.GetTabletLocations() RPC requests", |
25 | | yb::MetricUnit::kBytes, |
26 | | "Bytes sent in response to yb.master.MasterClient.GetTabletLocations() RPC requests"); |
27 | | |
28 | | METRIC_DEFINE_histogram_with_percentiles( |
29 | | server, handler_latency_yb_master_MasterClient_GetTabletLocations, |
30 | | "Microseconds spent handling yb.master.MasterClient.GetTabletLocations() RPC requests", |
31 | | yb::MetricUnit::kMicroseconds, |
32 | | "Microseconds spent handling yb.master.MasterClient.GetTabletLocations() RPC requests", |
33 | | 60000000LU, 2); |
34 | | |
35 | | METRIC_DEFINE_counter( |
36 | | server, service_request_bytes_yb_master_MasterClient_GetTableLocations, |
37 | | "Bytes received by yb.master.MasterClient.GetTableLocations() RPC requests", |
38 | | yb::MetricUnit::kBytes, |
39 | | "Bytes received by yb.master.MasterClient.GetTableLocations() RPC requests"); |
40 | | |
41 | | METRIC_DEFINE_counter( |
42 | | server, service_response_bytes_yb_master_MasterClient_GetTableLocations, |
43 | | "Bytes sent in response to yb.master.MasterClient.GetTableLocations() RPC requests", |
44 | | yb::MetricUnit::kBytes, |
45 | | "Bytes sent in response to yb.master.MasterClient.GetTableLocations() RPC requests"); |
46 | | |
47 | | METRIC_DEFINE_histogram_with_percentiles( |
48 | | server, handler_latency_yb_master_MasterClient_GetTableLocations, |
49 | | "Microseconds spent handling yb.master.MasterClient.GetTableLocations() RPC requests", |
50 | | yb::MetricUnit::kMicroseconds, |
51 | | "Microseconds spent handling yb.master.MasterClient.GetTableLocations() RPC requests", |
52 | | 60000000LU, 2); |
53 | | |
54 | | METRIC_DEFINE_counter( |
55 | | server, service_request_bytes_yb_master_MasterClient_GetTransactionStatusTablets, |
56 | | "Bytes received by yb.master.MasterClient.GetTransactionStatusTablets() RPC requests", |
57 | | yb::MetricUnit::kBytes, |
58 | | "Bytes received by yb.master.MasterClient.GetTransactionStatusTablets() RPC requests"); |
59 | | |
60 | | METRIC_DEFINE_counter( |
61 | | server, service_response_bytes_yb_master_MasterClient_GetTransactionStatusTablets, |
62 | | "Bytes sent in response to yb.master.MasterClient.GetTransactionStatusTablets() RPC requests", |
63 | | yb::MetricUnit::kBytes, |
64 | | "Bytes sent in response to yb.master.MasterClient.GetTransactionStatusTablets() RPC requests"); |
65 | | |
66 | | METRIC_DEFINE_histogram_with_percentiles( |
67 | | server, handler_latency_yb_master_MasterClient_GetTransactionStatusTablets, |
68 | | "Microseconds spent handling yb.master.MasterClient.GetTransactionStatusTablets() RPC requests", |
69 | | yb::MetricUnit::kMicroseconds, |
70 | | "Microseconds spent handling yb.master.MasterClient.GetTransactionStatusTablets() RPC requests", |
71 | | 60000000LU, 2); |
72 | | |
73 | | METRIC_DEFINE_counter( |
74 | | server, service_request_bytes_yb_master_MasterClient_ReservePgsqlOids, |
75 | | "Bytes received by yb.master.MasterClient.ReservePgsqlOids() RPC requests", |
76 | | yb::MetricUnit::kBytes, |
77 | | "Bytes received by yb.master.MasterClient.ReservePgsqlOids() RPC requests"); |
78 | | |
79 | | METRIC_DEFINE_counter( |
80 | | server, service_response_bytes_yb_master_MasterClient_ReservePgsqlOids, |
81 | | "Bytes sent in response to yb.master.MasterClient.ReservePgsqlOids() RPC requests", |
82 | | yb::MetricUnit::kBytes, |
83 | | "Bytes sent in response to yb.master.MasterClient.ReservePgsqlOids() RPC requests"); |
84 | | |
85 | | METRIC_DEFINE_histogram_with_percentiles( |
86 | | server, handler_latency_yb_master_MasterClient_ReservePgsqlOids, |
87 | | "Microseconds spent handling yb.master.MasterClient.ReservePgsqlOids() RPC requests", |
88 | | yb::MetricUnit::kMicroseconds, |
89 | | "Microseconds spent handling yb.master.MasterClient.ReservePgsqlOids() RPC requests", |
90 | | 60000000LU, 2); |
91 | | |
92 | | METRIC_DEFINE_counter( |
93 | | server, service_request_bytes_yb_master_MasterClient_GetYsqlCatalogConfig, |
94 | | "Bytes received by yb.master.MasterClient.GetYsqlCatalogConfig() RPC requests", |
95 | | yb::MetricUnit::kBytes, |
96 | | "Bytes received by yb.master.MasterClient.GetYsqlCatalogConfig() RPC requests"); |
97 | | |
98 | | METRIC_DEFINE_counter( |
99 | | server, service_response_bytes_yb_master_MasterClient_GetYsqlCatalogConfig, |
100 | | "Bytes sent in response to yb.master.MasterClient.GetYsqlCatalogConfig() RPC requests", |
101 | | yb::MetricUnit::kBytes, |
102 | | "Bytes sent in response to yb.master.MasterClient.GetYsqlCatalogConfig() RPC requests"); |
103 | | |
104 | | METRIC_DEFINE_histogram_with_percentiles( |
105 | | server, handler_latency_yb_master_MasterClient_GetYsqlCatalogConfig, |
106 | | "Microseconds spent handling yb.master.MasterClient.GetYsqlCatalogConfig() RPC requests", |
107 | | yb::MetricUnit::kMicroseconds, |
108 | | "Microseconds spent handling yb.master.MasterClient.GetYsqlCatalogConfig() RPC requests", |
109 | | 60000000LU, 2); |
110 | | |
111 | | METRIC_DEFINE_counter( |
112 | | server, service_request_bytes_yb_master_MasterClient_RedisConfigSet, |
113 | | "Bytes received by yb.master.MasterClient.RedisConfigSet() RPC requests", |
114 | | yb::MetricUnit::kBytes, |
115 | | "Bytes received by yb.master.MasterClient.RedisConfigSet() RPC requests"); |
116 | | |
117 | | METRIC_DEFINE_counter( |
118 | | server, service_response_bytes_yb_master_MasterClient_RedisConfigSet, |
119 | | "Bytes sent in response to yb.master.MasterClient.RedisConfigSet() RPC requests", |
120 | | yb::MetricUnit::kBytes, |
121 | | "Bytes sent in response to yb.master.MasterClient.RedisConfigSet() RPC requests"); |
122 | | |
123 | | METRIC_DEFINE_histogram_with_percentiles( |
124 | | server, handler_latency_yb_master_MasterClient_RedisConfigSet, |
125 | | "Microseconds spent handling yb.master.MasterClient.RedisConfigSet() RPC requests", |
126 | | yb::MetricUnit::kMicroseconds, |
127 | | "Microseconds spent handling yb.master.MasterClient.RedisConfigSet() RPC requests", |
128 | | 60000000LU, 2); |
129 | | |
130 | | METRIC_DEFINE_counter( |
131 | | server, service_request_bytes_yb_master_MasterClient_RedisConfigGet, |
132 | | "Bytes received by yb.master.MasterClient.RedisConfigGet() RPC requests", |
133 | | yb::MetricUnit::kBytes, |
134 | | "Bytes received by yb.master.MasterClient.RedisConfigGet() RPC requests"); |
135 | | |
136 | | METRIC_DEFINE_counter( |
137 | | server, service_response_bytes_yb_master_MasterClient_RedisConfigGet, |
138 | | "Bytes sent in response to yb.master.MasterClient.RedisConfigGet() RPC requests", |
139 | | yb::MetricUnit::kBytes, |
140 | | "Bytes sent in response to yb.master.MasterClient.RedisConfigGet() RPC requests"); |
141 | | |
142 | | METRIC_DEFINE_histogram_with_percentiles( |
143 | | server, handler_latency_yb_master_MasterClient_RedisConfigGet, |
144 | | "Microseconds spent handling yb.master.MasterClient.RedisConfigGet() RPC requests", |
145 | | yb::MetricUnit::kMicroseconds, |
146 | | "Microseconds spent handling yb.master.MasterClient.RedisConfigGet() RPC requests", |
147 | | 60000000LU, 2); |
148 | | |
149 | | namespace yb { |
150 | | namespace master { |
151 | | |
152 | 5.42k | MasterClientIf::MasterClientIf(const scoped_refptr<MetricEntity>& entity) { |
153 | 5.42k | InitMethods(entity); |
154 | 5.42k | } |
155 | | |
156 | 87 | MasterClientIf::~MasterClientIf() { |
157 | 87 | } |
158 | | |
159 | 5.42k | void MasterClientIf::FillEndpoints(const ::yb::rpc::RpcServicePtr& service, ::yb::rpc::RpcEndpointMap* map) { |
160 | 5.42k | map->emplace(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTabletLocations)].method.serialized_body(), std::make_pair(service, static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTabletLocations))); |
161 | 5.42k | map->emplace(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTableLocations)].method.serialized_body(), std::make_pair(service, static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTableLocations))); |
162 | 5.42k | map->emplace(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTransactionStatusTablets)].method.serialized_body(), std::make_pair(service, static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTransactionStatusTablets))); |
163 | 5.42k | map->emplace(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kReservePgsqlOids)].method.serialized_body(), std::make_pair(service, static_cast<size_t>(MasterClientRpcMethodIndexes::kReservePgsqlOids))); |
164 | 5.42k | map->emplace(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetYsqlCatalogConfig)].method.serialized_body(), std::make_pair(service, static_cast<size_t>(MasterClientRpcMethodIndexes::kGetYsqlCatalogConfig))); |
165 | 5.42k | map->emplace(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kRedisConfigSet)].method.serialized_body(), std::make_pair(service, static_cast<size_t>(MasterClientRpcMethodIndexes::kRedisConfigSet))); |
166 | 5.42k | map->emplace(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kRedisConfigGet)].method.serialized_body(), std::make_pair(service, static_cast<size_t>(MasterClientRpcMethodIndexes::kRedisConfigGet))); |
167 | 5.42k | } |
168 | | |
169 | 179k | void MasterClientIf::Handle(::yb::rpc::InboundCallPtr call) { |
170 | 179k | auto index = call->method_index(); |
171 | 179k | methods_[index].handler(std::move(call)); |
172 | 179k | } |
173 | | |
174 | 16.2k | std::string MasterClientIf::service_name() const { |
175 | 16.2k | return "yb.master.MasterService"; |
176 | 16.2k | } |
177 | 0 | std::string MasterClientIf::static_service_name() { |
178 | 0 | return "yb.master.MasterService"; |
179 | 0 | } |
180 | | |
181 | 5.42k | void MasterClientIf::InitMethods(const scoped_refptr<MetricEntity>& entity) { |
182 | 5.42k | methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTabletLocations)] = { |
183 | 5.42k | .method = ::yb::rpc::RemoteMethod("yb.master.MasterService", "GetTabletLocations"), |
184 | 9.11k | .handler = [this](::yb::rpc::InboundCallPtr call) { |
185 | 9.11k | call->SetRpcMethodMetrics(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTabletLocations)].metrics); |
186 | 9.11k | ::yb::rpc::HandleCall<::yb::rpc::RpcCallPBParamsImpl<::yb::master::GetTabletLocationsRequestPB, ::yb::master::GetTabletLocationsResponsePB>>( |
187 | 9.10k | std::move(call), [this](const ::yb::master::GetTabletLocationsRequestPB* req, ::yb::master::GetTabletLocationsResponsePB* resp, ::yb::rpc::RpcContext rpc_context) { |
188 | 9.10k | GetTabletLocations(req, resp, std::move(rpc_context)); |
189 | 9.10k | }); |
190 | 9.11k | }, |
191 | 5.42k | .metrics = ::yb::rpc::RpcMethodMetrics( |
192 | 5.42k | METRIC_service_request_bytes_yb_master_MasterClient_GetTabletLocations.Instantiate(entity), |
193 | 5.42k | METRIC_service_response_bytes_yb_master_MasterClient_GetTabletLocations.Instantiate(entity), |
194 | 5.42k | METRIC_handler_latency_yb_master_MasterClient_GetTabletLocations.Instantiate(entity)) |
195 | 5.42k | }; |
196 | | |
197 | 5.42k | methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTableLocations)] = { |
198 | 5.42k | .method = ::yb::rpc::RemoteMethod("yb.master.MasterService", "GetTableLocations"), |
199 | 167k | .handler = [this](::yb::rpc::InboundCallPtr call) { |
200 | 167k | call->SetRpcMethodMetrics(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTableLocations)].metrics); |
201 | 167k | ::yb::rpc::HandleCall<::yb::rpc::RpcCallPBParamsImpl<::yb::master::GetTableLocationsRequestPB, ::yb::master::GetTableLocationsResponsePB>>( |
202 | 167k | std::move(call), [this](const ::yb::master::GetTableLocationsRequestPB* req, ::yb::master::GetTableLocationsResponsePB* resp, ::yb::rpc::RpcContext rpc_context) { |
203 | 167k | GetTableLocations(req, resp, std::move(rpc_context)); |
204 | 167k | }); |
205 | 167k | }, |
206 | 5.42k | .metrics = ::yb::rpc::RpcMethodMetrics( |
207 | 5.42k | METRIC_service_request_bytes_yb_master_MasterClient_GetTableLocations.Instantiate(entity), |
208 | 5.42k | METRIC_service_response_bytes_yb_master_MasterClient_GetTableLocations.Instantiate(entity), |
209 | 5.42k | METRIC_handler_latency_yb_master_MasterClient_GetTableLocations.Instantiate(entity)) |
210 | 5.42k | }; |
211 | | |
212 | 5.42k | methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTransactionStatusTablets)] = { |
213 | 5.42k | .method = ::yb::rpc::RemoteMethod("yb.master.MasterService", "GetTransactionStatusTablets"), |
214 | 1.99k | .handler = [this](::yb::rpc::InboundCallPtr call) { |
215 | 1.99k | call->SetRpcMethodMetrics(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetTransactionStatusTablets)].metrics); |
216 | 1.99k | ::yb::rpc::HandleCall<::yb::rpc::RpcCallPBParamsImpl<::yb::master::GetTransactionStatusTabletsRequestPB, ::yb::master::GetTransactionStatusTabletsResponsePB>>( |
217 | 1.95k | std::move(call), [this](const ::yb::master::GetTransactionStatusTabletsRequestPB* req, ::yb::master::GetTransactionStatusTabletsResponsePB* resp, ::yb::rpc::RpcContext rpc_context) { |
218 | 1.95k | GetTransactionStatusTablets(req, resp, std::move(rpc_context)); |
219 | 1.95k | }); |
220 | 1.99k | }, |
221 | 5.42k | .metrics = ::yb::rpc::RpcMethodMetrics( |
222 | 5.42k | METRIC_service_request_bytes_yb_master_MasterClient_GetTransactionStatusTablets.Instantiate(entity), |
223 | 5.42k | METRIC_service_response_bytes_yb_master_MasterClient_GetTransactionStatusTablets.Instantiate(entity), |
224 | 5.42k | METRIC_handler_latency_yb_master_MasterClient_GetTransactionStatusTablets.Instantiate(entity)) |
225 | 5.42k | }; |
226 | | |
227 | 5.42k | methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kReservePgsqlOids)] = { |
228 | 5.42k | .method = ::yb::rpc::RemoteMethod("yb.master.MasterService", "ReservePgsqlOids"), |
229 | 380 | .handler = [this](::yb::rpc::InboundCallPtr call) { |
230 | 380 | call->SetRpcMethodMetrics(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kReservePgsqlOids)].metrics); |
231 | 380 | ::yb::rpc::HandleCall<::yb::rpc::RpcCallPBParamsImpl<::yb::master::ReservePgsqlOidsRequestPB, ::yb::master::ReservePgsqlOidsResponsePB>>( |
232 | 380 | std::move(call), [this](const ::yb::master::ReservePgsqlOidsRequestPB* req, ::yb::master::ReservePgsqlOidsResponsePB* resp, ::yb::rpc::RpcContext rpc_context) { |
233 | 380 | ReservePgsqlOids(req, resp, std::move(rpc_context)); |
234 | 380 | }); |
235 | 380 | }, |
236 | 5.42k | .metrics = ::yb::rpc::RpcMethodMetrics( |
237 | 5.42k | METRIC_service_request_bytes_yb_master_MasterClient_ReservePgsqlOids.Instantiate(entity), |
238 | 5.42k | METRIC_service_response_bytes_yb_master_MasterClient_ReservePgsqlOids.Instantiate(entity), |
239 | 5.42k | METRIC_handler_latency_yb_master_MasterClient_ReservePgsqlOids.Instantiate(entity)) |
240 | 5.42k | }; |
241 | | |
242 | 5.42k | methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetYsqlCatalogConfig)] = { |
243 | 5.42k | .method = ::yb::rpc::RemoteMethod("yb.master.MasterService", "GetYsqlCatalogConfig"), |
244 | 0 | .handler = [this](::yb::rpc::InboundCallPtr call) { |
245 | 0 | call->SetRpcMethodMetrics(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kGetYsqlCatalogConfig)].metrics); |
246 | 0 | ::yb::rpc::HandleCall<::yb::rpc::RpcCallPBParamsImpl<::yb::master::GetYsqlCatalogConfigRequestPB, ::yb::master::GetYsqlCatalogConfigResponsePB>>( |
247 | 0 | std::move(call), [this](const ::yb::master::GetYsqlCatalogConfigRequestPB* req, ::yb::master::GetYsqlCatalogConfigResponsePB* resp, ::yb::rpc::RpcContext rpc_context) { |
248 | 0 | GetYsqlCatalogConfig(req, resp, std::move(rpc_context)); |
249 | 0 | }); |
250 | 0 | }, |
251 | 5.42k | .metrics = ::yb::rpc::RpcMethodMetrics( |
252 | 5.42k | METRIC_service_request_bytes_yb_master_MasterClient_GetYsqlCatalogConfig.Instantiate(entity), |
253 | 5.42k | METRIC_service_response_bytes_yb_master_MasterClient_GetYsqlCatalogConfig.Instantiate(entity), |
254 | 5.42k | METRIC_handler_latency_yb_master_MasterClient_GetYsqlCatalogConfig.Instantiate(entity)) |
255 | 5.42k | }; |
256 | | |
257 | 5.42k | methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kRedisConfigSet)] = { |
258 | 5.42k | .method = ::yb::rpc::RemoteMethod("yb.master.MasterService", "RedisConfigSet"), |
259 | 0 | .handler = [this](::yb::rpc::InboundCallPtr call) { |
260 | 0 | call->SetRpcMethodMetrics(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kRedisConfigSet)].metrics); |
261 | 0 | ::yb::rpc::HandleCall<::yb::rpc::RpcCallPBParamsImpl<::yb::master::RedisConfigSetRequestPB, ::yb::master::RedisConfigSetResponsePB>>( |
262 | 0 | std::move(call), [this](const ::yb::master::RedisConfigSetRequestPB* req, ::yb::master::RedisConfigSetResponsePB* resp, ::yb::rpc::RpcContext rpc_context) { |
263 | 0 | RedisConfigSet(req, resp, std::move(rpc_context)); |
264 | 0 | }); |
265 | 0 | }, |
266 | 5.42k | .metrics = ::yb::rpc::RpcMethodMetrics( |
267 | 5.42k | METRIC_service_request_bytes_yb_master_MasterClient_RedisConfigSet.Instantiate(entity), |
268 | 5.42k | METRIC_service_response_bytes_yb_master_MasterClient_RedisConfigSet.Instantiate(entity), |
269 | 5.42k | METRIC_handler_latency_yb_master_MasterClient_RedisConfigSet.Instantiate(entity)) |
270 | 5.42k | }; |
271 | | |
272 | 5.42k | methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kRedisConfigGet)] = { |
273 | 5.42k | .method = ::yb::rpc::RemoteMethod("yb.master.MasterService", "RedisConfigGet"), |
274 | 291 | .handler = [this](::yb::rpc::InboundCallPtr call) { |
275 | 291 | call->SetRpcMethodMetrics(methods_[static_cast<size_t>(MasterClientRpcMethodIndexes::kRedisConfigGet)].metrics); |
276 | 291 | ::yb::rpc::HandleCall<::yb::rpc::RpcCallPBParamsImpl<::yb::master::RedisConfigGetRequestPB, ::yb::master::RedisConfigGetResponsePB>>( |
277 | 291 | std::move(call), [this](const ::yb::master::RedisConfigGetRequestPB* req, ::yb::master::RedisConfigGetResponsePB* resp, ::yb::rpc::RpcContext rpc_context) { |
278 | 291 | RedisConfigGet(req, resp, std::move(rpc_context)); |
279 | 291 | }); |
280 | 291 | }, |
281 | 5.42k | .metrics = ::yb::rpc::RpcMethodMetrics( |
282 | 5.42k | METRIC_service_request_bytes_yb_master_MasterClient_RedisConfigGet.Instantiate(entity), |
283 | 5.42k | METRIC_service_response_bytes_yb_master_MasterClient_RedisConfigGet.Instantiate(entity), |
284 | 5.42k | METRIC_handler_latency_yb_master_MasterClient_RedisConfigGet.Instantiate(entity)) |
285 | 5.42k | }; |
286 | | |
287 | 5.42k | } |
288 | | |
289 | | } // namespace master |
290 | | } // namespace yb |