1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/protobuf/service_config.proto |
3 | |
4 | #include "tensorflow/core/protobuf/service_config.pb.h" |
5 | |
6 | #include <algorithm> |
7 | |
8 | #include <google/protobuf/stubs/common.h> |
9 | #include <google/protobuf/io/coded_stream.h> |
10 | #include <google/protobuf/extension_set.h> |
11 | #include <google/protobuf/wire_format_lite.h> |
12 | #include <google/protobuf/descriptor.h> |
13 | #include <google/protobuf/generated_message_reflection.h> |
14 | #include <google/protobuf/reflection_ops.h> |
15 | #include <google/protobuf/wire_format.h> |
16 | // @@protoc_insertion_point(includes) |
17 | #include <google/protobuf/port_def.inc> |
18 | namespace tensorflow { |
19 | namespace data { |
20 | namespace experimental { |
21 | class DispatcherConfigDefaultTypeInternal { |
22 | public: |
23 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DispatcherConfig> _instance; |
24 | } _DispatcherConfig_default_instance_; |
25 | class WorkerConfigDefaultTypeInternal { |
26 | public: |
27 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WorkerConfig> _instance; |
28 | } _WorkerConfig_default_instance_; |
29 | } // namespace experimental |
30 | } // namespace data |
31 | } // namespace tensorflow |
32 | static void InitDefaultsscc_info_DispatcherConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto() { |
33 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
34 | |
35 | { |
36 | void* ptr = &::tensorflow::data::experimental::_DispatcherConfig_default_instance_; |
37 | new (ptr) ::tensorflow::data::experimental::DispatcherConfig(); |
38 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
39 | } |
40 | ::tensorflow::data::experimental::DispatcherConfig::InitAsDefaultInstance(); |
41 | } |
42 | |
43 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DispatcherConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto = |
44 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_DispatcherConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto}, {}}; |
45 | |
46 | static void InitDefaultsscc_info_WorkerConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto() { |
47 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
48 | |
49 | { |
50 | void* ptr = &::tensorflow::data::experimental::_WorkerConfig_default_instance_; |
51 | new (ptr) ::tensorflow::data::experimental::WorkerConfig(); |
52 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
53 | } |
54 | ::tensorflow::data::experimental::WorkerConfig::InitAsDefaultInstance(); |
55 | } |
56 | |
57 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_WorkerConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto = |
58 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_WorkerConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto}, {}}; |
59 | |
60 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto[2]; |
61 | static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto = nullptr; |
62 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto = nullptr; |
63 | |
64 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
65 | ~0u, // no _has_bits_ |
66 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::DispatcherConfig, _internal_metadata_), |
67 | ~0u, // no _extensions_ |
68 | ~0u, // no _oneof_case_ |
69 | ~0u, // no _weak_field_map_ |
70 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::DispatcherConfig, port_), |
71 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::DispatcherConfig, protocol_), |
72 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::DispatcherConfig, work_dir_), |
73 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::DispatcherConfig, fault_tolerant_mode_), |
74 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::DispatcherConfig, worker_addresses_), |
75 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::DispatcherConfig, deployment_mode_), |
76 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::DispatcherConfig, job_gc_check_interval_ms_), |
77 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::DispatcherConfig, job_gc_timeout_ms_), |
78 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::DispatcherConfig, client_timeout_ms_), |
79 | ~0u, // no _has_bits_ |
80 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, _internal_metadata_), |
81 | ~0u, // no _extensions_ |
82 | ~0u, // no _oneof_case_ |
83 | ~0u, // no _weak_field_map_ |
84 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, port_), |
85 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, protocol_), |
86 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, dispatcher_address_), |
87 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, worker_address_), |
88 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, worker_tags_), |
89 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, heartbeat_interval_ms_), |
90 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, dispatcher_timeout_ms_), |
91 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, data_transfer_protocol_), |
92 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, data_transfer_address_), |
93 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, cross_trainer_cache_size_bytes_), |
94 | PROTOBUF_FIELD_OFFSET(::tensorflow::data::experimental::WorkerConfig, shutdown_quiet_period_ms_), |
95 | }; |
96 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
97 | { 0, -1, sizeof(::tensorflow::data::experimental::DispatcherConfig)}, |
98 | { 14, -1, sizeof(::tensorflow::data::experimental::WorkerConfig)}, |
99 | }; |
100 | |
101 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
102 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::experimental::_DispatcherConfig_default_instance_), |
103 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::data::experimental::_WorkerConfig_default_instance_), |
104 | }; |
105 | |
106 | const char descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
107 | "\n-tensorflow/core/protobuf/service_confi" |
108 | "g.proto\022\034tensorflow.data.experimental\032+t" |
109 | "ensorflow/core/protobuf/data_service.pro" |
110 | "to\"\215\002\n\020DispatcherConfig\022\014\n\004port\030\001 \001(\003\022\020\n" |
111 | "\010protocol\030\002 \001(\t\022\020\n\010work_dir\030\003 \001(\t\022\033\n\023fau" |
112 | "lt_tolerant_mode\030\004 \001(\010\022\030\n\020worker_address" |
113 | "es\030\007 \003(\t\0228\n\017deployment_mode\030\t \001(\0162\037.tens" |
114 | "orflow.data.DeploymentMode\022 \n\030job_gc_che" |
115 | "ck_interval_ms\030\005 \001(\003\022\031\n\021job_gc_timeout_m" |
116 | "s\030\006 \001(\003\022\031\n\021client_timeout_ms\030\010 \001(\003\"\276\002\n\014W" |
117 | "orkerConfig\022\014\n\004port\030\001 \001(\003\022\020\n\010protocol\030\002 " |
118 | "\001(\t\022\032\n\022dispatcher_address\030\003 \001(\t\022\026\n\016worke" |
119 | "r_address\030\004 \001(\t\022\023\n\013worker_tags\030\n \003(\t\022\035\n\025" |
120 | "heartbeat_interval_ms\030\005 \001(\003\022\035\n\025dispatche" |
121 | "r_timeout_ms\030\006 \001(\003\022\036\n\026data_transfer_prot" |
122 | "ocol\030\007 \001(\t\022\035\n\025data_transfer_address\030\010 \001(" |
123 | "\t\022&\n\036cross_trainer_cache_size_bytes\030\013 \001(" |
124 | "\003\022 \n\030shutdown_quiet_period_ms\030\t \001(\003BWZUg" |
125 | "ithub.com/tensorflow/tensorflow/tensorfl" |
126 | "ow/go/core/protobuf/for_core_protos_go_p" |
127 | "rotob\006proto3" |
128 | ; |
129 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto_deps[1] = { |
130 | &::descriptor_table_tensorflow_2fcore_2fprotobuf_2fdata_5fservice_2eproto, |
131 | }; |
132 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto_sccs[2] = { |
133 | &scc_info_DispatcherConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto.base, |
134 | &scc_info_WorkerConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto.base, |
135 | }; |
136 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto_once; |
137 | static bool descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto_initialized = false; |
138 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto = { |
139 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto, "tensorflow/core/protobuf/service_config.proto" , 812, |
140 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto_once, descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto_deps, 2, 1, |
141 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto::offsets, |
142 | file_level_metadata_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto, 2, file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto, |
143 | }; |
144 | |
145 | // Force running AddDescriptors() at dynamic initialization time. |
146 | static bool dynamic_init_dummy_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto), true); |
147 | namespace tensorflow { |
148 | namespace data { |
149 | namespace experimental { |
150 | |
151 | // =================================================================== |
152 | |
153 | void DispatcherConfig::InitAsDefaultInstance() { |
154 | } |
155 | class DispatcherConfig::_Internal { |
156 | public: |
157 | }; |
158 | |
159 | DispatcherConfig::DispatcherConfig() |
160 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
161 | SharedCtor(); |
162 | // @@protoc_insertion_point(constructor:tensorflow.data.experimental.DispatcherConfig) |
163 | } |
164 | DispatcherConfig::DispatcherConfig(const DispatcherConfig& from) |
165 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
166 | _internal_metadata_(nullptr), |
167 | worker_addresses_(from.worker_addresses_) { |
168 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
169 | protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
170 | if (!from.protocol().empty()) { |
171 | protocol_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.protocol_); |
172 | } |
173 | work_dir_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
174 | if (!from.work_dir().empty()) { |
175 | work_dir_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.work_dir_); |
176 | } |
177 | ::memcpy(&port_, &from.port_, |
178 | static_cast<size_t>(reinterpret_cast<char*>(&client_timeout_ms_) - |
179 | reinterpret_cast<char*>(&port_)) + sizeof(client_timeout_ms_)); |
180 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.experimental.DispatcherConfig) |
181 | } |
182 | |
183 | void DispatcherConfig::SharedCtor() { |
184 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DispatcherConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto.base); |
185 | protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
186 | work_dir_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
187 | ::memset(&port_, 0, static_cast<size_t>( |
188 | reinterpret_cast<char*>(&client_timeout_ms_) - |
189 | reinterpret_cast<char*>(&port_)) + sizeof(client_timeout_ms_)); |
190 | } |
191 | |
192 | DispatcherConfig::~DispatcherConfig() { |
193 | // @@protoc_insertion_point(destructor:tensorflow.data.experimental.DispatcherConfig) |
194 | SharedDtor(); |
195 | } |
196 | |
197 | void DispatcherConfig::SharedDtor() { |
198 | protocol_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
199 | work_dir_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
200 | } |
201 | |
202 | void DispatcherConfig::SetCachedSize(int size) const { |
203 | _cached_size_.Set(size); |
204 | } |
205 | const DispatcherConfig& DispatcherConfig::default_instance() { |
206 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DispatcherConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto.base); |
207 | return *internal_default_instance(); |
208 | } |
209 | |
210 | |
211 | void DispatcherConfig::Clear() { |
212 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.experimental.DispatcherConfig) |
213 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
214 | // Prevent compiler warnings about cached_has_bits being unused |
215 | (void) cached_has_bits; |
216 | |
217 | worker_addresses_.Clear(); |
218 | protocol_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
219 | work_dir_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
220 | ::memset(&port_, 0, static_cast<size_t>( |
221 | reinterpret_cast<char*>(&client_timeout_ms_) - |
222 | reinterpret_cast<char*>(&port_)) + sizeof(client_timeout_ms_)); |
223 | _internal_metadata_.Clear(); |
224 | } |
225 | |
226 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
227 | const char* DispatcherConfig::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
228 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
229 | while (!ctx->Done(&ptr)) { |
230 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
231 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
232 | CHK_(ptr); |
233 | switch (tag >> 3) { |
234 | // int64 port = 1; |
235 | case 1: |
236 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
237 | port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
238 | CHK_(ptr); |
239 | } else goto handle_unusual; |
240 | continue; |
241 | // string protocol = 2; |
242 | case 2: |
243 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
244 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_protocol(), ptr, ctx, "tensorflow.data.experimental.DispatcherConfig.protocol" ); |
245 | CHK_(ptr); |
246 | } else goto handle_unusual; |
247 | continue; |
248 | // string work_dir = 3; |
249 | case 3: |
250 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
251 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_work_dir(), ptr, ctx, "tensorflow.data.experimental.DispatcherConfig.work_dir" ); |
252 | CHK_(ptr); |
253 | } else goto handle_unusual; |
254 | continue; |
255 | // bool fault_tolerant_mode = 4; |
256 | case 4: |
257 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
258 | fault_tolerant_mode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
259 | CHK_(ptr); |
260 | } else goto handle_unusual; |
261 | continue; |
262 | // int64 job_gc_check_interval_ms = 5; |
263 | case 5: |
264 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
265 | job_gc_check_interval_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
266 | CHK_(ptr); |
267 | } else goto handle_unusual; |
268 | continue; |
269 | // int64 job_gc_timeout_ms = 6; |
270 | case 6: |
271 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { |
272 | job_gc_timeout_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
273 | CHK_(ptr); |
274 | } else goto handle_unusual; |
275 | continue; |
276 | // repeated string worker_addresses = 7; |
277 | case 7: |
278 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
279 | ptr -= 1; |
280 | do { |
281 | ptr += 1; |
282 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_worker_addresses(), ptr, ctx, "tensorflow.data.experimental.DispatcherConfig.worker_addresses" ); |
283 | CHK_(ptr); |
284 | if (!ctx->DataAvailable(ptr)) break; |
285 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 58); |
286 | } else goto handle_unusual; |
287 | continue; |
288 | // int64 client_timeout_ms = 8; |
289 | case 8: |
290 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { |
291 | client_timeout_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
292 | CHK_(ptr); |
293 | } else goto handle_unusual; |
294 | continue; |
295 | // .tensorflow.data.DeploymentMode deployment_mode = 9; |
296 | case 9: |
297 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { |
298 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
299 | CHK_(ptr); |
300 | set_deployment_mode(static_cast<::tensorflow::data::DeploymentMode>(val)); |
301 | } else goto handle_unusual; |
302 | continue; |
303 | default: { |
304 | handle_unusual: |
305 | if ((tag & 7) == 4 || tag == 0) { |
306 | ctx->SetLastTag(tag); |
307 | goto success; |
308 | } |
309 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
310 | CHK_(ptr != nullptr); |
311 | continue; |
312 | } |
313 | } // switch |
314 | } // while |
315 | success: |
316 | return ptr; |
317 | failure: |
318 | ptr = nullptr; |
319 | goto success; |
320 | #undef CHK_ |
321 | } |
322 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
323 | bool DispatcherConfig::MergePartialFromCodedStream( |
324 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
325 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
326 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
327 | // @@protoc_insertion_point(parse_start:tensorflow.data.experimental.DispatcherConfig) |
328 | for (;;) { |
329 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
330 | tag = p.first; |
331 | if (!p.second) goto handle_unusual; |
332 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
333 | // int64 port = 1; |
334 | case 1: { |
335 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
336 | |
337 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
338 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
339 | input, &port_))); |
340 | } else { |
341 | goto handle_unusual; |
342 | } |
343 | break; |
344 | } |
345 | |
346 | // string protocol = 2; |
347 | case 2: { |
348 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
349 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
350 | input, this->mutable_protocol())); |
351 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
352 | this->protocol().data(), static_cast<int>(this->protocol().length()), |
353 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
354 | "tensorflow.data.experimental.DispatcherConfig.protocol" )); |
355 | } else { |
356 | goto handle_unusual; |
357 | } |
358 | break; |
359 | } |
360 | |
361 | // string work_dir = 3; |
362 | case 3: { |
363 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
364 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
365 | input, this->mutable_work_dir())); |
366 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
367 | this->work_dir().data(), static_cast<int>(this->work_dir().length()), |
368 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
369 | "tensorflow.data.experimental.DispatcherConfig.work_dir" )); |
370 | } else { |
371 | goto handle_unusual; |
372 | } |
373 | break; |
374 | } |
375 | |
376 | // bool fault_tolerant_mode = 4; |
377 | case 4: { |
378 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
379 | |
380 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
381 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
382 | input, &fault_tolerant_mode_))); |
383 | } else { |
384 | goto handle_unusual; |
385 | } |
386 | break; |
387 | } |
388 | |
389 | // int64 job_gc_check_interval_ms = 5; |
390 | case 5: { |
391 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { |
392 | |
393 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
394 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
395 | input, &job_gc_check_interval_ms_))); |
396 | } else { |
397 | goto handle_unusual; |
398 | } |
399 | break; |
400 | } |
401 | |
402 | // int64 job_gc_timeout_ms = 6; |
403 | case 6: { |
404 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { |
405 | |
406 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
407 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
408 | input, &job_gc_timeout_ms_))); |
409 | } else { |
410 | goto handle_unusual; |
411 | } |
412 | break; |
413 | } |
414 | |
415 | // repeated string worker_addresses = 7; |
416 | case 7: { |
417 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
418 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
419 | input, this->add_worker_addresses())); |
420 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
421 | this->worker_addresses(this->worker_addresses_size() - 1).data(), |
422 | static_cast<int>(this->worker_addresses(this->worker_addresses_size() - 1).length()), |
423 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
424 | "tensorflow.data.experimental.DispatcherConfig.worker_addresses" )); |
425 | } else { |
426 | goto handle_unusual; |
427 | } |
428 | break; |
429 | } |
430 | |
431 | // int64 client_timeout_ms = 8; |
432 | case 8: { |
433 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) { |
434 | |
435 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
436 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
437 | input, &client_timeout_ms_))); |
438 | } else { |
439 | goto handle_unusual; |
440 | } |
441 | break; |
442 | } |
443 | |
444 | // .tensorflow.data.DeploymentMode deployment_mode = 9; |
445 | case 9: { |
446 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { |
447 | int value = 0; |
448 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
449 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
450 | input, &value))); |
451 | set_deployment_mode(static_cast< ::tensorflow::data::DeploymentMode >(value)); |
452 | } else { |
453 | goto handle_unusual; |
454 | } |
455 | break; |
456 | } |
457 | |
458 | default: { |
459 | handle_unusual: |
460 | if (tag == 0) { |
461 | goto success; |
462 | } |
463 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
464 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
465 | break; |
466 | } |
467 | } |
468 | } |
469 | success: |
470 | // @@protoc_insertion_point(parse_success:tensorflow.data.experimental.DispatcherConfig) |
471 | return true; |
472 | failure: |
473 | // @@protoc_insertion_point(parse_failure:tensorflow.data.experimental.DispatcherConfig) |
474 | return false; |
475 | #undef DO_ |
476 | } |
477 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
478 | |
479 | void DispatcherConfig::SerializeWithCachedSizes( |
480 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
481 | // @@protoc_insertion_point(serialize_start:tensorflow.data.experimental.DispatcherConfig) |
482 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
483 | (void) cached_has_bits; |
484 | |
485 | // int64 port = 1; |
486 | if (this->port() != 0) { |
487 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->port(), output); |
488 | } |
489 | |
490 | // string protocol = 2; |
491 | if (this->protocol().size() > 0) { |
492 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
493 | this->protocol().data(), static_cast<int>(this->protocol().length()), |
494 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
495 | "tensorflow.data.experimental.DispatcherConfig.protocol" ); |
496 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
497 | 2, this->protocol(), output); |
498 | } |
499 | |
500 | // string work_dir = 3; |
501 | if (this->work_dir().size() > 0) { |
502 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
503 | this->work_dir().data(), static_cast<int>(this->work_dir().length()), |
504 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
505 | "tensorflow.data.experimental.DispatcherConfig.work_dir" ); |
506 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
507 | 3, this->work_dir(), output); |
508 | } |
509 | |
510 | // bool fault_tolerant_mode = 4; |
511 | if (this->fault_tolerant_mode() != 0) { |
512 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->fault_tolerant_mode(), output); |
513 | } |
514 | |
515 | // int64 job_gc_check_interval_ms = 5; |
516 | if (this->job_gc_check_interval_ms() != 0) { |
517 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->job_gc_check_interval_ms(), output); |
518 | } |
519 | |
520 | // int64 job_gc_timeout_ms = 6; |
521 | if (this->job_gc_timeout_ms() != 0) { |
522 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(6, this->job_gc_timeout_ms(), output); |
523 | } |
524 | |
525 | // repeated string worker_addresses = 7; |
526 | for (int i = 0, n = this->worker_addresses_size(); i < n; i++) { |
527 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
528 | this->worker_addresses(i).data(), static_cast<int>(this->worker_addresses(i).length()), |
529 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
530 | "tensorflow.data.experimental.DispatcherConfig.worker_addresses" ); |
531 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
532 | 7, this->worker_addresses(i), output); |
533 | } |
534 | |
535 | // int64 client_timeout_ms = 8; |
536 | if (this->client_timeout_ms() != 0) { |
537 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(8, this->client_timeout_ms(), output); |
538 | } |
539 | |
540 | // .tensorflow.data.DeploymentMode deployment_mode = 9; |
541 | if (this->deployment_mode() != 0) { |
542 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
543 | 9, this->deployment_mode(), output); |
544 | } |
545 | |
546 | if (_internal_metadata_.have_unknown_fields()) { |
547 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
548 | _internal_metadata_.unknown_fields(), output); |
549 | } |
550 | // @@protoc_insertion_point(serialize_end:tensorflow.data.experimental.DispatcherConfig) |
551 | } |
552 | |
553 | ::PROTOBUF_NAMESPACE_ID::uint8* DispatcherConfig::InternalSerializeWithCachedSizesToArray( |
554 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
555 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.experimental.DispatcherConfig) |
556 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
557 | (void) cached_has_bits; |
558 | |
559 | // int64 port = 1; |
560 | if (this->port() != 0) { |
561 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->port(), target); |
562 | } |
563 | |
564 | // string protocol = 2; |
565 | if (this->protocol().size() > 0) { |
566 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
567 | this->protocol().data(), static_cast<int>(this->protocol().length()), |
568 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
569 | "tensorflow.data.experimental.DispatcherConfig.protocol" ); |
570 | target = |
571 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
572 | 2, this->protocol(), target); |
573 | } |
574 | |
575 | // string work_dir = 3; |
576 | if (this->work_dir().size() > 0) { |
577 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
578 | this->work_dir().data(), static_cast<int>(this->work_dir().length()), |
579 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
580 | "tensorflow.data.experimental.DispatcherConfig.work_dir" ); |
581 | target = |
582 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
583 | 3, this->work_dir(), target); |
584 | } |
585 | |
586 | // bool fault_tolerant_mode = 4; |
587 | if (this->fault_tolerant_mode() != 0) { |
588 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->fault_tolerant_mode(), target); |
589 | } |
590 | |
591 | // int64 job_gc_check_interval_ms = 5; |
592 | if (this->job_gc_check_interval_ms() != 0) { |
593 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->job_gc_check_interval_ms(), target); |
594 | } |
595 | |
596 | // int64 job_gc_timeout_ms = 6; |
597 | if (this->job_gc_timeout_ms() != 0) { |
598 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->job_gc_timeout_ms(), target); |
599 | } |
600 | |
601 | // repeated string worker_addresses = 7; |
602 | for (int i = 0, n = this->worker_addresses_size(); i < n; i++) { |
603 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
604 | this->worker_addresses(i).data(), static_cast<int>(this->worker_addresses(i).length()), |
605 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
606 | "tensorflow.data.experimental.DispatcherConfig.worker_addresses" ); |
607 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
608 | WriteStringToArray(7, this->worker_addresses(i), target); |
609 | } |
610 | |
611 | // int64 client_timeout_ms = 8; |
612 | if (this->client_timeout_ms() != 0) { |
613 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->client_timeout_ms(), target); |
614 | } |
615 | |
616 | // .tensorflow.data.DeploymentMode deployment_mode = 9; |
617 | if (this->deployment_mode() != 0) { |
618 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
619 | 9, this->deployment_mode(), target); |
620 | } |
621 | |
622 | if (_internal_metadata_.have_unknown_fields()) { |
623 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
624 | _internal_metadata_.unknown_fields(), target); |
625 | } |
626 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.experimental.DispatcherConfig) |
627 | return target; |
628 | } |
629 | |
630 | size_t DispatcherConfig::ByteSizeLong() const { |
631 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.experimental.DispatcherConfig) |
632 | size_t total_size = 0; |
633 | |
634 | if (_internal_metadata_.have_unknown_fields()) { |
635 | total_size += |
636 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
637 | _internal_metadata_.unknown_fields()); |
638 | } |
639 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
640 | // Prevent compiler warnings about cached_has_bits being unused |
641 | (void) cached_has_bits; |
642 | |
643 | // repeated string worker_addresses = 7; |
644 | total_size += 1 * |
645 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->worker_addresses_size()); |
646 | for (int i = 0, n = this->worker_addresses_size(); i < n; i++) { |
647 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
648 | this->worker_addresses(i)); |
649 | } |
650 | |
651 | // string protocol = 2; |
652 | if (this->protocol().size() > 0) { |
653 | total_size += 1 + |
654 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
655 | this->protocol()); |
656 | } |
657 | |
658 | // string work_dir = 3; |
659 | if (this->work_dir().size() > 0) { |
660 | total_size += 1 + |
661 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
662 | this->work_dir()); |
663 | } |
664 | |
665 | // int64 port = 1; |
666 | if (this->port() != 0) { |
667 | total_size += 1 + |
668 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
669 | this->port()); |
670 | } |
671 | |
672 | // int64 job_gc_check_interval_ms = 5; |
673 | if (this->job_gc_check_interval_ms() != 0) { |
674 | total_size += 1 + |
675 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
676 | this->job_gc_check_interval_ms()); |
677 | } |
678 | |
679 | // int64 job_gc_timeout_ms = 6; |
680 | if (this->job_gc_timeout_ms() != 0) { |
681 | total_size += 1 + |
682 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
683 | this->job_gc_timeout_ms()); |
684 | } |
685 | |
686 | // bool fault_tolerant_mode = 4; |
687 | if (this->fault_tolerant_mode() != 0) { |
688 | total_size += 1 + 1; |
689 | } |
690 | |
691 | // .tensorflow.data.DeploymentMode deployment_mode = 9; |
692 | if (this->deployment_mode() != 0) { |
693 | total_size += 1 + |
694 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->deployment_mode()); |
695 | } |
696 | |
697 | // int64 client_timeout_ms = 8; |
698 | if (this->client_timeout_ms() != 0) { |
699 | total_size += 1 + |
700 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
701 | this->client_timeout_ms()); |
702 | } |
703 | |
704 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
705 | SetCachedSize(cached_size); |
706 | return total_size; |
707 | } |
708 | |
709 | void DispatcherConfig::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
710 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.experimental.DispatcherConfig) |
711 | GOOGLE_DCHECK_NE(&from, this); |
712 | const DispatcherConfig* source = |
713 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DispatcherConfig>( |
714 | &from); |
715 | if (source == nullptr) { |
716 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.experimental.DispatcherConfig) |
717 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
718 | } else { |
719 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.experimental.DispatcherConfig) |
720 | MergeFrom(*source); |
721 | } |
722 | } |
723 | |
724 | void DispatcherConfig::MergeFrom(const DispatcherConfig& from) { |
725 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.experimental.DispatcherConfig) |
726 | GOOGLE_DCHECK_NE(&from, this); |
727 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
728 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
729 | (void) cached_has_bits; |
730 | |
731 | worker_addresses_.MergeFrom(from.worker_addresses_); |
732 | if (from.protocol().size() > 0) { |
733 | |
734 | protocol_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.protocol_); |
735 | } |
736 | if (from.work_dir().size() > 0) { |
737 | |
738 | work_dir_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.work_dir_); |
739 | } |
740 | if (from.port() != 0) { |
741 | set_port(from.port()); |
742 | } |
743 | if (from.job_gc_check_interval_ms() != 0) { |
744 | set_job_gc_check_interval_ms(from.job_gc_check_interval_ms()); |
745 | } |
746 | if (from.job_gc_timeout_ms() != 0) { |
747 | set_job_gc_timeout_ms(from.job_gc_timeout_ms()); |
748 | } |
749 | if (from.fault_tolerant_mode() != 0) { |
750 | set_fault_tolerant_mode(from.fault_tolerant_mode()); |
751 | } |
752 | if (from.deployment_mode() != 0) { |
753 | set_deployment_mode(from.deployment_mode()); |
754 | } |
755 | if (from.client_timeout_ms() != 0) { |
756 | set_client_timeout_ms(from.client_timeout_ms()); |
757 | } |
758 | } |
759 | |
760 | void DispatcherConfig::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
761 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.experimental.DispatcherConfig) |
762 | if (&from == this) return; |
763 | Clear(); |
764 | MergeFrom(from); |
765 | } |
766 | |
767 | void DispatcherConfig::CopyFrom(const DispatcherConfig& from) { |
768 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.experimental.DispatcherConfig) |
769 | if (&from == this) return; |
770 | Clear(); |
771 | MergeFrom(from); |
772 | } |
773 | |
774 | bool DispatcherConfig::IsInitialized() const { |
775 | return true; |
776 | } |
777 | |
778 | void DispatcherConfig::InternalSwap(DispatcherConfig* other) { |
779 | using std::swap; |
780 | _internal_metadata_.Swap(&other->_internal_metadata_); |
781 | worker_addresses_.InternalSwap(CastToBase(&other->worker_addresses_)); |
782 | protocol_.Swap(&other->protocol_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
783 | GetArenaNoVirtual()); |
784 | work_dir_.Swap(&other->work_dir_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
785 | GetArenaNoVirtual()); |
786 | swap(port_, other->port_); |
787 | swap(job_gc_check_interval_ms_, other->job_gc_check_interval_ms_); |
788 | swap(job_gc_timeout_ms_, other->job_gc_timeout_ms_); |
789 | swap(fault_tolerant_mode_, other->fault_tolerant_mode_); |
790 | swap(deployment_mode_, other->deployment_mode_); |
791 | swap(client_timeout_ms_, other->client_timeout_ms_); |
792 | } |
793 | |
794 | ::PROTOBUF_NAMESPACE_ID::Metadata DispatcherConfig::GetMetadata() const { |
795 | return GetMetadataStatic(); |
796 | } |
797 | |
798 | |
799 | // =================================================================== |
800 | |
801 | void WorkerConfig::InitAsDefaultInstance() { |
802 | } |
803 | class WorkerConfig::_Internal { |
804 | public: |
805 | }; |
806 | |
807 | WorkerConfig::WorkerConfig() |
808 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
809 | SharedCtor(); |
810 | // @@protoc_insertion_point(constructor:tensorflow.data.experimental.WorkerConfig) |
811 | } |
812 | WorkerConfig::WorkerConfig(const WorkerConfig& from) |
813 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
814 | _internal_metadata_(nullptr), |
815 | worker_tags_(from.worker_tags_) { |
816 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
817 | protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
818 | if (!from.protocol().empty()) { |
819 | protocol_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.protocol_); |
820 | } |
821 | dispatcher_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
822 | if (!from.dispatcher_address().empty()) { |
823 | dispatcher_address_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.dispatcher_address_); |
824 | } |
825 | worker_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
826 | if (!from.worker_address().empty()) { |
827 | worker_address_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.worker_address_); |
828 | } |
829 | data_transfer_protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
830 | if (!from.data_transfer_protocol().empty()) { |
831 | data_transfer_protocol_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_transfer_protocol_); |
832 | } |
833 | data_transfer_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
834 | if (!from.data_transfer_address().empty()) { |
835 | data_transfer_address_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_transfer_address_); |
836 | } |
837 | ::memcpy(&port_, &from.port_, |
838 | static_cast<size_t>(reinterpret_cast<char*>(&cross_trainer_cache_size_bytes_) - |
839 | reinterpret_cast<char*>(&port_)) + sizeof(cross_trainer_cache_size_bytes_)); |
840 | // @@protoc_insertion_point(copy_constructor:tensorflow.data.experimental.WorkerConfig) |
841 | } |
842 | |
843 | void WorkerConfig::SharedCtor() { |
844 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WorkerConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto.base); |
845 | protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
846 | dispatcher_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
847 | worker_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
848 | data_transfer_protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
849 | data_transfer_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
850 | ::memset(&port_, 0, static_cast<size_t>( |
851 | reinterpret_cast<char*>(&cross_trainer_cache_size_bytes_) - |
852 | reinterpret_cast<char*>(&port_)) + sizeof(cross_trainer_cache_size_bytes_)); |
853 | } |
854 | |
855 | WorkerConfig::~WorkerConfig() { |
856 | // @@protoc_insertion_point(destructor:tensorflow.data.experimental.WorkerConfig) |
857 | SharedDtor(); |
858 | } |
859 | |
860 | void WorkerConfig::SharedDtor() { |
861 | protocol_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
862 | dispatcher_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
863 | worker_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
864 | data_transfer_protocol_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
865 | data_transfer_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
866 | } |
867 | |
868 | void WorkerConfig::SetCachedSize(int size) const { |
869 | _cached_size_.Set(size); |
870 | } |
871 | const WorkerConfig& WorkerConfig::default_instance() { |
872 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WorkerConfig_tensorflow_2fcore_2fprotobuf_2fservice_5fconfig_2eproto.base); |
873 | return *internal_default_instance(); |
874 | } |
875 | |
876 | |
877 | void WorkerConfig::Clear() { |
878 | // @@protoc_insertion_point(message_clear_start:tensorflow.data.experimental.WorkerConfig) |
879 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
880 | // Prevent compiler warnings about cached_has_bits being unused |
881 | (void) cached_has_bits; |
882 | |
883 | worker_tags_.Clear(); |
884 | protocol_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
885 | dispatcher_address_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
886 | worker_address_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
887 | data_transfer_protocol_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
888 | data_transfer_address_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
889 | ::memset(&port_, 0, static_cast<size_t>( |
890 | reinterpret_cast<char*>(&cross_trainer_cache_size_bytes_) - |
891 | reinterpret_cast<char*>(&port_)) + sizeof(cross_trainer_cache_size_bytes_)); |
892 | _internal_metadata_.Clear(); |
893 | } |
894 | |
895 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
896 | const char* WorkerConfig::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
897 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
898 | while (!ctx->Done(&ptr)) { |
899 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
900 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
901 | CHK_(ptr); |
902 | switch (tag >> 3) { |
903 | // int64 port = 1; |
904 | case 1: |
905 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
906 | port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
907 | CHK_(ptr); |
908 | } else goto handle_unusual; |
909 | continue; |
910 | // string protocol = 2; |
911 | case 2: |
912 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
913 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_protocol(), ptr, ctx, "tensorflow.data.experimental.WorkerConfig.protocol" ); |
914 | CHK_(ptr); |
915 | } else goto handle_unusual; |
916 | continue; |
917 | // string dispatcher_address = 3; |
918 | case 3: |
919 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
920 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_dispatcher_address(), ptr, ctx, "tensorflow.data.experimental.WorkerConfig.dispatcher_address" ); |
921 | CHK_(ptr); |
922 | } else goto handle_unusual; |
923 | continue; |
924 | // string worker_address = 4; |
925 | case 4: |
926 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
927 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_worker_address(), ptr, ctx, "tensorflow.data.experimental.WorkerConfig.worker_address" ); |
928 | CHK_(ptr); |
929 | } else goto handle_unusual; |
930 | continue; |
931 | // int64 heartbeat_interval_ms = 5; |
932 | case 5: |
933 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
934 | heartbeat_interval_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
935 | CHK_(ptr); |
936 | } else goto handle_unusual; |
937 | continue; |
938 | // int64 dispatcher_timeout_ms = 6; |
939 | case 6: |
940 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { |
941 | dispatcher_timeout_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
942 | CHK_(ptr); |
943 | } else goto handle_unusual; |
944 | continue; |
945 | // string data_transfer_protocol = 7; |
946 | case 7: |
947 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
948 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_data_transfer_protocol(), ptr, ctx, "tensorflow.data.experimental.WorkerConfig.data_transfer_protocol" ); |
949 | CHK_(ptr); |
950 | } else goto handle_unusual; |
951 | continue; |
952 | // string data_transfer_address = 8; |
953 | case 8: |
954 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { |
955 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_data_transfer_address(), ptr, ctx, "tensorflow.data.experimental.WorkerConfig.data_transfer_address" ); |
956 | CHK_(ptr); |
957 | } else goto handle_unusual; |
958 | continue; |
959 | // int64 shutdown_quiet_period_ms = 9; |
960 | case 9: |
961 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { |
962 | shutdown_quiet_period_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
963 | CHK_(ptr); |
964 | } else goto handle_unusual; |
965 | continue; |
966 | // repeated string worker_tags = 10; |
967 | case 10: |
968 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { |
969 | ptr -= 1; |
970 | do { |
971 | ptr += 1; |
972 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_worker_tags(), ptr, ctx, "tensorflow.data.experimental.WorkerConfig.worker_tags" ); |
973 | CHK_(ptr); |
974 | if (!ctx->DataAvailable(ptr)) break; |
975 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 82); |
976 | } else goto handle_unusual; |
977 | continue; |
978 | // int64 cross_trainer_cache_size_bytes = 11; |
979 | case 11: |
980 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) { |
981 | cross_trainer_cache_size_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
982 | CHK_(ptr); |
983 | } else goto handle_unusual; |
984 | continue; |
985 | default: { |
986 | handle_unusual: |
987 | if ((tag & 7) == 4 || tag == 0) { |
988 | ctx->SetLastTag(tag); |
989 | goto success; |
990 | } |
991 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
992 | CHK_(ptr != nullptr); |
993 | continue; |
994 | } |
995 | } // switch |
996 | } // while |
997 | success: |
998 | return ptr; |
999 | failure: |
1000 | ptr = nullptr; |
1001 | goto success; |
1002 | #undef CHK_ |
1003 | } |
1004 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1005 | bool WorkerConfig::MergePartialFromCodedStream( |
1006 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1007 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1008 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1009 | // @@protoc_insertion_point(parse_start:tensorflow.data.experimental.WorkerConfig) |
1010 | for (;;) { |
1011 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1012 | tag = p.first; |
1013 | if (!p.second) goto handle_unusual; |
1014 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1015 | // int64 port = 1; |
1016 | case 1: { |
1017 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
1018 | |
1019 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1020 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1021 | input, &port_))); |
1022 | } else { |
1023 | goto handle_unusual; |
1024 | } |
1025 | break; |
1026 | } |
1027 | |
1028 | // string protocol = 2; |
1029 | case 2: { |
1030 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
1031 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1032 | input, this->mutable_protocol())); |
1033 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1034 | this->protocol().data(), static_cast<int>(this->protocol().length()), |
1035 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1036 | "tensorflow.data.experimental.WorkerConfig.protocol" )); |
1037 | } else { |
1038 | goto handle_unusual; |
1039 | } |
1040 | break; |
1041 | } |
1042 | |
1043 | // string dispatcher_address = 3; |
1044 | case 3: { |
1045 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
1046 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1047 | input, this->mutable_dispatcher_address())); |
1048 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1049 | this->dispatcher_address().data(), static_cast<int>(this->dispatcher_address().length()), |
1050 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1051 | "tensorflow.data.experimental.WorkerConfig.dispatcher_address" )); |
1052 | } else { |
1053 | goto handle_unusual; |
1054 | } |
1055 | break; |
1056 | } |
1057 | |
1058 | // string worker_address = 4; |
1059 | case 4: { |
1060 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
1061 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1062 | input, this->mutable_worker_address())); |
1063 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1064 | this->worker_address().data(), static_cast<int>(this->worker_address().length()), |
1065 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1066 | "tensorflow.data.experimental.WorkerConfig.worker_address" )); |
1067 | } else { |
1068 | goto handle_unusual; |
1069 | } |
1070 | break; |
1071 | } |
1072 | |
1073 | // int64 heartbeat_interval_ms = 5; |
1074 | case 5: { |
1075 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { |
1076 | |
1077 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1078 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1079 | input, &heartbeat_interval_ms_))); |
1080 | } else { |
1081 | goto handle_unusual; |
1082 | } |
1083 | break; |
1084 | } |
1085 | |
1086 | // int64 dispatcher_timeout_ms = 6; |
1087 | case 6: { |
1088 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { |
1089 | |
1090 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1091 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1092 | input, &dispatcher_timeout_ms_))); |
1093 | } else { |
1094 | goto handle_unusual; |
1095 | } |
1096 | break; |
1097 | } |
1098 | |
1099 | // string data_transfer_protocol = 7; |
1100 | case 7: { |
1101 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
1102 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1103 | input, this->mutable_data_transfer_protocol())); |
1104 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1105 | this->data_transfer_protocol().data(), static_cast<int>(this->data_transfer_protocol().length()), |
1106 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1107 | "tensorflow.data.experimental.WorkerConfig.data_transfer_protocol" )); |
1108 | } else { |
1109 | goto handle_unusual; |
1110 | } |
1111 | break; |
1112 | } |
1113 | |
1114 | // string data_transfer_address = 8; |
1115 | case 8: { |
1116 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { |
1117 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1118 | input, this->mutable_data_transfer_address())); |
1119 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1120 | this->data_transfer_address().data(), static_cast<int>(this->data_transfer_address().length()), |
1121 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1122 | "tensorflow.data.experimental.WorkerConfig.data_transfer_address" )); |
1123 | } else { |
1124 | goto handle_unusual; |
1125 | } |
1126 | break; |
1127 | } |
1128 | |
1129 | // int64 shutdown_quiet_period_ms = 9; |
1130 | case 9: { |
1131 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { |
1132 | |
1133 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1134 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1135 | input, &shutdown_quiet_period_ms_))); |
1136 | } else { |
1137 | goto handle_unusual; |
1138 | } |
1139 | break; |
1140 | } |
1141 | |
1142 | // repeated string worker_tags = 10; |
1143 | case 10: { |
1144 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { |
1145 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1146 | input, this->add_worker_tags())); |
1147 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1148 | this->worker_tags(this->worker_tags_size() - 1).data(), |
1149 | static_cast<int>(this->worker_tags(this->worker_tags_size() - 1).length()), |
1150 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1151 | "tensorflow.data.experimental.WorkerConfig.worker_tags" )); |
1152 | } else { |
1153 | goto handle_unusual; |
1154 | } |
1155 | break; |
1156 | } |
1157 | |
1158 | // int64 cross_trainer_cache_size_bytes = 11; |
1159 | case 11: { |
1160 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (88 & 0xFF)) { |
1161 | |
1162 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1163 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1164 | input, &cross_trainer_cache_size_bytes_))); |
1165 | } else { |
1166 | goto handle_unusual; |
1167 | } |
1168 | break; |
1169 | } |
1170 | |
1171 | default: { |
1172 | handle_unusual: |
1173 | if (tag == 0) { |
1174 | goto success; |
1175 | } |
1176 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1177 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1178 | break; |
1179 | } |
1180 | } |
1181 | } |
1182 | success: |
1183 | // @@protoc_insertion_point(parse_success:tensorflow.data.experimental.WorkerConfig) |
1184 | return true; |
1185 | failure: |
1186 | // @@protoc_insertion_point(parse_failure:tensorflow.data.experimental.WorkerConfig) |
1187 | return false; |
1188 | #undef DO_ |
1189 | } |
1190 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1191 | |
1192 | void WorkerConfig::SerializeWithCachedSizes( |
1193 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1194 | // @@protoc_insertion_point(serialize_start:tensorflow.data.experimental.WorkerConfig) |
1195 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1196 | (void) cached_has_bits; |
1197 | |
1198 | // int64 port = 1; |
1199 | if (this->port() != 0) { |
1200 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->port(), output); |
1201 | } |
1202 | |
1203 | // string protocol = 2; |
1204 | if (this->protocol().size() > 0) { |
1205 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1206 | this->protocol().data(), static_cast<int>(this->protocol().length()), |
1207 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1208 | "tensorflow.data.experimental.WorkerConfig.protocol" ); |
1209 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1210 | 2, this->protocol(), output); |
1211 | } |
1212 | |
1213 | // string dispatcher_address = 3; |
1214 | if (this->dispatcher_address().size() > 0) { |
1215 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1216 | this->dispatcher_address().data(), static_cast<int>(this->dispatcher_address().length()), |
1217 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1218 | "tensorflow.data.experimental.WorkerConfig.dispatcher_address" ); |
1219 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1220 | 3, this->dispatcher_address(), output); |
1221 | } |
1222 | |
1223 | // string worker_address = 4; |
1224 | if (this->worker_address().size() > 0) { |
1225 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1226 | this->worker_address().data(), static_cast<int>(this->worker_address().length()), |
1227 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1228 | "tensorflow.data.experimental.WorkerConfig.worker_address" ); |
1229 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1230 | 4, this->worker_address(), output); |
1231 | } |
1232 | |
1233 | // int64 heartbeat_interval_ms = 5; |
1234 | if (this->heartbeat_interval_ms() != 0) { |
1235 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->heartbeat_interval_ms(), output); |
1236 | } |
1237 | |
1238 | // int64 dispatcher_timeout_ms = 6; |
1239 | if (this->dispatcher_timeout_ms() != 0) { |
1240 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(6, this->dispatcher_timeout_ms(), output); |
1241 | } |
1242 | |
1243 | // string data_transfer_protocol = 7; |
1244 | if (this->data_transfer_protocol().size() > 0) { |
1245 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1246 | this->data_transfer_protocol().data(), static_cast<int>(this->data_transfer_protocol().length()), |
1247 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1248 | "tensorflow.data.experimental.WorkerConfig.data_transfer_protocol" ); |
1249 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1250 | 7, this->data_transfer_protocol(), output); |
1251 | } |
1252 | |
1253 | // string data_transfer_address = 8; |
1254 | if (this->data_transfer_address().size() > 0) { |
1255 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1256 | this->data_transfer_address().data(), static_cast<int>(this->data_transfer_address().length()), |
1257 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1258 | "tensorflow.data.experimental.WorkerConfig.data_transfer_address" ); |
1259 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1260 | 8, this->data_transfer_address(), output); |
1261 | } |
1262 | |
1263 | // int64 shutdown_quiet_period_ms = 9; |
1264 | if (this->shutdown_quiet_period_ms() != 0) { |
1265 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(9, this->shutdown_quiet_period_ms(), output); |
1266 | } |
1267 | |
1268 | // repeated string worker_tags = 10; |
1269 | for (int i = 0, n = this->worker_tags_size(); i < n; i++) { |
1270 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1271 | this->worker_tags(i).data(), static_cast<int>(this->worker_tags(i).length()), |
1272 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1273 | "tensorflow.data.experimental.WorkerConfig.worker_tags" ); |
1274 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
1275 | 10, this->worker_tags(i), output); |
1276 | } |
1277 | |
1278 | // int64 cross_trainer_cache_size_bytes = 11; |
1279 | if (this->cross_trainer_cache_size_bytes() != 0) { |
1280 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(11, this->cross_trainer_cache_size_bytes(), output); |
1281 | } |
1282 | |
1283 | if (_internal_metadata_.have_unknown_fields()) { |
1284 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1285 | _internal_metadata_.unknown_fields(), output); |
1286 | } |
1287 | // @@protoc_insertion_point(serialize_end:tensorflow.data.experimental.WorkerConfig) |
1288 | } |
1289 | |
1290 | ::PROTOBUF_NAMESPACE_ID::uint8* WorkerConfig::InternalSerializeWithCachedSizesToArray( |
1291 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1292 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.data.experimental.WorkerConfig) |
1293 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1294 | (void) cached_has_bits; |
1295 | |
1296 | // int64 port = 1; |
1297 | if (this->port() != 0) { |
1298 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->port(), target); |
1299 | } |
1300 | |
1301 | // string protocol = 2; |
1302 | if (this->protocol().size() > 0) { |
1303 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1304 | this->protocol().data(), static_cast<int>(this->protocol().length()), |
1305 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1306 | "tensorflow.data.experimental.WorkerConfig.protocol" ); |
1307 | target = |
1308 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1309 | 2, this->protocol(), target); |
1310 | } |
1311 | |
1312 | // string dispatcher_address = 3; |
1313 | if (this->dispatcher_address().size() > 0) { |
1314 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1315 | this->dispatcher_address().data(), static_cast<int>(this->dispatcher_address().length()), |
1316 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1317 | "tensorflow.data.experimental.WorkerConfig.dispatcher_address" ); |
1318 | target = |
1319 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1320 | 3, this->dispatcher_address(), target); |
1321 | } |
1322 | |
1323 | // string worker_address = 4; |
1324 | if (this->worker_address().size() > 0) { |
1325 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1326 | this->worker_address().data(), static_cast<int>(this->worker_address().length()), |
1327 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1328 | "tensorflow.data.experimental.WorkerConfig.worker_address" ); |
1329 | target = |
1330 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1331 | 4, this->worker_address(), target); |
1332 | } |
1333 | |
1334 | // int64 heartbeat_interval_ms = 5; |
1335 | if (this->heartbeat_interval_ms() != 0) { |
1336 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->heartbeat_interval_ms(), target); |
1337 | } |
1338 | |
1339 | // int64 dispatcher_timeout_ms = 6; |
1340 | if (this->dispatcher_timeout_ms() != 0) { |
1341 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->dispatcher_timeout_ms(), target); |
1342 | } |
1343 | |
1344 | // string data_transfer_protocol = 7; |
1345 | if (this->data_transfer_protocol().size() > 0) { |
1346 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1347 | this->data_transfer_protocol().data(), static_cast<int>(this->data_transfer_protocol().length()), |
1348 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1349 | "tensorflow.data.experimental.WorkerConfig.data_transfer_protocol" ); |
1350 | target = |
1351 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1352 | 7, this->data_transfer_protocol(), target); |
1353 | } |
1354 | |
1355 | // string data_transfer_address = 8; |
1356 | if (this->data_transfer_address().size() > 0) { |
1357 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1358 | this->data_transfer_address().data(), static_cast<int>(this->data_transfer_address().length()), |
1359 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1360 | "tensorflow.data.experimental.WorkerConfig.data_transfer_address" ); |
1361 | target = |
1362 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1363 | 8, this->data_transfer_address(), target); |
1364 | } |
1365 | |
1366 | // int64 shutdown_quiet_period_ms = 9; |
1367 | if (this->shutdown_quiet_period_ms() != 0) { |
1368 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(9, this->shutdown_quiet_period_ms(), target); |
1369 | } |
1370 | |
1371 | // repeated string worker_tags = 10; |
1372 | for (int i = 0, n = this->worker_tags_size(); i < n; i++) { |
1373 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1374 | this->worker_tags(i).data(), static_cast<int>(this->worker_tags(i).length()), |
1375 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1376 | "tensorflow.data.experimental.WorkerConfig.worker_tags" ); |
1377 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1378 | WriteStringToArray(10, this->worker_tags(i), target); |
1379 | } |
1380 | |
1381 | // int64 cross_trainer_cache_size_bytes = 11; |
1382 | if (this->cross_trainer_cache_size_bytes() != 0) { |
1383 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(11, this->cross_trainer_cache_size_bytes(), target); |
1384 | } |
1385 | |
1386 | if (_internal_metadata_.have_unknown_fields()) { |
1387 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1388 | _internal_metadata_.unknown_fields(), target); |
1389 | } |
1390 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.data.experimental.WorkerConfig) |
1391 | return target; |
1392 | } |
1393 | |
1394 | size_t WorkerConfig::ByteSizeLong() const { |
1395 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.data.experimental.WorkerConfig) |
1396 | size_t total_size = 0; |
1397 | |
1398 | if (_internal_metadata_.have_unknown_fields()) { |
1399 | total_size += |
1400 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1401 | _internal_metadata_.unknown_fields()); |
1402 | } |
1403 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1404 | // Prevent compiler warnings about cached_has_bits being unused |
1405 | (void) cached_has_bits; |
1406 | |
1407 | // repeated string worker_tags = 10; |
1408 | total_size += 1 * |
1409 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->worker_tags_size()); |
1410 | for (int i = 0, n = this->worker_tags_size(); i < n; i++) { |
1411 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1412 | this->worker_tags(i)); |
1413 | } |
1414 | |
1415 | // string protocol = 2; |
1416 | if (this->protocol().size() > 0) { |
1417 | total_size += 1 + |
1418 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1419 | this->protocol()); |
1420 | } |
1421 | |
1422 | // string dispatcher_address = 3; |
1423 | if (this->dispatcher_address().size() > 0) { |
1424 | total_size += 1 + |
1425 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1426 | this->dispatcher_address()); |
1427 | } |
1428 | |
1429 | // string worker_address = 4; |
1430 | if (this->worker_address().size() > 0) { |
1431 | total_size += 1 + |
1432 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1433 | this->worker_address()); |
1434 | } |
1435 | |
1436 | // string data_transfer_protocol = 7; |
1437 | if (this->data_transfer_protocol().size() > 0) { |
1438 | total_size += 1 + |
1439 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1440 | this->data_transfer_protocol()); |
1441 | } |
1442 | |
1443 | // string data_transfer_address = 8; |
1444 | if (this->data_transfer_address().size() > 0) { |
1445 | total_size += 1 + |
1446 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1447 | this->data_transfer_address()); |
1448 | } |
1449 | |
1450 | // int64 port = 1; |
1451 | if (this->port() != 0) { |
1452 | total_size += 1 + |
1453 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1454 | this->port()); |
1455 | } |
1456 | |
1457 | // int64 heartbeat_interval_ms = 5; |
1458 | if (this->heartbeat_interval_ms() != 0) { |
1459 | total_size += 1 + |
1460 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1461 | this->heartbeat_interval_ms()); |
1462 | } |
1463 | |
1464 | // int64 dispatcher_timeout_ms = 6; |
1465 | if (this->dispatcher_timeout_ms() != 0) { |
1466 | total_size += 1 + |
1467 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1468 | this->dispatcher_timeout_ms()); |
1469 | } |
1470 | |
1471 | // int64 shutdown_quiet_period_ms = 9; |
1472 | if (this->shutdown_quiet_period_ms() != 0) { |
1473 | total_size += 1 + |
1474 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1475 | this->shutdown_quiet_period_ms()); |
1476 | } |
1477 | |
1478 | // int64 cross_trainer_cache_size_bytes = 11; |
1479 | if (this->cross_trainer_cache_size_bytes() != 0) { |
1480 | total_size += 1 + |
1481 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1482 | this->cross_trainer_cache_size_bytes()); |
1483 | } |
1484 | |
1485 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1486 | SetCachedSize(cached_size); |
1487 | return total_size; |
1488 | } |
1489 | |
1490 | void WorkerConfig::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1491 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.data.experimental.WorkerConfig) |
1492 | GOOGLE_DCHECK_NE(&from, this); |
1493 | const WorkerConfig* source = |
1494 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WorkerConfig>( |
1495 | &from); |
1496 | if (source == nullptr) { |
1497 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.data.experimental.WorkerConfig) |
1498 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1499 | } else { |
1500 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.data.experimental.WorkerConfig) |
1501 | MergeFrom(*source); |
1502 | } |
1503 | } |
1504 | |
1505 | void WorkerConfig::MergeFrom(const WorkerConfig& from) { |
1506 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.data.experimental.WorkerConfig) |
1507 | GOOGLE_DCHECK_NE(&from, this); |
1508 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1509 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1510 | (void) cached_has_bits; |
1511 | |
1512 | worker_tags_.MergeFrom(from.worker_tags_); |
1513 | if (from.protocol().size() > 0) { |
1514 | |
1515 | protocol_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.protocol_); |
1516 | } |
1517 | if (from.dispatcher_address().size() > 0) { |
1518 | |
1519 | dispatcher_address_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.dispatcher_address_); |
1520 | } |
1521 | if (from.worker_address().size() > 0) { |
1522 | |
1523 | worker_address_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.worker_address_); |
1524 | } |
1525 | if (from.data_transfer_protocol().size() > 0) { |
1526 | |
1527 | data_transfer_protocol_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_transfer_protocol_); |
1528 | } |
1529 | if (from.data_transfer_address().size() > 0) { |
1530 | |
1531 | data_transfer_address_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.data_transfer_address_); |
1532 | } |
1533 | if (from.port() != 0) { |
1534 | set_port(from.port()); |
1535 | } |
1536 | if (from.heartbeat_interval_ms() != 0) { |
1537 | set_heartbeat_interval_ms(from.heartbeat_interval_ms()); |
1538 | } |
1539 | if (from.dispatcher_timeout_ms() != 0) { |
1540 | set_dispatcher_timeout_ms(from.dispatcher_timeout_ms()); |
1541 | } |
1542 | if (from.shutdown_quiet_period_ms() != 0) { |
1543 | set_shutdown_quiet_period_ms(from.shutdown_quiet_period_ms()); |
1544 | } |
1545 | if (from.cross_trainer_cache_size_bytes() != 0) { |
1546 | set_cross_trainer_cache_size_bytes(from.cross_trainer_cache_size_bytes()); |
1547 | } |
1548 | } |
1549 | |
1550 | void WorkerConfig::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1551 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.data.experimental.WorkerConfig) |
1552 | if (&from == this) return; |
1553 | Clear(); |
1554 | MergeFrom(from); |
1555 | } |
1556 | |
1557 | void WorkerConfig::CopyFrom(const WorkerConfig& from) { |
1558 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.data.experimental.WorkerConfig) |
1559 | if (&from == this) return; |
1560 | Clear(); |
1561 | MergeFrom(from); |
1562 | } |
1563 | |
1564 | bool WorkerConfig::IsInitialized() const { |
1565 | return true; |
1566 | } |
1567 | |
1568 | void WorkerConfig::InternalSwap(WorkerConfig* other) { |
1569 | using std::swap; |
1570 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1571 | worker_tags_.InternalSwap(CastToBase(&other->worker_tags_)); |
1572 | protocol_.Swap(&other->protocol_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1573 | GetArenaNoVirtual()); |
1574 | dispatcher_address_.Swap(&other->dispatcher_address_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1575 | GetArenaNoVirtual()); |
1576 | worker_address_.Swap(&other->worker_address_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1577 | GetArenaNoVirtual()); |
1578 | data_transfer_protocol_.Swap(&other->data_transfer_protocol_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1579 | GetArenaNoVirtual()); |
1580 | data_transfer_address_.Swap(&other->data_transfer_address_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1581 | GetArenaNoVirtual()); |
1582 | swap(port_, other->port_); |
1583 | swap(heartbeat_interval_ms_, other->heartbeat_interval_ms_); |
1584 | swap(dispatcher_timeout_ms_, other->dispatcher_timeout_ms_); |
1585 | swap(shutdown_quiet_period_ms_, other->shutdown_quiet_period_ms_); |
1586 | swap(cross_trainer_cache_size_bytes_, other->cross_trainer_cache_size_bytes_); |
1587 | } |
1588 | |
1589 | ::PROTOBUF_NAMESPACE_ID::Metadata WorkerConfig::GetMetadata() const { |
1590 | return GetMetadataStatic(); |
1591 | } |
1592 | |
1593 | |
1594 | // @@protoc_insertion_point(namespace_scope) |
1595 | } // namespace experimental |
1596 | } // namespace data |
1597 | } // namespace tensorflow |
1598 | PROTOBUF_NAMESPACE_OPEN |
1599 | template<> PROTOBUF_NOINLINE ::tensorflow::data::experimental::DispatcherConfig* Arena::CreateMaybeMessage< ::tensorflow::data::experimental::DispatcherConfig >(Arena* arena) { |
1600 | return Arena::CreateInternal< ::tensorflow::data::experimental::DispatcherConfig >(arena); |
1601 | } |
1602 | template<> PROTOBUF_NOINLINE ::tensorflow::data::experimental::WorkerConfig* Arena::CreateMaybeMessage< ::tensorflow::data::experimental::WorkerConfig >(Arena* arena) { |
1603 | return Arena::CreateInternal< ::tensorflow::data::experimental::WorkerConfig >(arena); |
1604 | } |
1605 | PROTOBUF_NAMESPACE_CLOSE |
1606 | |
1607 | // @@protoc_insertion_point(global_scope) |
1608 | #include <google/protobuf/port_undef.inc> |
1609 | |