/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/consensus/log.pb.cc
Line | Count | Source (jump to first uncovered line) |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: yb/consensus/log.proto |
3 | | |
4 | | #include "yb/consensus/log.pb.h" |
5 | | |
6 | | #include <algorithm> |
7 | | |
8 | | #include <google/protobuf/stubs/common.h> |
9 | | #include <google/protobuf/stubs/port.h> |
10 | | #include <google/protobuf/stubs/once.h> |
11 | | #include <google/protobuf/io/coded_stream.h> |
12 | | #include <google/protobuf/wire_format_lite_inl.h> |
13 | | #include <google/protobuf/descriptor.h> |
14 | | #include <google/protobuf/generated_message_reflection.h> |
15 | | #include <google/protobuf/reflection_ops.h> |
16 | | #include <google/protobuf/wire_format.h> |
17 | | // This is a temporary google only hack |
18 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
19 | | #include "third_party/protobuf/version.h" |
20 | | #endif |
21 | | #include "yb/util/protobuf-annotations.h" |
22 | | // @@protoc_insertion_point(includes) |
23 | | namespace yb { |
24 | | namespace log { |
25 | | class LogEntryPBDefaultTypeInternal { |
26 | | public: |
27 | | ::google::protobuf::internal::ExplicitlyConstructed<LogEntryPB> |
28 | | _instance; |
29 | | } _LogEntryPB_default_instance_; |
30 | | class LogEntryBatchPBDefaultTypeInternal { |
31 | | public: |
32 | | ::google::protobuf::internal::ExplicitlyConstructed<LogEntryBatchPB> |
33 | | _instance; |
34 | | } _LogEntryBatchPB_default_instance_; |
35 | | class LogSegmentHeaderPBDefaultTypeInternal { |
36 | | public: |
37 | | ::google::protobuf::internal::ExplicitlyConstructed<LogSegmentHeaderPB> |
38 | | _instance; |
39 | | } _LogSegmentHeaderPB_default_instance_; |
40 | | class LogSegmentFooterPBDefaultTypeInternal { |
41 | | public: |
42 | | ::google::protobuf::internal::ExplicitlyConstructed<LogSegmentFooterPB> |
43 | | _instance; |
44 | | } _LogSegmentFooterPB_default_instance_; |
45 | | } // namespace log |
46 | | } // namespace yb |
47 | | namespace protobuf_yb_2fconsensus_2flog_2eproto { |
48 | 16.5k | void InitDefaultsLogEntryPBImpl() { |
49 | 16.5k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
50 | | |
51 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
52 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
53 | | #else |
54 | 16.5k | ::google::protobuf::internal::InitProtobufDefaults(); |
55 | 16.5k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
56 | 16.5k | protobuf_yb_2fconsensus_2fconsensus_2eproto::InitDefaultsReplicateMsg(); |
57 | 16.5k | { |
58 | 16.5k | void* ptr = &::yb::log::_LogEntryPB_default_instance_; |
59 | 16.5k | new (ptr) ::yb::log::LogEntryPB(); |
60 | 16.5k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
61 | 16.5k | } |
62 | 16.5k | ::yb::log::LogEntryPB::InitAsDefaultInstance(); |
63 | 16.5k | } |
64 | | |
65 | 17.4M | void InitDefaultsLogEntryPB() { |
66 | 17.4M | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
67 | 17.4M | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLogEntryPBImpl); |
68 | 17.4M | } |
69 | | |
70 | 16.5k | void InitDefaultsLogEntryBatchPBImpl() { |
71 | 16.5k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
72 | | |
73 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
74 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
75 | | #else |
76 | 16.5k | ::google::protobuf::internal::InitProtobufDefaults(); |
77 | 16.5k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
78 | 16.5k | protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogEntryPB(); |
79 | 16.5k | protobuf_yb_2futil_2fopid_2eproto::InitDefaultsOpIdPB(); |
80 | 16.5k | { |
81 | 16.5k | void* ptr = &::yb::log::_LogEntryBatchPB_default_instance_; |
82 | 16.5k | new (ptr) ::yb::log::LogEntryBatchPB(); |
83 | 16.5k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
84 | 16.5k | } |
85 | 16.5k | ::yb::log::LogEntryBatchPB::InitAsDefaultInstance(); |
86 | 16.5k | } |
87 | | |
88 | 59.9M | void InitDefaultsLogEntryBatchPB() { |
89 | 59.9M | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
90 | 59.9M | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLogEntryBatchPBImpl); |
91 | 59.9M | } |
92 | | |
93 | 16.5k | void InitDefaultsLogSegmentHeaderPBImpl() { |
94 | 16.5k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
95 | | |
96 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
97 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
98 | | #else |
99 | 16.5k | ::google::protobuf::internal::InitProtobufDefaults(); |
100 | 16.5k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
101 | 16.5k | protobuf_yb_2fcommon_2fcommon_2eproto::InitDefaultsSchemaPB(); |
102 | 16.5k | { |
103 | 16.5k | void* ptr = &::yb::log::_LogSegmentHeaderPB_default_instance_; |
104 | 16.5k | new (ptr) ::yb::log::LogSegmentHeaderPB(); |
105 | 16.5k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
106 | 16.5k | } |
107 | 16.5k | ::yb::log::LogSegmentHeaderPB::InitAsDefaultInstance(); |
108 | 16.5k | } |
109 | | |
110 | 602k | void InitDefaultsLogSegmentHeaderPB() { |
111 | 602k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
112 | 602k | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLogSegmentHeaderPBImpl); |
113 | 602k | } |
114 | | |
115 | 16.5k | void InitDefaultsLogSegmentFooterPBImpl() { |
116 | 16.5k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
117 | | |
118 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
119 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
120 | | #else |
121 | 16.5k | ::google::protobuf::internal::InitProtobufDefaults(); |
122 | 16.5k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
123 | 16.5k | { |
124 | 16.5k | void* ptr = &::yb::log::_LogSegmentFooterPB_default_instance_; |
125 | 16.5k | new (ptr) ::yb::log::LogSegmentFooterPB(); |
126 | 16.5k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
127 | 16.5k | } |
128 | 16.5k | ::yb::log::LogSegmentFooterPB::InitAsDefaultInstance(); |
129 | 16.5k | } |
130 | | |
131 | 589k | void InitDefaultsLogSegmentFooterPB() { |
132 | 589k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
133 | 589k | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLogSegmentFooterPBImpl); |
134 | 589k | } |
135 | | |
136 | | ::google::protobuf::Metadata file_level_metadata[4]; |
137 | | const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; |
138 | | |
139 | | const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
140 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryPB, _has_bits_), |
141 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryPB, _internal_metadata_), |
142 | | ~0u, // no _extensions_ |
143 | | ~0u, // no _oneof_case_ |
144 | | ~0u, // no _weak_field_map_ |
145 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryPB, type_), |
146 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryPB, replicate_), |
147 | | 1, |
148 | | 0, |
149 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryBatchPB, _has_bits_), |
150 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryBatchPB, _internal_metadata_), |
151 | | ~0u, // no _extensions_ |
152 | | ~0u, // no _oneof_case_ |
153 | | ~0u, // no _weak_field_map_ |
154 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryBatchPB, entry_), |
155 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryBatchPB, committed_op_id_), |
156 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryBatchPB, mono_time_), |
157 | | ~0u, |
158 | | 0, |
159 | | 1, |
160 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, _has_bits_), |
161 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, _internal_metadata_), |
162 | | ~0u, // no _extensions_ |
163 | | ~0u, // no _oneof_case_ |
164 | | ~0u, // no _weak_field_map_ |
165 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, major_version_), |
166 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, minor_version_), |
167 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, unused_tablet_id_), |
168 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, sequence_number_), |
169 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, unused_schema_), |
170 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, unused_schema_version_), |
171 | | 2, |
172 | | 3, |
173 | | 0, |
174 | | 4, |
175 | | 1, |
176 | | 5, |
177 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, _has_bits_), |
178 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, _internal_metadata_), |
179 | | ~0u, // no _extensions_ |
180 | | ~0u, // no _oneof_case_ |
181 | | ~0u, // no _weak_field_map_ |
182 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, num_entries_), |
183 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, min_replicate_index_), |
184 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, max_replicate_index_), |
185 | | GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, close_timestamp_micros_), |
186 | | 0, |
187 | | 2, |
188 | | 3, |
189 | | 1, |
190 | | }; |
191 | | static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
192 | | { 0, 7, sizeof(::yb::log::LogEntryPB)}, |
193 | | { 9, 17, sizeof(::yb::log::LogEntryBatchPB)}, |
194 | | { 20, 31, sizeof(::yb::log::LogSegmentHeaderPB)}, |
195 | | { 37, 46, sizeof(::yb::log::LogSegmentFooterPB)}, |
196 | | }; |
197 | | |
198 | | static ::google::protobuf::Message const * const file_default_instances[] = { |
199 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::log::_LogEntryPB_default_instance_), |
200 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::log::_LogEntryBatchPB_default_instance_), |
201 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::log::_LogSegmentHeaderPB_default_instance_), |
202 | | reinterpret_cast<const ::google::protobuf::Message*>(&::yb::log::_LogSegmentFooterPB_default_instance_), |
203 | | }; |
204 | | |
205 | 94 | void protobuf_AssignDescriptors() { |
206 | 94 | AddDescriptors(); |
207 | 94 | ::google::protobuf::MessageFactory* factory = NULL; |
208 | 94 | AssignDescriptors( |
209 | 94 | "yb/consensus/log.proto", schemas, file_default_instances, TableStruct::offsets, factory, |
210 | 94 | file_level_metadata, file_level_enum_descriptors, NULL); |
211 | 94 | } |
212 | | |
213 | 6.54k | void protobuf_AssignDescriptorsOnce() { |
214 | 6.54k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
215 | 6.54k | ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); |
216 | 6.54k | } |
217 | | |
218 | | void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; |
219 | 0 | void protobuf_RegisterTypes(const ::std::string&) { |
220 | 0 | protobuf_AssignDescriptorsOnce(); |
221 | 0 | ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4); |
222 | 0 | } |
223 | | |
224 | 16.5k | void AddDescriptorsImpl() { |
225 | 16.5k | InitDefaults(); |
226 | 16.5k | static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
227 | 16.5k | "\n\026yb/consensus/log.proto\022\006yb.log\032\026yb/com" |
228 | 16.5k | "mon/common.proto\032\034yb/consensus/consensus" |
229 | 16.5k | ".proto\032\022yb/util/opid.proto\"a\n\nLogEntryPB" |
230 | 16.5k | "\022$\n\004type\030\001 \002(\0162\026.yb.log.LogEntryTypePB\022-" |
231 | 16.5k | "\n\treplicate\030\002 \001(\0132\032.yb.consensus.Replica" |
232 | 16.5k | "teMsg\"l\n\017LogEntryBatchPB\022!\n\005entry\030\001 \003(\0132" |
233 | 16.5k | "\022.yb.log.LogEntryPB\022#\n\017committed_op_id\030\002" |
234 | 16.5k | " \001(\0132\n.yb.OpIdPB\022\021\n\tmono_time\030\003 \001(\004\"\271\001\n\022" |
235 | 16.5k | "LogSegmentHeaderPB\022\025\n\rmajor_version\030\001 \002(" |
236 | 16.5k | "\r\022\025\n\rminor_version\030\002 \002(\r\022\030\n\020unused_table" |
237 | 16.5k | "t_id\030\005 \002(\014\022\027\n\017sequence_number\030\006 \002(\004\022#\n\ru" |
238 | 16.5k | "nused_schema\030\007 \002(\0132\014.yb.SchemaPB\022\035\n\025unus" |
239 | 16.5k | "ed_schema_version\030\010 \001(\r\"\213\001\n\022LogSegmentFo" |
240 | 16.5k | "oterPB\022\023\n\013num_entries\030\001 \002(\003\022\037\n\023min_repli" |
241 | 16.5k | "cate_index\030\002 \001(\003:\002-1\022\037\n\023max_replicate_in" |
242 | 16.5k | "dex\030\003 \001(\003:\002-1\022\036\n\026close_timestamp_micros\030" |
243 | 16.5k | "\004 \001(\003*U\n\016LogEntryTypePB\022\013\n\007UNKNOWN\020\000\022\r\n\t" |
244 | 16.5k | "REPLICATE\020\001\022\024\n\017ROLLOVER_MARKER\020\346\007\022\021\n\014FLU" |
245 | 16.5k | "SH_MARKER\020\347\007B\014\n\norg.yb.log" |
246 | 16.5k | }; |
247 | 16.5k | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
248 | 16.5k | descriptor, 746); |
249 | 16.5k | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
250 | 16.5k | "yb/consensus/log.proto", &protobuf_RegisterTypes); |
251 | 16.5k | ::protobuf_yb_2fcommon_2fcommon_2eproto::AddDescriptors(); |
252 | 16.5k | ::protobuf_yb_2fconsensus_2fconsensus_2eproto::AddDescriptors(); |
253 | 16.5k | ::protobuf_yb_2futil_2fopid_2eproto::AddDescriptors(); |
254 | 16.5k | } |
255 | | |
256 | 16.6k | void AddDescriptors() { |
257 | 16.6k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
258 | 16.6k | ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); |
259 | 16.6k | } |
260 | | // Force AddDescriptors() to be called at dynamic initialization time. |
261 | | struct StaticDescriptorInitializer { |
262 | 16.5k | StaticDescriptorInitializer() { |
263 | 16.5k | AddDescriptors(); |
264 | 16.5k | } |
265 | | } static_descriptor_initializer; |
266 | | } // namespace protobuf_yb_2fconsensus_2flog_2eproto |
267 | | namespace yb { |
268 | | namespace log { |
269 | 3.70k | const ::google::protobuf::EnumDescriptor* LogEntryTypePB_descriptor() { |
270 | 3.70k | protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce(); |
271 | 3.70k | return protobuf_yb_2fconsensus_2flog_2eproto::file_level_enum_descriptors[0]; |
272 | 3.70k | } |
273 | 19.6M | bool LogEntryTypePB_IsValid(int value) { |
274 | 19.6M | switch (value) { |
275 | 0 | case 0: |
276 | 19.6M | case 1: |
277 | 19.6M | case 998: |
278 | 19.6M | case 999: |
279 | 19.6M | return true; |
280 | 0 | default: |
281 | 0 | return false; |
282 | 19.6M | } |
283 | 19.6M | } |
284 | | |
285 | | |
286 | | // =================================================================== |
287 | | |
288 | 16.5k | void LogEntryPB::InitAsDefaultInstance() { |
289 | 16.5k | ::yb::log::_LogEntryPB_default_instance_._instance.get_mutable()->replicate_ = const_cast< ::yb::consensus::ReplicateMsg*>( |
290 | 16.5k | ::yb::consensus::ReplicateMsg::internal_default_instance()); |
291 | 16.5k | } |
292 | 0 | void LogEntryPB::clear_replicate() { |
293 | 0 | if (replicate_ != NULL) replicate_->Clear(); |
294 | 0 | clear_has_replicate(); |
295 | 0 | } |
296 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
297 | | const int LogEntryPB::kTypeFieldNumber; |
298 | | const int LogEntryPB::kReplicateFieldNumber; |
299 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
300 | | |
301 | | LogEntryPB::LogEntryPB() |
302 | 17.4M | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
303 | 17.4M | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
304 | 17.4M | ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogEntryPB(); |
305 | 17.4M | } |
306 | 17.4M | SharedCtor(); |
307 | | // @@protoc_insertion_point(constructor:yb.log.LogEntryPB) |
308 | 17.4M | } |
309 | | LogEntryPB::LogEntryPB(const LogEntryPB& from) |
310 | | : ::google::protobuf::Message(), |
311 | | _internal_metadata_(NULL), |
312 | | _has_bits_(from._has_bits_), |
313 | 0 | _cached_size_(0) { |
314 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
315 | 0 | if (from.has_replicate()) { |
316 | 0 | replicate_ = new ::yb::consensus::ReplicateMsg(*from.replicate_); |
317 | 0 | } else { |
318 | 0 | replicate_ = NULL; |
319 | 0 | } |
320 | 0 | type_ = from.type_; |
321 | | // @@protoc_insertion_point(copy_constructor:yb.log.LogEntryPB) |
322 | 0 | } |
323 | | |
324 | 17.4M | void LogEntryPB::SharedCtor() { |
325 | 17.4M | _cached_size_ = 0; |
326 | 17.4M | ::memset(&replicate_, 0, static_cast<size_t>( |
327 | 17.4M | reinterpret_cast<char*>(&type_) - |
328 | 17.4M | reinterpret_cast<char*>(&replicate_)) + sizeof(type_)); |
329 | 17.4M | } |
330 | | |
331 | 17.4M | LogEntryPB::~LogEntryPB() { |
332 | | // @@protoc_insertion_point(destructor:yb.log.LogEntryPB) |
333 | 17.4M | SharedDtor(); |
334 | 17.4M | } |
335 | | |
336 | 17.4M | void LogEntryPB::SharedDtor() { |
337 | 17.4M | if (this != internal_default_instance()) delete replicate_17.4M ; |
338 | 17.4M | } |
339 | | |
340 | 0 | void LogEntryPB::SetCachedSize(int size) const { |
341 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
342 | 0 | _cached_size_ = size; |
343 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
344 | 0 | } |
345 | 0 | const ::google::protobuf::Descriptor* LogEntryPB::descriptor() { |
346 | 0 | ::protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce(); |
347 | 0 | return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
348 | 0 | } |
349 | | |
350 | 0 | const LogEntryPB& LogEntryPB::default_instance() { |
351 | 0 | ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogEntryPB(); |
352 | 0 | return *internal_default_instance(); |
353 | 0 | } |
354 | | |
355 | 0 | LogEntryPB* LogEntryPB::New(::google::protobuf::Arena* arena) const { |
356 | 0 | LogEntryPB* n = new LogEntryPB; |
357 | 0 | if (arena != NULL) { |
358 | 0 | arena->Own(n); |
359 | 0 | } |
360 | 0 | return n; |
361 | 0 | } |
362 | | |
363 | 0 | void LogEntryPB::Clear() { |
364 | | // @@protoc_insertion_point(message_clear_start:yb.log.LogEntryPB) |
365 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
366 | | // Prevent compiler warnings about cached_has_bits being unused |
367 | 0 | (void) cached_has_bits; |
368 | |
|
369 | 0 | cached_has_bits = _has_bits_[0]; |
370 | 0 | if (cached_has_bits & 0x00000001u) { |
371 | 0 | GOOGLE_DCHECK(replicate_ != NULL); |
372 | 0 | replicate_->Clear(); |
373 | 0 | } |
374 | 0 | type_ = 0; |
375 | 0 | _has_bits_.Clear(); |
376 | 0 | _internal_metadata_.Clear(); |
377 | 0 | } |
378 | | |
379 | | bool LogEntryPB::MergePartialFromCodedStream( |
380 | 2.16M | ::google::protobuf::io::CodedInputStream* input) { |
381 | 4.32M | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure0 |
382 | 2.16M | ::google::protobuf::uint32 tag; |
383 | | // @@protoc_insertion_point(parse_start:yb.log.LogEntryPB) |
384 | 6.48M | for (;;) { |
385 | 6.48M | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
386 | 6.48M | tag = p.first; |
387 | 6.48M | if (!p.second) goto handle_unusual2.16M ; |
388 | 4.32M | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
389 | | // required .yb.log.LogEntryTypePB type = 1; |
390 | 2.16M | case 1: { |
391 | 2.16M | if (static_cast< ::google::protobuf::uint8>(tag) == |
392 | 2.16M | static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { |
393 | 2.16M | int value; |
394 | 2.16M | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
395 | 2.16M | int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
396 | 2.16M | input, &value))); |
397 | 2.16M | if (::yb::log::LogEntryTypePB_IsValid(value)) { |
398 | 2.16M | set_type(static_cast< ::yb::log::LogEntryTypePB >(value)); |
399 | 2.16M | } else { |
400 | 93 | mutable_unknown_fields()->AddVarint( |
401 | 93 | 1, static_cast< ::google::protobuf::uint64>(value)); |
402 | 93 | } |
403 | 18.4E | } else { |
404 | 18.4E | goto handle_unusual; |
405 | 18.4E | } |
406 | 2.16M | break; |
407 | 2.16M | } |
408 | | |
409 | | // optional .yb.consensus.ReplicateMsg replicate = 2; |
410 | 2.16M | case 2: { |
411 | 2.16M | if (static_cast< ::google::protobuf::uint8>(tag) == |
412 | 2.16M | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
413 | 2.16M | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
414 | 2.16M | input, mutable_replicate())); |
415 | 18.4E | } else { |
416 | 18.4E | goto handle_unusual; |
417 | 18.4E | } |
418 | 2.16M | break; |
419 | 2.16M | } |
420 | | |
421 | 2.16M | default: { |
422 | 2.16M | handle_unusual: |
423 | 2.16M | if (tag == 02.16M ) { |
424 | 2.16M | goto success; |
425 | 2.16M | } |
426 | 18.4E | DO_(::google::protobuf::internal::WireFormat::SkipField( |
427 | 18.4E | input, tag, _internal_metadata_.mutable_unknown_fields())); |
428 | 18.4E | break; |
429 | 18.4E | } |
430 | 4.32M | } |
431 | 4.32M | } |
432 | 2.16M | success: |
433 | | // @@protoc_insertion_point(parse_success:yb.log.LogEntryPB) |
434 | 2.16M | return true; |
435 | 0 | failure: |
436 | | // @@protoc_insertion_point(parse_failure:yb.log.LogEntryPB) |
437 | 0 | return false; |
438 | 2.16M | #undef DO_ |
439 | 2.16M | } |
440 | | |
441 | | void LogEntryPB::SerializeWithCachedSizes( |
442 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
443 | | // @@protoc_insertion_point(serialize_start:yb.log.LogEntryPB) |
444 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
445 | 0 | (void) cached_has_bits; |
446 | |
|
447 | 0 | cached_has_bits = _has_bits_[0]; |
448 | | // required .yb.log.LogEntryTypePB type = 1; |
449 | 0 | if (cached_has_bits & 0x00000002u) { |
450 | 0 | ::google::protobuf::internal::WireFormatLite::WriteEnum( |
451 | 0 | 1, this->type(), output); |
452 | 0 | } |
453 | | |
454 | | // optional .yb.consensus.ReplicateMsg replicate = 2; |
455 | 0 | if (cached_has_bits & 0x00000001u) { |
456 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
457 | 0 | 2, *this->replicate_, output); |
458 | 0 | } |
459 | |
|
460 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
461 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
462 | 0 | _internal_metadata_.unknown_fields(), output); |
463 | 0 | } |
464 | | // @@protoc_insertion_point(serialize_end:yb.log.LogEntryPB) |
465 | 0 | } |
466 | | |
467 | | ::google::protobuf::uint8* LogEntryPB::InternalSerializeWithCachedSizesToArray( |
468 | 15.3M | bool deterministic, ::google::protobuf::uint8* target) const { |
469 | 15.3M | (void)deterministic; // Unused |
470 | | // @@protoc_insertion_point(serialize_to_array_start:yb.log.LogEntryPB) |
471 | 15.3M | ::google::protobuf::uint32 cached_has_bits = 0; |
472 | 15.3M | (void) cached_has_bits; |
473 | | |
474 | 15.3M | cached_has_bits = _has_bits_[0]; |
475 | | // required .yb.log.LogEntryTypePB type = 1; |
476 | 15.3M | if (cached_has_bits & 0x00000002u) { |
477 | 15.3M | target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
478 | 15.3M | 1, this->type(), target); |
479 | 15.3M | } |
480 | | |
481 | | // optional .yb.consensus.ReplicateMsg replicate = 2; |
482 | 15.3M | if (cached_has_bits & 0x00000001u) { |
483 | 15.3M | target = ::google::protobuf::internal::WireFormatLite:: |
484 | 15.3M | InternalWriteMessageToArray( |
485 | 15.3M | 2, *this->replicate_, deterministic, target); |
486 | 15.3M | } |
487 | | |
488 | 15.3M | if (_internal_metadata_.have_unknown_fields()) { |
489 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
490 | 0 | _internal_metadata_.unknown_fields(), target); |
491 | 0 | } |
492 | | // @@protoc_insertion_point(serialize_to_array_end:yb.log.LogEntryPB) |
493 | 15.3M | return target; |
494 | 15.3M | } |
495 | | |
496 | 30.5M | size_t LogEntryPB::ByteSizeLong() const { |
497 | | // @@protoc_insertion_point(message_byte_size_start:yb.log.LogEntryPB) |
498 | 30.5M | size_t total_size = 0; |
499 | | |
500 | 30.5M | if (_internal_metadata_.have_unknown_fields()) { |
501 | 0 | total_size += |
502 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
503 | 0 | _internal_metadata_.unknown_fields()); |
504 | 0 | } |
505 | | // required .yb.log.LogEntryTypePB type = 1; |
506 | 30.5M | if (has_type()) { |
507 | 30.5M | total_size += 1 + |
508 | 30.5M | ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); |
509 | 30.5M | } |
510 | | // optional .yb.consensus.ReplicateMsg replicate = 2; |
511 | 30.5M | if (has_replicate()) { |
512 | 30.5M | total_size += 1 + |
513 | 30.5M | ::google::protobuf::internal::WireFormatLite::MessageSize( |
514 | 30.5M | *this->replicate_); |
515 | 30.5M | } |
516 | | |
517 | 30.5M | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
518 | 30.5M | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
519 | 30.5M | _cached_size_ = cached_size; |
520 | 30.5M | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
521 | 30.5M | return total_size; |
522 | 30.5M | } |
523 | | |
524 | 0 | void LogEntryPB::MergeFrom(const ::google::protobuf::Message& from) { |
525 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.log.LogEntryPB) |
526 | 0 | GOOGLE_DCHECK_NE(&from, this); |
527 | 0 | const LogEntryPB* source = |
528 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const LogEntryPB>( |
529 | 0 | &from); |
530 | 0 | if (source == NULL) { |
531 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.log.LogEntryPB) |
532 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
533 | 0 | } else { |
534 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.log.LogEntryPB) |
535 | 0 | MergeFrom(*source); |
536 | 0 | } |
537 | 0 | } |
538 | | |
539 | 0 | void LogEntryPB::MergeFrom(const LogEntryPB& from) { |
540 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.log.LogEntryPB) |
541 | 0 | GOOGLE_DCHECK_NE(&from, this); |
542 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
543 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
544 | 0 | (void) cached_has_bits; |
545 | |
|
546 | 0 | cached_has_bits = from._has_bits_[0]; |
547 | 0 | if (cached_has_bits & 3u) { |
548 | 0 | if (cached_has_bits & 0x00000001u) { |
549 | 0 | mutable_replicate()->::yb::consensus::ReplicateMsg::MergeFrom(from.replicate()); |
550 | 0 | } |
551 | 0 | if (cached_has_bits & 0x00000002u) { |
552 | 0 | type_ = from.type_; |
553 | 0 | } |
554 | 0 | _has_bits_[0] |= cached_has_bits; |
555 | 0 | } |
556 | 0 | } |
557 | | |
558 | 0 | void LogEntryPB::CopyFrom(const ::google::protobuf::Message& from) { |
559 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.log.LogEntryPB) |
560 | 0 | if (&from == this) return; |
561 | 0 | Clear(); |
562 | 0 | MergeFrom(from); |
563 | 0 | } |
564 | | |
565 | 0 | void LogEntryPB::CopyFrom(const LogEntryPB& from) { |
566 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.log.LogEntryPB) |
567 | 0 | if (&from == this) return; |
568 | 0 | Clear(); |
569 | 0 | MergeFrom(from); |
570 | 0 | } |
571 | | |
572 | 17.4M | bool LogEntryPB::IsInitialized() const { |
573 | 17.4M | if ((_has_bits_[0] & 0x00000002) != 0x00000002) return false0 ; |
574 | 17.4M | if (17.4M has_replicate()17.4M ) { |
575 | 17.4M | if (!this->replicate_->IsInitialized()) return false0 ; |
576 | 17.4M | } |
577 | 17.4M | return true; |
578 | 17.4M | } |
579 | | |
580 | 0 | void LogEntryPB::Swap(LogEntryPB* other) { |
581 | 0 | if (other == this) return; |
582 | 0 | InternalSwap(other); |
583 | 0 | } |
584 | 0 | void LogEntryPB::InternalSwap(LogEntryPB* other) { |
585 | 0 | using std::swap; |
586 | 0 | swap(replicate_, other->replicate_); |
587 | 0 | swap(type_, other->type_); |
588 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
589 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
590 | 0 | swap(_cached_size_, other->_cached_size_); |
591 | 0 | } |
592 | | |
593 | 2.83k | ::google::protobuf::Metadata LogEntryPB::GetMetadata() const { |
594 | 2.83k | protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce(); |
595 | 2.83k | return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages]; |
596 | 2.83k | } |
597 | | |
598 | | |
599 | | // =================================================================== |
600 | | |
601 | 16.5k | void LogEntryBatchPB::InitAsDefaultInstance() { |
602 | 16.5k | ::yb::log::_LogEntryBatchPB_default_instance_._instance.get_mutable()->committed_op_id_ = const_cast< ::yb::OpIdPB*>( |
603 | 16.5k | ::yb::OpIdPB::internal_default_instance()); |
604 | 16.5k | } |
605 | 0 | void LogEntryBatchPB::clear_committed_op_id() { |
606 | 0 | if (committed_op_id_ != NULL) committed_op_id_->Clear(); |
607 | 0 | clear_has_committed_op_id(); |
608 | 0 | } |
609 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
610 | | const int LogEntryBatchPB::kEntryFieldNumber; |
611 | | const int LogEntryBatchPB::kCommittedOpIdFieldNumber; |
612 | | const int LogEntryBatchPB::kMonoTimeFieldNumber; |
613 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
614 | | |
615 | | LogEntryBatchPB::LogEntryBatchPB() |
616 | 59.9M | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
617 | 59.9M | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
618 | 59.9M | ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogEntryBatchPB(); |
619 | 59.9M | } |
620 | 59.9M | SharedCtor(); |
621 | | // @@protoc_insertion_point(constructor:yb.log.LogEntryBatchPB) |
622 | 59.9M | } |
623 | | LogEntryBatchPB::LogEntryBatchPB(const LogEntryBatchPB& from) |
624 | | : ::google::protobuf::Message(), |
625 | | _internal_metadata_(NULL), |
626 | | _has_bits_(from._has_bits_), |
627 | | _cached_size_(0), |
628 | 0 | entry_(from.entry_) { |
629 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
630 | 0 | if (from.has_committed_op_id()) { |
631 | 0 | committed_op_id_ = new ::yb::OpIdPB(*from.committed_op_id_); |
632 | 0 | } else { |
633 | 0 | committed_op_id_ = NULL; |
634 | 0 | } |
635 | 0 | mono_time_ = from.mono_time_; |
636 | | // @@protoc_insertion_point(copy_constructor:yb.log.LogEntryBatchPB) |
637 | 0 | } |
638 | | |
639 | 59.9M | void LogEntryBatchPB::SharedCtor() { |
640 | 59.9M | _cached_size_ = 0; |
641 | 59.9M | ::memset(&committed_op_id_, 0, static_cast<size_t>( |
642 | 59.9M | reinterpret_cast<char*>(&mono_time_) - |
643 | 59.9M | reinterpret_cast<char*>(&committed_op_id_)) + sizeof(mono_time_)); |
644 | 59.9M | } |
645 | | |
646 | 59.9M | LogEntryBatchPB::~LogEntryBatchPB() { |
647 | | // @@protoc_insertion_point(destructor:yb.log.LogEntryBatchPB) |
648 | 59.9M | SharedDtor(); |
649 | 59.9M | } |
650 | | |
651 | 59.9M | void LogEntryBatchPB::SharedDtor() { |
652 | 59.9M | if (this != internal_default_instance()) delete committed_op_id_59.9M ; |
653 | 59.9M | } |
654 | | |
655 | 0 | void LogEntryBatchPB::SetCachedSize(int size) const { |
656 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
657 | 0 | _cached_size_ = size; |
658 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
659 | 0 | } |
660 | 0 | const ::google::protobuf::Descriptor* LogEntryBatchPB::descriptor() { |
661 | 0 | ::protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce(); |
662 | 0 | return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
663 | 0 | } |
664 | | |
665 | 0 | const LogEntryBatchPB& LogEntryBatchPB::default_instance() { |
666 | 0 | ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogEntryBatchPB(); |
667 | 0 | return *internal_default_instance(); |
668 | 0 | } |
669 | | |
670 | 0 | LogEntryBatchPB* LogEntryBatchPB::New(::google::protobuf::Arena* arena) const { |
671 | 0 | LogEntryBatchPB* n = new LogEntryBatchPB; |
672 | 0 | if (arena != NULL) { |
673 | 0 | arena->Own(n); |
674 | 0 | } |
675 | 0 | return n; |
676 | 0 | } |
677 | | |
678 | 3.56M | void LogEntryBatchPB::Clear() { |
679 | | // @@protoc_insertion_point(message_clear_start:yb.log.LogEntryBatchPB) |
680 | 3.56M | ::google::protobuf::uint32 cached_has_bits = 0; |
681 | | // Prevent compiler warnings about cached_has_bits being unused |
682 | 3.56M | (void) cached_has_bits; |
683 | | |
684 | 3.56M | entry_.Clear(); |
685 | 3.56M | cached_has_bits = _has_bits_[0]; |
686 | 3.56M | if (cached_has_bits & 0x00000001u) { |
687 | 0 | GOOGLE_DCHECK(committed_op_id_ != NULL); |
688 | 0 | committed_op_id_->Clear(); |
689 | 0 | } |
690 | 3.56M | mono_time_ = GOOGLE_ULONGLONG(0); |
691 | 3.56M | _has_bits_.Clear(); |
692 | 3.56M | _internal_metadata_.Clear(); |
693 | 3.56M | } |
694 | | |
695 | | bool LogEntryBatchPB::MergePartialFromCodedStream( |
696 | 3.56M | ::google::protobuf::io::CodedInputStream* input) { |
697 | 9.25M | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure0 |
698 | 3.56M | ::google::protobuf::uint32 tag; |
699 | | // @@protoc_insertion_point(parse_start:yb.log.LogEntryBatchPB) |
700 | 12.8M | for (;;) { |
701 | 12.8M | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
702 | 12.8M | tag = p.first; |
703 | 12.8M | if (!p.second) goto handle_unusual3.56M ; |
704 | 9.24M | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
705 | | // repeated .yb.log.LogEntryPB entry = 1; |
706 | 2.16M | case 1: { |
707 | 2.16M | if (static_cast< ::google::protobuf::uint8>(tag) == |
708 | 2.16M | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
709 | 2.16M | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_entry())); |
710 | 2.16M | } else { |
711 | 0 | goto handle_unusual; |
712 | 0 | } |
713 | 2.16M | break; |
714 | 2.16M | } |
715 | | |
716 | | // optional .yb.OpIdPB committed_op_id = 2; |
717 | 3.52M | case 2: { |
718 | 3.52M | if (static_cast< ::google::protobuf::uint8>(tag) == |
719 | 3.52M | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
720 | 3.52M | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
721 | 3.52M | input, mutable_committed_op_id())); |
722 | 18.4E | } else { |
723 | 18.4E | goto handle_unusual; |
724 | 18.4E | } |
725 | 3.52M | break; |
726 | 3.52M | } |
727 | | |
728 | | // optional uint64 mono_time = 3; |
729 | 3.56M | case 3: { |
730 | 3.56M | if (static_cast< ::google::protobuf::uint8>(tag) == |
731 | 3.56M | static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { |
732 | 3.56M | set_has_mono_time(); |
733 | 3.56M | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
734 | 3.56M | ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
735 | 3.56M | input, &mono_time_))); |
736 | 3.56M | } else { |
737 | 4 | goto handle_unusual; |
738 | 4 | } |
739 | 3.56M | break; |
740 | 3.56M | } |
741 | | |
742 | 3.56M | default: { |
743 | 3.56M | handle_unusual: |
744 | 3.56M | if (tag == 03.56M ) { |
745 | 3.56M | goto success; |
746 | 3.56M | } |
747 | 18.4E | DO_(::google::protobuf::internal::WireFormat::SkipField( |
748 | 18.4E | input, tag, _internal_metadata_.mutable_unknown_fields())); |
749 | 18.4E | break; |
750 | 18.4E | } |
751 | 9.24M | } |
752 | 9.24M | } |
753 | 3.56M | success: |
754 | | // @@protoc_insertion_point(parse_success:yb.log.LogEntryBatchPB) |
755 | 3.56M | return true; |
756 | 0 | failure: |
757 | | // @@protoc_insertion_point(parse_failure:yb.log.LogEntryBatchPB) |
758 | 0 | return false; |
759 | 3.56M | #undef DO_ |
760 | 3.56M | } |
761 | | |
762 | | void LogEntryBatchPB::SerializeWithCachedSizes( |
763 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
764 | | // @@protoc_insertion_point(serialize_start:yb.log.LogEntryBatchPB) |
765 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
766 | 0 | (void) cached_has_bits; |
767 | | |
768 | | // repeated .yb.log.LogEntryPB entry = 1; |
769 | 0 | for (unsigned int i = 0, |
770 | 0 | n = static_cast<unsigned int>(this->entry_size()); i < n; i++) { |
771 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
772 | 0 | 1, this->entry(static_cast<int>(i)), output); |
773 | 0 | } |
774 | |
|
775 | 0 | cached_has_bits = _has_bits_[0]; |
776 | | // optional .yb.OpIdPB committed_op_id = 2; |
777 | 0 | if (cached_has_bits & 0x00000001u) { |
778 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
779 | 0 | 2, *this->committed_op_id_, output); |
780 | 0 | } |
781 | | |
782 | | // optional uint64 mono_time = 3; |
783 | 0 | if (cached_has_bits & 0x00000002u) { |
784 | 0 | ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->mono_time(), output); |
785 | 0 | } |
786 | |
|
787 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
788 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
789 | 0 | _internal_metadata_.unknown_fields(), output); |
790 | 0 | } |
791 | | // @@protoc_insertion_point(serialize_end:yb.log.LogEntryBatchPB) |
792 | 0 | } |
793 | | |
794 | | ::google::protobuf::uint8* LogEntryBatchPB::InternalSerializeWithCachedSizesToArray( |
795 | 25.0M | bool deterministic, ::google::protobuf::uint8* target) const { |
796 | 25.0M | (void)deterministic; // Unused |
797 | | // @@protoc_insertion_point(serialize_to_array_start:yb.log.LogEntryBatchPB) |
798 | 25.0M | ::google::protobuf::uint32 cached_has_bits = 0; |
799 | 25.0M | (void) cached_has_bits; |
800 | | |
801 | | // repeated .yb.log.LogEntryPB entry = 1; |
802 | 25.0M | for (unsigned int i = 0, |
803 | 40.3M | n = static_cast<unsigned int>(this->entry_size()); i < n; i++15.2M ) { |
804 | 15.2M | target = ::google::protobuf::internal::WireFormatLite:: |
805 | 15.2M | InternalWriteMessageToArray( |
806 | 15.2M | 1, this->entry(static_cast<int>(i)), deterministic, target); |
807 | 15.2M | } |
808 | | |
809 | 25.0M | cached_has_bits = _has_bits_[0]; |
810 | | // optional .yb.OpIdPB committed_op_id = 2; |
811 | 25.0M | if (cached_has_bits & 0x00000001u) { |
812 | 24.7M | target = ::google::protobuf::internal::WireFormatLite:: |
813 | 24.7M | InternalWriteMessageToArray( |
814 | 24.7M | 2, *this->committed_op_id_, deterministic, target); |
815 | 24.7M | } |
816 | | |
817 | | // optional uint64 mono_time = 3; |
818 | 25.0M | if (cached_has_bits & 0x00000002u) { |
819 | 25.0M | target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->mono_time(), target); |
820 | 25.0M | } |
821 | | |
822 | 25.0M | if (_internal_metadata_.have_unknown_fields()) { |
823 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
824 | 0 | _internal_metadata_.unknown_fields(), target); |
825 | 0 | } |
826 | | // @@protoc_insertion_point(serialize_to_array_end:yb.log.LogEntryBatchPB) |
827 | 25.0M | return target; |
828 | 25.0M | } |
829 | | |
830 | 50.1M | size_t LogEntryBatchPB::ByteSizeLong() const { |
831 | | // @@protoc_insertion_point(message_byte_size_start:yb.log.LogEntryBatchPB) |
832 | 50.1M | size_t total_size = 0; |
833 | | |
834 | 50.1M | if (_internal_metadata_.have_unknown_fields()) { |
835 | 0 | total_size += |
836 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
837 | 0 | _internal_metadata_.unknown_fields()); |
838 | 0 | } |
839 | | // repeated .yb.log.LogEntryPB entry = 1; |
840 | 50.1M | { |
841 | 50.1M | unsigned int count = static_cast<unsigned int>(this->entry_size()); |
842 | 50.1M | total_size += 1UL * count; |
843 | 80.7M | for (unsigned int i = 0; i < count; i++30.5M ) { |
844 | 30.5M | total_size += |
845 | 30.5M | ::google::protobuf::internal::WireFormatLite::MessageSize( |
846 | 30.5M | this->entry(static_cast<int>(i))); |
847 | 30.5M | } |
848 | 50.1M | } |
849 | | |
850 | 50.1M | if (_has_bits_[0 / 32] & 3u50.1M ) { |
851 | | // optional .yb.OpIdPB committed_op_id = 2; |
852 | 50.1M | if (has_committed_op_id()) { |
853 | 49.5M | total_size += 1 + |
854 | 49.5M | ::google::protobuf::internal::WireFormatLite::MessageSize( |
855 | 49.5M | *this->committed_op_id_); |
856 | 49.5M | } |
857 | | |
858 | | // optional uint64 mono_time = 3; |
859 | 50.1M | if (has_mono_time()) { |
860 | 50.1M | total_size += 1 + |
861 | 50.1M | ::google::protobuf::internal::WireFormatLite::UInt64Size( |
862 | 50.1M | this->mono_time()); |
863 | 50.1M | } |
864 | | |
865 | 50.1M | } |
866 | 50.1M | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
867 | 50.1M | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
868 | 50.1M | _cached_size_ = cached_size; |
869 | 50.1M | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
870 | 50.1M | return total_size; |
871 | 50.1M | } |
872 | | |
873 | 0 | void LogEntryBatchPB::MergeFrom(const ::google::protobuf::Message& from) { |
874 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.log.LogEntryBatchPB) |
875 | 0 | GOOGLE_DCHECK_NE(&from, this); |
876 | 0 | const LogEntryBatchPB* source = |
877 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const LogEntryBatchPB>( |
878 | 0 | &from); |
879 | 0 | if (source == NULL) { |
880 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.log.LogEntryBatchPB) |
881 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
882 | 0 | } else { |
883 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.log.LogEntryBatchPB) |
884 | 0 | MergeFrom(*source); |
885 | 0 | } |
886 | 0 | } |
887 | | |
888 | 0 | void LogEntryBatchPB::MergeFrom(const LogEntryBatchPB& from) { |
889 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.log.LogEntryBatchPB) |
890 | 0 | GOOGLE_DCHECK_NE(&from, this); |
891 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
892 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
893 | 0 | (void) cached_has_bits; |
894 | |
|
895 | 0 | entry_.MergeFrom(from.entry_); |
896 | 0 | cached_has_bits = from._has_bits_[0]; |
897 | 0 | if (cached_has_bits & 3u) { |
898 | 0 | if (cached_has_bits & 0x00000001u) { |
899 | 0 | mutable_committed_op_id()->::yb::OpIdPB::MergeFrom(from.committed_op_id()); |
900 | 0 | } |
901 | 0 | if (cached_has_bits & 0x00000002u) { |
902 | 0 | mono_time_ = from.mono_time_; |
903 | 0 | } |
904 | 0 | _has_bits_[0] |= cached_has_bits; |
905 | 0 | } |
906 | 0 | } |
907 | | |
908 | 0 | void LogEntryBatchPB::CopyFrom(const ::google::protobuf::Message& from) { |
909 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.log.LogEntryBatchPB) |
910 | 0 | if (&from == this) return; |
911 | 0 | Clear(); |
912 | 0 | MergeFrom(from); |
913 | 0 | } |
914 | | |
915 | 0 | void LogEntryBatchPB::CopyFrom(const LogEntryBatchPB& from) { |
916 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.log.LogEntryBatchPB) |
917 | 0 | if (&from == this) return; |
918 | 0 | Clear(); |
919 | 0 | MergeFrom(from); |
920 | 0 | } |
921 | | |
922 | 28.6M | bool LogEntryBatchPB::IsInitialized() const { |
923 | 28.6M | if (!::google::protobuf::internal::AllAreInitialized(this->entry())) return false0 ; |
924 | 28.6M | if (has_committed_op_id()) { |
925 | 28.2M | if (!this->committed_op_id_->IsInitialized()) return false0 ; |
926 | 28.2M | } |
927 | 28.6M | return true; |
928 | 28.6M | } |
929 | | |
930 | 3.56M | void LogEntryBatchPB::Swap(LogEntryBatchPB* other) { |
931 | 3.56M | if (other == this) return0 ; |
932 | 3.56M | InternalSwap(other); |
933 | 3.56M | } |
934 | 30.0M | void LogEntryBatchPB::InternalSwap(LogEntryBatchPB* other) { |
935 | 30.0M | using std::swap; |
936 | 30.0M | entry_.InternalSwap(&other->entry_); |
937 | 30.0M | swap(committed_op_id_, other->committed_op_id_); |
938 | 30.0M | swap(mono_time_, other->mono_time_); |
939 | 30.0M | swap(_has_bits_[0], other->_has_bits_[0]); |
940 | 30.0M | _internal_metadata_.Swap(&other->_internal_metadata_); |
941 | 30.0M | swap(_cached_size_, other->_cached_size_); |
942 | 30.0M | } |
943 | | |
944 | 0 | ::google::protobuf::Metadata LogEntryBatchPB::GetMetadata() const { |
945 | 0 | protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce(); |
946 | 0 | return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages]; |
947 | 0 | } |
948 | | |
949 | | |
950 | | // =================================================================== |
951 | | |
952 | 16.5k | void LogSegmentHeaderPB::InitAsDefaultInstance() { |
953 | 16.5k | ::yb::log::_LogSegmentHeaderPB_default_instance_._instance.get_mutable()->unused_schema_ = const_cast< ::yb::SchemaPB*>( |
954 | 16.5k | ::yb::SchemaPB::internal_default_instance()); |
955 | 16.5k | } |
956 | 0 | void LogSegmentHeaderPB::clear_unused_schema() { |
957 | 0 | if (unused_schema_ != NULL) unused_schema_->Clear(); |
958 | 0 | clear_has_unused_schema(); |
959 | 0 | } |
960 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
961 | | const int LogSegmentHeaderPB::kMajorVersionFieldNumber; |
962 | | const int LogSegmentHeaderPB::kMinorVersionFieldNumber; |
963 | | const int LogSegmentHeaderPB::kUnusedTabletIdFieldNumber; |
964 | | const int LogSegmentHeaderPB::kSequenceNumberFieldNumber; |
965 | | const int LogSegmentHeaderPB::kUnusedSchemaFieldNumber; |
966 | | const int LogSegmentHeaderPB::kUnusedSchemaVersionFieldNumber; |
967 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
968 | | |
969 | | LogSegmentHeaderPB::LogSegmentHeaderPB() |
970 | 602k | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
971 | 602k | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
972 | 585k | ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogSegmentHeaderPB(); |
973 | 585k | } |
974 | 602k | SharedCtor(); |
975 | | // @@protoc_insertion_point(constructor:yb.log.LogSegmentHeaderPB) |
976 | 602k | } |
977 | | LogSegmentHeaderPB::LogSegmentHeaderPB(const LogSegmentHeaderPB& from) |
978 | | : ::google::protobuf::Message(), |
979 | | _internal_metadata_(NULL), |
980 | | _has_bits_(from._has_bits_), |
981 | 0 | _cached_size_(0) { |
982 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
983 | 0 | unused_tablet_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
984 | 0 | if (from.has_unused_tablet_id()) { |
985 | 0 | unused_tablet_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.unused_tablet_id_); |
986 | 0 | } |
987 | 0 | if (from.has_unused_schema()) { |
988 | 0 | unused_schema_ = new ::yb::SchemaPB(*from.unused_schema_); |
989 | 0 | } else { |
990 | 0 | unused_schema_ = NULL; |
991 | 0 | } |
992 | 0 | ::memcpy(&major_version_, &from.major_version_, |
993 | 0 | static_cast<size_t>(reinterpret_cast<char*>(&unused_schema_version_) - |
994 | 0 | reinterpret_cast<char*>(&major_version_)) + sizeof(unused_schema_version_)); |
995 | | // @@protoc_insertion_point(copy_constructor:yb.log.LogSegmentHeaderPB) |
996 | 0 | } |
997 | | |
998 | 602k | void LogSegmentHeaderPB::SharedCtor() { |
999 | 602k | _cached_size_ = 0; |
1000 | 602k | unused_tablet_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1001 | 602k | ::memset(&unused_schema_, 0, static_cast<size_t>( |
1002 | 602k | reinterpret_cast<char*>(&unused_schema_version_) - |
1003 | 602k | reinterpret_cast<char*>(&unused_schema_)) + sizeof(unused_schema_version_)); |
1004 | 602k | } |
1005 | | |
1006 | 431k | LogSegmentHeaderPB::~LogSegmentHeaderPB() { |
1007 | | // @@protoc_insertion_point(destructor:yb.log.LogSegmentHeaderPB) |
1008 | 431k | SharedDtor(); |
1009 | 431k | } |
1010 | | |
1011 | 431k | void LogSegmentHeaderPB::SharedDtor() { |
1012 | 431k | unused_tablet_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1013 | 431k | if (this != internal_default_instance()) delete unused_schema_430k ; |
1014 | 431k | } |
1015 | | |
1016 | 0 | void LogSegmentHeaderPB::SetCachedSize(int size) const { |
1017 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1018 | 0 | _cached_size_ = size; |
1019 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1020 | 0 | } |
1021 | 0 | const ::google::protobuf::Descriptor* LogSegmentHeaderPB::descriptor() { |
1022 | 0 | ::protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce(); |
1023 | 0 | return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
1024 | 0 | } |
1025 | | |
1026 | 0 | const LogSegmentHeaderPB& LogSegmentHeaderPB::default_instance() { |
1027 | 0 | ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogSegmentHeaderPB(); |
1028 | 0 | return *internal_default_instance(); |
1029 | 0 | } |
1030 | | |
1031 | 0 | LogSegmentHeaderPB* LogSegmentHeaderPB::New(::google::protobuf::Arena* arena) const { |
1032 | 0 | LogSegmentHeaderPB* n = new LogSegmentHeaderPB; |
1033 | 0 | if (arena != NULL) { |
1034 | 0 | arena->Own(n); |
1035 | 0 | } |
1036 | 0 | return n; |
1037 | 0 | } |
1038 | | |
1039 | 425k | void LogSegmentHeaderPB::Clear() { |
1040 | | // @@protoc_insertion_point(message_clear_start:yb.log.LogSegmentHeaderPB) |
1041 | 425k | ::google::protobuf::uint32 cached_has_bits = 0; |
1042 | | // Prevent compiler warnings about cached_has_bits being unused |
1043 | 425k | (void) cached_has_bits; |
1044 | | |
1045 | 425k | cached_has_bits = _has_bits_[0]; |
1046 | 425k | if (cached_has_bits & 3u) { |
1047 | 0 | if (cached_has_bits & 0x00000001u) { |
1048 | 0 | GOOGLE_DCHECK(!unused_tablet_id_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); |
1049 | 0 | (*unused_tablet_id_.UnsafeRawStringPointer())->clear(); |
1050 | 0 | } |
1051 | 0 | if (cached_has_bits & 0x00000002u) { |
1052 | 0 | GOOGLE_DCHECK(unused_schema_ != NULL); |
1053 | 0 | unused_schema_->Clear(); |
1054 | 0 | } |
1055 | 0 | } |
1056 | 425k | if (cached_has_bits & 60u) { |
1057 | 0 | ::memset(&major_version_, 0, static_cast<size_t>( |
1058 | 0 | reinterpret_cast<char*>(&unused_schema_version_) - |
1059 | 0 | reinterpret_cast<char*>(&major_version_)) + sizeof(unused_schema_version_)); |
1060 | 0 | } |
1061 | 425k | _has_bits_.Clear(); |
1062 | 425k | _internal_metadata_.Clear(); |
1063 | 425k | } |
1064 | | |
1065 | | bool LogSegmentHeaderPB::MergePartialFromCodedStream( |
1066 | 10.6k | ::google::protobuf::io::CodedInputStream* input) { |
1067 | 63.5k | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure0 |
1068 | 10.6k | ::google::protobuf::uint32 tag; |
1069 | | // @@protoc_insertion_point(parse_start:yb.log.LogSegmentHeaderPB) |
1070 | 74.0k | for (;;) { |
1071 | 74.0k | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1072 | 74.0k | tag = p.first; |
1073 | 74.0k | if (!p.second) goto handle_unusual10.5k ; |
1074 | 63.5k | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1075 | | // required uint32 major_version = 1; |
1076 | 10.5k | case 1: { |
1077 | 10.5k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1078 | 10.5k | static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { |
1079 | 10.5k | set_has_major_version(); |
1080 | 10.5k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1081 | 10.5k | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
1082 | 10.5k | input, &major_version_))); |
1083 | 18.4E | } else { |
1084 | 18.4E | goto handle_unusual; |
1085 | 18.4E | } |
1086 | 10.5k | break; |
1087 | 10.5k | } |
1088 | | |
1089 | | // required uint32 minor_version = 2; |
1090 | 10.5k | case 2: { |
1091 | 10.5k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1092 | 10.5k | static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { |
1093 | 10.5k | set_has_minor_version(); |
1094 | 10.5k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1095 | 10.5k | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
1096 | 10.5k | input, &minor_version_))); |
1097 | 10.5k | } else { |
1098 | 2 | goto handle_unusual; |
1099 | 2 | } |
1100 | 10.5k | break; |
1101 | 10.5k | } |
1102 | | |
1103 | | // required bytes unused_tablet_id = 5; |
1104 | 10.5k | case 5: { |
1105 | 10.5k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1106 | 10.5k | static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { |
1107 | 10.5k | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
1108 | 10.5k | input, this->mutable_unused_tablet_id())); |
1109 | 10.5k | } else { |
1110 | 0 | goto handle_unusual; |
1111 | 0 | } |
1112 | 10.5k | break; |
1113 | 10.5k | } |
1114 | | |
1115 | | // required uint64 sequence_number = 6; |
1116 | 10.5k | case 6: { |
1117 | 10.5k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1118 | 10.5k | static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { |
1119 | 10.5k | set_has_sequence_number(); |
1120 | 10.5k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1121 | 10.5k | ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( |
1122 | 10.5k | input, &sequence_number_))); |
1123 | 18.4E | } else { |
1124 | 18.4E | goto handle_unusual; |
1125 | 18.4E | } |
1126 | 10.5k | break; |
1127 | 10.5k | } |
1128 | | |
1129 | | // required .yb.SchemaPB unused_schema = 7; |
1130 | 10.5k | case 7: { |
1131 | 10.5k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1132 | 10.5k | static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { |
1133 | 10.5k | DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( |
1134 | 10.5k | input, mutable_unused_schema())); |
1135 | 18.4E | } else { |
1136 | 18.4E | goto handle_unusual; |
1137 | 18.4E | } |
1138 | 10.5k | break; |
1139 | 10.5k | } |
1140 | | |
1141 | | // optional uint32 unused_schema_version = 8; |
1142 | 10.5k | case 8: { |
1143 | 10.5k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1144 | 10.5k | static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) { |
1145 | 10.5k | set_has_unused_schema_version(); |
1146 | 10.5k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1147 | 10.5k | ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( |
1148 | 10.5k | input, &unused_schema_version_))); |
1149 | 18.4E | } else { |
1150 | 18.4E | goto handle_unusual; |
1151 | 18.4E | } |
1152 | 10.5k | break; |
1153 | 10.5k | } |
1154 | | |
1155 | 10.5k | default: { |
1156 | 10.5k | handle_unusual: |
1157 | 10.5k | if (tag == 010.5k ) { |
1158 | 10.5k | goto success; |
1159 | 10.5k | } |
1160 | 18.4E | DO_(::google::protobuf::internal::WireFormat::SkipField( |
1161 | 18.4E | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1162 | 18.4E | break; |
1163 | 18.4E | } |
1164 | 63.5k | } |
1165 | 63.5k | } |
1166 | 10.5k | success: |
1167 | | // @@protoc_insertion_point(parse_success:yb.log.LogSegmentHeaderPB) |
1168 | 10.5k | return true; |
1169 | 0 | failure: |
1170 | | // @@protoc_insertion_point(parse_failure:yb.log.LogSegmentHeaderPB) |
1171 | 0 | return false; |
1172 | 10.6k | #undef DO_ |
1173 | 10.6k | } |
1174 | | |
1175 | | void LogSegmentHeaderPB::SerializeWithCachedSizes( |
1176 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
1177 | | // @@protoc_insertion_point(serialize_start:yb.log.LogSegmentHeaderPB) |
1178 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1179 | 0 | (void) cached_has_bits; |
1180 | |
|
1181 | 0 | cached_has_bits = _has_bits_[0]; |
1182 | | // required uint32 major_version = 1; |
1183 | 0 | if (cached_has_bits & 0x00000004u) { |
1184 | 0 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->major_version(), output); |
1185 | 0 | } |
1186 | | |
1187 | | // required uint32 minor_version = 2; |
1188 | 0 | if (cached_has_bits & 0x00000008u) { |
1189 | 0 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->minor_version(), output); |
1190 | 0 | } |
1191 | | |
1192 | | // required bytes unused_tablet_id = 5; |
1193 | 0 | if (cached_has_bits & 0x00000001u) { |
1194 | 0 | ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( |
1195 | 0 | 5, this->unused_tablet_id(), output); |
1196 | 0 | } |
1197 | | |
1198 | | // required uint64 sequence_number = 6; |
1199 | 0 | if (cached_has_bits & 0x00000010u) { |
1200 | 0 | ::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->sequence_number(), output); |
1201 | 0 | } |
1202 | | |
1203 | | // required .yb.SchemaPB unused_schema = 7; |
1204 | 0 | if (cached_has_bits & 0x00000002u) { |
1205 | 0 | ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( |
1206 | 0 | 7, *this->unused_schema_, output); |
1207 | 0 | } |
1208 | | |
1209 | | // optional uint32 unused_schema_version = 8; |
1210 | 0 | if (cached_has_bits & 0x00000020u) { |
1211 | 0 | ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->unused_schema_version(), output); |
1212 | 0 | } |
1213 | |
|
1214 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1215 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
1216 | 0 | _internal_metadata_.unknown_fields(), output); |
1217 | 0 | } |
1218 | | // @@protoc_insertion_point(serialize_end:yb.log.LogSegmentHeaderPB) |
1219 | 0 | } |
1220 | | |
1221 | | ::google::protobuf::uint8* LogSegmentHeaderPB::InternalSerializeWithCachedSizesToArray( |
1222 | 159k | bool deterministic, ::google::protobuf::uint8* target) const { |
1223 | 159k | (void)deterministic; // Unused |
1224 | | // @@protoc_insertion_point(serialize_to_array_start:yb.log.LogSegmentHeaderPB) |
1225 | 159k | ::google::protobuf::uint32 cached_has_bits = 0; |
1226 | 159k | (void) cached_has_bits; |
1227 | | |
1228 | 159k | cached_has_bits = _has_bits_[0]; |
1229 | | // required uint32 major_version = 1; |
1230 | 159k | if (cached_has_bits & 0x00000004u) { |
1231 | 159k | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->major_version(), target); |
1232 | 159k | } |
1233 | | |
1234 | | // required uint32 minor_version = 2; |
1235 | 159k | if (cached_has_bits & 0x00000008u159k ) { |
1236 | 159k | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->minor_version(), target); |
1237 | 159k | } |
1238 | | |
1239 | | // required bytes unused_tablet_id = 5; |
1240 | 159k | if (cached_has_bits & 0x00000001u159k ) { |
1241 | 159k | target = |
1242 | 159k | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
1243 | 159k | 5, this->unused_tablet_id(), target); |
1244 | 159k | } |
1245 | | |
1246 | | // required uint64 sequence_number = 6; |
1247 | 159k | if (cached_has_bits & 0x00000010u159k ) { |
1248 | 159k | target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(6, this->sequence_number(), target); |
1249 | 159k | } |
1250 | | |
1251 | | // required .yb.SchemaPB unused_schema = 7; |
1252 | 159k | if (cached_has_bits & 0x00000002u159k ) { |
1253 | 159k | target = ::google::protobuf::internal::WireFormatLite:: |
1254 | 159k | InternalWriteMessageToArray( |
1255 | 159k | 7, *this->unused_schema_, deterministic, target); |
1256 | 159k | } |
1257 | | |
1258 | | // optional uint32 unused_schema_version = 8; |
1259 | 159k | if (cached_has_bits & 0x00000020u159k ) { |
1260 | 159k | target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->unused_schema_version(), target); |
1261 | 159k | } |
1262 | | |
1263 | 159k | if (_internal_metadata_.have_unknown_fields()) { |
1264 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
1265 | 0 | _internal_metadata_.unknown_fields(), target); |
1266 | 0 | } |
1267 | | // @@protoc_insertion_point(serialize_to_array_end:yb.log.LogSegmentHeaderPB) |
1268 | 159k | return target; |
1269 | 159k | } |
1270 | | |
1271 | 0 | size_t LogSegmentHeaderPB::RequiredFieldsByteSizeFallback() const { |
1272 | | // @@protoc_insertion_point(required_fields_byte_size_fallback_start:yb.log.LogSegmentHeaderPB) |
1273 | 0 | size_t total_size = 0; |
1274 | |
|
1275 | 0 | if (has_unused_tablet_id()) { |
1276 | | // required bytes unused_tablet_id = 5; |
1277 | 0 | total_size += 1 + |
1278 | 0 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
1279 | 0 | this->unused_tablet_id()); |
1280 | 0 | } |
1281 | |
|
1282 | 0 | if (has_unused_schema()) { |
1283 | | // required .yb.SchemaPB unused_schema = 7; |
1284 | 0 | total_size += 1 + |
1285 | 0 | ::google::protobuf::internal::WireFormatLite::MessageSize( |
1286 | 0 | *this->unused_schema_); |
1287 | 0 | } |
1288 | |
|
1289 | 0 | if (has_major_version()) { |
1290 | | // required uint32 major_version = 1; |
1291 | 0 | total_size += 1 + |
1292 | 0 | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
1293 | 0 | this->major_version()); |
1294 | 0 | } |
1295 | |
|
1296 | 0 | if (has_minor_version()) { |
1297 | | // required uint32 minor_version = 2; |
1298 | 0 | total_size += 1 + |
1299 | 0 | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
1300 | 0 | this->minor_version()); |
1301 | 0 | } |
1302 | |
|
1303 | 0 | if (has_sequence_number()) { |
1304 | | // required uint64 sequence_number = 6; |
1305 | 0 | total_size += 1 + |
1306 | 0 | ::google::protobuf::internal::WireFormatLite::UInt64Size( |
1307 | 0 | this->sequence_number()); |
1308 | 0 | } |
1309 | |
|
1310 | 0 | return total_size; |
1311 | 0 | } |
1312 | 319k | size_t LogSegmentHeaderPB::ByteSizeLong() const { |
1313 | | // @@protoc_insertion_point(message_byte_size_start:yb.log.LogSegmentHeaderPB) |
1314 | 319k | size_t total_size = 0; |
1315 | | |
1316 | 319k | if (_internal_metadata_.have_unknown_fields()) { |
1317 | 0 | total_size += |
1318 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
1319 | 0 | _internal_metadata_.unknown_fields()); |
1320 | 0 | } |
1321 | 319k | if (((_has_bits_[0] & 0x0000001f) ^ 0x0000001f) == 0) { // All required fields are present. |
1322 | | // required bytes unused_tablet_id = 5; |
1323 | 319k | total_size += 1 + |
1324 | 319k | ::google::protobuf::internal::WireFormatLite::BytesSize( |
1325 | 319k | this->unused_tablet_id()); |
1326 | | |
1327 | | // required .yb.SchemaPB unused_schema = 7; |
1328 | 319k | total_size += 1 + |
1329 | 319k | ::google::protobuf::internal::WireFormatLite::MessageSize( |
1330 | 319k | *this->unused_schema_); |
1331 | | |
1332 | | // required uint32 major_version = 1; |
1333 | 319k | total_size += 1 + |
1334 | 319k | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
1335 | 319k | this->major_version()); |
1336 | | |
1337 | | // required uint32 minor_version = 2; |
1338 | 319k | total_size += 1 + |
1339 | 319k | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
1340 | 319k | this->minor_version()); |
1341 | | |
1342 | | // required uint64 sequence_number = 6; |
1343 | 319k | total_size += 1 + |
1344 | 319k | ::google::protobuf::internal::WireFormatLite::UInt64Size( |
1345 | 319k | this->sequence_number()); |
1346 | | |
1347 | 319k | } else { |
1348 | 60 | total_size += RequiredFieldsByteSizeFallback(); |
1349 | 60 | } |
1350 | | // optional uint32 unused_schema_version = 8; |
1351 | 320k | if (has_unused_schema_version()319k ) { |
1352 | 320k | total_size += 1 + |
1353 | 320k | ::google::protobuf::internal::WireFormatLite::UInt32Size( |
1354 | 320k | this->unused_schema_version()); |
1355 | 320k | } |
1356 | | |
1357 | 319k | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
1358 | 319k | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1359 | 319k | _cached_size_ = cached_size; |
1360 | 319k | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1361 | 319k | return total_size; |
1362 | 319k | } |
1363 | | |
1364 | 0 | void LogSegmentHeaderPB::MergeFrom(const ::google::protobuf::Message& from) { |
1365 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.log.LogSegmentHeaderPB) |
1366 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1367 | 0 | const LogSegmentHeaderPB* source = |
1368 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const LogSegmentHeaderPB>( |
1369 | 0 | &from); |
1370 | 0 | if (source == NULL) { |
1371 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.log.LogSegmentHeaderPB) |
1372 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
1373 | 0 | } else { |
1374 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.log.LogSegmentHeaderPB) |
1375 | 0 | MergeFrom(*source); |
1376 | 0 | } |
1377 | 0 | } |
1378 | | |
1379 | 415k | void LogSegmentHeaderPB::MergeFrom(const LogSegmentHeaderPB& from) { |
1380 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.log.LogSegmentHeaderPB) |
1381 | 415k | GOOGLE_DCHECK_NE(&from, this); |
1382 | 415k | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1383 | 415k | ::google::protobuf::uint32 cached_has_bits = 0; |
1384 | 415k | (void) cached_has_bits; |
1385 | | |
1386 | 415k | cached_has_bits = from._has_bits_[0]; |
1387 | 415k | if (cached_has_bits & 63u415k ) { |
1388 | 415k | if (cached_has_bits & 0x00000001u415k ) { |
1389 | 415k | set_has_unused_tablet_id(); |
1390 | 415k | unused_tablet_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.unused_tablet_id_); |
1391 | 415k | } |
1392 | 415k | if (cached_has_bits & 0x00000002u) { |
1393 | 413k | mutable_unused_schema()->::yb::SchemaPB::MergeFrom(from.unused_schema()); |
1394 | 413k | } |
1395 | 415k | if (cached_has_bits & 0x00000004u) { |
1396 | 414k | major_version_ = from.major_version_; |
1397 | 414k | } |
1398 | 415k | if (cached_has_bits & 0x00000008u) { |
1399 | 415k | minor_version_ = from.minor_version_; |
1400 | 415k | } |
1401 | 415k | if (cached_has_bits & 0x00000010u) { |
1402 | 415k | sequence_number_ = from.sequence_number_; |
1403 | 415k | } |
1404 | 415k | if (cached_has_bits & 0x00000020u) { |
1405 | 415k | unused_schema_version_ = from.unused_schema_version_; |
1406 | 415k | } |
1407 | 415k | _has_bits_[0] |= cached_has_bits; |
1408 | 415k | } |
1409 | 415k | } |
1410 | | |
1411 | 0 | void LogSegmentHeaderPB::CopyFrom(const ::google::protobuf::Message& from) { |
1412 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.log.LogSegmentHeaderPB) |
1413 | 0 | if (&from == this) return; |
1414 | 0 | Clear(); |
1415 | 0 | MergeFrom(from); |
1416 | 0 | } |
1417 | | |
1418 | 414k | void LogSegmentHeaderPB::CopyFrom(const LogSegmentHeaderPB& from) { |
1419 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.log.LogSegmentHeaderPB) |
1420 | 414k | if (&from == this) return0 ; |
1421 | 414k | Clear(); |
1422 | 414k | MergeFrom(from); |
1423 | 414k | } |
1424 | | |
1425 | 27.1M | bool LogSegmentHeaderPB::IsInitialized() const { |
1426 | 27.1M | if ((_has_bits_[0] & 0x0000001f) != 0x0000001f) return false0 ; |
1427 | 27.1M | if (has_unused_schema()) { |
1428 | 27.1M | if (!this->unused_schema_->IsInitialized()) return false0 ; |
1429 | 27.1M | } |
1430 | 27.1M | return true; |
1431 | 27.1M | } |
1432 | | |
1433 | 0 | void LogSegmentHeaderPB::Swap(LogSegmentHeaderPB* other) { |
1434 | 0 | if (other == this) return; |
1435 | 0 | InternalSwap(other); |
1436 | 0 | } |
1437 | 0 | void LogSegmentHeaderPB::InternalSwap(LogSegmentHeaderPB* other) { |
1438 | 0 | using std::swap; |
1439 | 0 | unused_tablet_id_.Swap(&other->unused_tablet_id_); |
1440 | 0 | swap(unused_schema_, other->unused_schema_); |
1441 | 0 | swap(major_version_, other->major_version_); |
1442 | 0 | swap(minor_version_, other->minor_version_); |
1443 | 0 | swap(sequence_number_, other->sequence_number_); |
1444 | 0 | swap(unused_schema_version_, other->unused_schema_version_); |
1445 | 0 | swap(_has_bits_[0], other->_has_bits_[0]); |
1446 | 0 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1447 | 0 | swap(_cached_size_, other->_cached_size_); |
1448 | 0 | } |
1449 | | |
1450 | 0 | ::google::protobuf::Metadata LogSegmentHeaderPB::GetMetadata() const { |
1451 | 0 | protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce(); |
1452 | 0 | return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages]; |
1453 | 0 | } |
1454 | | |
1455 | | |
1456 | | // =================================================================== |
1457 | | |
1458 | 16.5k | void LogSegmentFooterPB::InitAsDefaultInstance() { |
1459 | 16.5k | } |
1460 | | #if !defined(_MSC_VER) || _MSC_VER >= 1900 |
1461 | | const int LogSegmentFooterPB::kNumEntriesFieldNumber; |
1462 | | const int LogSegmentFooterPB::kMinReplicateIndexFieldNumber; |
1463 | | const int LogSegmentFooterPB::kMaxReplicateIndexFieldNumber; |
1464 | | const int LogSegmentFooterPB::kCloseTimestampMicrosFieldNumber; |
1465 | | #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 |
1466 | | |
1467 | | LogSegmentFooterPB::LogSegmentFooterPB() |
1468 | 589k | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
1469 | 589k | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
1470 | 573k | ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogSegmentFooterPB(); |
1471 | 573k | } |
1472 | 589k | SharedCtor(); |
1473 | | // @@protoc_insertion_point(constructor:yb.log.LogSegmentFooterPB) |
1474 | 589k | } |
1475 | | LogSegmentFooterPB::LogSegmentFooterPB(const LogSegmentFooterPB& from) |
1476 | | : ::google::protobuf::Message(), |
1477 | | _internal_metadata_(NULL), |
1478 | | _has_bits_(from._has_bits_), |
1479 | 0 | _cached_size_(0) { |
1480 | 0 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1481 | 0 | ::memcpy(&num_entries_, &from.num_entries_, |
1482 | 0 | static_cast<size_t>(reinterpret_cast<char*>(&max_replicate_index_) - |
1483 | 0 | reinterpret_cast<char*>(&num_entries_)) + sizeof(max_replicate_index_)); |
1484 | | // @@protoc_insertion_point(copy_constructor:yb.log.LogSegmentFooterPB) |
1485 | 0 | } |
1486 | | |
1487 | 589k | void LogSegmentFooterPB::SharedCtor() { |
1488 | 589k | _cached_size_ = 0; |
1489 | 589k | ::memset(&num_entries_, 0, static_cast<size_t>( |
1490 | 589k | reinterpret_cast<char*>(&close_timestamp_micros_) - |
1491 | 589k | reinterpret_cast<char*>(&num_entries_)) + sizeof(close_timestamp_micros_)); |
1492 | 589k | min_replicate_index_ = GOOGLE_LONGLONG(-1); |
1493 | 589k | max_replicate_index_ = GOOGLE_LONGLONG(-1); |
1494 | 589k | } |
1495 | | |
1496 | 343k | LogSegmentFooterPB::~LogSegmentFooterPB() { |
1497 | | // @@protoc_insertion_point(destructor:yb.log.LogSegmentFooterPB) |
1498 | 343k | SharedDtor(); |
1499 | 343k | } |
1500 | | |
1501 | 342k | void LogSegmentFooterPB::SharedDtor() { |
1502 | 342k | } |
1503 | | |
1504 | 0 | void LogSegmentFooterPB::SetCachedSize(int size) const { |
1505 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1506 | 0 | _cached_size_ = size; |
1507 | 0 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1508 | 0 | } |
1509 | 0 | const ::google::protobuf::Descriptor* LogSegmentFooterPB::descriptor() { |
1510 | 0 | ::protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce(); |
1511 | 0 | return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; |
1512 | 0 | } |
1513 | | |
1514 | 0 | const LogSegmentFooterPB& LogSegmentFooterPB::default_instance() { |
1515 | 0 | ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogSegmentFooterPB(); |
1516 | 0 | return *internal_default_instance(); |
1517 | 0 | } |
1518 | | |
1519 | 0 | LogSegmentFooterPB* LogSegmentFooterPB::New(::google::protobuf::Arena* arena) const { |
1520 | 0 | LogSegmentFooterPB* n = new LogSegmentFooterPB; |
1521 | 0 | if (arena != NULL) { |
1522 | 0 | arena->Own(n); |
1523 | 0 | } |
1524 | 0 | return n; |
1525 | 0 | } |
1526 | | |
1527 | 337k | void LogSegmentFooterPB::Clear() { |
1528 | | // @@protoc_insertion_point(message_clear_start:yb.log.LogSegmentFooterPB) |
1529 | 337k | ::google::protobuf::uint32 cached_has_bits = 0; |
1530 | | // Prevent compiler warnings about cached_has_bits being unused |
1531 | 337k | (void) cached_has_bits; |
1532 | | |
1533 | 337k | cached_has_bits = _has_bits_[0]; |
1534 | 337k | if (cached_has_bits & 15u) { |
1535 | 11.7k | ::memset(&num_entries_, 0, static_cast<size_t>( |
1536 | 11.7k | reinterpret_cast<char*>(&close_timestamp_micros_) - |
1537 | 11.7k | reinterpret_cast<char*>(&num_entries_)) + sizeof(close_timestamp_micros_)); |
1538 | 11.7k | min_replicate_index_ = GOOGLE_LONGLONG(-1); |
1539 | 11.7k | max_replicate_index_ = GOOGLE_LONGLONG(-1); |
1540 | 11.7k | } |
1541 | 337k | _has_bits_.Clear(); |
1542 | 337k | _internal_metadata_.Clear(); |
1543 | 337k | } |
1544 | | |
1545 | | bool LogSegmentFooterPB::MergePartialFromCodedStream( |
1546 | 6.85k | ::google::protobuf::io::CodedInputStream* input) { |
1547 | 27.3k | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure0 |
1548 | 6.85k | ::google::protobuf::uint32 tag; |
1549 | | // @@protoc_insertion_point(parse_start:yb.log.LogSegmentFooterPB) |
1550 | 34.1k | for (;;) { |
1551 | 34.1k | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1552 | 34.1k | tag = p.first; |
1553 | 34.1k | if (!p.second) goto handle_unusual6.85k ; |
1554 | 27.3k | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1555 | | // required int64 num_entries = 1; |
1556 | 6.84k | case 1: { |
1557 | 6.84k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1558 | 6.84k | static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { |
1559 | 6.84k | set_has_num_entries(); |
1560 | 6.84k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1561 | 6.84k | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
1562 | 6.84k | input, &num_entries_))); |
1563 | 6.84k | } else { |
1564 | 0 | goto handle_unusual; |
1565 | 0 | } |
1566 | 6.84k | break; |
1567 | 6.84k | } |
1568 | | |
1569 | | // optional int64 min_replicate_index = 2 [default = -1]; |
1570 | 6.84k | case 2: { |
1571 | 6.82k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1572 | 6.82k | static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { |
1573 | 6.82k | set_has_min_replicate_index(); |
1574 | 6.82k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1575 | 6.82k | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
1576 | 6.82k | input, &min_replicate_index_))); |
1577 | 6.82k | } else { |
1578 | 0 | goto handle_unusual; |
1579 | 0 | } |
1580 | 6.82k | break; |
1581 | 6.82k | } |
1582 | | |
1583 | | // optional int64 max_replicate_index = 3 [default = -1]; |
1584 | 6.82k | case 3: { |
1585 | 6.82k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1586 | 6.82k | static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { |
1587 | 6.82k | set_has_max_replicate_index(); |
1588 | 6.82k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1589 | 6.82k | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
1590 | 6.82k | input, &max_replicate_index_))); |
1591 | 6.82k | } else { |
1592 | 0 | goto handle_unusual; |
1593 | 0 | } |
1594 | 6.82k | break; |
1595 | 6.82k | } |
1596 | | |
1597 | | // optional int64 close_timestamp_micros = 4; |
1598 | 6.84k | case 4: { |
1599 | 6.84k | if (static_cast< ::google::protobuf::uint8>(tag) == |
1600 | 6.84k | static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { |
1601 | 6.84k | set_has_close_timestamp_micros(); |
1602 | 6.84k | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1603 | 6.84k | ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( |
1604 | 6.84k | input, &close_timestamp_micros_))); |
1605 | 6.84k | } else { |
1606 | 0 | goto handle_unusual; |
1607 | 0 | } |
1608 | 6.84k | break; |
1609 | 6.84k | } |
1610 | | |
1611 | 6.84k | default: { |
1612 | 6.85k | handle_unusual: |
1613 | 6.85k | if (tag == 0) { |
1614 | 6.85k | goto success; |
1615 | 6.85k | } |
1616 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
1617 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1618 | 0 | break; |
1619 | 0 | } |
1620 | 27.3k | } |
1621 | 27.3k | } |
1622 | 18.4E | success: |
1623 | | // @@protoc_insertion_point(parse_success:yb.log.LogSegmentFooterPB) |
1624 | 6.85k | return true; |
1625 | 0 | failure: |
1626 | | // @@protoc_insertion_point(parse_failure:yb.log.LogSegmentFooterPB) |
1627 | 0 | return false; |
1628 | 6.85k | #undef DO_ |
1629 | 6.85k | } |
1630 | | |
1631 | | void LogSegmentFooterPB::SerializeWithCachedSizes( |
1632 | 0 | ::google::protobuf::io::CodedOutputStream* output) const { |
1633 | | // @@protoc_insertion_point(serialize_start:yb.log.LogSegmentFooterPB) |
1634 | 0 | ::google::protobuf::uint32 cached_has_bits = 0; |
1635 | 0 | (void) cached_has_bits; |
1636 | |
|
1637 | 0 | cached_has_bits = _has_bits_[0]; |
1638 | | // required int64 num_entries = 1; |
1639 | 0 | if (cached_has_bits & 0x00000001u) { |
1640 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->num_entries(), output); |
1641 | 0 | } |
1642 | | |
1643 | | // optional int64 min_replicate_index = 2 [default = -1]; |
1644 | 0 | if (cached_has_bits & 0x00000004u) { |
1645 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->min_replicate_index(), output); |
1646 | 0 | } |
1647 | | |
1648 | | // optional int64 max_replicate_index = 3 [default = -1]; |
1649 | 0 | if (cached_has_bits & 0x00000008u) { |
1650 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->max_replicate_index(), output); |
1651 | 0 | } |
1652 | | |
1653 | | // optional int64 close_timestamp_micros = 4; |
1654 | 0 | if (cached_has_bits & 0x00000002u) { |
1655 | 0 | ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->close_timestamp_micros(), output); |
1656 | 0 | } |
1657 | |
|
1658 | 0 | if (_internal_metadata_.have_unknown_fields()) { |
1659 | 0 | ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
1660 | 0 | _internal_metadata_.unknown_fields(), output); |
1661 | 0 | } |
1662 | | // @@protoc_insertion_point(serialize_end:yb.log.LogSegmentFooterPB) |
1663 | 0 | } |
1664 | | |
1665 | | ::google::protobuf::uint8* LogSegmentFooterPB::InternalSerializeWithCachedSizesToArray( |
1666 | 85.4k | bool deterministic, ::google::protobuf::uint8* target) const { |
1667 | 85.4k | (void)deterministic; // Unused |
1668 | | // @@protoc_insertion_point(serialize_to_array_start:yb.log.LogSegmentFooterPB) |
1669 | 85.4k | ::google::protobuf::uint32 cached_has_bits = 0; |
1670 | 85.4k | (void) cached_has_bits; |
1671 | | |
1672 | 85.4k | cached_has_bits = _has_bits_[0]; |
1673 | | // required int64 num_entries = 1; |
1674 | 85.4k | if (cached_has_bits & 0x00000001u) { |
1675 | 85.3k | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->num_entries(), target); |
1676 | 85.3k | } |
1677 | | |
1678 | | // optional int64 min_replicate_index = 2 [default = -1]; |
1679 | 85.4k | if (cached_has_bits & 0x00000004u) { |
1680 | 84.5k | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->min_replicate_index(), target); |
1681 | 84.5k | } |
1682 | | |
1683 | | // optional int64 max_replicate_index = 3 [default = -1]; |
1684 | 85.4k | if (cached_has_bits & 0x00000008u) { |
1685 | 84.5k | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->max_replicate_index(), target); |
1686 | 84.5k | } |
1687 | | |
1688 | | // optional int64 close_timestamp_micros = 4; |
1689 | 85.4k | if (cached_has_bits & 0x00000002u) { |
1690 | 85.3k | target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->close_timestamp_micros(), target); |
1691 | 85.3k | } |
1692 | | |
1693 | 85.4k | if (_internal_metadata_.have_unknown_fields()) { |
1694 | 0 | target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
1695 | 0 | _internal_metadata_.unknown_fields(), target); |
1696 | 0 | } |
1697 | | // @@protoc_insertion_point(serialize_to_array_end:yb.log.LogSegmentFooterPB) |
1698 | 85.4k | return target; |
1699 | 85.4k | } |
1700 | | |
1701 | 178k | size_t LogSegmentFooterPB::ByteSizeLong() const { |
1702 | | // @@protoc_insertion_point(message_byte_size_start:yb.log.LogSegmentFooterPB) |
1703 | 178k | size_t total_size = 0; |
1704 | | |
1705 | 178k | if (_internal_metadata_.have_unknown_fields()) { |
1706 | 0 | total_size += |
1707 | 0 | ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
1708 | 0 | _internal_metadata_.unknown_fields()); |
1709 | 0 | } |
1710 | | // required int64 num_entries = 1; |
1711 | 178k | if (has_num_entries()) { |
1712 | 178k | total_size += 1 + |
1713 | 178k | ::google::protobuf::internal::WireFormatLite::Int64Size( |
1714 | 178k | this->num_entries()); |
1715 | 178k | } |
1716 | 178k | if (_has_bits_[0 / 32] & 14u) { |
1717 | | // optional int64 close_timestamp_micros = 4; |
1718 | 178k | if (has_close_timestamp_micros()) { |
1719 | 178k | total_size += 1 + |
1720 | 178k | ::google::protobuf::internal::WireFormatLite::Int64Size( |
1721 | 178k | this->close_timestamp_micros()); |
1722 | 178k | } |
1723 | | |
1724 | | // optional int64 min_replicate_index = 2 [default = -1]; |
1725 | 178k | if (has_min_replicate_index()) { |
1726 | 177k | total_size += 1 + |
1727 | 177k | ::google::protobuf::internal::WireFormatLite::Int64Size( |
1728 | 177k | this->min_replicate_index()); |
1729 | 177k | } |
1730 | | |
1731 | | // optional int64 max_replicate_index = 3 [default = -1]; |
1732 | 178k | if (has_max_replicate_index()) { |
1733 | 177k | total_size += 1 + |
1734 | 177k | ::google::protobuf::internal::WireFormatLite::Int64Size( |
1735 | 177k | this->max_replicate_index()); |
1736 | 177k | } |
1737 | | |
1738 | 178k | } |
1739 | 178k | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
1740 | 178k | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1741 | 178k | _cached_size_ = cached_size; |
1742 | 178k | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1743 | 178k | return total_size; |
1744 | 178k | } |
1745 | | |
1746 | 0 | void LogSegmentFooterPB::MergeFrom(const ::google::protobuf::Message& from) { |
1747 | | // @@protoc_insertion_point(generalized_merge_from_start:yb.log.LogSegmentFooterPB) |
1748 | 0 | GOOGLE_DCHECK_NE(&from, this); |
1749 | 0 | const LogSegmentFooterPB* source = |
1750 | 0 | ::google::protobuf::internal::DynamicCastToGenerated<const LogSegmentFooterPB>( |
1751 | 0 | &from); |
1752 | 0 | if (source == NULL) { |
1753 | | // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.log.LogSegmentFooterPB) |
1754 | 0 | ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
1755 | 0 | } else { |
1756 | | // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.log.LogSegmentFooterPB) |
1757 | 0 | MergeFrom(*source); |
1758 | 0 | } |
1759 | 0 | } |
1760 | | |
1761 | 170k | void LogSegmentFooterPB::MergeFrom(const LogSegmentFooterPB& from) { |
1762 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.log.LogSegmentFooterPB) |
1763 | 170k | GOOGLE_DCHECK_NE(&from, this); |
1764 | 170k | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1765 | 170k | ::google::protobuf::uint32 cached_has_bits = 0; |
1766 | 170k | (void) cached_has_bits; |
1767 | | |
1768 | 170k | cached_has_bits = from._has_bits_[0]; |
1769 | 170k | if (cached_has_bits & 15u) { |
1770 | 169k | if (cached_has_bits & 0x00000001u169k ) { |
1771 | 169k | num_entries_ = from.num_entries_; |
1772 | 169k | } |
1773 | 169k | if (cached_has_bits & 0x00000002u169k ) { |
1774 | 169k | close_timestamp_micros_ = from.close_timestamp_micros_; |
1775 | 169k | } |
1776 | 169k | if (cached_has_bits & 0x00000004u) { |
1777 | 168k | min_replicate_index_ = from.min_replicate_index_; |
1778 | 168k | } |
1779 | 169k | if (cached_has_bits & 0x00000008u) { |
1780 | 168k | max_replicate_index_ = from.max_replicate_index_; |
1781 | 168k | } |
1782 | 169k | _has_bits_[0] |= cached_has_bits; |
1783 | 169k | } |
1784 | 170k | } |
1785 | | |
1786 | 0 | void LogSegmentFooterPB::CopyFrom(const ::google::protobuf::Message& from) { |
1787 | | // @@protoc_insertion_point(generalized_copy_from_start:yb.log.LogSegmentFooterPB) |
1788 | 0 | if (&from == this) return; |
1789 | 0 | Clear(); |
1790 | 0 | MergeFrom(from); |
1791 | 0 | } |
1792 | | |
1793 | 170k | void LogSegmentFooterPB::CopyFrom(const LogSegmentFooterPB& from) { |
1794 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.log.LogSegmentFooterPB) |
1795 | 170k | if (&from == this) return0 ; |
1796 | 170k | Clear(); |
1797 | 170k | MergeFrom(from); |
1798 | 170k | } |
1799 | | |
1800 | 88.1M | bool LogSegmentFooterPB::IsInitialized() const { |
1801 | 88.1M | if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false72.1M ; |
1802 | 15.9M | return true; |
1803 | 88.1M | } |
1804 | | |
1805 | 6.85k | void LogSegmentFooterPB::Swap(LogSegmentFooterPB* other) { |
1806 | 6.85k | if (other == this) return0 ; |
1807 | 6.85k | InternalSwap(other); |
1808 | 6.85k | } |
1809 | 6.85k | void LogSegmentFooterPB::InternalSwap(LogSegmentFooterPB* other) { |
1810 | 6.85k | using std::swap; |
1811 | 6.85k | swap(num_entries_, other->num_entries_); |
1812 | 6.85k | swap(close_timestamp_micros_, other->close_timestamp_micros_); |
1813 | 6.85k | swap(min_replicate_index_, other->min_replicate_index_); |
1814 | 6.85k | swap(max_replicate_index_, other->max_replicate_index_); |
1815 | 6.85k | swap(_has_bits_[0], other->_has_bits_[0]); |
1816 | 6.85k | _internal_metadata_.Swap(&other->_internal_metadata_); |
1817 | 6.85k | swap(_cached_size_, other->_cached_size_); |
1818 | 6.85k | } |
1819 | | |
1820 | 0 | ::google::protobuf::Metadata LogSegmentFooterPB::GetMetadata() const { |
1821 | 0 | protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce(); |
1822 | 0 | return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages]; |
1823 | 0 | } |
1824 | | |
1825 | | |
1826 | | // @@protoc_insertion_point(namespace_scope) |
1827 | | } // namespace log |
1828 | | } // namespace yb |
1829 | | |
1830 | | // @@protoc_insertion_point(global_scope) |