diff --git a/.gitignore b/.gitignore index 9c3ac5f981..54d598a1f9 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,10 @@ core/build/* core/.idea/ .idea/ .idea/* +pulsar/client-cpp/cmake-build-debug/ +pulsar/client-cpp/cmake-build-debug/* +pulsar/client-cpp/build/ +pulsar/client-cpp/build/* # vscode generated files .vscode diff --git a/master/client/base_client.go b/master/client/base_client.go index 6972724c03..c92eccd96e 100644 --- a/master/client/base_client.go +++ b/master/client/base_client.go @@ -129,13 +129,6 @@ func (c *baseClient) leaderLoop() { } } -// ScheduleCheckLeader is used to check leader. -func (c *baseClient) ScheduleCheckLeader() { - select { - case c.checkLeaderCh <- struct{}{}: - default: - } -} // GetClusterID returns the ClusterID. func (c *baseClient) GetClusterID(context.Context) uint64 { @@ -173,28 +166,6 @@ func (c *baseClient) updateURLs(members []*pdpb.Member) { c.urls = urls } -func (c *baseClient) switchLeader(addrs []string) error { - // FIXME: How to safely compare leader urls? For now, only allows one client url. - addr := addrs[0] - - c.connMu.RLock() - oldLeader := c.connMu.leader - c.connMu.RUnlock() - - if addr == oldLeader { - return nil - } - - log.Info("[pd] switch leader", zap.String("new-leader", addr), zap.String("old-leader", oldLeader)) - if _, err := c.getOrCreateGRPCConn(addr); err != nil { - return err - } - - c.connMu.Lock() - defer c.connMu.Unlock() - c.connMu.leader = addr - return nil -} func (c *baseClient) getOrCreateGRPCConn(addr string) (*grpc.ClientConn, error) { c.connMu.RLock() diff --git a/master/client/client.go b/master/client/client.go index 4e57092ad6..ffad2705fe 100644 --- a/master/client/client.go +++ b/master/client/client.go @@ -178,7 +178,6 @@ func (c *client) tsLoop() { default: } log.Error("[pd] create tso stream error") - c.ScheduleCheckLeader() cancel() c.revokeTSORequest(errors.WithStack(err)) select { @@ -225,7 +224,6 @@ func (c *client) tsLoop() { default: } log.Error("[pd] getTS error") - c.ScheduleCheckLeader() cancel() stream, cancel = nil, nil } diff --git a/master/config/util.go b/master/config/util.go index 097e3a0de0..a68770d28d 100644 --- a/master/config/util.go +++ b/master/config/util.go @@ -18,7 +18,6 @@ import ( "regexp" "github.com/czs007/suvlim/errors" - "github.com/czs007/suvlim/pkg/metapb" ) const ( @@ -38,19 +37,6 @@ func validateFormat(s, format string) error { return nil } -// ValidateLabels checks the legality of the labels. -func ValidateLabels(labels []*metapb.StoreLabel) error { - for _, label := range labels { - if err := validateFormat(label.Key, keyFormat); err != nil { - return err - } - if err := validateFormat(label.Value, valueFormat); err != nil { - return err - } - } - return nil -} - // ValidateURLWithScheme checks the format of the URL. func ValidateURLWithScheme(rawURL string) error { u, err := url.ParseRequestURI(rawURL) diff --git a/master/config/util_test.go b/master/config/util_test.go deleted file mode 100644 index 2e68fd2ea7..0000000000 --- a/master/config/util_test.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2018 TiKV Project Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "github.com/czs007/suvlim/pkg/metapb" - . "github.com/pingcap/check" -) - -var _ = Suite(&testUtilSuite{}) - -type testUtilSuite struct{} - -func (s *testUtilSuite) TestValidateLabels(c *C) { - tests := []struct { - label string - hasErr bool - }{ - {"z1", false}, - {"z-1", false}, - {"h1;", true}, - {"z_1", false}, - {"z_1&", true}, - {"cn", false}, - {"Zo^ne", true}, - {"z_", true}, - {"hos&t-15", true}, - {"_test1", true}, - {"-test1", true}, - {"192.168.199.1", false}, - {"www.pingcap.com", false}, - {"h_127.0.0.1", false}, - {"a", false}, - {"a/b", false}, - {"ab/", true}, - {"/ab", true}, - {"$abc", false}, - {"$", true}, - {"a$b", true}, - {"$$", true}, - } - for _, t := range tests { - c.Assert(ValidateLabels([]*metapb.StoreLabel{{Key: t.label}}) != nil, Equals, t.hasErr) - } -} - -func (s *testUtilSuite) TestValidateURLWithScheme(c *C) { - tests := []struct { - addr string - hasErr bool - }{ - {"", true}, - {"foo", true}, - {"/foo", true}, - {"http", true}, - {"http://", true}, - {"http://foo", false}, - {"https://foo", false}, - {"http://127.0.0.1", false}, - {"http://127.0.0.1/", false}, - {"https://foo.com/bar", false}, - {"https://foo.com/bar/", false}, - } - for _, t := range tests { - c.Assert(ValidateURLWithScheme(t.addr) != nil, Equals, t.hasErr) - } -} diff --git a/pulsar/client-cpp/CMakeLists.txt b/pulsar/client-cpp/CMakeLists.txt new file mode 100644 index 0000000000..dcb6f48841 --- /dev/null +++ b/pulsar/client-cpp/CMakeLists.txt @@ -0,0 +1,40 @@ +project(CLIENT_CPP LANGUAGES CXX) + +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +cmake_minimum_required(VERSION 3.16) +set( CMAKE_CXX_STANDARD 17 ) +set( CMAKE_CXX_STANDARD_REQUIRED on ) +set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) +endif () + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lprotobuf -fPIC -pthread -Wall -Wno-unused-variable -Wno-sign-compare -Werror") +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +set(OUTDIR ${CMAKE_CURRENT_SOURCE_DIR}/build) +SET(EXECUTABLE_OUTPUT_PATH ${OUTDIR}) + +if( CMAKE_BUILD_TYPE STREQUAL "Release" ) + message(STATUS "Building Release version") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_ARROW_ARRAY_SIZE=1073741824") #1G +else() + message(STATUS "Building Debug version") + add_definitions(-DDEBUG_RENDER) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_ARROW_ARRAY_SIZE=16777216") #16M +endif() +if ("${MAKE}" STREQUAL "") + if (NOT MSVC) + find_program(MAKE make) + endif () +endif () + +set(CLIENT_SOURCE_DIR ${PROJECT_SOURCE_DIR}) +set(CLIENT_SRC ${PROJECT_SOURCE_DIR}/src) + +add_subdirectory(src) +add_subdirectory(unittest) +#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unittest) \ No newline at end of file diff --git a/pulsar/client-cpp/src/CMakeLists.txt b/pulsar/client-cpp/src/CMakeLists.txt new file mode 100644 index 0000000000..0da27e6ae7 --- /dev/null +++ b/pulsar/client-cpp/src/CMakeLists.txt @@ -0,0 +1,14 @@ +set(src-cpp + client.cpp + consumer.cpp + producer.cpp + pb/pulsar.pb.cc) + +add_library(client_cpp SHARED + ${src-cpp} + ) + +target_link_libraries(client_cpp pulsar protobuf) + +install(TARGETS client_cpp + DESTINATION lib) \ No newline at end of file diff --git a/pulsar/client-cpp/src/client.cpp b/pulsar/client-cpp/src/client.cpp new file mode 100644 index 0000000000..8c0a1fecaa --- /dev/null +++ b/pulsar/client-cpp/src/client.cpp @@ -0,0 +1,11 @@ + +#include "client.h" + +namespace message_client { + +MsgClient::MsgClient(const std::string &serviceUrl) : pulsar::Client(serviceUrl) {} + +MsgClient::MsgClient(const std::string &serviceUrl, const pulsar::ClientConfiguration& clientConfiguration) + : pulsar::Client(serviceUrl, clientConfiguration) {} + +} \ No newline at end of file diff --git a/pulsar/client-cpp/src/client.h b/pulsar/client-cpp/src/client.h new file mode 100644 index 0000000000..a7f0a1ee58 --- /dev/null +++ b/pulsar/client-cpp/src/client.h @@ -0,0 +1,24 @@ +#pragma once + +#include "pulsar/Client.h" +#include + +namespace message_client { + +using Result = pulsar::Result; +using Message = pulsar::Message; + +class MsgClient : public pulsar::Client{ +public: + MsgClient(const std::string& serviceUrl); + MsgClient(const std::string& serviceUrl, const pulsar::ClientConfiguration& clientConfiguration); + + void set_client_id(int64_t id) { client_id_ = id; } + + int64_t get_client_id() { return client_id_; } + +private: + int64_t client_id_; +}; + +} diff --git a/pulsar/client-cpp/src/consumer.cpp b/pulsar/client-cpp/src/consumer.cpp new file mode 100644 index 0000000000..abe3dc03c4 --- /dev/null +++ b/pulsar/client-cpp/src/consumer.cpp @@ -0,0 +1,66 @@ + +#include "consumer.h" +#include "pb/pulsar.pb.h" + +namespace message_client { + +MsgConsumer::MsgConsumer(std::shared_ptr &client, std::string subscription_name, const ConsumerConfiguration conf) + :client_(client), config_(conf), subscription_name_(subscription_name){} + +Result MsgConsumer::subscribe(const std::string &topic) { + return client_->subscribe(topic, subscription_name_, config_, consumer_); +} + +Result MsgConsumer::subscribe(const std::vector &topics) { + return client_->subscribe(topics, subscription_name_, config_, consumer_); +} + +Result MsgConsumer::unsubscribe() { + return consumer_.unsubscribe(); +} + +Result MsgConsumer::receive(Message &msg) { + return consumer_.receive(msg); +} + +std::shared_ptr MsgConsumer::receive_proto(ConsumerType consumer_type) { + Message msg; + receive(msg); + acknowledge(msg); + switch (consumer_type) { + case INSERT: { + pb::InsertMsg insert_msg; + insert_msg.ParseFromString(msg.getDataAsString()); + auto message = std::make_shared(insert_msg); + return std::shared_ptr(message); + } + case DELETE: { + pb::DeleteMsg delete_msg; + delete_msg.ParseFromString(msg.getDataAsString()); + auto message = std::make_shared(delete_msg); + return std::shared_ptr(message); + } + case SEARCH_RESULT: { + pb::SearchResultMsg search_res_msg; + search_res_msg.ParseFromString(msg.getDataAsString()); + auto message = std::make_shared(search_res_msg); + return std::shared_ptr(message); + } + case TEST: + pb::TestData test_msg; + test_msg.ParseFromString(msg.getDataAsString()); + auto message = std::make_shared(test_msg); + return std::shared_ptr(message); + } + return nullptr; +} + +Result MsgConsumer::close() { + return consumer_.close(); +} + +Result MsgConsumer::acknowledge(const Message &message) { + return consumer_.acknowledge(message); +} + +} diff --git a/pulsar/client-cpp/src/consumer.h b/pulsar/client-cpp/src/consumer.h new file mode 100644 index 0000000000..2f6fcf421b --- /dev/null +++ b/pulsar/client-cpp/src/consumer.h @@ -0,0 +1,41 @@ +#pragma once + +#include "pulsar/Consumer.h" +#include "client.h" + +namespace message_client { + +enum ConsumerType { + INSERT = 0, + DELETE = 1, + SEARCH_RESULT = 2, + TEST = 3, +}; + +using Consumer = pulsar::Consumer; +using ConsumerConfiguration = pulsar::ConsumerConfiguration; + +class MsgConsumer{ +public: + MsgConsumer(std::shared_ptr &client, std::string consumer_name, + const pulsar::ConsumerConfiguration conf = ConsumerConfiguration()); + + Result subscribe(const std::string& topic); + Result subscribe(const std::vector& topics); + Result unsubscribe(); + Result receive(Message& msg); + std::shared_ptr receive_proto(ConsumerType consumer_type); + Result acknowledge(const Message& message); + Result close(); + + const Consumer& + consumer() const {return consumer_; } + +private: + Consumer consumer_; + std::shared_ptr client_; + ConsumerConfiguration config_; + std::string subscription_name_; +}; + +} \ No newline at end of file diff --git a/pulsar/client-cpp/src/pb/build.sh b/pulsar/client-cpp/src/pb/build.sh new file mode 100755 index 0000000000..c6519cde44 --- /dev/null +++ b/pulsar/client-cpp/src/pb/build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +protoc -I=./ --cpp_out=./ pulsar.proto \ No newline at end of file diff --git a/pulsar/pb/milvus.proto b/pulsar/client-cpp/src/pb/milvus.proto similarity index 100% rename from pulsar/pb/milvus.proto rename to pulsar/client-cpp/src/pb/milvus.proto diff --git a/pulsar/client-cpp/src/pb/pulsar.pb.cc b/pulsar/client-cpp/src/pb/pulsar.pb.cc new file mode 100644 index 0000000000..c004019c48 --- /dev/null +++ b/pulsar/client-cpp/src/pb/pulsar.pb.cc @@ -0,0 +1,5540 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pulsar.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "pulsar.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace pb { + +namespace { + +const ::google::protobuf::Descriptor* Status_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + Status_reflection_ = NULL; +const ::google::protobuf::Descriptor* SegmentRecord_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + SegmentRecord_reflection_ = NULL; +const ::google::protobuf::Descriptor* VectorRowRecord_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + VectorRowRecord_reflection_ = NULL; +const ::google::protobuf::Descriptor* AttrRecord_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + AttrRecord_reflection_ = NULL; +const ::google::protobuf::Descriptor* VectorRecord_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + VectorRecord_reflection_ = NULL; +const ::google::protobuf::Descriptor* VectorParam_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + VectorParam_reflection_ = NULL; +const ::google::protobuf::Descriptor* FieldValue_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + FieldValue_reflection_ = NULL; +const ::google::protobuf::Descriptor* PulsarMessage_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + PulsarMessage_reflection_ = NULL; +const ::google::protobuf::Descriptor* TestData_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + TestData_reflection_ = NULL; +const ::google::protobuf::Descriptor* InsertMsg_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + InsertMsg_reflection_ = NULL; +const ::google::protobuf::Descriptor* DeleteMsg_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + DeleteMsg_reflection_ = NULL; +const ::google::protobuf::Descriptor* SearchMsg_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + SearchMsg_reflection_ = NULL; +const ::google::protobuf::Descriptor* SearchResultMsg_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + SearchResultMsg_reflection_ = NULL; +const ::google::protobuf::EnumDescriptor* ErrorCode_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* DataType_descriptor_ = NULL; +const ::google::protobuf::EnumDescriptor* OpType_descriptor_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_pulsar_2eproto() GOOGLE_ATTRIBUTE_COLD; +void protobuf_AssignDesc_pulsar_2eproto() { + protobuf_AddDesc_pulsar_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "pulsar.proto"); + GOOGLE_CHECK(file != NULL); + Status_descriptor_ = file->message_type(0); + static const int Status_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Status, error_code_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Status, reason_), + }; + Status_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + Status_descriptor_, + Status::default_instance_, + Status_offsets_, + -1, + -1, + -1, + sizeof(Status), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Status, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Status, _is_default_instance_)); + SegmentRecord_descriptor_ = file->message_type(1); + static const int SegmentRecord_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SegmentRecord, seg_info_), + }; + SegmentRecord_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + SegmentRecord_descriptor_, + SegmentRecord::default_instance_, + SegmentRecord_offsets_, + -1, + -1, + -1, + sizeof(SegmentRecord), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SegmentRecord, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SegmentRecord, _is_default_instance_)); + VectorRowRecord_descriptor_ = file->message_type(2); + static const int VectorRowRecord_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorRowRecord, float_data_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorRowRecord, binary_data_), + }; + VectorRowRecord_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + VectorRowRecord_descriptor_, + VectorRowRecord::default_instance_, + VectorRowRecord_offsets_, + -1, + -1, + -1, + sizeof(VectorRowRecord), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorRowRecord, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorRowRecord, _is_default_instance_)); + AttrRecord_descriptor_ = file->message_type(3); + static const int AttrRecord_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrRecord, int32_value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrRecord, int64_value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrRecord, float_value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrRecord, double_value_), + }; + AttrRecord_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + AttrRecord_descriptor_, + AttrRecord::default_instance_, + AttrRecord_offsets_, + -1, + -1, + -1, + sizeof(AttrRecord), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrRecord, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AttrRecord, _is_default_instance_)); + VectorRecord_descriptor_ = file->message_type(4); + static const int VectorRecord_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorRecord, records_), + }; + VectorRecord_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + VectorRecord_descriptor_, + VectorRecord::default_instance_, + VectorRecord_offsets_, + -1, + -1, + -1, + sizeof(VectorRecord), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorRecord, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorRecord, _is_default_instance_)); + VectorParam_descriptor_ = file->message_type(5); + static const int VectorParam_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorParam, json_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorParam, row_record_), + }; + VectorParam_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + VectorParam_descriptor_, + VectorParam::default_instance_, + VectorParam_offsets_, + -1, + -1, + -1, + sizeof(VectorParam), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorParam, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VectorParam, _is_default_instance_)); + FieldValue_descriptor_ = file->message_type(6); + static const int FieldValue_offsets_[4] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldValue, field_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldValue, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldValue, attr_record_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldValue, vector_record_), + }; + FieldValue_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + FieldValue_descriptor_, + FieldValue::default_instance_, + FieldValue_offsets_, + -1, + -1, + -1, + sizeof(FieldValue), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldValue, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldValue, _is_default_instance_)); + PulsarMessage_descriptor_ = file->message_type(7); + static const int PulsarMessage_offsets_[11] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, collection_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, fields_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, entity_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, partition_tag_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, vector_param_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, segments_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, timestamp_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, client_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, msg_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, topic_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, partition_id_), + }; + PulsarMessage_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + PulsarMessage_descriptor_, + PulsarMessage::default_instance_, + PulsarMessage_offsets_, + -1, + -1, + -1, + sizeof(PulsarMessage), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PulsarMessage, _is_default_instance_)); + TestData_descriptor_ = file->message_type(8); + static const int TestData_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestData, id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestData, name_), + }; + TestData_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + TestData_descriptor_, + TestData::default_instance_, + TestData_offsets_, + -1, + -1, + -1, + sizeof(TestData), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestData, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TestData, _is_default_instance_)); + InsertMsg_descriptor_ = file->message_type(9); + static const int InsertMsg_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InsertMsg, client_id_), + }; + InsertMsg_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + InsertMsg_descriptor_, + InsertMsg::default_instance_, + InsertMsg_offsets_, + -1, + -1, + -1, + sizeof(InsertMsg), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InsertMsg, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InsertMsg, _is_default_instance_)); + DeleteMsg_descriptor_ = file->message_type(10); + static const int DeleteMsg_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DeleteMsg, client_id_), + }; + DeleteMsg_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + DeleteMsg_descriptor_, + DeleteMsg::default_instance_, + DeleteMsg_offsets_, + -1, + -1, + -1, + sizeof(DeleteMsg), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DeleteMsg, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DeleteMsg, _is_default_instance_)); + SearchMsg_descriptor_ = file->message_type(11); + static const int SearchMsg_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SearchMsg, client_id_), + }; + SearchMsg_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + SearchMsg_descriptor_, + SearchMsg::default_instance_, + SearchMsg_offsets_, + -1, + -1, + -1, + sizeof(SearchMsg), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SearchMsg, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SearchMsg, _is_default_instance_)); + SearchResultMsg_descriptor_ = file->message_type(12); + static const int SearchResultMsg_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SearchResultMsg, client_id_), + }; + SearchResultMsg_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + SearchResultMsg_descriptor_, + SearchResultMsg::default_instance_, + SearchResultMsg_offsets_, + -1, + -1, + -1, + sizeof(SearchResultMsg), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SearchResultMsg, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SearchResultMsg, _is_default_instance_)); + ErrorCode_descriptor_ = file->enum_type(0); + DataType_descriptor_ = file->enum_type(1); + OpType_descriptor_ = file->enum_type(2); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_pulsar_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + Status_descriptor_, &Status::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + SegmentRecord_descriptor_, &SegmentRecord::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + VectorRowRecord_descriptor_, &VectorRowRecord::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + AttrRecord_descriptor_, &AttrRecord::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + VectorRecord_descriptor_, &VectorRecord::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + VectorParam_descriptor_, &VectorParam::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + FieldValue_descriptor_, &FieldValue::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + PulsarMessage_descriptor_, &PulsarMessage::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + TestData_descriptor_, &TestData::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + InsertMsg_descriptor_, &InsertMsg::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + DeleteMsg_descriptor_, &DeleteMsg::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + SearchMsg_descriptor_, &SearchMsg::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + SearchResultMsg_descriptor_, &SearchResultMsg::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_pulsar_2eproto() { + delete Status::default_instance_; + delete Status_reflection_; + delete SegmentRecord::default_instance_; + delete SegmentRecord_reflection_; + delete VectorRowRecord::default_instance_; + delete VectorRowRecord_reflection_; + delete AttrRecord::default_instance_; + delete AttrRecord_reflection_; + delete VectorRecord::default_instance_; + delete VectorRecord_reflection_; + delete VectorParam::default_instance_; + delete VectorParam_reflection_; + delete FieldValue::default_instance_; + delete FieldValue_reflection_; + delete PulsarMessage::default_instance_; + delete PulsarMessage_reflection_; + delete TestData::default_instance_; + delete TestData_reflection_; + delete InsertMsg::default_instance_; + delete InsertMsg_reflection_; + delete DeleteMsg::default_instance_; + delete DeleteMsg_reflection_; + delete SearchMsg::default_instance_; + delete SearchMsg_reflection_; + delete SearchResultMsg::default_instance_; + delete SearchResultMsg_reflection_; +} + +void protobuf_AddDesc_pulsar_2eproto() GOOGLE_ATTRIBUTE_COLD; +void protobuf_AddDesc_pulsar_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\014pulsar.proto\022\002pb\";\n\006Status\022!\n\nerror_co" + "de\030\001 \001(\0162\r.pb.ErrorCode\022\016\n\006reason\030\002 \001(\t\"" + "!\n\rSegmentRecord\022\020\n\010seg_info\030\001 \003(\t\":\n\017Ve" + "ctorRowRecord\022\022\n\nfloat_data\030\001 \003(\002\022\023\n\013bin" + "ary_data\030\002 \001(\014\"a\n\nAttrRecord\022\023\n\013int32_va" + "lue\030\001 \003(\005\022\023\n\013int64_value\030\002 \003(\003\022\023\n\013float_" + "value\030\003 \003(\002\022\024\n\014double_value\030\004 \003(\001\"4\n\014Vec" + "torRecord\022$\n\007records\030\001 \003(\0132\023.pb.VectorRo" + "wRecord\"A\n\013VectorParam\022\014\n\004json\030\001 \001(\t\022$\n\n" + "row_record\030\002 \001(\0132\020.pb.VectorRecord\"\212\001\n\nF" + "ieldValue\022\022\n\nfield_name\030\001 \001(\t\022\032\n\004type\030\002 " + "\001(\0162\014.pb.DataType\022#\n\013attr_record\030\003 \001(\0132\016" + ".pb.AttrRecord\022\'\n\rvector_record\030\004 \001(\0132\020." + "pb.VectorRecord\"\254\002\n\rPulsarMessage\022\027\n\017col" + "lection_name\030\001 \001(\t\022\036\n\006fields\030\002 \003(\0132\016.pb." + "FieldValue\022\021\n\tentity_id\030\003 \001(\003\022\025\n\rpartiti" + "on_tag\030\004 \001(\t\022%\n\014vector_param\030\005 \001(\0132\017.pb." + "VectorParam\022#\n\010segments\030\006 \001(\0132\021.pb.Segme" + "ntRecord\022\021\n\ttimestamp\030\007 \001(\003\022\021\n\tclient_id" + "\030\010 \001(\003\022\034\n\010msg_type\030\t \001(\0162\n.pb.OpType\022\022\n\n" + "topic_name\030\n \001(\t\022\024\n\014partition_id\030\013 \001(\003\"$" + "\n\010TestData\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\"\036\n\t" + "InsertMsg\022\021\n\tclient_id\030\001 \001(\003\"\036\n\tDeleteMs" + "g\022\021\n\tclient_id\030\001 \001(\003\"\036\n\tSearchMsg\022\021\n\tcli" + "ent_id\030\001 \001(\003\"$\n\017SearchResultMsg\022\021\n\tclien" + "t_id\030\001 \001(\003*\242\004\n\tErrorCode\022\013\n\007SUCCESS\020\000\022\024\n" + "\020UNEXPECTED_ERROR\020\001\022\022\n\016CONNECT_FAILED\020\002\022" + "\025\n\021PERMISSION_DENIED\020\003\022\031\n\025COLLECTION_NOT" + "_EXISTS\020\004\022\024\n\020ILLEGAL_ARGUMENT\020\005\022\025\n\021ILLEG" + "AL_DIMENSION\020\007\022\026\n\022ILLEGAL_INDEX_TYPE\020\010\022\033" + "\n\027ILLEGAL_COLLECTION_NAME\020\t\022\020\n\014ILLEGAL_T" + "OPK\020\n\022\025\n\021ILLEGAL_ROWRECORD\020\013\022\025\n\021ILLEGAL_" + "VECTOR_ID\020\014\022\031\n\025ILLEGAL_SEARCH_RESULT\020\r\022\022" + "\n\016FILE_NOT_FOUND\020\016\022\017\n\013META_FAILED\020\017\022\020\n\014C" + "ACHE_FAILED\020\020\022\030\n\024CANNOT_CREATE_FOLDER\020\021\022" + "\026\n\022CANNOT_CREATE_FILE\020\022\022\030\n\024CANNOT_DELETE" + "_FOLDER\020\023\022\026\n\022CANNOT_DELETE_FILE\020\024\022\025\n\021BUI" + "LD_INDEX_ERROR\020\025\022\021\n\rILLEGAL_NLIST\020\026\022\027\n\023I" + "LLEGAL_METRIC_TYPE\020\027\022\021\n\rOUT_OF_MEMORY\020\030*" + "\221\001\n\010DataType\022\010\n\004NONE\020\000\022\010\n\004BOOL\020\001\022\010\n\004INT8" + "\020\002\022\t\n\005INT16\020\003\022\t\n\005INT32\020\004\022\t\n\005INT64\020\005\022\t\n\005F" + "LOAT\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006STRING\020\024\022\021\n\rVECTOR" + "_BINARY\020d\022\020\n\014VECTOR_FLOAT\020e*W\n\006OpType\022\n\n" + "\006Insert\020\000\022\n\n\006Delete\020\001\022\n\n\006Search\020\002\022\014\n\010Tim" + "eSync\020\003\022\013\n\007Key2Seg\020\004\022\016\n\nStatistics\020\005b\006pr" + "oto3", 1804); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "pulsar.proto", &protobuf_RegisterTypes); + Status::default_instance_ = new Status(); + SegmentRecord::default_instance_ = new SegmentRecord(); + VectorRowRecord::default_instance_ = new VectorRowRecord(); + AttrRecord::default_instance_ = new AttrRecord(); + VectorRecord::default_instance_ = new VectorRecord(); + VectorParam::default_instance_ = new VectorParam(); + FieldValue::default_instance_ = new FieldValue(); + PulsarMessage::default_instance_ = new PulsarMessage(); + TestData::default_instance_ = new TestData(); + InsertMsg::default_instance_ = new InsertMsg(); + DeleteMsg::default_instance_ = new DeleteMsg(); + SearchMsg::default_instance_ = new SearchMsg(); + SearchResultMsg::default_instance_ = new SearchResultMsg(); + Status::default_instance_->InitAsDefaultInstance(); + SegmentRecord::default_instance_->InitAsDefaultInstance(); + VectorRowRecord::default_instance_->InitAsDefaultInstance(); + AttrRecord::default_instance_->InitAsDefaultInstance(); + VectorRecord::default_instance_->InitAsDefaultInstance(); + VectorParam::default_instance_->InitAsDefaultInstance(); + FieldValue::default_instance_->InitAsDefaultInstance(); + PulsarMessage::default_instance_->InitAsDefaultInstance(); + TestData::default_instance_->InitAsDefaultInstance(); + InsertMsg::default_instance_->InitAsDefaultInstance(); + DeleteMsg::default_instance_->InitAsDefaultInstance(); + SearchMsg::default_instance_->InitAsDefaultInstance(); + SearchResultMsg::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_pulsar_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_pulsar_2eproto { + StaticDescriptorInitializer_pulsar_2eproto() { + protobuf_AddDesc_pulsar_2eproto(); + } +} static_descriptor_initializer_pulsar_2eproto_; +const ::google::protobuf::EnumDescriptor* ErrorCode_descriptor() { + protobuf_AssignDescriptorsOnce(); + return ErrorCode_descriptor_; +} +bool ErrorCode_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* DataType_descriptor() { + protobuf_AssignDescriptorsOnce(); + return DataType_descriptor_; +} +bool DataType_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 10: + case 11: + case 20: + case 100: + case 101: + return true; + default: + return false; + } +} + +const ::google::protobuf::EnumDescriptor* OpType_descriptor() { + protobuf_AssignDescriptorsOnce(); + return OpType_descriptor_; +} +bool OpType_IsValid(int value) { + switch(value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int Status::kErrorCodeFieldNumber; +const int Status::kReasonFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +Status::Status() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.Status) +} + +void Status::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +Status::Status(const Status& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.Status) +} + +void Status::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + error_code_ = 0; + reason_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +Status::~Status() { + // @@protoc_insertion_point(destructor:pb.Status) + SharedDtor(); +} + +void Status::SharedDtor() { + reason_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void Status::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Status::descriptor() { + protobuf_AssignDescriptorsOnce(); + return Status_descriptor_; +} + +const Status& Status::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +Status* Status::default_instance_ = NULL; + +Status* Status::New(::google::protobuf::Arena* arena) const { + Status* n = new Status; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void Status::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.Status) + error_code_ = 0; + reason_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +bool Status::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.Status) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional .pb.ErrorCode error_code = 1; + case 1: { + if (tag == 8) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_error_code(static_cast< ::pb::ErrorCode >(value)); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_reason; + break; + } + + // optional string reason = 2; + case 2: { + if (tag == 18) { + parse_reason: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_reason())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "pb.Status.reason")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.Status) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.Status) + return false; +#undef DO_ +} + +void Status::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.Status) + // optional .pb.ErrorCode error_code = 1; + if (this->error_code() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->error_code(), output); + } + + // optional string reason = 2; + if (this->reason().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.Status.reason"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->reason(), output); + } + + // @@protoc_insertion_point(serialize_end:pb.Status) +} + +::google::protobuf::uint8* Status::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.Status) + // optional .pb.ErrorCode error_code = 1; + if (this->error_code() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->error_code(), target); + } + + // optional string reason = 2; + if (this->reason().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->reason().data(), this->reason().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.Status.reason"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->reason(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.Status) + return target; +} + +int Status::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.Status) + int total_size = 0; + + // optional .pb.ErrorCode error_code = 1; + if (this->error_code() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->error_code()); + } + + // optional string reason = 2; + if (this->reason().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->reason()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Status::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.Status) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const Status* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.Status) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.Status) + MergeFrom(*source); + } +} + +void Status::MergeFrom(const Status& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.Status) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + if (from.error_code() != 0) { + set_error_code(from.error_code()); + } + if (from.reason().size() > 0) { + + reason_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reason_); + } +} + +void Status::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.Status) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Status::CopyFrom(const Status& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.Status) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Status::IsInitialized() const { + + return true; +} + +void Status::Swap(Status* other) { + if (other == this) return; + InternalSwap(other); +} +void Status::InternalSwap(Status* other) { + std::swap(error_code_, other->error_code_); + reason_.Swap(&other->reason_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata Status::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = Status_descriptor_; + metadata.reflection = Status_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Status + +// optional .pb.ErrorCode error_code = 1; +void Status::clear_error_code() { + error_code_ = 0; +} + ::pb::ErrorCode Status::error_code() const { + // @@protoc_insertion_point(field_get:pb.Status.error_code) + return static_cast< ::pb::ErrorCode >(error_code_); +} + void Status::set_error_code(::pb::ErrorCode value) { + + error_code_ = value; + // @@protoc_insertion_point(field_set:pb.Status.error_code) +} + +// optional string reason = 2; +void Status::clear_reason() { + reason_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& Status::reason() const { + // @@protoc_insertion_point(field_get:pb.Status.reason) + return reason_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void Status::set_reason(const ::std::string& value) { + + reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.Status.reason) +} + void Status::set_reason(const char* value) { + + reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.Status.reason) +} + void Status::set_reason(const char* value, size_t size) { + + reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.Status.reason) +} + ::std::string* Status::mutable_reason() { + + // @@protoc_insertion_point(field_mutable:pb.Status.reason) + return reason_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* Status::release_reason() { + // @@protoc_insertion_point(field_release:pb.Status.reason) + + return reason_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void Status::set_allocated_reason(::std::string* reason) { + if (reason != NULL) { + + } else { + + } + reason_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), reason); + // @@protoc_insertion_point(field_set_allocated:pb.Status.reason) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int SegmentRecord::kSegInfoFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +SegmentRecord::SegmentRecord() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.SegmentRecord) +} + +void SegmentRecord::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +SegmentRecord::SegmentRecord(const SegmentRecord& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.SegmentRecord) +} + +void SegmentRecord::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; +} + +SegmentRecord::~SegmentRecord() { + // @@protoc_insertion_point(destructor:pb.SegmentRecord) + SharedDtor(); +} + +void SegmentRecord::SharedDtor() { + if (this != default_instance_) { + } +} + +void SegmentRecord::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* SegmentRecord::descriptor() { + protobuf_AssignDescriptorsOnce(); + return SegmentRecord_descriptor_; +} + +const SegmentRecord& SegmentRecord::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +SegmentRecord* SegmentRecord::default_instance_ = NULL; + +SegmentRecord* SegmentRecord::New(::google::protobuf::Arena* arena) const { + SegmentRecord* n = new SegmentRecord; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void SegmentRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.SegmentRecord) + seg_info_.Clear(); +} + +bool SegmentRecord::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.SegmentRecord) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated string seg_info = 1; + case 1: { + if (tag == 10) { + parse_seg_info: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_seg_info())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->seg_info(this->seg_info_size() - 1).data(), + this->seg_info(this->seg_info_size() - 1).length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "pb.SegmentRecord.seg_info")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_seg_info; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.SegmentRecord) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.SegmentRecord) + return false; +#undef DO_ +} + +void SegmentRecord::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.SegmentRecord) + // repeated string seg_info = 1; + for (int i = 0; i < this->seg_info_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->seg_info(i).data(), this->seg_info(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.SegmentRecord.seg_info"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->seg_info(i), output); + } + + // @@protoc_insertion_point(serialize_end:pb.SegmentRecord) +} + +::google::protobuf::uint8* SegmentRecord::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.SegmentRecord) + // repeated string seg_info = 1; + for (int i = 0; i < this->seg_info_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->seg_info(i).data(), this->seg_info(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.SegmentRecord.seg_info"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(1, this->seg_info(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.SegmentRecord) + return target; +} + +int SegmentRecord::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.SegmentRecord) + int total_size = 0; + + // repeated string seg_info = 1; + total_size += 1 * this->seg_info_size(); + for (int i = 0; i < this->seg_info_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->seg_info(i)); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void SegmentRecord::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.SegmentRecord) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const SegmentRecord* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.SegmentRecord) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.SegmentRecord) + MergeFrom(*source); + } +} + +void SegmentRecord::MergeFrom(const SegmentRecord& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.SegmentRecord) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + seg_info_.MergeFrom(from.seg_info_); +} + +void SegmentRecord::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.SegmentRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void SegmentRecord::CopyFrom(const SegmentRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.SegmentRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SegmentRecord::IsInitialized() const { + + return true; +} + +void SegmentRecord::Swap(SegmentRecord* other) { + if (other == this) return; + InternalSwap(other); +} +void SegmentRecord::InternalSwap(SegmentRecord* other) { + seg_info_.UnsafeArenaSwap(&other->seg_info_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata SegmentRecord::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = SegmentRecord_descriptor_; + metadata.reflection = SegmentRecord_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SegmentRecord + +// repeated string seg_info = 1; +int SegmentRecord::seg_info_size() const { + return seg_info_.size(); +} +void SegmentRecord::clear_seg_info() { + seg_info_.Clear(); +} + const ::std::string& SegmentRecord::seg_info(int index) const { + // @@protoc_insertion_point(field_get:pb.SegmentRecord.seg_info) + return seg_info_.Get(index); +} + ::std::string* SegmentRecord::mutable_seg_info(int index) { + // @@protoc_insertion_point(field_mutable:pb.SegmentRecord.seg_info) + return seg_info_.Mutable(index); +} + void SegmentRecord::set_seg_info(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:pb.SegmentRecord.seg_info) + seg_info_.Mutable(index)->assign(value); +} + void SegmentRecord::set_seg_info(int index, const char* value) { + seg_info_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.SegmentRecord.seg_info) +} + void SegmentRecord::set_seg_info(int index, const char* value, size_t size) { + seg_info_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.SegmentRecord.seg_info) +} + ::std::string* SegmentRecord::add_seg_info() { + // @@protoc_insertion_point(field_add_mutable:pb.SegmentRecord.seg_info) + return seg_info_.Add(); +} + void SegmentRecord::add_seg_info(const ::std::string& value) { + seg_info_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.SegmentRecord.seg_info) +} + void SegmentRecord::add_seg_info(const char* value) { + seg_info_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.SegmentRecord.seg_info) +} + void SegmentRecord::add_seg_info(const char* value, size_t size) { + seg_info_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.SegmentRecord.seg_info) +} + const ::google::protobuf::RepeatedPtrField< ::std::string>& +SegmentRecord::seg_info() const { + // @@protoc_insertion_point(field_list:pb.SegmentRecord.seg_info) + return seg_info_; +} + ::google::protobuf::RepeatedPtrField< ::std::string>* +SegmentRecord::mutable_seg_info() { + // @@protoc_insertion_point(field_mutable_list:pb.SegmentRecord.seg_info) + return &seg_info_; +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int VectorRowRecord::kFloatDataFieldNumber; +const int VectorRowRecord::kBinaryDataFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +VectorRowRecord::VectorRowRecord() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.VectorRowRecord) +} + +void VectorRowRecord::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +VectorRowRecord::VectorRowRecord(const VectorRowRecord& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.VectorRowRecord) +} + +void VectorRowRecord::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + binary_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +VectorRowRecord::~VectorRowRecord() { + // @@protoc_insertion_point(destructor:pb.VectorRowRecord) + SharedDtor(); +} + +void VectorRowRecord::SharedDtor() { + binary_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void VectorRowRecord::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* VectorRowRecord::descriptor() { + protobuf_AssignDescriptorsOnce(); + return VectorRowRecord_descriptor_; +} + +const VectorRowRecord& VectorRowRecord::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +VectorRowRecord* VectorRowRecord::default_instance_ = NULL; + +VectorRowRecord* VectorRowRecord::New(::google::protobuf::Arena* arena) const { + VectorRowRecord* n = new VectorRowRecord; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void VectorRowRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.VectorRowRecord) + binary_data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + float_data_.Clear(); +} + +bool VectorRowRecord::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.VectorRowRecord) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated float float_data = 1; + case 1: { + if (tag == 10) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_float_data()))); + } else if (tag == 13) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + 1, 10, input, this->mutable_float_data()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_binary_data; + break; + } + + // optional bytes binary_data = 2; + case 2: { + if (tag == 18) { + parse_binary_data: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_binary_data())); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.VectorRowRecord) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.VectorRowRecord) + return false; +#undef DO_ +} + +void VectorRowRecord::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.VectorRowRecord) + // repeated float float_data = 1; + if (this->float_data_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_float_data_cached_byte_size_); + } + for (int i = 0; i < this->float_data_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag( + this->float_data(i), output); + } + + // optional bytes binary_data = 2; + if (this->binary_data().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 2, this->binary_data(), output); + } + + // @@protoc_insertion_point(serialize_end:pb.VectorRowRecord) +} + +::google::protobuf::uint8* VectorRowRecord::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.VectorRowRecord) + // repeated float float_data = 1; + if (this->float_data_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 1, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _float_data_cached_byte_size_, target); + } + for (int i = 0; i < this->float_data_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteFloatNoTagToArray(this->float_data(i), target); + } + + // optional bytes binary_data = 2; + if (this->binary_data().size() > 0) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 2, this->binary_data(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.VectorRowRecord) + return target; +} + +int VectorRowRecord::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.VectorRowRecord) + int total_size = 0; + + // optional bytes binary_data = 2; + if (this->binary_data().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->binary_data()); + } + + // repeated float float_data = 1; + { + int data_size = 0; + data_size = 4 * this->float_data_size(); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _float_data_cached_byte_size_ = data_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void VectorRowRecord::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.VectorRowRecord) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const VectorRowRecord* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.VectorRowRecord) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.VectorRowRecord) + MergeFrom(*source); + } +} + +void VectorRowRecord::MergeFrom(const VectorRowRecord& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.VectorRowRecord) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + float_data_.MergeFrom(from.float_data_); + if (from.binary_data().size() > 0) { + + binary_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.binary_data_); + } +} + +void VectorRowRecord::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.VectorRowRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void VectorRowRecord::CopyFrom(const VectorRowRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.VectorRowRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool VectorRowRecord::IsInitialized() const { + + return true; +} + +void VectorRowRecord::Swap(VectorRowRecord* other) { + if (other == this) return; + InternalSwap(other); +} +void VectorRowRecord::InternalSwap(VectorRowRecord* other) { + float_data_.UnsafeArenaSwap(&other->float_data_); + binary_data_.Swap(&other->binary_data_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata VectorRowRecord::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = VectorRowRecord_descriptor_; + metadata.reflection = VectorRowRecord_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// VectorRowRecord + +// repeated float float_data = 1; +int VectorRowRecord::float_data_size() const { + return float_data_.size(); +} +void VectorRowRecord::clear_float_data() { + float_data_.Clear(); +} + float VectorRowRecord::float_data(int index) const { + // @@protoc_insertion_point(field_get:pb.VectorRowRecord.float_data) + return float_data_.Get(index); +} + void VectorRowRecord::set_float_data(int index, float value) { + float_data_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.VectorRowRecord.float_data) +} + void VectorRowRecord::add_float_data(float value) { + float_data_.Add(value); + // @@protoc_insertion_point(field_add:pb.VectorRowRecord.float_data) +} + const ::google::protobuf::RepeatedField< float >& +VectorRowRecord::float_data() const { + // @@protoc_insertion_point(field_list:pb.VectorRowRecord.float_data) + return float_data_; +} + ::google::protobuf::RepeatedField< float >* +VectorRowRecord::mutable_float_data() { + // @@protoc_insertion_point(field_mutable_list:pb.VectorRowRecord.float_data) + return &float_data_; +} + +// optional bytes binary_data = 2; +void VectorRowRecord::clear_binary_data() { + binary_data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& VectorRowRecord::binary_data() const { + // @@protoc_insertion_point(field_get:pb.VectorRowRecord.binary_data) + return binary_data_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void VectorRowRecord::set_binary_data(const ::std::string& value) { + + binary_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.VectorRowRecord.binary_data) +} + void VectorRowRecord::set_binary_data(const char* value) { + + binary_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.VectorRowRecord.binary_data) +} + void VectorRowRecord::set_binary_data(const void* value, size_t size) { + + binary_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.VectorRowRecord.binary_data) +} + ::std::string* VectorRowRecord::mutable_binary_data() { + + // @@protoc_insertion_point(field_mutable:pb.VectorRowRecord.binary_data) + return binary_data_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* VectorRowRecord::release_binary_data() { + // @@protoc_insertion_point(field_release:pb.VectorRowRecord.binary_data) + + return binary_data_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void VectorRowRecord::set_allocated_binary_data(::std::string* binary_data) { + if (binary_data != NULL) { + + } else { + + } + binary_data_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), binary_data); + // @@protoc_insertion_point(field_set_allocated:pb.VectorRowRecord.binary_data) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int AttrRecord::kInt32ValueFieldNumber; +const int AttrRecord::kInt64ValueFieldNumber; +const int AttrRecord::kFloatValueFieldNumber; +const int AttrRecord::kDoubleValueFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +AttrRecord::AttrRecord() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.AttrRecord) +} + +void AttrRecord::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +AttrRecord::AttrRecord(const AttrRecord& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.AttrRecord) +} + +void AttrRecord::SharedCtor() { + _is_default_instance_ = false; + _cached_size_ = 0; +} + +AttrRecord::~AttrRecord() { + // @@protoc_insertion_point(destructor:pb.AttrRecord) + SharedDtor(); +} + +void AttrRecord::SharedDtor() { + if (this != default_instance_) { + } +} + +void AttrRecord::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* AttrRecord::descriptor() { + protobuf_AssignDescriptorsOnce(); + return AttrRecord_descriptor_; +} + +const AttrRecord& AttrRecord::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +AttrRecord* AttrRecord::default_instance_ = NULL; + +AttrRecord* AttrRecord::New(::google::protobuf::Arena* arena) const { + AttrRecord* n = new AttrRecord; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void AttrRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.AttrRecord) + int32_value_.Clear(); + int64_value_.Clear(); + float_value_.Clear(); + double_value_.Clear(); +} + +bool AttrRecord::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.AttrRecord) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated int32 int32_value = 1; + case 1: { + if (tag == 10) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_int32_value()))); + } else if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 10, input, this->mutable_int32_value()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_int64_value; + break; + } + + // repeated int64 int64_value = 2; + case 2: { + if (tag == 18) { + parse_int64_value: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, this->mutable_int64_value()))); + } else if (tag == 16) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + 1, 18, input, this->mutable_int64_value()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_float_value; + break; + } + + // repeated float float_value = 3; + case 3: { + if (tag == 26) { + parse_float_value: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_float_value()))); + } else if (tag == 29) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + 1, 26, input, this->mutable_float_value()))); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_double_value; + break; + } + + // repeated double double_value = 4; + case 4: { + if (tag == 34) { + parse_double_value: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, this->mutable_double_value()))); + } else if (tag == 33) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + 1, 34, input, this->mutable_double_value()))); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.AttrRecord) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.AttrRecord) + return false; +#undef DO_ +} + +void AttrRecord::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.AttrRecord) + // repeated int32 int32_value = 1; + if (this->int32_value_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_int32_value_cached_byte_size_); + } + for (int i = 0; i < this->int32_value_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->int32_value(i), output); + } + + // repeated int64 int64_value = 2; + if (this->int64_value_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_int64_value_cached_byte_size_); + } + for (int i = 0; i < this->int64_value_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag( + this->int64_value(i), output); + } + + // repeated float float_value = 3; + if (this->float_value_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(3, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_float_value_cached_byte_size_); + } + for (int i = 0; i < this->float_value_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag( + this->float_value(i), output); + } + + // repeated double double_value = 4; + if (this->double_value_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(4, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_double_value_cached_byte_size_); + } + for (int i = 0; i < this->double_value_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteDoubleNoTag( + this->double_value(i), output); + } + + // @@protoc_insertion_point(serialize_end:pb.AttrRecord) +} + +::google::protobuf::uint8* AttrRecord::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.AttrRecord) + // repeated int32 int32_value = 1; + if (this->int32_value_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 1, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _int32_value_cached_byte_size_, target); + } + for (int i = 0; i < this->int32_value_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->int32_value(i), target); + } + + // repeated int64 int64_value = 2; + if (this->int64_value_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _int64_value_cached_byte_size_, target); + } + for (int i = 0; i < this->int64_value_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64NoTagToArray(this->int64_value(i), target); + } + + // repeated float float_value = 3; + if (this->float_value_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 3, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _float_value_cached_byte_size_, target); + } + for (int i = 0; i < this->float_value_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteFloatNoTagToArray(this->float_value(i), target); + } + + // repeated double double_value = 4; + if (this->double_value_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 4, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _double_value_cached_byte_size_, target); + } + for (int i = 0; i < this->double_value_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteDoubleNoTagToArray(this->double_value(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.AttrRecord) + return target; +} + +int AttrRecord::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.AttrRecord) + int total_size = 0; + + // repeated int32 int32_value = 1; + { + int data_size = 0; + for (int i = 0; i < this->int32_value_size(); i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->int32_value(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _int32_value_cached_byte_size_ = data_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated int64 int64_value = 2; + { + int data_size = 0; + for (int i = 0; i < this->int64_value_size(); i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int64Size(this->int64_value(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _int64_value_cached_byte_size_ = data_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated float float_value = 3; + { + int data_size = 0; + data_size = 4 * this->float_value_size(); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _float_value_cached_byte_size_ = data_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated double double_value = 4; + { + int data_size = 0; + data_size = 8 * this->double_value_size(); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _double_value_cached_byte_size_ = data_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void AttrRecord::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.AttrRecord) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const AttrRecord* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.AttrRecord) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.AttrRecord) + MergeFrom(*source); + } +} + +void AttrRecord::MergeFrom(const AttrRecord& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.AttrRecord) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + int32_value_.MergeFrom(from.int32_value_); + int64_value_.MergeFrom(from.int64_value_); + float_value_.MergeFrom(from.float_value_); + double_value_.MergeFrom(from.double_value_); +} + +void AttrRecord::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.AttrRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AttrRecord::CopyFrom(const AttrRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.AttrRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AttrRecord::IsInitialized() const { + + return true; +} + +void AttrRecord::Swap(AttrRecord* other) { + if (other == this) return; + InternalSwap(other); +} +void AttrRecord::InternalSwap(AttrRecord* other) { + int32_value_.UnsafeArenaSwap(&other->int32_value_); + int64_value_.UnsafeArenaSwap(&other->int64_value_); + float_value_.UnsafeArenaSwap(&other->float_value_); + double_value_.UnsafeArenaSwap(&other->double_value_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata AttrRecord::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = AttrRecord_descriptor_; + metadata.reflection = AttrRecord_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// AttrRecord + +// repeated int32 int32_value = 1; +int AttrRecord::int32_value_size() const { + return int32_value_.size(); +} +void AttrRecord::clear_int32_value() { + int32_value_.Clear(); +} + ::google::protobuf::int32 AttrRecord::int32_value(int index) const { + // @@protoc_insertion_point(field_get:pb.AttrRecord.int32_value) + return int32_value_.Get(index); +} + void AttrRecord::set_int32_value(int index, ::google::protobuf::int32 value) { + int32_value_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.AttrRecord.int32_value) +} + void AttrRecord::add_int32_value(::google::protobuf::int32 value) { + int32_value_.Add(value); + // @@protoc_insertion_point(field_add:pb.AttrRecord.int32_value) +} + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +AttrRecord::int32_value() const { + // @@protoc_insertion_point(field_list:pb.AttrRecord.int32_value) + return int32_value_; +} + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +AttrRecord::mutable_int32_value() { + // @@protoc_insertion_point(field_mutable_list:pb.AttrRecord.int32_value) + return &int32_value_; +} + +// repeated int64 int64_value = 2; +int AttrRecord::int64_value_size() const { + return int64_value_.size(); +} +void AttrRecord::clear_int64_value() { + int64_value_.Clear(); +} + ::google::protobuf::int64 AttrRecord::int64_value(int index) const { + // @@protoc_insertion_point(field_get:pb.AttrRecord.int64_value) + return int64_value_.Get(index); +} + void AttrRecord::set_int64_value(int index, ::google::protobuf::int64 value) { + int64_value_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.AttrRecord.int64_value) +} + void AttrRecord::add_int64_value(::google::protobuf::int64 value) { + int64_value_.Add(value); + // @@protoc_insertion_point(field_add:pb.AttrRecord.int64_value) +} + const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +AttrRecord::int64_value() const { + // @@protoc_insertion_point(field_list:pb.AttrRecord.int64_value) + return int64_value_; +} + ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +AttrRecord::mutable_int64_value() { + // @@protoc_insertion_point(field_mutable_list:pb.AttrRecord.int64_value) + return &int64_value_; +} + +// repeated float float_value = 3; +int AttrRecord::float_value_size() const { + return float_value_.size(); +} +void AttrRecord::clear_float_value() { + float_value_.Clear(); +} + float AttrRecord::float_value(int index) const { + // @@protoc_insertion_point(field_get:pb.AttrRecord.float_value) + return float_value_.Get(index); +} + void AttrRecord::set_float_value(int index, float value) { + float_value_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.AttrRecord.float_value) +} + void AttrRecord::add_float_value(float value) { + float_value_.Add(value); + // @@protoc_insertion_point(field_add:pb.AttrRecord.float_value) +} + const ::google::protobuf::RepeatedField< float >& +AttrRecord::float_value() const { + // @@protoc_insertion_point(field_list:pb.AttrRecord.float_value) + return float_value_; +} + ::google::protobuf::RepeatedField< float >* +AttrRecord::mutable_float_value() { + // @@protoc_insertion_point(field_mutable_list:pb.AttrRecord.float_value) + return &float_value_; +} + +// repeated double double_value = 4; +int AttrRecord::double_value_size() const { + return double_value_.size(); +} +void AttrRecord::clear_double_value() { + double_value_.Clear(); +} + double AttrRecord::double_value(int index) const { + // @@protoc_insertion_point(field_get:pb.AttrRecord.double_value) + return double_value_.Get(index); +} + void AttrRecord::set_double_value(int index, double value) { + double_value_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.AttrRecord.double_value) +} + void AttrRecord::add_double_value(double value) { + double_value_.Add(value); + // @@protoc_insertion_point(field_add:pb.AttrRecord.double_value) +} + const ::google::protobuf::RepeatedField< double >& +AttrRecord::double_value() const { + // @@protoc_insertion_point(field_list:pb.AttrRecord.double_value) + return double_value_; +} + ::google::protobuf::RepeatedField< double >* +AttrRecord::mutable_double_value() { + // @@protoc_insertion_point(field_mutable_list:pb.AttrRecord.double_value) + return &double_value_; +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int VectorRecord::kRecordsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +VectorRecord::VectorRecord() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.VectorRecord) +} + +void VectorRecord::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +VectorRecord::VectorRecord(const VectorRecord& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.VectorRecord) +} + +void VectorRecord::SharedCtor() { + _is_default_instance_ = false; + _cached_size_ = 0; +} + +VectorRecord::~VectorRecord() { + // @@protoc_insertion_point(destructor:pb.VectorRecord) + SharedDtor(); +} + +void VectorRecord::SharedDtor() { + if (this != default_instance_) { + } +} + +void VectorRecord::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* VectorRecord::descriptor() { + protobuf_AssignDescriptorsOnce(); + return VectorRecord_descriptor_; +} + +const VectorRecord& VectorRecord::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +VectorRecord* VectorRecord::default_instance_ = NULL; + +VectorRecord* VectorRecord::New(::google::protobuf::Arena* arena) const { + VectorRecord* n = new VectorRecord; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void VectorRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.VectorRecord) + records_.Clear(); +} + +bool VectorRecord::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.VectorRecord) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .pb.VectorRowRecord records = 1; + case 1: { + if (tag == 10) { + DO_(input->IncrementRecursionDepth()); + parse_loop_records: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_records())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_loop_records; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.VectorRecord) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.VectorRecord) + return false; +#undef DO_ +} + +void VectorRecord::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.VectorRecord) + // repeated .pb.VectorRowRecord records = 1; + for (unsigned int i = 0, n = this->records_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->records(i), output); + } + + // @@protoc_insertion_point(serialize_end:pb.VectorRecord) +} + +::google::protobuf::uint8* VectorRecord::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.VectorRecord) + // repeated .pb.VectorRowRecord records = 1; + for (unsigned int i = 0, n = this->records_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 1, this->records(i), false, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.VectorRecord) + return target; +} + +int VectorRecord::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.VectorRecord) + int total_size = 0; + + // repeated .pb.VectorRowRecord records = 1; + total_size += 1 * this->records_size(); + for (int i = 0; i < this->records_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->records(i)); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void VectorRecord::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.VectorRecord) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const VectorRecord* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.VectorRecord) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.VectorRecord) + MergeFrom(*source); + } +} + +void VectorRecord::MergeFrom(const VectorRecord& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.VectorRecord) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + records_.MergeFrom(from.records_); +} + +void VectorRecord::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.VectorRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void VectorRecord::CopyFrom(const VectorRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.VectorRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool VectorRecord::IsInitialized() const { + + return true; +} + +void VectorRecord::Swap(VectorRecord* other) { + if (other == this) return; + InternalSwap(other); +} +void VectorRecord::InternalSwap(VectorRecord* other) { + records_.UnsafeArenaSwap(&other->records_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata VectorRecord::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = VectorRecord_descriptor_; + metadata.reflection = VectorRecord_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// VectorRecord + +// repeated .pb.VectorRowRecord records = 1; +int VectorRecord::records_size() const { + return records_.size(); +} +void VectorRecord::clear_records() { + records_.Clear(); +} +const ::pb::VectorRowRecord& VectorRecord::records(int index) const { + // @@protoc_insertion_point(field_get:pb.VectorRecord.records) + return records_.Get(index); +} +::pb::VectorRowRecord* VectorRecord::mutable_records(int index) { + // @@protoc_insertion_point(field_mutable:pb.VectorRecord.records) + return records_.Mutable(index); +} +::pb::VectorRowRecord* VectorRecord::add_records() { + // @@protoc_insertion_point(field_add:pb.VectorRecord.records) + return records_.Add(); +} +::google::protobuf::RepeatedPtrField< ::pb::VectorRowRecord >* +VectorRecord::mutable_records() { + // @@protoc_insertion_point(field_mutable_list:pb.VectorRecord.records) + return &records_; +} +const ::google::protobuf::RepeatedPtrField< ::pb::VectorRowRecord >& +VectorRecord::records() const { + // @@protoc_insertion_point(field_list:pb.VectorRecord.records) + return records_; +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int VectorParam::kJsonFieldNumber; +const int VectorParam::kRowRecordFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +VectorParam::VectorParam() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.VectorParam) +} + +void VectorParam::InitAsDefaultInstance() { + _is_default_instance_ = true; + row_record_ = const_cast< ::pb::VectorRecord*>(&::pb::VectorRecord::default_instance()); +} + +VectorParam::VectorParam(const VectorParam& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.VectorParam) +} + +void VectorParam::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + json_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + row_record_ = NULL; +} + +VectorParam::~VectorParam() { + // @@protoc_insertion_point(destructor:pb.VectorParam) + SharedDtor(); +} + +void VectorParam::SharedDtor() { + json_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + delete row_record_; + } +} + +void VectorParam::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* VectorParam::descriptor() { + protobuf_AssignDescriptorsOnce(); + return VectorParam_descriptor_; +} + +const VectorParam& VectorParam::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +VectorParam* VectorParam::default_instance_ = NULL; + +VectorParam* VectorParam::New(::google::protobuf::Arena* arena) const { + VectorParam* n = new VectorParam; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void VectorParam::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.VectorParam) + json_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == NULL && row_record_ != NULL) delete row_record_; + row_record_ = NULL; +} + +bool VectorParam::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.VectorParam) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string json = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_json())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->json().data(), this->json().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "pb.VectorParam.json")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_row_record; + break; + } + + // optional .pb.VectorRecord row_record = 2; + case 2: { + if (tag == 18) { + parse_row_record: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_row_record())); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.VectorParam) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.VectorParam) + return false; +#undef DO_ +} + +void VectorParam::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.VectorParam) + // optional string json = 1; + if (this->json().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->json().data(), this->json().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.VectorParam.json"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->json(), output); + } + + // optional .pb.VectorRecord row_record = 2; + if (this->has_row_record()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, *this->row_record_, output); + } + + // @@protoc_insertion_point(serialize_end:pb.VectorParam) +} + +::google::protobuf::uint8* VectorParam::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.VectorParam) + // optional string json = 1; + if (this->json().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->json().data(), this->json().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.VectorParam.json"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->json(), target); + } + + // optional .pb.VectorRecord row_record = 2; + if (this->has_row_record()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, *this->row_record_, false, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.VectorParam) + return target; +} + +int VectorParam::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.VectorParam) + int total_size = 0; + + // optional string json = 1; + if (this->json().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->json()); + } + + // optional .pb.VectorRecord row_record = 2; + if (this->has_row_record()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->row_record_); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void VectorParam::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.VectorParam) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const VectorParam* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.VectorParam) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.VectorParam) + MergeFrom(*source); + } +} + +void VectorParam::MergeFrom(const VectorParam& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.VectorParam) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + if (from.json().size() > 0) { + + json_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.json_); + } + if (from.has_row_record()) { + mutable_row_record()->::pb::VectorRecord::MergeFrom(from.row_record()); + } +} + +void VectorParam::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.VectorParam) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void VectorParam::CopyFrom(const VectorParam& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.VectorParam) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool VectorParam::IsInitialized() const { + + return true; +} + +void VectorParam::Swap(VectorParam* other) { + if (other == this) return; + InternalSwap(other); +} +void VectorParam::InternalSwap(VectorParam* other) { + json_.Swap(&other->json_); + std::swap(row_record_, other->row_record_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata VectorParam::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = VectorParam_descriptor_; + metadata.reflection = VectorParam_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// VectorParam + +// optional string json = 1; +void VectorParam::clear_json() { + json_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& VectorParam::json() const { + // @@protoc_insertion_point(field_get:pb.VectorParam.json) + return json_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void VectorParam::set_json(const ::std::string& value) { + + json_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.VectorParam.json) +} + void VectorParam::set_json(const char* value) { + + json_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.VectorParam.json) +} + void VectorParam::set_json(const char* value, size_t size) { + + json_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.VectorParam.json) +} + ::std::string* VectorParam::mutable_json() { + + // @@protoc_insertion_point(field_mutable:pb.VectorParam.json) + return json_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* VectorParam::release_json() { + // @@protoc_insertion_point(field_release:pb.VectorParam.json) + + return json_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void VectorParam::set_allocated_json(::std::string* json) { + if (json != NULL) { + + } else { + + } + json_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json); + // @@protoc_insertion_point(field_set_allocated:pb.VectorParam.json) +} + +// optional .pb.VectorRecord row_record = 2; +bool VectorParam::has_row_record() const { + return !_is_default_instance_ && row_record_ != NULL; +} +void VectorParam::clear_row_record() { + if (GetArenaNoVirtual() == NULL && row_record_ != NULL) delete row_record_; + row_record_ = NULL; +} +const ::pb::VectorRecord& VectorParam::row_record() const { + // @@protoc_insertion_point(field_get:pb.VectorParam.row_record) + return row_record_ != NULL ? *row_record_ : *default_instance_->row_record_; +} +::pb::VectorRecord* VectorParam::mutable_row_record() { + + if (row_record_ == NULL) { + row_record_ = new ::pb::VectorRecord; + } + // @@protoc_insertion_point(field_mutable:pb.VectorParam.row_record) + return row_record_; +} +::pb::VectorRecord* VectorParam::release_row_record() { + // @@protoc_insertion_point(field_release:pb.VectorParam.row_record) + + ::pb::VectorRecord* temp = row_record_; + row_record_ = NULL; + return temp; +} +void VectorParam::set_allocated_row_record(::pb::VectorRecord* row_record) { + delete row_record_; + row_record_ = row_record; + if (row_record) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:pb.VectorParam.row_record) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int FieldValue::kFieldNameFieldNumber; +const int FieldValue::kTypeFieldNumber; +const int FieldValue::kAttrRecordFieldNumber; +const int FieldValue::kVectorRecordFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +FieldValue::FieldValue() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.FieldValue) +} + +void FieldValue::InitAsDefaultInstance() { + _is_default_instance_ = true; + attr_record_ = const_cast< ::pb::AttrRecord*>(&::pb::AttrRecord::default_instance()); + vector_record_ = const_cast< ::pb::VectorRecord*>(&::pb::VectorRecord::default_instance()); +} + +FieldValue::FieldValue(const FieldValue& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.FieldValue) +} + +void FieldValue::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + field_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_ = 0; + attr_record_ = NULL; + vector_record_ = NULL; +} + +FieldValue::~FieldValue() { + // @@protoc_insertion_point(destructor:pb.FieldValue) + SharedDtor(); +} + +void FieldValue::SharedDtor() { + field_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + delete attr_record_; + delete vector_record_; + } +} + +void FieldValue::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* FieldValue::descriptor() { + protobuf_AssignDescriptorsOnce(); + return FieldValue_descriptor_; +} + +const FieldValue& FieldValue::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +FieldValue* FieldValue::default_instance_ = NULL; + +FieldValue* FieldValue::New(::google::protobuf::Arena* arena) const { + FieldValue* n = new FieldValue; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void FieldValue::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.FieldValue) + field_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_ = 0; + if (GetArenaNoVirtual() == NULL && attr_record_ != NULL) delete attr_record_; + attr_record_ = NULL; + if (GetArenaNoVirtual() == NULL && vector_record_ != NULL) delete vector_record_; + vector_record_ = NULL; +} + +bool FieldValue::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.FieldValue) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string field_name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_field_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->field_name().data(), this->field_name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "pb.FieldValue.field_name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_type; + break; + } + + // optional .pb.DataType type = 2; + case 2: { + if (tag == 16) { + parse_type: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_type(static_cast< ::pb::DataType >(value)); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_attr_record; + break; + } + + // optional .pb.AttrRecord attr_record = 3; + case 3: { + if (tag == 26) { + parse_attr_record: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_attr_record())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_vector_record; + break; + } + + // optional .pb.VectorRecord vector_record = 4; + case 4: { + if (tag == 34) { + parse_vector_record: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_vector_record())); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.FieldValue) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.FieldValue) + return false; +#undef DO_ +} + +void FieldValue::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.FieldValue) + // optional string field_name = 1; + if (this->field_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->field_name().data(), this->field_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.FieldValue.field_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->field_name(), output); + } + + // optional .pb.DataType type = 2; + if (this->type() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 2, this->type(), output); + } + + // optional .pb.AttrRecord attr_record = 3; + if (this->has_attr_record()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, *this->attr_record_, output); + } + + // optional .pb.VectorRecord vector_record = 4; + if (this->has_vector_record()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, *this->vector_record_, output); + } + + // @@protoc_insertion_point(serialize_end:pb.FieldValue) +} + +::google::protobuf::uint8* FieldValue::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.FieldValue) + // optional string field_name = 1; + if (this->field_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->field_name().data(), this->field_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.FieldValue.field_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->field_name(), target); + } + + // optional .pb.DataType type = 2; + if (this->type() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 2, this->type(), target); + } + + // optional .pb.AttrRecord attr_record = 3; + if (this->has_attr_record()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 3, *this->attr_record_, false, target); + } + + // optional .pb.VectorRecord vector_record = 4; + if (this->has_vector_record()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 4, *this->vector_record_, false, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.FieldValue) + return target; +} + +int FieldValue::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.FieldValue) + int total_size = 0; + + // optional string field_name = 1; + if (this->field_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->field_name()); + } + + // optional .pb.DataType type = 2; + if (this->type() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + // optional .pb.AttrRecord attr_record = 3; + if (this->has_attr_record()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->attr_record_); + } + + // optional .pb.VectorRecord vector_record = 4; + if (this->has_vector_record()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->vector_record_); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void FieldValue::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.FieldValue) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const FieldValue* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.FieldValue) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.FieldValue) + MergeFrom(*source); + } +} + +void FieldValue::MergeFrom(const FieldValue& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.FieldValue) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + if (from.field_name().size() > 0) { + + field_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.field_name_); + } + if (from.type() != 0) { + set_type(from.type()); + } + if (from.has_attr_record()) { + mutable_attr_record()->::pb::AttrRecord::MergeFrom(from.attr_record()); + } + if (from.has_vector_record()) { + mutable_vector_record()->::pb::VectorRecord::MergeFrom(from.vector_record()); + } +} + +void FieldValue::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.FieldValue) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void FieldValue::CopyFrom(const FieldValue& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.FieldValue) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FieldValue::IsInitialized() const { + + return true; +} + +void FieldValue::Swap(FieldValue* other) { + if (other == this) return; + InternalSwap(other); +} +void FieldValue::InternalSwap(FieldValue* other) { + field_name_.Swap(&other->field_name_); + std::swap(type_, other->type_); + std::swap(attr_record_, other->attr_record_); + std::swap(vector_record_, other->vector_record_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata FieldValue::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = FieldValue_descriptor_; + metadata.reflection = FieldValue_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// FieldValue + +// optional string field_name = 1; +void FieldValue::clear_field_name() { + field_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& FieldValue::field_name() const { + // @@protoc_insertion_point(field_get:pb.FieldValue.field_name) + return field_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void FieldValue::set_field_name(const ::std::string& value) { + + field_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.FieldValue.field_name) +} + void FieldValue::set_field_name(const char* value) { + + field_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.FieldValue.field_name) +} + void FieldValue::set_field_name(const char* value, size_t size) { + + field_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.FieldValue.field_name) +} + ::std::string* FieldValue::mutable_field_name() { + + // @@protoc_insertion_point(field_mutable:pb.FieldValue.field_name) + return field_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* FieldValue::release_field_name() { + // @@protoc_insertion_point(field_release:pb.FieldValue.field_name) + + return field_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void FieldValue::set_allocated_field_name(::std::string* field_name) { + if (field_name != NULL) { + + } else { + + } + field_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), field_name); + // @@protoc_insertion_point(field_set_allocated:pb.FieldValue.field_name) +} + +// optional .pb.DataType type = 2; +void FieldValue::clear_type() { + type_ = 0; +} + ::pb::DataType FieldValue::type() const { + // @@protoc_insertion_point(field_get:pb.FieldValue.type) + return static_cast< ::pb::DataType >(type_); +} + void FieldValue::set_type(::pb::DataType value) { + + type_ = value; + // @@protoc_insertion_point(field_set:pb.FieldValue.type) +} + +// optional .pb.AttrRecord attr_record = 3; +bool FieldValue::has_attr_record() const { + return !_is_default_instance_ && attr_record_ != NULL; +} +void FieldValue::clear_attr_record() { + if (GetArenaNoVirtual() == NULL && attr_record_ != NULL) delete attr_record_; + attr_record_ = NULL; +} +const ::pb::AttrRecord& FieldValue::attr_record() const { + // @@protoc_insertion_point(field_get:pb.FieldValue.attr_record) + return attr_record_ != NULL ? *attr_record_ : *default_instance_->attr_record_; +} +::pb::AttrRecord* FieldValue::mutable_attr_record() { + + if (attr_record_ == NULL) { + attr_record_ = new ::pb::AttrRecord; + } + // @@protoc_insertion_point(field_mutable:pb.FieldValue.attr_record) + return attr_record_; +} +::pb::AttrRecord* FieldValue::release_attr_record() { + // @@protoc_insertion_point(field_release:pb.FieldValue.attr_record) + + ::pb::AttrRecord* temp = attr_record_; + attr_record_ = NULL; + return temp; +} +void FieldValue::set_allocated_attr_record(::pb::AttrRecord* attr_record) { + delete attr_record_; + attr_record_ = attr_record; + if (attr_record) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:pb.FieldValue.attr_record) +} + +// optional .pb.VectorRecord vector_record = 4; +bool FieldValue::has_vector_record() const { + return !_is_default_instance_ && vector_record_ != NULL; +} +void FieldValue::clear_vector_record() { + if (GetArenaNoVirtual() == NULL && vector_record_ != NULL) delete vector_record_; + vector_record_ = NULL; +} +const ::pb::VectorRecord& FieldValue::vector_record() const { + // @@protoc_insertion_point(field_get:pb.FieldValue.vector_record) + return vector_record_ != NULL ? *vector_record_ : *default_instance_->vector_record_; +} +::pb::VectorRecord* FieldValue::mutable_vector_record() { + + if (vector_record_ == NULL) { + vector_record_ = new ::pb::VectorRecord; + } + // @@protoc_insertion_point(field_mutable:pb.FieldValue.vector_record) + return vector_record_; +} +::pb::VectorRecord* FieldValue::release_vector_record() { + // @@protoc_insertion_point(field_release:pb.FieldValue.vector_record) + + ::pb::VectorRecord* temp = vector_record_; + vector_record_ = NULL; + return temp; +} +void FieldValue::set_allocated_vector_record(::pb::VectorRecord* vector_record) { + delete vector_record_; + vector_record_ = vector_record; + if (vector_record) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:pb.FieldValue.vector_record) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int PulsarMessage::kCollectionNameFieldNumber; +const int PulsarMessage::kFieldsFieldNumber; +const int PulsarMessage::kEntityIdFieldNumber; +const int PulsarMessage::kPartitionTagFieldNumber; +const int PulsarMessage::kVectorParamFieldNumber; +const int PulsarMessage::kSegmentsFieldNumber; +const int PulsarMessage::kTimestampFieldNumber; +const int PulsarMessage::kClientIdFieldNumber; +const int PulsarMessage::kMsgTypeFieldNumber; +const int PulsarMessage::kTopicNameFieldNumber; +const int PulsarMessage::kPartitionIdFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +PulsarMessage::PulsarMessage() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.PulsarMessage) +} + +void PulsarMessage::InitAsDefaultInstance() { + _is_default_instance_ = true; + vector_param_ = const_cast< ::pb::VectorParam*>(&::pb::VectorParam::default_instance()); + segments_ = const_cast< ::pb::SegmentRecord*>(&::pb::SegmentRecord::default_instance()); +} + +PulsarMessage::PulsarMessage(const PulsarMessage& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.PulsarMessage) +} + +void PulsarMessage::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + collection_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + entity_id_ = GOOGLE_LONGLONG(0); + partition_tag_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + vector_param_ = NULL; + segments_ = NULL; + timestamp_ = GOOGLE_LONGLONG(0); + client_id_ = GOOGLE_LONGLONG(0); + msg_type_ = 0; + topic_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + partition_id_ = GOOGLE_LONGLONG(0); +} + +PulsarMessage::~PulsarMessage() { + // @@protoc_insertion_point(destructor:pb.PulsarMessage) + SharedDtor(); +} + +void PulsarMessage::SharedDtor() { + collection_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + partition_tag_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + topic_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + delete vector_param_; + delete segments_; + } +} + +void PulsarMessage::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* PulsarMessage::descriptor() { + protobuf_AssignDescriptorsOnce(); + return PulsarMessage_descriptor_; +} + +const PulsarMessage& PulsarMessage::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +PulsarMessage* PulsarMessage::default_instance_ = NULL; + +PulsarMessage* PulsarMessage::New(::google::protobuf::Arena* arena) const { + PulsarMessage* n = new PulsarMessage; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void PulsarMessage::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.PulsarMessage) +#if defined(__clang__) +#define ZR_HELPER_(f) \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ + __builtin_offsetof(PulsarMessage, f) \ + _Pragma("clang diagnostic pop") +#else +#define ZR_HELPER_(f) reinterpret_cast(\ + &reinterpret_cast(16)->f) +#endif + +#define ZR_(first, last) do {\ + ::memset(&first, 0,\ + ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ +} while (0) + + ZR_(timestamp_, client_id_); + collection_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + entity_id_ = GOOGLE_LONGLONG(0); + partition_tag_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == NULL && vector_param_ != NULL) delete vector_param_; + vector_param_ = NULL; + if (GetArenaNoVirtual() == NULL && segments_ != NULL) delete segments_; + segments_ = NULL; + ZR_(partition_id_, msg_type_); + topic_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + +#undef ZR_HELPER_ +#undef ZR_ + + fields_.Clear(); +} + +bool PulsarMessage::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.PulsarMessage) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string collection_name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_collection_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), this->collection_name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "pb.PulsarMessage.collection_name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_fields; + break; + } + + // repeated .pb.FieldValue fields = 2; + case 2: { + if (tag == 18) { + parse_fields: + DO_(input->IncrementRecursionDepth()); + parse_loop_fields: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_fields())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_loop_fields; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectTag(24)) goto parse_entity_id; + break; + } + + // optional int64 entity_id = 3; + case 3: { + if (tag == 24) { + parse_entity_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &entity_id_))); + + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_partition_tag; + break; + } + + // optional string partition_tag = 4; + case 4: { + if (tag == 34) { + parse_partition_tag: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_partition_tag())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag().data(), this->partition_tag().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "pb.PulsarMessage.partition_tag")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_vector_param; + break; + } + + // optional .pb.VectorParam vector_param = 5; + case 5: { + if (tag == 42) { + parse_vector_param: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_vector_param())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_segments; + break; + } + + // optional .pb.SegmentRecord segments = 6; + case 6: { + if (tag == 50) { + parse_segments: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_segments())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(56)) goto parse_timestamp; + break; + } + + // optional int64 timestamp = 7; + case 7: { + if (tag == 56) { + parse_timestamp: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, ×tamp_))); + + } else { + goto handle_unusual; + } + if (input->ExpectTag(64)) goto parse_client_id; + break; + } + + // optional int64 client_id = 8; + case 8: { + if (tag == 64) { + parse_client_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &client_id_))); + + } else { + goto handle_unusual; + } + if (input->ExpectTag(72)) goto parse_msg_type; + break; + } + + // optional .pb.OpType msg_type = 9; + case 9: { + if (tag == 72) { + parse_msg_type: + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_msg_type(static_cast< ::pb::OpType >(value)); + } else { + goto handle_unusual; + } + if (input->ExpectTag(82)) goto parse_topic_name; + break; + } + + // optional string topic_name = 10; + case 10: { + if (tag == 82) { + parse_topic_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_topic_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->topic_name().data(), this->topic_name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "pb.PulsarMessage.topic_name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(88)) goto parse_partition_id; + break; + } + + // optional int64 partition_id = 11; + case 11: { + if (tag == 88) { + parse_partition_id: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &partition_id_))); + + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.PulsarMessage) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.PulsarMessage) + return false; +#undef DO_ +} + +void PulsarMessage::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.PulsarMessage) + // optional string collection_name = 1; + if (this->collection_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), this->collection_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.PulsarMessage.collection_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->collection_name(), output); + } + + // repeated .pb.FieldValue fields = 2; + for (unsigned int i = 0, n = this->fields_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, this->fields(i), output); + } + + // optional int64 entity_id = 3; + if (this->entity_id() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->entity_id(), output); + } + + // optional string partition_tag = 4; + if (this->partition_tag().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag().data(), this->partition_tag().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.PulsarMessage.partition_tag"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->partition_tag(), output); + } + + // optional .pb.VectorParam vector_param = 5; + if (this->has_vector_param()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *this->vector_param_, output); + } + + // optional .pb.SegmentRecord segments = 6; + if (this->has_segments()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 6, *this->segments_, output); + } + + // optional int64 timestamp = 7; + if (this->timestamp() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(7, this->timestamp(), output); + } + + // optional int64 client_id = 8; + if (this->client_id() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(8, this->client_id(), output); + } + + // optional .pb.OpType msg_type = 9; + if (this->msg_type() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 9, this->msg_type(), output); + } + + // optional string topic_name = 10; + if (this->topic_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->topic_name().data(), this->topic_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.PulsarMessage.topic_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 10, this->topic_name(), output); + } + + // optional int64 partition_id = 11; + if (this->partition_id() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(11, this->partition_id(), output); + } + + // @@protoc_insertion_point(serialize_end:pb.PulsarMessage) +} + +::google::protobuf::uint8* PulsarMessage::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.PulsarMessage) + // optional string collection_name = 1; + if (this->collection_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->collection_name().data(), this->collection_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.PulsarMessage.collection_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->collection_name(), target); + } + + // repeated .pb.FieldValue fields = 2; + for (unsigned int i = 0, n = this->fields_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 2, this->fields(i), false, target); + } + + // optional int64 entity_id = 3; + if (this->entity_id() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->entity_id(), target); + } + + // optional string partition_tag = 4; + if (this->partition_tag().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->partition_tag().data(), this->partition_tag().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.PulsarMessage.partition_tag"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->partition_tag(), target); + } + + // optional .pb.VectorParam vector_param = 5; + if (this->has_vector_param()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 5, *this->vector_param_, false, target); + } + + // optional .pb.SegmentRecord segments = 6; + if (this->has_segments()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageNoVirtualToArray( + 6, *this->segments_, false, target); + } + + // optional int64 timestamp = 7; + if (this->timestamp() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(7, this->timestamp(), target); + } + + // optional int64 client_id = 8; + if (this->client_id() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(8, this->client_id(), target); + } + + // optional .pb.OpType msg_type = 9; + if (this->msg_type() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 9, this->msg_type(), target); + } + + // optional string topic_name = 10; + if (this->topic_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->topic_name().data(), this->topic_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.PulsarMessage.topic_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 10, this->topic_name(), target); + } + + // optional int64 partition_id = 11; + if (this->partition_id() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(11, this->partition_id(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.PulsarMessage) + return target; +} + +int PulsarMessage::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.PulsarMessage) + int total_size = 0; + + // optional string collection_name = 1; + if (this->collection_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->collection_name()); + } + + // optional int64 entity_id = 3; + if (this->entity_id() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->entity_id()); + } + + // optional string partition_tag = 4; + if (this->partition_tag().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->partition_tag()); + } + + // optional .pb.VectorParam vector_param = 5; + if (this->has_vector_param()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->vector_param_); + } + + // optional .pb.SegmentRecord segments = 6; + if (this->has_segments()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->segments_); + } + + // optional int64 timestamp = 7; + if (this->timestamp() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->timestamp()); + } + + // optional int64 client_id = 8; + if (this->client_id() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->client_id()); + } + + // optional .pb.OpType msg_type = 9; + if (this->msg_type() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->msg_type()); + } + + // optional string topic_name = 10; + if (this->topic_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->topic_name()); + } + + // optional int64 partition_id = 11; + if (this->partition_id() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->partition_id()); + } + + // repeated .pb.FieldValue fields = 2; + total_size += 1 * this->fields_size(); + for (int i = 0; i < this->fields_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->fields(i)); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void PulsarMessage::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.PulsarMessage) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const PulsarMessage* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.PulsarMessage) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.PulsarMessage) + MergeFrom(*source); + } +} + +void PulsarMessage::MergeFrom(const PulsarMessage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.PulsarMessage) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + fields_.MergeFrom(from.fields_); + if (from.collection_name().size() > 0) { + + collection_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_name_); + } + if (from.entity_id() != 0) { + set_entity_id(from.entity_id()); + } + if (from.partition_tag().size() > 0) { + + partition_tag_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.partition_tag_); + } + if (from.has_vector_param()) { + mutable_vector_param()->::pb::VectorParam::MergeFrom(from.vector_param()); + } + if (from.has_segments()) { + mutable_segments()->::pb::SegmentRecord::MergeFrom(from.segments()); + } + if (from.timestamp() != 0) { + set_timestamp(from.timestamp()); + } + if (from.client_id() != 0) { + set_client_id(from.client_id()); + } + if (from.msg_type() != 0) { + set_msg_type(from.msg_type()); + } + if (from.topic_name().size() > 0) { + + topic_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.topic_name_); + } + if (from.partition_id() != 0) { + set_partition_id(from.partition_id()); + } +} + +void PulsarMessage::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.PulsarMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void PulsarMessage::CopyFrom(const PulsarMessage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.PulsarMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PulsarMessage::IsInitialized() const { + + return true; +} + +void PulsarMessage::Swap(PulsarMessage* other) { + if (other == this) return; + InternalSwap(other); +} +void PulsarMessage::InternalSwap(PulsarMessage* other) { + collection_name_.Swap(&other->collection_name_); + fields_.UnsafeArenaSwap(&other->fields_); + std::swap(entity_id_, other->entity_id_); + partition_tag_.Swap(&other->partition_tag_); + std::swap(vector_param_, other->vector_param_); + std::swap(segments_, other->segments_); + std::swap(timestamp_, other->timestamp_); + std::swap(client_id_, other->client_id_); + std::swap(msg_type_, other->msg_type_); + topic_name_.Swap(&other->topic_name_); + std::swap(partition_id_, other->partition_id_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata PulsarMessage::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = PulsarMessage_descriptor_; + metadata.reflection = PulsarMessage_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// PulsarMessage + +// optional string collection_name = 1; +void PulsarMessage::clear_collection_name() { + collection_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& PulsarMessage::collection_name() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.collection_name) + return collection_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void PulsarMessage::set_collection_name(const ::std::string& value) { + + collection_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.PulsarMessage.collection_name) +} + void PulsarMessage::set_collection_name(const char* value) { + + collection_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PulsarMessage.collection_name) +} + void PulsarMessage::set_collection_name(const char* value, size_t size) { + + collection_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PulsarMessage.collection_name) +} + ::std::string* PulsarMessage::mutable_collection_name() { + + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.collection_name) + return collection_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* PulsarMessage::release_collection_name() { + // @@protoc_insertion_point(field_release:pb.PulsarMessage.collection_name) + + return collection_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void PulsarMessage::set_allocated_collection_name(::std::string* collection_name) { + if (collection_name != NULL) { + + } else { + + } + collection_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), collection_name); + // @@protoc_insertion_point(field_set_allocated:pb.PulsarMessage.collection_name) +} + +// repeated .pb.FieldValue fields = 2; +int PulsarMessage::fields_size() const { + return fields_.size(); +} +void PulsarMessage::clear_fields() { + fields_.Clear(); +} +const ::pb::FieldValue& PulsarMessage::fields(int index) const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.fields) + return fields_.Get(index); +} +::pb::FieldValue* PulsarMessage::mutable_fields(int index) { + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.fields) + return fields_.Mutable(index); +} +::pb::FieldValue* PulsarMessage::add_fields() { + // @@protoc_insertion_point(field_add:pb.PulsarMessage.fields) + return fields_.Add(); +} +::google::protobuf::RepeatedPtrField< ::pb::FieldValue >* +PulsarMessage::mutable_fields() { + // @@protoc_insertion_point(field_mutable_list:pb.PulsarMessage.fields) + return &fields_; +} +const ::google::protobuf::RepeatedPtrField< ::pb::FieldValue >& +PulsarMessage::fields() const { + // @@protoc_insertion_point(field_list:pb.PulsarMessage.fields) + return fields_; +} + +// optional int64 entity_id = 3; +void PulsarMessage::clear_entity_id() { + entity_id_ = GOOGLE_LONGLONG(0); +} + ::google::protobuf::int64 PulsarMessage::entity_id() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.entity_id) + return entity_id_; +} + void PulsarMessage::set_entity_id(::google::protobuf::int64 value) { + + entity_id_ = value; + // @@protoc_insertion_point(field_set:pb.PulsarMessage.entity_id) +} + +// optional string partition_tag = 4; +void PulsarMessage::clear_partition_tag() { + partition_tag_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& PulsarMessage::partition_tag() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.partition_tag) + return partition_tag_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void PulsarMessage::set_partition_tag(const ::std::string& value) { + + partition_tag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.PulsarMessage.partition_tag) +} + void PulsarMessage::set_partition_tag(const char* value) { + + partition_tag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PulsarMessage.partition_tag) +} + void PulsarMessage::set_partition_tag(const char* value, size_t size) { + + partition_tag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PulsarMessage.partition_tag) +} + ::std::string* PulsarMessage::mutable_partition_tag() { + + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.partition_tag) + return partition_tag_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* PulsarMessage::release_partition_tag() { + // @@protoc_insertion_point(field_release:pb.PulsarMessage.partition_tag) + + return partition_tag_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void PulsarMessage::set_allocated_partition_tag(::std::string* partition_tag) { + if (partition_tag != NULL) { + + } else { + + } + partition_tag_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), partition_tag); + // @@protoc_insertion_point(field_set_allocated:pb.PulsarMessage.partition_tag) +} + +// optional .pb.VectorParam vector_param = 5; +bool PulsarMessage::has_vector_param() const { + return !_is_default_instance_ && vector_param_ != NULL; +} +void PulsarMessage::clear_vector_param() { + if (GetArenaNoVirtual() == NULL && vector_param_ != NULL) delete vector_param_; + vector_param_ = NULL; +} +const ::pb::VectorParam& PulsarMessage::vector_param() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.vector_param) + return vector_param_ != NULL ? *vector_param_ : *default_instance_->vector_param_; +} +::pb::VectorParam* PulsarMessage::mutable_vector_param() { + + if (vector_param_ == NULL) { + vector_param_ = new ::pb::VectorParam; + } + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.vector_param) + return vector_param_; +} +::pb::VectorParam* PulsarMessage::release_vector_param() { + // @@protoc_insertion_point(field_release:pb.PulsarMessage.vector_param) + + ::pb::VectorParam* temp = vector_param_; + vector_param_ = NULL; + return temp; +} +void PulsarMessage::set_allocated_vector_param(::pb::VectorParam* vector_param) { + delete vector_param_; + vector_param_ = vector_param; + if (vector_param) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:pb.PulsarMessage.vector_param) +} + +// optional .pb.SegmentRecord segments = 6; +bool PulsarMessage::has_segments() const { + return !_is_default_instance_ && segments_ != NULL; +} +void PulsarMessage::clear_segments() { + if (GetArenaNoVirtual() == NULL && segments_ != NULL) delete segments_; + segments_ = NULL; +} +const ::pb::SegmentRecord& PulsarMessage::segments() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.segments) + return segments_ != NULL ? *segments_ : *default_instance_->segments_; +} +::pb::SegmentRecord* PulsarMessage::mutable_segments() { + + if (segments_ == NULL) { + segments_ = new ::pb::SegmentRecord; + } + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.segments) + return segments_; +} +::pb::SegmentRecord* PulsarMessage::release_segments() { + // @@protoc_insertion_point(field_release:pb.PulsarMessage.segments) + + ::pb::SegmentRecord* temp = segments_; + segments_ = NULL; + return temp; +} +void PulsarMessage::set_allocated_segments(::pb::SegmentRecord* segments) { + delete segments_; + segments_ = segments; + if (segments) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:pb.PulsarMessage.segments) +} + +// optional int64 timestamp = 7; +void PulsarMessage::clear_timestamp() { + timestamp_ = GOOGLE_LONGLONG(0); +} + ::google::protobuf::int64 PulsarMessage::timestamp() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.timestamp) + return timestamp_; +} + void PulsarMessage::set_timestamp(::google::protobuf::int64 value) { + + timestamp_ = value; + // @@protoc_insertion_point(field_set:pb.PulsarMessage.timestamp) +} + +// optional int64 client_id = 8; +void PulsarMessage::clear_client_id() { + client_id_ = GOOGLE_LONGLONG(0); +} + ::google::protobuf::int64 PulsarMessage::client_id() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.client_id) + return client_id_; +} + void PulsarMessage::set_client_id(::google::protobuf::int64 value) { + + client_id_ = value; + // @@protoc_insertion_point(field_set:pb.PulsarMessage.client_id) +} + +// optional .pb.OpType msg_type = 9; +void PulsarMessage::clear_msg_type() { + msg_type_ = 0; +} + ::pb::OpType PulsarMessage::msg_type() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.msg_type) + return static_cast< ::pb::OpType >(msg_type_); +} + void PulsarMessage::set_msg_type(::pb::OpType value) { + + msg_type_ = value; + // @@protoc_insertion_point(field_set:pb.PulsarMessage.msg_type) +} + +// optional string topic_name = 10; +void PulsarMessage::clear_topic_name() { + topic_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& PulsarMessage::topic_name() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.topic_name) + return topic_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void PulsarMessage::set_topic_name(const ::std::string& value) { + + topic_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.PulsarMessage.topic_name) +} + void PulsarMessage::set_topic_name(const char* value) { + + topic_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PulsarMessage.topic_name) +} + void PulsarMessage::set_topic_name(const char* value, size_t size) { + + topic_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PulsarMessage.topic_name) +} + ::std::string* PulsarMessage::mutable_topic_name() { + + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.topic_name) + return topic_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* PulsarMessage::release_topic_name() { + // @@protoc_insertion_point(field_release:pb.PulsarMessage.topic_name) + + return topic_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void PulsarMessage::set_allocated_topic_name(::std::string* topic_name) { + if (topic_name != NULL) { + + } else { + + } + topic_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), topic_name); + // @@protoc_insertion_point(field_set_allocated:pb.PulsarMessage.topic_name) +} + +// optional int64 partition_id = 11; +void PulsarMessage::clear_partition_id() { + partition_id_ = GOOGLE_LONGLONG(0); +} + ::google::protobuf::int64 PulsarMessage::partition_id() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.partition_id) + return partition_id_; +} + void PulsarMessage::set_partition_id(::google::protobuf::int64 value) { + + partition_id_ = value; + // @@protoc_insertion_point(field_set:pb.PulsarMessage.partition_id) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TestData::kIdFieldNumber; +const int TestData::kNameFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TestData::TestData() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.TestData) +} + +void TestData::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +TestData::TestData(const TestData& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.TestData) +} + +void TestData::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +TestData::~TestData() { + // @@protoc_insertion_point(destructor:pb.TestData) + SharedDtor(); +} + +void TestData::SharedDtor() { + id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void TestData::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TestData::descriptor() { + protobuf_AssignDescriptorsOnce(); + return TestData_descriptor_; +} + +const TestData& TestData::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +TestData* TestData::default_instance_ = NULL; + +TestData* TestData::New(::google::protobuf::Arena* arena) const { + TestData* n = new TestData; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void TestData::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.TestData) + id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +bool TestData::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.TestData) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string id = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_id())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->id().data(), this->id().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "pb.TestData.id")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_name; + break; + } + + // optional string name = 2; + case 2: { + if (tag == 18) { + parse_name: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "pb.TestData.name")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.TestData) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.TestData) + return false; +#undef DO_ +} + +void TestData::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.TestData) + // optional string id = 1; + if (this->id().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->id().data(), this->id().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.TestData.id"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->id(), output); + } + + // optional string name = 2; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.TestData.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->name(), output); + } + + // @@protoc_insertion_point(serialize_end:pb.TestData) +} + +::google::protobuf::uint8* TestData::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.TestData) + // optional string id = 1; + if (this->id().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->id().data(), this->id().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.TestData.id"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->id(), target); + } + + // optional string name = 2; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "pb.TestData.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->name(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.TestData) + return target; +} + +int TestData::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.TestData) + int total_size = 0; + + // optional string id = 1; + if (this->id().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->id()); + } + + // optional string name = 2; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TestData::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.TestData) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const TestData* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.TestData) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.TestData) + MergeFrom(*source); + } +} + +void TestData::MergeFrom(const TestData& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.TestData) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + if (from.id().size() > 0) { + + id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.id_); + } + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } +} + +void TestData::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.TestData) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TestData::CopyFrom(const TestData& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.TestData) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TestData::IsInitialized() const { + + return true; +} + +void TestData::Swap(TestData* other) { + if (other == this) return; + InternalSwap(other); +} +void TestData::InternalSwap(TestData* other) { + id_.Swap(&other->id_); + name_.Swap(&other->name_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TestData::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = TestData_descriptor_; + metadata.reflection = TestData_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// TestData + +// optional string id = 1; +void TestData::clear_id() { + id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& TestData::id() const { + // @@protoc_insertion_point(field_get:pb.TestData.id) + return id_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void TestData::set_id(const ::std::string& value) { + + id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.TestData.id) +} + void TestData::set_id(const char* value) { + + id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.TestData.id) +} + void TestData::set_id(const char* value, size_t size) { + + id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.TestData.id) +} + ::std::string* TestData::mutable_id() { + + // @@protoc_insertion_point(field_mutable:pb.TestData.id) + return id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* TestData::release_id() { + // @@protoc_insertion_point(field_release:pb.TestData.id) + + return id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void TestData::set_allocated_id(::std::string* id) { + if (id != NULL) { + + } else { + + } + id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), id); + // @@protoc_insertion_point(field_set_allocated:pb.TestData.id) +} + +// optional string name = 2; +void TestData::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& TestData::name() const { + // @@protoc_insertion_point(field_get:pb.TestData.name) + return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void TestData::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.TestData.name) +} + void TestData::set_name(const char* value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.TestData.name) +} + void TestData::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.TestData.name) +} + ::std::string* TestData::mutable_name() { + + // @@protoc_insertion_point(field_mutable:pb.TestData.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* TestData::release_name() { + // @@protoc_insertion_point(field_release:pb.TestData.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void TestData::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:pb.TestData.name) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int InsertMsg::kClientIdFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +InsertMsg::InsertMsg() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.InsertMsg) +} + +void InsertMsg::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +InsertMsg::InsertMsg(const InsertMsg& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.InsertMsg) +} + +void InsertMsg::SharedCtor() { + _is_default_instance_ = false; + _cached_size_ = 0; + client_id_ = GOOGLE_LONGLONG(0); +} + +InsertMsg::~InsertMsg() { + // @@protoc_insertion_point(destructor:pb.InsertMsg) + SharedDtor(); +} + +void InsertMsg::SharedDtor() { + if (this != default_instance_) { + } +} + +void InsertMsg::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* InsertMsg::descriptor() { + protobuf_AssignDescriptorsOnce(); + return InsertMsg_descriptor_; +} + +const InsertMsg& InsertMsg::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +InsertMsg* InsertMsg::default_instance_ = NULL; + +InsertMsg* InsertMsg::New(::google::protobuf::Arena* arena) const { + InsertMsg* n = new InsertMsg; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void InsertMsg::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.InsertMsg) + client_id_ = GOOGLE_LONGLONG(0); +} + +bool InsertMsg::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.InsertMsg) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int64 client_id = 1; + case 1: { + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &client_id_))); + + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.InsertMsg) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.InsertMsg) + return false; +#undef DO_ +} + +void InsertMsg::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.InsertMsg) + // optional int64 client_id = 1; + if (this->client_id() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->client_id(), output); + } + + // @@protoc_insertion_point(serialize_end:pb.InsertMsg) +} + +::google::protobuf::uint8* InsertMsg::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.InsertMsg) + // optional int64 client_id = 1; + if (this->client_id() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->client_id(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.InsertMsg) + return target; +} + +int InsertMsg::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.InsertMsg) + int total_size = 0; + + // optional int64 client_id = 1; + if (this->client_id() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->client_id()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void InsertMsg::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.InsertMsg) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const InsertMsg* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.InsertMsg) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.InsertMsg) + MergeFrom(*source); + } +} + +void InsertMsg::MergeFrom(const InsertMsg& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.InsertMsg) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + if (from.client_id() != 0) { + set_client_id(from.client_id()); + } +} + +void InsertMsg::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.InsertMsg) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void InsertMsg::CopyFrom(const InsertMsg& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.InsertMsg) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool InsertMsg::IsInitialized() const { + + return true; +} + +void InsertMsg::Swap(InsertMsg* other) { + if (other == this) return; + InternalSwap(other); +} +void InsertMsg::InternalSwap(InsertMsg* other) { + std::swap(client_id_, other->client_id_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata InsertMsg::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = InsertMsg_descriptor_; + metadata.reflection = InsertMsg_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// InsertMsg + +// optional int64 client_id = 1; +void InsertMsg::clear_client_id() { + client_id_ = GOOGLE_LONGLONG(0); +} + ::google::protobuf::int64 InsertMsg::client_id() const { + // @@protoc_insertion_point(field_get:pb.InsertMsg.client_id) + return client_id_; +} + void InsertMsg::set_client_id(::google::protobuf::int64 value) { + + client_id_ = value; + // @@protoc_insertion_point(field_set:pb.InsertMsg.client_id) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int DeleteMsg::kClientIdFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +DeleteMsg::DeleteMsg() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.DeleteMsg) +} + +void DeleteMsg::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +DeleteMsg::DeleteMsg(const DeleteMsg& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.DeleteMsg) +} + +void DeleteMsg::SharedCtor() { + _is_default_instance_ = false; + _cached_size_ = 0; + client_id_ = GOOGLE_LONGLONG(0); +} + +DeleteMsg::~DeleteMsg() { + // @@protoc_insertion_point(destructor:pb.DeleteMsg) + SharedDtor(); +} + +void DeleteMsg::SharedDtor() { + if (this != default_instance_) { + } +} + +void DeleteMsg::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* DeleteMsg::descriptor() { + protobuf_AssignDescriptorsOnce(); + return DeleteMsg_descriptor_; +} + +const DeleteMsg& DeleteMsg::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +DeleteMsg* DeleteMsg::default_instance_ = NULL; + +DeleteMsg* DeleteMsg::New(::google::protobuf::Arena* arena) const { + DeleteMsg* n = new DeleteMsg; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void DeleteMsg::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.DeleteMsg) + client_id_ = GOOGLE_LONGLONG(0); +} + +bool DeleteMsg::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.DeleteMsg) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int64 client_id = 1; + case 1: { + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &client_id_))); + + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.DeleteMsg) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.DeleteMsg) + return false; +#undef DO_ +} + +void DeleteMsg::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.DeleteMsg) + // optional int64 client_id = 1; + if (this->client_id() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->client_id(), output); + } + + // @@protoc_insertion_point(serialize_end:pb.DeleteMsg) +} + +::google::protobuf::uint8* DeleteMsg::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.DeleteMsg) + // optional int64 client_id = 1; + if (this->client_id() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->client_id(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.DeleteMsg) + return target; +} + +int DeleteMsg::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.DeleteMsg) + int total_size = 0; + + // optional int64 client_id = 1; + if (this->client_id() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->client_id()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void DeleteMsg::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.DeleteMsg) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const DeleteMsg* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.DeleteMsg) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.DeleteMsg) + MergeFrom(*source); + } +} + +void DeleteMsg::MergeFrom(const DeleteMsg& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.DeleteMsg) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + if (from.client_id() != 0) { + set_client_id(from.client_id()); + } +} + +void DeleteMsg::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.DeleteMsg) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void DeleteMsg::CopyFrom(const DeleteMsg& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.DeleteMsg) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DeleteMsg::IsInitialized() const { + + return true; +} + +void DeleteMsg::Swap(DeleteMsg* other) { + if (other == this) return; + InternalSwap(other); +} +void DeleteMsg::InternalSwap(DeleteMsg* other) { + std::swap(client_id_, other->client_id_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata DeleteMsg::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = DeleteMsg_descriptor_; + metadata.reflection = DeleteMsg_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// DeleteMsg + +// optional int64 client_id = 1; +void DeleteMsg::clear_client_id() { + client_id_ = GOOGLE_LONGLONG(0); +} + ::google::protobuf::int64 DeleteMsg::client_id() const { + // @@protoc_insertion_point(field_get:pb.DeleteMsg.client_id) + return client_id_; +} + void DeleteMsg::set_client_id(::google::protobuf::int64 value) { + + client_id_ = value; + // @@protoc_insertion_point(field_set:pb.DeleteMsg.client_id) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int SearchMsg::kClientIdFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +SearchMsg::SearchMsg() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.SearchMsg) +} + +void SearchMsg::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +SearchMsg::SearchMsg(const SearchMsg& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.SearchMsg) +} + +void SearchMsg::SharedCtor() { + _is_default_instance_ = false; + _cached_size_ = 0; + client_id_ = GOOGLE_LONGLONG(0); +} + +SearchMsg::~SearchMsg() { + // @@protoc_insertion_point(destructor:pb.SearchMsg) + SharedDtor(); +} + +void SearchMsg::SharedDtor() { + if (this != default_instance_) { + } +} + +void SearchMsg::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* SearchMsg::descriptor() { + protobuf_AssignDescriptorsOnce(); + return SearchMsg_descriptor_; +} + +const SearchMsg& SearchMsg::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +SearchMsg* SearchMsg::default_instance_ = NULL; + +SearchMsg* SearchMsg::New(::google::protobuf::Arena* arena) const { + SearchMsg* n = new SearchMsg; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void SearchMsg::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.SearchMsg) + client_id_ = GOOGLE_LONGLONG(0); +} + +bool SearchMsg::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.SearchMsg) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int64 client_id = 1; + case 1: { + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &client_id_))); + + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.SearchMsg) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.SearchMsg) + return false; +#undef DO_ +} + +void SearchMsg::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.SearchMsg) + // optional int64 client_id = 1; + if (this->client_id() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->client_id(), output); + } + + // @@protoc_insertion_point(serialize_end:pb.SearchMsg) +} + +::google::protobuf::uint8* SearchMsg::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.SearchMsg) + // optional int64 client_id = 1; + if (this->client_id() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->client_id(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.SearchMsg) + return target; +} + +int SearchMsg::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.SearchMsg) + int total_size = 0; + + // optional int64 client_id = 1; + if (this->client_id() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->client_id()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void SearchMsg::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.SearchMsg) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const SearchMsg* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.SearchMsg) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.SearchMsg) + MergeFrom(*source); + } +} + +void SearchMsg::MergeFrom(const SearchMsg& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.SearchMsg) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + if (from.client_id() != 0) { + set_client_id(from.client_id()); + } +} + +void SearchMsg::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.SearchMsg) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void SearchMsg::CopyFrom(const SearchMsg& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.SearchMsg) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SearchMsg::IsInitialized() const { + + return true; +} + +void SearchMsg::Swap(SearchMsg* other) { + if (other == this) return; + InternalSwap(other); +} +void SearchMsg::InternalSwap(SearchMsg* other) { + std::swap(client_id_, other->client_id_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata SearchMsg::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = SearchMsg_descriptor_; + metadata.reflection = SearchMsg_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SearchMsg + +// optional int64 client_id = 1; +void SearchMsg::clear_client_id() { + client_id_ = GOOGLE_LONGLONG(0); +} + ::google::protobuf::int64 SearchMsg::client_id() const { + // @@protoc_insertion_point(field_get:pb.SearchMsg.client_id) + return client_id_; +} + void SearchMsg::set_client_id(::google::protobuf::int64 value) { + + client_id_ = value; + // @@protoc_insertion_point(field_set:pb.SearchMsg.client_id) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int SearchResultMsg::kClientIdFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +SearchResultMsg::SearchResultMsg() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:pb.SearchResultMsg) +} + +void SearchResultMsg::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +SearchResultMsg::SearchResultMsg(const SearchResultMsg& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:pb.SearchResultMsg) +} + +void SearchResultMsg::SharedCtor() { + _is_default_instance_ = false; + _cached_size_ = 0; + client_id_ = GOOGLE_LONGLONG(0); +} + +SearchResultMsg::~SearchResultMsg() { + // @@protoc_insertion_point(destructor:pb.SearchResultMsg) + SharedDtor(); +} + +void SearchResultMsg::SharedDtor() { + if (this != default_instance_) { + } +} + +void SearchResultMsg::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* SearchResultMsg::descriptor() { + protobuf_AssignDescriptorsOnce(); + return SearchResultMsg_descriptor_; +} + +const SearchResultMsg& SearchResultMsg::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pulsar_2eproto(); + return *default_instance_; +} + +SearchResultMsg* SearchResultMsg::default_instance_ = NULL; + +SearchResultMsg* SearchResultMsg::New(::google::protobuf::Arena* arena) const { + SearchResultMsg* n = new SearchResultMsg; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void SearchResultMsg::Clear() { +// @@protoc_insertion_point(message_clear_start:pb.SearchResultMsg) + client_id_ = GOOGLE_LONGLONG(0); +} + +bool SearchResultMsg::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:pb.SearchResultMsg) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int64 client_id = 1; + case 1: { + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &client_id_))); + + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:pb.SearchResultMsg) + return true; +failure: + // @@protoc_insertion_point(parse_failure:pb.SearchResultMsg) + return false; +#undef DO_ +} + +void SearchResultMsg::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:pb.SearchResultMsg) + // optional int64 client_id = 1; + if (this->client_id() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->client_id(), output); + } + + // @@protoc_insertion_point(serialize_end:pb.SearchResultMsg) +} + +::google::protobuf::uint8* SearchResultMsg::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:pb.SearchResultMsg) + // optional int64 client_id = 1; + if (this->client_id() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->client_id(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:pb.SearchResultMsg) + return target; +} + +int SearchResultMsg::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:pb.SearchResultMsg) + int total_size = 0; + + // optional int64 client_id = 1; + if (this->client_id() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->client_id()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void SearchResultMsg::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:pb.SearchResultMsg) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + const SearchResultMsg* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:pb.SearchResultMsg) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:pb.SearchResultMsg) + MergeFrom(*source); + } +} + +void SearchResultMsg::MergeFrom(const SearchResultMsg& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pb.SearchResultMsg) + if (GOOGLE_PREDICT_FALSE(&from == this)) { + ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); + } + if (from.client_id() != 0) { + set_client_id(from.client_id()); + } +} + +void SearchResultMsg::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:pb.SearchResultMsg) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void SearchResultMsg::CopyFrom(const SearchResultMsg& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pb.SearchResultMsg) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SearchResultMsg::IsInitialized() const { + + return true; +} + +void SearchResultMsg::Swap(SearchResultMsg* other) { + if (other == this) return; + InternalSwap(other); +} +void SearchResultMsg::InternalSwap(SearchResultMsg* other) { + std::swap(client_id_, other->client_id_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata SearchResultMsg::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = SearchResultMsg_descriptor_; + metadata.reflection = SearchResultMsg_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SearchResultMsg + +// optional int64 client_id = 1; +void SearchResultMsg::clear_client_id() { + client_id_ = GOOGLE_LONGLONG(0); +} + ::google::protobuf::int64 SearchResultMsg::client_id() const { + // @@protoc_insertion_point(field_get:pb.SearchResultMsg.client_id) + return client_id_; +} + void SearchResultMsg::set_client_id(::google::protobuf::int64 value) { + + client_id_ = value; + // @@protoc_insertion_point(field_set:pb.SearchResultMsg.client_id) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace pb + +// @@protoc_insertion_point(global_scope) diff --git a/pulsar/client-cpp/src/pb/pulsar.pb.h b/pulsar/client-cpp/src/pb/pulsar.pb.h new file mode 100644 index 0000000000..cd685332e0 --- /dev/null +++ b/pulsar/client-cpp/src/pb/pulsar.pb.h @@ -0,0 +1,2592 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pulsar.proto + +#ifndef PROTOBUF_pulsar_2eproto__INCLUDED +#define PROTOBUF_pulsar_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3000000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace pb { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_pulsar_2eproto(); +void protobuf_AssignDesc_pulsar_2eproto(); +void protobuf_ShutdownFile_pulsar_2eproto(); + +class AttrRecord; +class DeleteMsg; +class FieldValue; +class InsertMsg; +class PulsarMessage; +class SearchMsg; +class SearchResultMsg; +class SegmentRecord; +class Status; +class TestData; +class VectorParam; +class VectorRecord; +class VectorRowRecord; + +enum ErrorCode { + SUCCESS = 0, + UNEXPECTED_ERROR = 1, + CONNECT_FAILED = 2, + PERMISSION_DENIED = 3, + COLLECTION_NOT_EXISTS = 4, + ILLEGAL_ARGUMENT = 5, + ILLEGAL_DIMENSION = 7, + ILLEGAL_INDEX_TYPE = 8, + ILLEGAL_COLLECTION_NAME = 9, + ILLEGAL_TOPK = 10, + ILLEGAL_ROWRECORD = 11, + ILLEGAL_VECTOR_ID = 12, + ILLEGAL_SEARCH_RESULT = 13, + FILE_NOT_FOUND = 14, + META_FAILED = 15, + CACHE_FAILED = 16, + CANNOT_CREATE_FOLDER = 17, + CANNOT_CREATE_FILE = 18, + CANNOT_DELETE_FOLDER = 19, + CANNOT_DELETE_FILE = 20, + BUILD_INDEX_ERROR = 21, + ILLEGAL_NLIST = 22, + ILLEGAL_METRIC_TYPE = 23, + OUT_OF_MEMORY = 24, + ErrorCode_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, + ErrorCode_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max +}; +bool ErrorCode_IsValid(int value); +const ErrorCode ErrorCode_MIN = SUCCESS; +const ErrorCode ErrorCode_MAX = OUT_OF_MEMORY; +const int ErrorCode_ARRAYSIZE = ErrorCode_MAX + 1; + +const ::google::protobuf::EnumDescriptor* ErrorCode_descriptor(); +inline const ::std::string& ErrorCode_Name(ErrorCode value) { + return ::google::protobuf::internal::NameOfEnum( + ErrorCode_descriptor(), value); +} +inline bool ErrorCode_Parse( + const ::std::string& name, ErrorCode* value) { + return ::google::protobuf::internal::ParseNamedEnum( + ErrorCode_descriptor(), name, value); +} +enum DataType { + NONE = 0, + BOOL = 1, + INT8 = 2, + INT16 = 3, + INT32 = 4, + INT64 = 5, + FLOAT = 10, + DOUBLE = 11, + STRING = 20, + VECTOR_BINARY = 100, + VECTOR_FLOAT = 101, + DataType_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, + DataType_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max +}; +bool DataType_IsValid(int value); +const DataType DataType_MIN = NONE; +const DataType DataType_MAX = VECTOR_FLOAT; +const int DataType_ARRAYSIZE = DataType_MAX + 1; + +const ::google::protobuf::EnumDescriptor* DataType_descriptor(); +inline const ::std::string& DataType_Name(DataType value) { + return ::google::protobuf::internal::NameOfEnum( + DataType_descriptor(), value); +} +inline bool DataType_Parse( + const ::std::string& name, DataType* value) { + return ::google::protobuf::internal::ParseNamedEnum( + DataType_descriptor(), name, value); +} +enum OpType { + Insert = 0, + Delete = 1, + Search = 2, + TimeSync = 3, + Key2Seg = 4, + Statistics = 5, + OpType_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min, + OpType_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max +}; +bool OpType_IsValid(int value); +const OpType OpType_MIN = Insert; +const OpType OpType_MAX = Statistics; +const int OpType_ARRAYSIZE = OpType_MAX + 1; + +const ::google::protobuf::EnumDescriptor* OpType_descriptor(); +inline const ::std::string& OpType_Name(OpType value) { + return ::google::protobuf::internal::NameOfEnum( + OpType_descriptor(), value); +} +inline bool OpType_Parse( + const ::std::string& name, OpType* value) { + return ::google::protobuf::internal::ParseNamedEnum( + OpType_descriptor(), name, value); +} +// =================================================================== + +class Status : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.Status) */ { + public: + Status(); + virtual ~Status(); + + Status(const Status& from); + + inline Status& operator=(const Status& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const Status& default_instance(); + + void Swap(Status* other); + + // implements Message ---------------------------------------------- + + inline Status* New() const { return New(NULL); } + + Status* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const Status& from); + void MergeFrom(const Status& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Status* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional .pb.ErrorCode error_code = 1; + void clear_error_code(); + static const int kErrorCodeFieldNumber = 1; + ::pb::ErrorCode error_code() const; + void set_error_code(::pb::ErrorCode value); + + // optional string reason = 2; + void clear_reason(); + static const int kReasonFieldNumber = 2; + const ::std::string& reason() const; + void set_reason(const ::std::string& value); + void set_reason(const char* value); + void set_reason(const char* value, size_t size); + ::std::string* mutable_reason(); + ::std::string* release_reason(); + void set_allocated_reason(::std::string* reason); + + // @@protoc_insertion_point(class_scope:pb.Status) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr reason_; + int error_code_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static Status* default_instance_; +}; +// ------------------------------------------------------------------- + +class SegmentRecord : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.SegmentRecord) */ { + public: + SegmentRecord(); + virtual ~SegmentRecord(); + + SegmentRecord(const SegmentRecord& from); + + inline SegmentRecord& operator=(const SegmentRecord& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const SegmentRecord& default_instance(); + + void Swap(SegmentRecord* other); + + // implements Message ---------------------------------------------- + + inline SegmentRecord* New() const { return New(NULL); } + + SegmentRecord* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const SegmentRecord& from); + void MergeFrom(const SegmentRecord& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SegmentRecord* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated string seg_info = 1; + int seg_info_size() const; + void clear_seg_info(); + static const int kSegInfoFieldNumber = 1; + const ::std::string& seg_info(int index) const; + ::std::string* mutable_seg_info(int index); + void set_seg_info(int index, const ::std::string& value); + void set_seg_info(int index, const char* value); + void set_seg_info(int index, const char* value, size_t size); + ::std::string* add_seg_info(); + void add_seg_info(const ::std::string& value); + void add_seg_info(const char* value); + void add_seg_info(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& seg_info() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_seg_info(); + + // @@protoc_insertion_point(class_scope:pb.SegmentRecord) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::RepeatedPtrField< ::std::string> seg_info_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static SegmentRecord* default_instance_; +}; +// ------------------------------------------------------------------- + +class VectorRowRecord : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.VectorRowRecord) */ { + public: + VectorRowRecord(); + virtual ~VectorRowRecord(); + + VectorRowRecord(const VectorRowRecord& from); + + inline VectorRowRecord& operator=(const VectorRowRecord& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const VectorRowRecord& default_instance(); + + void Swap(VectorRowRecord* other); + + // implements Message ---------------------------------------------- + + inline VectorRowRecord* New() const { return New(NULL); } + + VectorRowRecord* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const VectorRowRecord& from); + void MergeFrom(const VectorRowRecord& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(VectorRowRecord* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated float float_data = 1; + int float_data_size() const; + void clear_float_data(); + static const int kFloatDataFieldNumber = 1; + float float_data(int index) const; + void set_float_data(int index, float value); + void add_float_data(float value); + const ::google::protobuf::RepeatedField< float >& + float_data() const; + ::google::protobuf::RepeatedField< float >* + mutable_float_data(); + + // optional bytes binary_data = 2; + void clear_binary_data(); + static const int kBinaryDataFieldNumber = 2; + const ::std::string& binary_data() const; + void set_binary_data(const ::std::string& value); + void set_binary_data(const char* value); + void set_binary_data(const void* value, size_t size); + ::std::string* mutable_binary_data(); + ::std::string* release_binary_data(); + void set_allocated_binary_data(::std::string* binary_data); + + // @@protoc_insertion_point(class_scope:pb.VectorRowRecord) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::RepeatedField< float > float_data_; + mutable int _float_data_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr binary_data_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static VectorRowRecord* default_instance_; +}; +// ------------------------------------------------------------------- + +class AttrRecord : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.AttrRecord) */ { + public: + AttrRecord(); + virtual ~AttrRecord(); + + AttrRecord(const AttrRecord& from); + + inline AttrRecord& operator=(const AttrRecord& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const AttrRecord& default_instance(); + + void Swap(AttrRecord* other); + + // implements Message ---------------------------------------------- + + inline AttrRecord* New() const { return New(NULL); } + + AttrRecord* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const AttrRecord& from); + void MergeFrom(const AttrRecord& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(AttrRecord* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated int32 int32_value = 1; + int int32_value_size() const; + void clear_int32_value(); + static const int kInt32ValueFieldNumber = 1; + ::google::protobuf::int32 int32_value(int index) const; + void set_int32_value(int index, ::google::protobuf::int32 value); + void add_int32_value(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + int32_value() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_int32_value(); + + // repeated int64 int64_value = 2; + int int64_value_size() const; + void clear_int64_value(); + static const int kInt64ValueFieldNumber = 2; + ::google::protobuf::int64 int64_value(int index) const; + void set_int64_value(int index, ::google::protobuf::int64 value); + void add_int64_value(::google::protobuf::int64 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& + int64_value() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* + mutable_int64_value(); + + // repeated float float_value = 3; + int float_value_size() const; + void clear_float_value(); + static const int kFloatValueFieldNumber = 3; + float float_value(int index) const; + void set_float_value(int index, float value); + void add_float_value(float value); + const ::google::protobuf::RepeatedField< float >& + float_value() const; + ::google::protobuf::RepeatedField< float >* + mutable_float_value(); + + // repeated double double_value = 4; + int double_value_size() const; + void clear_double_value(); + static const int kDoubleValueFieldNumber = 4; + double double_value(int index) const; + void set_double_value(int index, double value); + void add_double_value(double value); + const ::google::protobuf::RepeatedField< double >& + double_value() const; + ::google::protobuf::RepeatedField< double >* + mutable_double_value(); + + // @@protoc_insertion_point(class_scope:pb.AttrRecord) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > int32_value_; + mutable int _int32_value_cached_byte_size_; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 > int64_value_; + mutable int _int64_value_cached_byte_size_; + ::google::protobuf::RepeatedField< float > float_value_; + mutable int _float_value_cached_byte_size_; + ::google::protobuf::RepeatedField< double > double_value_; + mutable int _double_value_cached_byte_size_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static AttrRecord* default_instance_; +}; +// ------------------------------------------------------------------- + +class VectorRecord : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.VectorRecord) */ { + public: + VectorRecord(); + virtual ~VectorRecord(); + + VectorRecord(const VectorRecord& from); + + inline VectorRecord& operator=(const VectorRecord& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const VectorRecord& default_instance(); + + void Swap(VectorRecord* other); + + // implements Message ---------------------------------------------- + + inline VectorRecord* New() const { return New(NULL); } + + VectorRecord* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const VectorRecord& from); + void MergeFrom(const VectorRecord& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(VectorRecord* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .pb.VectorRowRecord records = 1; + int records_size() const; + void clear_records(); + static const int kRecordsFieldNumber = 1; + const ::pb::VectorRowRecord& records(int index) const; + ::pb::VectorRowRecord* mutable_records(int index); + ::pb::VectorRowRecord* add_records(); + ::google::protobuf::RepeatedPtrField< ::pb::VectorRowRecord >* + mutable_records(); + const ::google::protobuf::RepeatedPtrField< ::pb::VectorRowRecord >& + records() const; + + // @@protoc_insertion_point(class_scope:pb.VectorRecord) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::RepeatedPtrField< ::pb::VectorRowRecord > records_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static VectorRecord* default_instance_; +}; +// ------------------------------------------------------------------- + +class VectorParam : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.VectorParam) */ { + public: + VectorParam(); + virtual ~VectorParam(); + + VectorParam(const VectorParam& from); + + inline VectorParam& operator=(const VectorParam& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const VectorParam& default_instance(); + + void Swap(VectorParam* other); + + // implements Message ---------------------------------------------- + + inline VectorParam* New() const { return New(NULL); } + + VectorParam* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const VectorParam& from); + void MergeFrom(const VectorParam& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(VectorParam* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string json = 1; + void clear_json(); + static const int kJsonFieldNumber = 1; + const ::std::string& json() const; + void set_json(const ::std::string& value); + void set_json(const char* value); + void set_json(const char* value, size_t size); + ::std::string* mutable_json(); + ::std::string* release_json(); + void set_allocated_json(::std::string* json); + + // optional .pb.VectorRecord row_record = 2; + bool has_row_record() const; + void clear_row_record(); + static const int kRowRecordFieldNumber = 2; + const ::pb::VectorRecord& row_record() const; + ::pb::VectorRecord* mutable_row_record(); + ::pb::VectorRecord* release_row_record(); + void set_allocated_row_record(::pb::VectorRecord* row_record); + + // @@protoc_insertion_point(class_scope:pb.VectorParam) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr json_; + ::pb::VectorRecord* row_record_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static VectorParam* default_instance_; +}; +// ------------------------------------------------------------------- + +class FieldValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.FieldValue) */ { + public: + FieldValue(); + virtual ~FieldValue(); + + FieldValue(const FieldValue& from); + + inline FieldValue& operator=(const FieldValue& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const FieldValue& default_instance(); + + void Swap(FieldValue* other); + + // implements Message ---------------------------------------------- + + inline FieldValue* New() const { return New(NULL); } + + FieldValue* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const FieldValue& from); + void MergeFrom(const FieldValue& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FieldValue* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string field_name = 1; + void clear_field_name(); + static const int kFieldNameFieldNumber = 1; + const ::std::string& field_name() const; + void set_field_name(const ::std::string& value); + void set_field_name(const char* value); + void set_field_name(const char* value, size_t size); + ::std::string* mutable_field_name(); + ::std::string* release_field_name(); + void set_allocated_field_name(::std::string* field_name); + + // optional .pb.DataType type = 2; + void clear_type(); + static const int kTypeFieldNumber = 2; + ::pb::DataType type() const; + void set_type(::pb::DataType value); + + // optional .pb.AttrRecord attr_record = 3; + bool has_attr_record() const; + void clear_attr_record(); + static const int kAttrRecordFieldNumber = 3; + const ::pb::AttrRecord& attr_record() const; + ::pb::AttrRecord* mutable_attr_record(); + ::pb::AttrRecord* release_attr_record(); + void set_allocated_attr_record(::pb::AttrRecord* attr_record); + + // optional .pb.VectorRecord vector_record = 4; + bool has_vector_record() const; + void clear_vector_record(); + static const int kVectorRecordFieldNumber = 4; + const ::pb::VectorRecord& vector_record() const; + ::pb::VectorRecord* mutable_vector_record(); + ::pb::VectorRecord* release_vector_record(); + void set_allocated_vector_record(::pb::VectorRecord* vector_record); + + // @@protoc_insertion_point(class_scope:pb.FieldValue) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr field_name_; + ::pb::AttrRecord* attr_record_; + ::pb::VectorRecord* vector_record_; + int type_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static FieldValue* default_instance_; +}; +// ------------------------------------------------------------------- + +class PulsarMessage : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.PulsarMessage) */ { + public: + PulsarMessage(); + virtual ~PulsarMessage(); + + PulsarMessage(const PulsarMessage& from); + + inline PulsarMessage& operator=(const PulsarMessage& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const PulsarMessage& default_instance(); + + void Swap(PulsarMessage* other); + + // implements Message ---------------------------------------------- + + inline PulsarMessage* New() const { return New(NULL); } + + PulsarMessage* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const PulsarMessage& from); + void MergeFrom(const PulsarMessage& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(PulsarMessage* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string collection_name = 1; + void clear_collection_name(); + static const int kCollectionNameFieldNumber = 1; + const ::std::string& collection_name() const; + void set_collection_name(const ::std::string& value); + void set_collection_name(const char* value); + void set_collection_name(const char* value, size_t size); + ::std::string* mutable_collection_name(); + ::std::string* release_collection_name(); + void set_allocated_collection_name(::std::string* collection_name); + + // repeated .pb.FieldValue fields = 2; + int fields_size() const; + void clear_fields(); + static const int kFieldsFieldNumber = 2; + const ::pb::FieldValue& fields(int index) const; + ::pb::FieldValue* mutable_fields(int index); + ::pb::FieldValue* add_fields(); + ::google::protobuf::RepeatedPtrField< ::pb::FieldValue >* + mutable_fields(); + const ::google::protobuf::RepeatedPtrField< ::pb::FieldValue >& + fields() const; + + // optional int64 entity_id = 3; + void clear_entity_id(); + static const int kEntityIdFieldNumber = 3; + ::google::protobuf::int64 entity_id() const; + void set_entity_id(::google::protobuf::int64 value); + + // optional string partition_tag = 4; + void clear_partition_tag(); + static const int kPartitionTagFieldNumber = 4; + const ::std::string& partition_tag() const; + void set_partition_tag(const ::std::string& value); + void set_partition_tag(const char* value); + void set_partition_tag(const char* value, size_t size); + ::std::string* mutable_partition_tag(); + ::std::string* release_partition_tag(); + void set_allocated_partition_tag(::std::string* partition_tag); + + // optional .pb.VectorParam vector_param = 5; + bool has_vector_param() const; + void clear_vector_param(); + static const int kVectorParamFieldNumber = 5; + const ::pb::VectorParam& vector_param() const; + ::pb::VectorParam* mutable_vector_param(); + ::pb::VectorParam* release_vector_param(); + void set_allocated_vector_param(::pb::VectorParam* vector_param); + + // optional .pb.SegmentRecord segments = 6; + bool has_segments() const; + void clear_segments(); + static const int kSegmentsFieldNumber = 6; + const ::pb::SegmentRecord& segments() const; + ::pb::SegmentRecord* mutable_segments(); + ::pb::SegmentRecord* release_segments(); + void set_allocated_segments(::pb::SegmentRecord* segments); + + // optional int64 timestamp = 7; + void clear_timestamp(); + static const int kTimestampFieldNumber = 7; + ::google::protobuf::int64 timestamp() const; + void set_timestamp(::google::protobuf::int64 value); + + // optional int64 client_id = 8; + void clear_client_id(); + static const int kClientIdFieldNumber = 8; + ::google::protobuf::int64 client_id() const; + void set_client_id(::google::protobuf::int64 value); + + // optional .pb.OpType msg_type = 9; + void clear_msg_type(); + static const int kMsgTypeFieldNumber = 9; + ::pb::OpType msg_type() const; + void set_msg_type(::pb::OpType value); + + // optional string topic_name = 10; + void clear_topic_name(); + static const int kTopicNameFieldNumber = 10; + const ::std::string& topic_name() const; + void set_topic_name(const ::std::string& value); + void set_topic_name(const char* value); + void set_topic_name(const char* value, size_t size); + ::std::string* mutable_topic_name(); + ::std::string* release_topic_name(); + void set_allocated_topic_name(::std::string* topic_name); + + // optional int64 partition_id = 11; + void clear_partition_id(); + static const int kPartitionIdFieldNumber = 11; + ::google::protobuf::int64 partition_id() const; + void set_partition_id(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:pb.PulsarMessage) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr collection_name_; + ::google::protobuf::RepeatedPtrField< ::pb::FieldValue > fields_; + ::google::protobuf::int64 entity_id_; + ::google::protobuf::internal::ArenaStringPtr partition_tag_; + ::pb::VectorParam* vector_param_; + ::pb::SegmentRecord* segments_; + ::google::protobuf::int64 timestamp_; + ::google::protobuf::int64 client_id_; + ::google::protobuf::internal::ArenaStringPtr topic_name_; + ::google::protobuf::int64 partition_id_; + int msg_type_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static PulsarMessage* default_instance_; +}; +// ------------------------------------------------------------------- + +class TestData : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.TestData) */ { + public: + TestData(); + virtual ~TestData(); + + TestData(const TestData& from); + + inline TestData& operator=(const TestData& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const TestData& default_instance(); + + void Swap(TestData* other); + + // implements Message ---------------------------------------------- + + inline TestData* New() const { return New(NULL); } + + TestData* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const TestData& from); + void MergeFrom(const TestData& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TestData* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string id = 1; + void clear_id(); + static const int kIdFieldNumber = 1; + const ::std::string& id() const; + void set_id(const ::std::string& value); + void set_id(const char* value); + void set_id(const char* value, size_t size); + ::std::string* mutable_id(); + ::std::string* release_id(); + void set_allocated_id(::std::string* id); + + // optional string name = 2; + void clear_name(); + static const int kNameFieldNumber = 2; + const ::std::string& name() const; + void set_name(const ::std::string& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // @@protoc_insertion_point(class_scope:pb.TestData) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr id_; + ::google::protobuf::internal::ArenaStringPtr name_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static TestData* default_instance_; +}; +// ------------------------------------------------------------------- + +class InsertMsg : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.InsertMsg) */ { + public: + InsertMsg(); + virtual ~InsertMsg(); + + InsertMsg(const InsertMsg& from); + + inline InsertMsg& operator=(const InsertMsg& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const InsertMsg& default_instance(); + + void Swap(InsertMsg* other); + + // implements Message ---------------------------------------------- + + inline InsertMsg* New() const { return New(NULL); } + + InsertMsg* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const InsertMsg& from); + void MergeFrom(const InsertMsg& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(InsertMsg* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional int64 client_id = 1; + void clear_client_id(); + static const int kClientIdFieldNumber = 1; + ::google::protobuf::int64 client_id() const; + void set_client_id(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:pb.InsertMsg) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::int64 client_id_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static InsertMsg* default_instance_; +}; +// ------------------------------------------------------------------- + +class DeleteMsg : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.DeleteMsg) */ { + public: + DeleteMsg(); + virtual ~DeleteMsg(); + + DeleteMsg(const DeleteMsg& from); + + inline DeleteMsg& operator=(const DeleteMsg& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const DeleteMsg& default_instance(); + + void Swap(DeleteMsg* other); + + // implements Message ---------------------------------------------- + + inline DeleteMsg* New() const { return New(NULL); } + + DeleteMsg* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const DeleteMsg& from); + void MergeFrom(const DeleteMsg& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(DeleteMsg* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional int64 client_id = 1; + void clear_client_id(); + static const int kClientIdFieldNumber = 1; + ::google::protobuf::int64 client_id() const; + void set_client_id(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:pb.DeleteMsg) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::int64 client_id_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static DeleteMsg* default_instance_; +}; +// ------------------------------------------------------------------- + +class SearchMsg : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.SearchMsg) */ { + public: + SearchMsg(); + virtual ~SearchMsg(); + + SearchMsg(const SearchMsg& from); + + inline SearchMsg& operator=(const SearchMsg& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const SearchMsg& default_instance(); + + void Swap(SearchMsg* other); + + // implements Message ---------------------------------------------- + + inline SearchMsg* New() const { return New(NULL); } + + SearchMsg* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const SearchMsg& from); + void MergeFrom(const SearchMsg& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SearchMsg* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional int64 client_id = 1; + void clear_client_id(); + static const int kClientIdFieldNumber = 1; + ::google::protobuf::int64 client_id() const; + void set_client_id(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:pb.SearchMsg) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::int64 client_id_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static SearchMsg* default_instance_; +}; +// ------------------------------------------------------------------- + +class SearchResultMsg : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.SearchResultMsg) */ { + public: + SearchResultMsg(); + virtual ~SearchResultMsg(); + + SearchResultMsg(const SearchResultMsg& from); + + inline SearchResultMsg& operator=(const SearchResultMsg& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const SearchResultMsg& default_instance(); + + void Swap(SearchResultMsg* other); + + // implements Message ---------------------------------------------- + + inline SearchResultMsg* New() const { return New(NULL); } + + SearchResultMsg* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const SearchResultMsg& from); + void MergeFrom(const SearchResultMsg& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { + return InternalSerializeWithCachedSizesToArray(false, output); + } + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SearchResultMsg* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional int64 client_id = 1; + void clear_client_id(); + static const int kClientIdFieldNumber = 1; + ::google::protobuf::int64 client_id() const; + void set_client_id(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:pb.SearchResultMsg) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::int64 client_id_; + mutable int _cached_size_; + friend void protobuf_AddDesc_pulsar_2eproto(); + friend void protobuf_AssignDesc_pulsar_2eproto(); + friend void protobuf_ShutdownFile_pulsar_2eproto(); + + void InitAsDefaultInstance(); + static SearchResultMsg* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +// Status + +// optional .pb.ErrorCode error_code = 1; +inline void Status::clear_error_code() { + error_code_ = 0; +} +inline ::pb::ErrorCode Status::error_code() const { + // @@protoc_insertion_point(field_get:pb.Status.error_code) + return static_cast< ::pb::ErrorCode >(error_code_); +} +inline void Status::set_error_code(::pb::ErrorCode value) { + + error_code_ = value; + // @@protoc_insertion_point(field_set:pb.Status.error_code) +} + +// optional string reason = 2; +inline void Status::clear_reason() { + reason_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Status::reason() const { + // @@protoc_insertion_point(field_get:pb.Status.reason) + return reason_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Status::set_reason(const ::std::string& value) { + + reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.Status.reason) +} +inline void Status::set_reason(const char* value) { + + reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.Status.reason) +} +inline void Status::set_reason(const char* value, size_t size) { + + reason_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.Status.reason) +} +inline ::std::string* Status::mutable_reason() { + + // @@protoc_insertion_point(field_mutable:pb.Status.reason) + return reason_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Status::release_reason() { + // @@protoc_insertion_point(field_release:pb.Status.reason) + + return reason_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Status::set_allocated_reason(::std::string* reason) { + if (reason != NULL) { + + } else { + + } + reason_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), reason); + // @@protoc_insertion_point(field_set_allocated:pb.Status.reason) +} + +// ------------------------------------------------------------------- + +// SegmentRecord + +// repeated string seg_info = 1; +inline int SegmentRecord::seg_info_size() const { + return seg_info_.size(); +} +inline void SegmentRecord::clear_seg_info() { + seg_info_.Clear(); +} +inline const ::std::string& SegmentRecord::seg_info(int index) const { + // @@protoc_insertion_point(field_get:pb.SegmentRecord.seg_info) + return seg_info_.Get(index); +} +inline ::std::string* SegmentRecord::mutable_seg_info(int index) { + // @@protoc_insertion_point(field_mutable:pb.SegmentRecord.seg_info) + return seg_info_.Mutable(index); +} +inline void SegmentRecord::set_seg_info(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:pb.SegmentRecord.seg_info) + seg_info_.Mutable(index)->assign(value); +} +inline void SegmentRecord::set_seg_info(int index, const char* value) { + seg_info_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:pb.SegmentRecord.seg_info) +} +inline void SegmentRecord::set_seg_info(int index, const char* value, size_t size) { + seg_info_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:pb.SegmentRecord.seg_info) +} +inline ::std::string* SegmentRecord::add_seg_info() { + // @@protoc_insertion_point(field_add_mutable:pb.SegmentRecord.seg_info) + return seg_info_.Add(); +} +inline void SegmentRecord::add_seg_info(const ::std::string& value) { + seg_info_.Add()->assign(value); + // @@protoc_insertion_point(field_add:pb.SegmentRecord.seg_info) +} +inline void SegmentRecord::add_seg_info(const char* value) { + seg_info_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:pb.SegmentRecord.seg_info) +} +inline void SegmentRecord::add_seg_info(const char* value, size_t size) { + seg_info_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:pb.SegmentRecord.seg_info) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +SegmentRecord::seg_info() const { + // @@protoc_insertion_point(field_list:pb.SegmentRecord.seg_info) + return seg_info_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +SegmentRecord::mutable_seg_info() { + // @@protoc_insertion_point(field_mutable_list:pb.SegmentRecord.seg_info) + return &seg_info_; +} + +// ------------------------------------------------------------------- + +// VectorRowRecord + +// repeated float float_data = 1; +inline int VectorRowRecord::float_data_size() const { + return float_data_.size(); +} +inline void VectorRowRecord::clear_float_data() { + float_data_.Clear(); +} +inline float VectorRowRecord::float_data(int index) const { + // @@protoc_insertion_point(field_get:pb.VectorRowRecord.float_data) + return float_data_.Get(index); +} +inline void VectorRowRecord::set_float_data(int index, float value) { + float_data_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.VectorRowRecord.float_data) +} +inline void VectorRowRecord::add_float_data(float value) { + float_data_.Add(value); + // @@protoc_insertion_point(field_add:pb.VectorRowRecord.float_data) +} +inline const ::google::protobuf::RepeatedField< float >& +VectorRowRecord::float_data() const { + // @@protoc_insertion_point(field_list:pb.VectorRowRecord.float_data) + return float_data_; +} +inline ::google::protobuf::RepeatedField< float >* +VectorRowRecord::mutable_float_data() { + // @@protoc_insertion_point(field_mutable_list:pb.VectorRowRecord.float_data) + return &float_data_; +} + +// optional bytes binary_data = 2; +inline void VectorRowRecord::clear_binary_data() { + binary_data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& VectorRowRecord::binary_data() const { + // @@protoc_insertion_point(field_get:pb.VectorRowRecord.binary_data) + return binary_data_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void VectorRowRecord::set_binary_data(const ::std::string& value) { + + binary_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.VectorRowRecord.binary_data) +} +inline void VectorRowRecord::set_binary_data(const char* value) { + + binary_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.VectorRowRecord.binary_data) +} +inline void VectorRowRecord::set_binary_data(const void* value, size_t size) { + + binary_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.VectorRowRecord.binary_data) +} +inline ::std::string* VectorRowRecord::mutable_binary_data() { + + // @@protoc_insertion_point(field_mutable:pb.VectorRowRecord.binary_data) + return binary_data_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* VectorRowRecord::release_binary_data() { + // @@protoc_insertion_point(field_release:pb.VectorRowRecord.binary_data) + + return binary_data_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void VectorRowRecord::set_allocated_binary_data(::std::string* binary_data) { + if (binary_data != NULL) { + + } else { + + } + binary_data_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), binary_data); + // @@protoc_insertion_point(field_set_allocated:pb.VectorRowRecord.binary_data) +} + +// ------------------------------------------------------------------- + +// AttrRecord + +// repeated int32 int32_value = 1; +inline int AttrRecord::int32_value_size() const { + return int32_value_.size(); +} +inline void AttrRecord::clear_int32_value() { + int32_value_.Clear(); +} +inline ::google::protobuf::int32 AttrRecord::int32_value(int index) const { + // @@protoc_insertion_point(field_get:pb.AttrRecord.int32_value) + return int32_value_.Get(index); +} +inline void AttrRecord::set_int32_value(int index, ::google::protobuf::int32 value) { + int32_value_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.AttrRecord.int32_value) +} +inline void AttrRecord::add_int32_value(::google::protobuf::int32 value) { + int32_value_.Add(value); + // @@protoc_insertion_point(field_add:pb.AttrRecord.int32_value) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +AttrRecord::int32_value() const { + // @@protoc_insertion_point(field_list:pb.AttrRecord.int32_value) + return int32_value_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +AttrRecord::mutable_int32_value() { + // @@protoc_insertion_point(field_mutable_list:pb.AttrRecord.int32_value) + return &int32_value_; +} + +// repeated int64 int64_value = 2; +inline int AttrRecord::int64_value_size() const { + return int64_value_.size(); +} +inline void AttrRecord::clear_int64_value() { + int64_value_.Clear(); +} +inline ::google::protobuf::int64 AttrRecord::int64_value(int index) const { + // @@protoc_insertion_point(field_get:pb.AttrRecord.int64_value) + return int64_value_.Get(index); +} +inline void AttrRecord::set_int64_value(int index, ::google::protobuf::int64 value) { + int64_value_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.AttrRecord.int64_value) +} +inline void AttrRecord::add_int64_value(::google::protobuf::int64 value) { + int64_value_.Add(value); + // @@protoc_insertion_point(field_add:pb.AttrRecord.int64_value) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +AttrRecord::int64_value() const { + // @@protoc_insertion_point(field_list:pb.AttrRecord.int64_value) + return int64_value_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +AttrRecord::mutable_int64_value() { + // @@protoc_insertion_point(field_mutable_list:pb.AttrRecord.int64_value) + return &int64_value_; +} + +// repeated float float_value = 3; +inline int AttrRecord::float_value_size() const { + return float_value_.size(); +} +inline void AttrRecord::clear_float_value() { + float_value_.Clear(); +} +inline float AttrRecord::float_value(int index) const { + // @@protoc_insertion_point(field_get:pb.AttrRecord.float_value) + return float_value_.Get(index); +} +inline void AttrRecord::set_float_value(int index, float value) { + float_value_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.AttrRecord.float_value) +} +inline void AttrRecord::add_float_value(float value) { + float_value_.Add(value); + // @@protoc_insertion_point(field_add:pb.AttrRecord.float_value) +} +inline const ::google::protobuf::RepeatedField< float >& +AttrRecord::float_value() const { + // @@protoc_insertion_point(field_list:pb.AttrRecord.float_value) + return float_value_; +} +inline ::google::protobuf::RepeatedField< float >* +AttrRecord::mutable_float_value() { + // @@protoc_insertion_point(field_mutable_list:pb.AttrRecord.float_value) + return &float_value_; +} + +// repeated double double_value = 4; +inline int AttrRecord::double_value_size() const { + return double_value_.size(); +} +inline void AttrRecord::clear_double_value() { + double_value_.Clear(); +} +inline double AttrRecord::double_value(int index) const { + // @@protoc_insertion_point(field_get:pb.AttrRecord.double_value) + return double_value_.Get(index); +} +inline void AttrRecord::set_double_value(int index, double value) { + double_value_.Set(index, value); + // @@protoc_insertion_point(field_set:pb.AttrRecord.double_value) +} +inline void AttrRecord::add_double_value(double value) { + double_value_.Add(value); + // @@protoc_insertion_point(field_add:pb.AttrRecord.double_value) +} +inline const ::google::protobuf::RepeatedField< double >& +AttrRecord::double_value() const { + // @@protoc_insertion_point(field_list:pb.AttrRecord.double_value) + return double_value_; +} +inline ::google::protobuf::RepeatedField< double >* +AttrRecord::mutable_double_value() { + // @@protoc_insertion_point(field_mutable_list:pb.AttrRecord.double_value) + return &double_value_; +} + +// ------------------------------------------------------------------- + +// VectorRecord + +// repeated .pb.VectorRowRecord records = 1; +inline int VectorRecord::records_size() const { + return records_.size(); +} +inline void VectorRecord::clear_records() { + records_.Clear(); +} +inline const ::pb::VectorRowRecord& VectorRecord::records(int index) const { + // @@protoc_insertion_point(field_get:pb.VectorRecord.records) + return records_.Get(index); +} +inline ::pb::VectorRowRecord* VectorRecord::mutable_records(int index) { + // @@protoc_insertion_point(field_mutable:pb.VectorRecord.records) + return records_.Mutable(index); +} +inline ::pb::VectorRowRecord* VectorRecord::add_records() { + // @@protoc_insertion_point(field_add:pb.VectorRecord.records) + return records_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::pb::VectorRowRecord >* +VectorRecord::mutable_records() { + // @@protoc_insertion_point(field_mutable_list:pb.VectorRecord.records) + return &records_; +} +inline const ::google::protobuf::RepeatedPtrField< ::pb::VectorRowRecord >& +VectorRecord::records() const { + // @@protoc_insertion_point(field_list:pb.VectorRecord.records) + return records_; +} + +// ------------------------------------------------------------------- + +// VectorParam + +// optional string json = 1; +inline void VectorParam::clear_json() { + json_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& VectorParam::json() const { + // @@protoc_insertion_point(field_get:pb.VectorParam.json) + return json_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void VectorParam::set_json(const ::std::string& value) { + + json_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.VectorParam.json) +} +inline void VectorParam::set_json(const char* value) { + + json_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.VectorParam.json) +} +inline void VectorParam::set_json(const char* value, size_t size) { + + json_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.VectorParam.json) +} +inline ::std::string* VectorParam::mutable_json() { + + // @@protoc_insertion_point(field_mutable:pb.VectorParam.json) + return json_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* VectorParam::release_json() { + // @@protoc_insertion_point(field_release:pb.VectorParam.json) + + return json_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void VectorParam::set_allocated_json(::std::string* json) { + if (json != NULL) { + + } else { + + } + json_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), json); + // @@protoc_insertion_point(field_set_allocated:pb.VectorParam.json) +} + +// optional .pb.VectorRecord row_record = 2; +inline bool VectorParam::has_row_record() const { + return !_is_default_instance_ && row_record_ != NULL; +} +inline void VectorParam::clear_row_record() { + if (GetArenaNoVirtual() == NULL && row_record_ != NULL) delete row_record_; + row_record_ = NULL; +} +inline const ::pb::VectorRecord& VectorParam::row_record() const { + // @@protoc_insertion_point(field_get:pb.VectorParam.row_record) + return row_record_ != NULL ? *row_record_ : *default_instance_->row_record_; +} +inline ::pb::VectorRecord* VectorParam::mutable_row_record() { + + if (row_record_ == NULL) { + row_record_ = new ::pb::VectorRecord; + } + // @@protoc_insertion_point(field_mutable:pb.VectorParam.row_record) + return row_record_; +} +inline ::pb::VectorRecord* VectorParam::release_row_record() { + // @@protoc_insertion_point(field_release:pb.VectorParam.row_record) + + ::pb::VectorRecord* temp = row_record_; + row_record_ = NULL; + return temp; +} +inline void VectorParam::set_allocated_row_record(::pb::VectorRecord* row_record) { + delete row_record_; + row_record_ = row_record; + if (row_record) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:pb.VectorParam.row_record) +} + +// ------------------------------------------------------------------- + +// FieldValue + +// optional string field_name = 1; +inline void FieldValue::clear_field_name() { + field_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& FieldValue::field_name() const { + // @@protoc_insertion_point(field_get:pb.FieldValue.field_name) + return field_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FieldValue::set_field_name(const ::std::string& value) { + + field_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.FieldValue.field_name) +} +inline void FieldValue::set_field_name(const char* value) { + + field_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.FieldValue.field_name) +} +inline void FieldValue::set_field_name(const char* value, size_t size) { + + field_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.FieldValue.field_name) +} +inline ::std::string* FieldValue::mutable_field_name() { + + // @@protoc_insertion_point(field_mutable:pb.FieldValue.field_name) + return field_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* FieldValue::release_field_name() { + // @@protoc_insertion_point(field_release:pb.FieldValue.field_name) + + return field_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FieldValue::set_allocated_field_name(::std::string* field_name) { + if (field_name != NULL) { + + } else { + + } + field_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), field_name); + // @@protoc_insertion_point(field_set_allocated:pb.FieldValue.field_name) +} + +// optional .pb.DataType type = 2; +inline void FieldValue::clear_type() { + type_ = 0; +} +inline ::pb::DataType FieldValue::type() const { + // @@protoc_insertion_point(field_get:pb.FieldValue.type) + return static_cast< ::pb::DataType >(type_); +} +inline void FieldValue::set_type(::pb::DataType value) { + + type_ = value; + // @@protoc_insertion_point(field_set:pb.FieldValue.type) +} + +// optional .pb.AttrRecord attr_record = 3; +inline bool FieldValue::has_attr_record() const { + return !_is_default_instance_ && attr_record_ != NULL; +} +inline void FieldValue::clear_attr_record() { + if (GetArenaNoVirtual() == NULL && attr_record_ != NULL) delete attr_record_; + attr_record_ = NULL; +} +inline const ::pb::AttrRecord& FieldValue::attr_record() const { + // @@protoc_insertion_point(field_get:pb.FieldValue.attr_record) + return attr_record_ != NULL ? *attr_record_ : *default_instance_->attr_record_; +} +inline ::pb::AttrRecord* FieldValue::mutable_attr_record() { + + if (attr_record_ == NULL) { + attr_record_ = new ::pb::AttrRecord; + } + // @@protoc_insertion_point(field_mutable:pb.FieldValue.attr_record) + return attr_record_; +} +inline ::pb::AttrRecord* FieldValue::release_attr_record() { + // @@protoc_insertion_point(field_release:pb.FieldValue.attr_record) + + ::pb::AttrRecord* temp = attr_record_; + attr_record_ = NULL; + return temp; +} +inline void FieldValue::set_allocated_attr_record(::pb::AttrRecord* attr_record) { + delete attr_record_; + attr_record_ = attr_record; + if (attr_record) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:pb.FieldValue.attr_record) +} + +// optional .pb.VectorRecord vector_record = 4; +inline bool FieldValue::has_vector_record() const { + return !_is_default_instance_ && vector_record_ != NULL; +} +inline void FieldValue::clear_vector_record() { + if (GetArenaNoVirtual() == NULL && vector_record_ != NULL) delete vector_record_; + vector_record_ = NULL; +} +inline const ::pb::VectorRecord& FieldValue::vector_record() const { + // @@protoc_insertion_point(field_get:pb.FieldValue.vector_record) + return vector_record_ != NULL ? *vector_record_ : *default_instance_->vector_record_; +} +inline ::pb::VectorRecord* FieldValue::mutable_vector_record() { + + if (vector_record_ == NULL) { + vector_record_ = new ::pb::VectorRecord; + } + // @@protoc_insertion_point(field_mutable:pb.FieldValue.vector_record) + return vector_record_; +} +inline ::pb::VectorRecord* FieldValue::release_vector_record() { + // @@protoc_insertion_point(field_release:pb.FieldValue.vector_record) + + ::pb::VectorRecord* temp = vector_record_; + vector_record_ = NULL; + return temp; +} +inline void FieldValue::set_allocated_vector_record(::pb::VectorRecord* vector_record) { + delete vector_record_; + vector_record_ = vector_record; + if (vector_record) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:pb.FieldValue.vector_record) +} + +// ------------------------------------------------------------------- + +// PulsarMessage + +// optional string collection_name = 1; +inline void PulsarMessage::clear_collection_name() { + collection_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& PulsarMessage::collection_name() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.collection_name) + return collection_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void PulsarMessage::set_collection_name(const ::std::string& value) { + + collection_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.PulsarMessage.collection_name) +} +inline void PulsarMessage::set_collection_name(const char* value) { + + collection_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PulsarMessage.collection_name) +} +inline void PulsarMessage::set_collection_name(const char* value, size_t size) { + + collection_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PulsarMessage.collection_name) +} +inline ::std::string* PulsarMessage::mutable_collection_name() { + + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.collection_name) + return collection_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* PulsarMessage::release_collection_name() { + // @@protoc_insertion_point(field_release:pb.PulsarMessage.collection_name) + + return collection_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void PulsarMessage::set_allocated_collection_name(::std::string* collection_name) { + if (collection_name != NULL) { + + } else { + + } + collection_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), collection_name); + // @@protoc_insertion_point(field_set_allocated:pb.PulsarMessage.collection_name) +} + +// repeated .pb.FieldValue fields = 2; +inline int PulsarMessage::fields_size() const { + return fields_.size(); +} +inline void PulsarMessage::clear_fields() { + fields_.Clear(); +} +inline const ::pb::FieldValue& PulsarMessage::fields(int index) const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.fields) + return fields_.Get(index); +} +inline ::pb::FieldValue* PulsarMessage::mutable_fields(int index) { + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.fields) + return fields_.Mutable(index); +} +inline ::pb::FieldValue* PulsarMessage::add_fields() { + // @@protoc_insertion_point(field_add:pb.PulsarMessage.fields) + return fields_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::pb::FieldValue >* +PulsarMessage::mutable_fields() { + // @@protoc_insertion_point(field_mutable_list:pb.PulsarMessage.fields) + return &fields_; +} +inline const ::google::protobuf::RepeatedPtrField< ::pb::FieldValue >& +PulsarMessage::fields() const { + // @@protoc_insertion_point(field_list:pb.PulsarMessage.fields) + return fields_; +} + +// optional int64 entity_id = 3; +inline void PulsarMessage::clear_entity_id() { + entity_id_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 PulsarMessage::entity_id() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.entity_id) + return entity_id_; +} +inline void PulsarMessage::set_entity_id(::google::protobuf::int64 value) { + + entity_id_ = value; + // @@protoc_insertion_point(field_set:pb.PulsarMessage.entity_id) +} + +// optional string partition_tag = 4; +inline void PulsarMessage::clear_partition_tag() { + partition_tag_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& PulsarMessage::partition_tag() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.partition_tag) + return partition_tag_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void PulsarMessage::set_partition_tag(const ::std::string& value) { + + partition_tag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.PulsarMessage.partition_tag) +} +inline void PulsarMessage::set_partition_tag(const char* value) { + + partition_tag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PulsarMessage.partition_tag) +} +inline void PulsarMessage::set_partition_tag(const char* value, size_t size) { + + partition_tag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PulsarMessage.partition_tag) +} +inline ::std::string* PulsarMessage::mutable_partition_tag() { + + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.partition_tag) + return partition_tag_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* PulsarMessage::release_partition_tag() { + // @@protoc_insertion_point(field_release:pb.PulsarMessage.partition_tag) + + return partition_tag_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void PulsarMessage::set_allocated_partition_tag(::std::string* partition_tag) { + if (partition_tag != NULL) { + + } else { + + } + partition_tag_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), partition_tag); + // @@protoc_insertion_point(field_set_allocated:pb.PulsarMessage.partition_tag) +} + +// optional .pb.VectorParam vector_param = 5; +inline bool PulsarMessage::has_vector_param() const { + return !_is_default_instance_ && vector_param_ != NULL; +} +inline void PulsarMessage::clear_vector_param() { + if (GetArenaNoVirtual() == NULL && vector_param_ != NULL) delete vector_param_; + vector_param_ = NULL; +} +inline const ::pb::VectorParam& PulsarMessage::vector_param() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.vector_param) + return vector_param_ != NULL ? *vector_param_ : *default_instance_->vector_param_; +} +inline ::pb::VectorParam* PulsarMessage::mutable_vector_param() { + + if (vector_param_ == NULL) { + vector_param_ = new ::pb::VectorParam; + } + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.vector_param) + return vector_param_; +} +inline ::pb::VectorParam* PulsarMessage::release_vector_param() { + // @@protoc_insertion_point(field_release:pb.PulsarMessage.vector_param) + + ::pb::VectorParam* temp = vector_param_; + vector_param_ = NULL; + return temp; +} +inline void PulsarMessage::set_allocated_vector_param(::pb::VectorParam* vector_param) { + delete vector_param_; + vector_param_ = vector_param; + if (vector_param) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:pb.PulsarMessage.vector_param) +} + +// optional .pb.SegmentRecord segments = 6; +inline bool PulsarMessage::has_segments() const { + return !_is_default_instance_ && segments_ != NULL; +} +inline void PulsarMessage::clear_segments() { + if (GetArenaNoVirtual() == NULL && segments_ != NULL) delete segments_; + segments_ = NULL; +} +inline const ::pb::SegmentRecord& PulsarMessage::segments() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.segments) + return segments_ != NULL ? *segments_ : *default_instance_->segments_; +} +inline ::pb::SegmentRecord* PulsarMessage::mutable_segments() { + + if (segments_ == NULL) { + segments_ = new ::pb::SegmentRecord; + } + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.segments) + return segments_; +} +inline ::pb::SegmentRecord* PulsarMessage::release_segments() { + // @@protoc_insertion_point(field_release:pb.PulsarMessage.segments) + + ::pb::SegmentRecord* temp = segments_; + segments_ = NULL; + return temp; +} +inline void PulsarMessage::set_allocated_segments(::pb::SegmentRecord* segments) { + delete segments_; + segments_ = segments; + if (segments) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:pb.PulsarMessage.segments) +} + +// optional int64 timestamp = 7; +inline void PulsarMessage::clear_timestamp() { + timestamp_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 PulsarMessage::timestamp() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.timestamp) + return timestamp_; +} +inline void PulsarMessage::set_timestamp(::google::protobuf::int64 value) { + + timestamp_ = value; + // @@protoc_insertion_point(field_set:pb.PulsarMessage.timestamp) +} + +// optional int64 client_id = 8; +inline void PulsarMessage::clear_client_id() { + client_id_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 PulsarMessage::client_id() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.client_id) + return client_id_; +} +inline void PulsarMessage::set_client_id(::google::protobuf::int64 value) { + + client_id_ = value; + // @@protoc_insertion_point(field_set:pb.PulsarMessage.client_id) +} + +// optional .pb.OpType msg_type = 9; +inline void PulsarMessage::clear_msg_type() { + msg_type_ = 0; +} +inline ::pb::OpType PulsarMessage::msg_type() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.msg_type) + return static_cast< ::pb::OpType >(msg_type_); +} +inline void PulsarMessage::set_msg_type(::pb::OpType value) { + + msg_type_ = value; + // @@protoc_insertion_point(field_set:pb.PulsarMessage.msg_type) +} + +// optional string topic_name = 10; +inline void PulsarMessage::clear_topic_name() { + topic_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& PulsarMessage::topic_name() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.topic_name) + return topic_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void PulsarMessage::set_topic_name(const ::std::string& value) { + + topic_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.PulsarMessage.topic_name) +} +inline void PulsarMessage::set_topic_name(const char* value) { + + topic_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.PulsarMessage.topic_name) +} +inline void PulsarMessage::set_topic_name(const char* value, size_t size) { + + topic_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.PulsarMessage.topic_name) +} +inline ::std::string* PulsarMessage::mutable_topic_name() { + + // @@protoc_insertion_point(field_mutable:pb.PulsarMessage.topic_name) + return topic_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* PulsarMessage::release_topic_name() { + // @@protoc_insertion_point(field_release:pb.PulsarMessage.topic_name) + + return topic_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void PulsarMessage::set_allocated_topic_name(::std::string* topic_name) { + if (topic_name != NULL) { + + } else { + + } + topic_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), topic_name); + // @@protoc_insertion_point(field_set_allocated:pb.PulsarMessage.topic_name) +} + +// optional int64 partition_id = 11; +inline void PulsarMessage::clear_partition_id() { + partition_id_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 PulsarMessage::partition_id() const { + // @@protoc_insertion_point(field_get:pb.PulsarMessage.partition_id) + return partition_id_; +} +inline void PulsarMessage::set_partition_id(::google::protobuf::int64 value) { + + partition_id_ = value; + // @@protoc_insertion_point(field_set:pb.PulsarMessage.partition_id) +} + +// ------------------------------------------------------------------- + +// TestData + +// optional string id = 1; +inline void TestData::clear_id() { + id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& TestData::id() const { + // @@protoc_insertion_point(field_get:pb.TestData.id) + return id_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TestData::set_id(const ::std::string& value) { + + id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.TestData.id) +} +inline void TestData::set_id(const char* value) { + + id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.TestData.id) +} +inline void TestData::set_id(const char* value, size_t size) { + + id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.TestData.id) +} +inline ::std::string* TestData::mutable_id() { + + // @@protoc_insertion_point(field_mutable:pb.TestData.id) + return id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* TestData::release_id() { + // @@protoc_insertion_point(field_release:pb.TestData.id) + + return id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TestData::set_allocated_id(::std::string* id) { + if (id != NULL) { + + } else { + + } + id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), id); + // @@protoc_insertion_point(field_set_allocated:pb.TestData.id) +} + +// optional string name = 2; +inline void TestData::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& TestData::name() const { + // @@protoc_insertion_point(field_get:pb.TestData.name) + return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TestData::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:pb.TestData.name) +} +inline void TestData::set_name(const char* value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:pb.TestData.name) +} +inline void TestData::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:pb.TestData.name) +} +inline ::std::string* TestData::mutable_name() { + + // @@protoc_insertion_point(field_mutable:pb.TestData.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* TestData::release_name() { + // @@protoc_insertion_point(field_release:pb.TestData.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TestData::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:pb.TestData.name) +} + +// ------------------------------------------------------------------- + +// InsertMsg + +// optional int64 client_id = 1; +inline void InsertMsg::clear_client_id() { + client_id_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 InsertMsg::client_id() const { + // @@protoc_insertion_point(field_get:pb.InsertMsg.client_id) + return client_id_; +} +inline void InsertMsg::set_client_id(::google::protobuf::int64 value) { + + client_id_ = value; + // @@protoc_insertion_point(field_set:pb.InsertMsg.client_id) +} + +// ------------------------------------------------------------------- + +// DeleteMsg + +// optional int64 client_id = 1; +inline void DeleteMsg::clear_client_id() { + client_id_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 DeleteMsg::client_id() const { + // @@protoc_insertion_point(field_get:pb.DeleteMsg.client_id) + return client_id_; +} +inline void DeleteMsg::set_client_id(::google::protobuf::int64 value) { + + client_id_ = value; + // @@protoc_insertion_point(field_set:pb.DeleteMsg.client_id) +} + +// ------------------------------------------------------------------- + +// SearchMsg + +// optional int64 client_id = 1; +inline void SearchMsg::clear_client_id() { + client_id_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 SearchMsg::client_id() const { + // @@protoc_insertion_point(field_get:pb.SearchMsg.client_id) + return client_id_; +} +inline void SearchMsg::set_client_id(::google::protobuf::int64 value) { + + client_id_ = value; + // @@protoc_insertion_point(field_set:pb.SearchMsg.client_id) +} + +// ------------------------------------------------------------------- + +// SearchResultMsg + +// optional int64 client_id = 1; +inline void SearchResultMsg::clear_client_id() { + client_id_ = GOOGLE_LONGLONG(0); +} +inline ::google::protobuf::int64 SearchResultMsg::client_id() const { + // @@protoc_insertion_point(field_get:pb.SearchResultMsg.client_id) + return client_id_; +} +inline void SearchResultMsg::set_client_id(::google::protobuf::int64 value) { + + client_id_ = value; + // @@protoc_insertion_point(field_set:pb.SearchResultMsg.client_id) +} + +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace pb + +#ifndef SWIG +namespace google { +namespace protobuf { + +template <> struct is_proto_enum< ::pb::ErrorCode> : ::google::protobuf::internal::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::ErrorCode>() { + return ::pb::ErrorCode_descriptor(); +} +template <> struct is_proto_enum< ::pb::DataType> : ::google::protobuf::internal::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::DataType>() { + return ::pb::DataType_descriptor(); +} +template <> struct is_proto_enum< ::pb::OpType> : ::google::protobuf::internal::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pb::OpType>() { + return ::pb::OpType_descriptor(); +} + +} // namespace protobuf +} // namespace google +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_pulsar_2eproto__INCLUDED diff --git a/pulsar/client-cpp/src/pb/pulsar.proto b/pulsar/client-cpp/src/pb/pulsar.proto new file mode 100644 index 0000000000..1623983f83 --- /dev/null +++ b/pulsar/client-cpp/src/pb/pulsar.proto @@ -0,0 +1,143 @@ + +syntax = "proto3"; + +package pb; + +enum ErrorCode { + SUCCESS = 0; + UNEXPECTED_ERROR = 1; + CONNECT_FAILED = 2; + PERMISSION_DENIED = 3; + COLLECTION_NOT_EXISTS = 4; + ILLEGAL_ARGUMENT = 5; + ILLEGAL_DIMENSION = 7; + ILLEGAL_INDEX_TYPE = 8; + ILLEGAL_COLLECTION_NAME = 9; + ILLEGAL_TOPK = 10; + ILLEGAL_ROWRECORD = 11; + ILLEGAL_VECTOR_ID = 12; + ILLEGAL_SEARCH_RESULT = 13; + FILE_NOT_FOUND = 14; + META_FAILED = 15; + CACHE_FAILED = 16; + CANNOT_CREATE_FOLDER = 17; + CANNOT_CREATE_FILE = 18; + CANNOT_DELETE_FOLDER = 19; + CANNOT_DELETE_FILE = 20; + BUILD_INDEX_ERROR = 21; + ILLEGAL_NLIST = 22; + ILLEGAL_METRIC_TYPE = 23; + OUT_OF_MEMORY = 24; +} + +message Status { + ErrorCode error_code = 1; + string reason = 2; +} + +enum DataType { + NONE = 0; + BOOL = 1; + INT8 = 2; + INT16 = 3; + INT32 = 4; + INT64 = 5; + + FLOAT = 10; + DOUBLE = 11; + + STRING = 20; + + VECTOR_BINARY = 100; + VECTOR_FLOAT = 101; +} + +enum OpType { + Insert = 0; + Delete = 1; + Search = 2; + TimeSync = 3; + Key2Seg = 4; + Statistics = 5; +} + +message SegmentRecord { + repeated string seg_info = 1; +} + +message VectorRowRecord { + repeated float float_data = 1; //float vector data + bytes binary_data = 2; //binary vector data +} + +message AttrRecord { + repeated int32 int32_value = 1; + repeated int64 int64_value = 2; + repeated float float_value = 3; + repeated double double_value = 4; +} + +message VectorRecord { + repeated VectorRowRecord records = 1; +} + +message VectorParam { + string json = 1; + VectorRecord row_record = 2; +} + +message FieldValue { + string field_name = 1; + DataType type = 2; + AttrRecord attr_record = 3; + VectorRecord vector_record = 4; +} + +message PulsarMessage { + string collection_name = 1; + repeated FieldValue fields = 2; + int64 entity_id = 3; + string partition_tag = 4; + VectorParam vector_param =5; + SegmentRecord segments = 6; + int64 timestamp = 7; + int64 client_id = 8; + OpType msg_type = 9; + string topic_name = 10; + int64 partition_id = 11; +} + +//message PulsarMessages { +// string collection_name = 1; +// repeated FieldValue fields = 2; +// repeated int64 entity_id = 3; +// string partition_tag = 4; +// repeated VectorParam vector_param =5; +// repeated SegmentRecord segments = 6; +// repeated int64 timestamp = 7; +// repeated int64 client_id = 8; +// OpType msg_type = 9; +// repeated string topic_name = 10; +// repeated int64 partition_id = 11; +//} +message TestData { + string id = 1; + string name = 2; +} + +message InsertMsg { + int64 client_id = 1; +} + +message DeleteMsg { + int64 client_id = 1; +} + +message SearchMsg { + int64 client_id = 1; +} + +message SearchResultMsg { + int64 client_id = 1; +} + diff --git a/pulsar/client-cpp/src/producer.cpp b/pulsar/client-cpp/src/producer.cpp new file mode 100644 index 0000000000..c61400ea7d --- /dev/null +++ b/pulsar/client-cpp/src/producer.cpp @@ -0,0 +1,27 @@ + +#include "producer.h" + +namespace message_client { + +MsgProducer::MsgProducer(std::shared_ptr &client, const std::string &topic, const ProducerConfiguration conf) : client_(client), config_(conf){ + createProducer(topic); +} + +Result MsgProducer::createProducer(const std::string &topic) { + return client_->createProducer(topic, producer_); +} + +Result MsgProducer::send(const Message &msg) { + return producer_.send(msg); +} + +Result MsgProducer::send(const std::string &msg) { + auto pulsar_msg = pulsar::MessageBuilder().setContent(msg).build(); + return send(pulsar_msg); +} + +Result MsgProducer::close() { + return producer_.close(); +} + +} \ No newline at end of file diff --git a/pulsar/client-cpp/src/producer.h b/pulsar/client-cpp/src/producer.h new file mode 100644 index 0000000000..40bb9cf0b4 --- /dev/null +++ b/pulsar/client-cpp/src/producer.h @@ -0,0 +1,29 @@ +#pragma once + +#include "pulsar/Producer.h" +#include "client.h" + +namespace message_client { + +using Producer = pulsar::Producer; +using ProducerConfiguration = pulsar::ProducerConfiguration; + +class MsgProducer{ +public: + MsgProducer(std::shared_ptr &client, const std::string &topic, const ProducerConfiguration conf = ProducerConfiguration()); + + Result createProducer(const std::string& topic); + Result send(const Message& msg); + Result send(const std::string& msg); + Result close(); + + const Producer& + producer() const { return producer_; } + +private: + Producer producer_; + std::shared_ptr client_; + ProducerConfiguration config_; +}; + +} \ No newline at end of file diff --git a/pulsar/client-cpp/unittest/CMakeLists.txt b/pulsar/client-cpp/unittest/CMakeLists.txt new file mode 100644 index 0000000000..376c5f6fbc --- /dev/null +++ b/pulsar/client-cpp/unittest/CMakeLists.txt @@ -0,0 +1,15 @@ +include_directories(${CMAKE_SOURCE_DIR}/src) +include_directories(.) +enable_testing() +set(unittest_srcs + unittest_entry.cpp + consumer_test.cpp producer_test.cpp) + +add_executable(test ${unittest_srcs}) + +target_link_libraries(test + client_cpp + pulsar + gtest) + +install(TARGETS test DESTINATION unittest) \ No newline at end of file diff --git a/pulsar/client-cpp/unittest/consumer_test.cpp b/pulsar/client-cpp/unittest/consumer_test.cpp new file mode 100644 index 0000000000..15cb103aa7 --- /dev/null +++ b/pulsar/client-cpp/unittest/consumer_test.cpp @@ -0,0 +1,14 @@ +#include +#include "consumer.h" +#include "pb/pulsar.pb.h" + +TEST(CLIENT_CPP, CONSUMER) { + auto client= std::make_shared("pulsar://localhost:6650"); + message_client::MsgConsumer consumer(client, "my_consumer"); + consumer.subscribe("test"); + auto msg = consumer.receive_proto(message_client::TEST); + pb::TestData* data = (pb::TestData*)(msg.get()); + std::cout << "Received: " << msg << " with payload '" << data->name()<< ";" << data->id(); + consumer.close(); + client->close(); +} diff --git a/pulsar/client-cpp/unittest/producer_test.cpp b/pulsar/client-cpp/unittest/producer_test.cpp new file mode 100644 index 0000000000..babf577ffd --- /dev/null +++ b/pulsar/client-cpp/unittest/producer_test.cpp @@ -0,0 +1,15 @@ +#include +#include "producer.h" +#include "pb/pulsar.pb.h" + +TEST(CLIENT_CPP, Producer) { + auto client= std::make_shared("pulsar://localhost:6650"); + message_client::MsgProducer producer(client,"test"); + pb::TestData data; + data.set_id("test"); + data.set_name("hahah"); + std::string to_string = data.SerializeAsString(); + producer.send(to_string); + producer.close(); + client->close(); +} diff --git a/pulsar/client-cpp/unittest/unittest_entry.cpp b/pulsar/client-cpp/unittest/unittest_entry.cpp new file mode 100644 index 0000000000..697a9d70c0 --- /dev/null +++ b/pulsar/client-cpp/unittest/unittest_entry.cpp @@ -0,0 +1,6 @@ +#include + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/pulsar/go_client.go b/pulsar/client-go/go_client.go similarity index 73% rename from pulsar/go_client.go rename to pulsar/client-go/go_client.go index fa34f66aae..19e727b1f2 100644 --- a/pulsar/go_client.go +++ b/pulsar/client-go/go_client.go @@ -1,30 +1,13 @@ -package pulsar +package client_go import ( "context" "github.com/apache/pulsar/pulsar-client-go/pulsar" "log" - "github.com/czs007/suvlim/pulsar/schema" - "sync" + "suvlim/pulsar/client-go/schema" ) var ( - wg sync.WaitGroup - //wgJob sync.WaitGroup - //wgQuery sync.WaitGroup - //wgWrite sync.WaitGroup - - OriginMsgSchema = "{\"type\":\"record\",\"name\":\"suvlim\",\"namespace\":\"pulsar\",\"fields\":[" + - "{\"name\":\"CollectionName\",\"type\":\"string\"}," + - "{\"name\":\"Fields\",\"type\":\"[]*FieldValue\"}" + - "{\"name\":\"EntityId\",\"type\":\"int64\"}" + - "{\"name\":\"PartitionTag\",\"type\":\"string\"}" + - "{\"name\":\"VectorParam\",\"type\":\"*VectorParam\"}" + - "{\"name\":\"Segments\",\"type\":\"[]string\"}" + - "{\"name\":\"Timestamp\",\"type\":\"int64\"}" + - "{\"name\":\"ClientId\",\"type\":\"int64\"}" + - "{\"name\":\"MsgType\",\"type\":\"OpType\"}" + - "]}" SyncEofSchema = "{\"type\":\"record\",\"name\":\"suvlim\",\"namespace\":\"pulsar\",\"fields\":[" + "{\"name\":\"MsgType\",\"type\":\"OpType\"}," + "]}" @@ -122,17 +105,29 @@ func (mc *MessageClient) CreateClient(url string) pulsar.Client { return client } -func (mc *MessageClient) InitClient(url string,topics []string) { +func (mc *MessageClient) InitClient(url string, topics []string, consumerMsgSchema string) { //create client mc.client = mc.CreateClient(url) //create producer + for topicIndex := range topics { + if topics[topicIndex] == "insert" { + mc.syncInsertProducer = mc.CreatProducer(SyncEofSchema, "insert") + } + if topics[topicIndex] == "delete" { + mc.syncDeleteProducer = mc.CreatProducer(SyncEofSchema, "delete") + } + if topics[topicIndex] == "key2seg" { + mc.syncInsertProducer = mc.CreatProducer(SyncEofSchema, "key2seg") + } + + } mc.syncInsertProducer = mc.CreatProducer(SyncEofSchema, "insert") mc.syncDeleteProducer = mc.CreatProducer(SyncEofSchema, "delete") mc.key2segProducer = mc.CreatProducer(SyncEofSchema, "key2seg") //create consumer - mc.consumer = mc.CreateConsumer(OriginMsgSchema, topics) + mc.consumer = mc.CreateConsumer(consumerMsgSchema, topics) // init channel mc.insertChan = make(chan *schema.InsertMsg, 1000) @@ -148,6 +143,36 @@ const ( OpInWriteNode JobType = 1 ) +func (mc *MessageClient) PrepareMsg(opType schema.OpType, msgLen int) { + switch opType { + case schema.Insert: + for i := 0; i < msgLen; i++ { + msg := <- mc.insertChan + mc.InsertMsg[i] = msg + } + case schema.Delete: + for i := 0; i < msgLen; i++ { + msg := <- mc.deleteChan + mc.DeleteMsg[i] = msg + } + case schema.Search: + for i := 0; i < msgLen; i++ { + msg := <-mc.searchChan + mc.SearchMsg[i] = msg + } + case schema.TimeSync: + for i := 0; i < msgLen; i++ { + msg := <- mc.timeSyncChan + mc.timeMsg[i] = msg + } + case schema.Key2Seg: + for i := 0; i < msgLen; i++ { + msg := <-mc.key2SegChan + mc.key2segMsg[i] = msg + } + } +} + func (mc *MessageClient) PrepareBatchMsg(jobType JobType) { // assume the channel not full mc.InsertMsg = make([]*schema.InsertMsg, 1000) @@ -156,6 +181,8 @@ func (mc *MessageClient) PrepareBatchMsg(jobType JobType) { mc.timeMsg = make([]*schema.TimeSyncMsg, 1000) mc.key2segMsg = make([]*schema.Key2SegMsg, 1000) + // ensure all messages before time in timeSyncTopic have been push into channel + // get the length of every channel insertLen := len(mc.insertChan) deleteLen := len(mc.deleteChan) @@ -163,29 +190,12 @@ func (mc *MessageClient) PrepareBatchMsg(jobType JobType) { timeLen := len(mc.timeSyncChan) key2segLen := len(mc.key2SegChan) - // get message from channel to slice - for i := 0; i < insertLen; i++ { - msg := <- mc.insertChan - mc.InsertMsg[i] = msg - } - for i := 0; i < deleteLen; i++ { - msg := <- mc.deleteChan - mc.DeleteMsg[i] = msg - } - for i := 0; i < timeLen; i++ { - msg := <- mc.timeSyncChan - mc.timeMsg[i] = msg - } + mc.PrepareMsg(schema.Insert, insertLen) + mc.PrepareMsg(schema.Delete, deleteLen) + mc.PrepareMsg(schema.TimeSync, timeLen) if jobType == OpInQueryNode { - for i := 0; i < key2segLen; i++ { - msg := <-mc.key2SegChan - mc.key2segMsg[i] = msg - } - - for i := 0; i < searchLen; i++ { - msg := <-mc.searchChan - mc.SearchMsg[i] = msg - } + mc.PrepareMsg(schema.Key2Seg, key2segLen) + mc.PrepareMsg(schema.Search, searchLen) } } diff --git a/pulsar/pb/build.sh b/pulsar/client-go/pb/build.sh similarity index 100% rename from pulsar/pb/build.sh rename to pulsar/client-go/pb/build.sh diff --git a/pulsar/client-go/pb/milvus.proto b/pulsar/client-go/pb/milvus.proto new file mode 100644 index 0000000000..6f58ae1fae --- /dev/null +++ b/pulsar/client-go/pb/milvus.proto @@ -0,0 +1,744 @@ +syntax = "proto3"; + +package pb; + +enum ErrorCode { + SUCCESS = 0; + UNEXPECTED_ERROR = 1; + CONNECT_FAILED = 2; + PERMISSION_DENIED = 3; + COLLECTION_NOT_EXISTS = 4; + ILLEGAL_ARGUMENT = 5; + ILLEGAL_DIMENSION = 7; + ILLEGAL_INDEX_TYPE = 8; + ILLEGAL_COLLECTION_NAME = 9; + ILLEGAL_TOPK = 10; + ILLEGAL_ROWRECORD = 11; + ILLEGAL_VECTOR_ID = 12; + ILLEGAL_SEARCH_RESULT = 13; + FILE_NOT_FOUND = 14; + META_FAILED = 15; + CACHE_FAILED = 16; + CANNOT_CREATE_FOLDER = 17; + CANNOT_CREATE_FILE = 18; + CANNOT_DELETE_FOLDER = 19; + CANNOT_DELETE_FILE = 20; + BUILD_INDEX_ERROR = 21; + ILLEGAL_NLIST = 22; + ILLEGAL_METRIC_TYPE = 23; + OUT_OF_MEMORY = 24; +} + +message Status { + ErrorCode error_code = 1; + string reason = 2; +} + +/** + * @brief Field data type + */ +enum DataType { + NONE = 0; + BOOL = 1; + INT8 = 2; + INT16 = 3; + INT32 = 4; + INT64 = 5; + + FLOAT = 10; + DOUBLE = 11; + + STRING = 20; + + VECTOR_BINARY = 100; + VECTOR_FLOAT = 101; +} + +/** + * @brief General usage + */ +message KeyValuePair { + string key = 1; + string value = 2; +} + +/** + * @brief Collection name + */ +message CollectionName { + string collection_name = 1; +} + +/** + * @brief Collection name list + */ +message CollectionNameList { + Status status = 1; + repeated string collection_names = 2; +} + +/** + * @brief Field name + */ +message FieldName { + string collection_name = 1; + string field_name = 2; +} + +/** + * @brief Collection mapping + * @extra_params: key-value pair for extra parameters of the collection + * typically usage: + * extra_params["params"] = {segment_row_count: 1000000, auto_id: true} + * Note: + * the segment_row_count specify segment row count limit for merging + * the auto_id = true means entity id is auto-generated by milvus + */ +message Mapping { + Status status = 1; + string collection_name = 2; + repeated FieldParam fields = 3; + repeated KeyValuePair extra_params = 4; +} + +/** + * @brief Collection mapping list + */ +message MappingList { + Status status = 1; + repeated Mapping mapping_list = 2; +} + +/** + * @brief Parameters of partition + */ +message PartitionParam { + string collection_name = 1; + string tag = 2; +} + +/** + * @brief Partition list + */ +message PartitionList { + Status status = 1; + repeated string partition_tag_array = 2; +} + +/** + * @brief Vector row record + */ +message VectorRowRecord { + repeated float float_data = 1; //float vector data + bytes binary_data = 2; //binary vector data +} + +/** + * @brief Attribute record + */ +message AttrRecord { + repeated int32 int32_value = 1; + repeated int64 int64_value = 2; + repeated float float_value = 3; + repeated double double_value = 4; +} + +/** + * @brief Vector records + */ +message VectorRecord { + repeated VectorRowRecord records = 1; +} + +/** + * @brief Field values + */ +message FieldValue { + string field_name = 1; + DataType type = 2; + AttrRecord attr_record = 3; + VectorRecord vector_record = 4; +} + +/** + * @brief Parameters for insert action + */ +message InsertParam { + string collection_name = 1; + repeated FieldValue fields = 2; + repeated int64 entity_id_array = 3; //optional + string partition_tag = 4; + repeated KeyValuePair extra_params = 5; +} + +/** + * @brief Entity ids + */ +message EntityIds { + Status status = 1; + repeated int64 entity_id_array = 2; +} + +/** + * @brief Search vector parameters + */ +message VectorParam { + string json = 1; + VectorRecord row_record = 2; +} + +/** + * @brief Parameters for search action + * @dsl example: + * { + * "query": { + * "bool": { + * "must": [ + * { + * "must":[ + * { + * "should": [ + * { + * "term": { + * "gender": ["male"] + * } + * }, + * { + * "range": { + * "height": {"gte": "170.0", "lte": "180.0"} + * } + * } + * ] + * }, + * { + * "must_not": [ + * { + * "term": { + * "age": [20, 21, 22, 23, 24, 25] + * } + * }, + * { + * "Range": { + * "weight": {"lte": "100"} + * } + * } + * ] + * } + * ] + * }, + * { + * "must": [ + * { + * "vector": { + * "face_img": { + * "topk": 10, + * "metric_type": "L2", + * "query": [], + * "params": { + * "nprobe": 10 + * } + * } + * } + * } + * ] + * } + * ] + * } + * }, + * "fields": ["age", "face_img"] + * } + */ +message SearchParam { + string collection_name = 1; + repeated string partition_tag_array = 2; + repeated VectorParam vector_param = 3; + string dsl = 4; + repeated KeyValuePair extra_params = 5; +} + +/** + * @brief Parameters for searching in segments + */ +message SearchInSegmentParam { + repeated string file_id_array = 1; + SearchParam search_param = 2; +} + +/** + * @brief Entities + */ +message Entities { + Status status = 1; + repeated int64 ids = 2; + repeated bool valid_row = 3; + repeated FieldValue fields = 4; +} + +/** + * @brief Query result + */ +message QueryResult { + Status status = 1; + Entities entities = 2; + int64 row_num = 3; + repeated float scores = 4; + repeated float distances = 5; + repeated KeyValuePair extra_params = 6; +} + +/** + * @brief Server string Reply + */ +message StringReply { + Status status = 1; + string string_reply = 2; +} + +/** + * @brief Server bool Reply + */ +message BoolReply { + Status status = 1; + bool bool_reply = 2; +} + +/** + * @brief Return collection row count + */ +message CollectionRowCount { + Status status = 1; + int64 collection_row_count = 2; +} + +/** + * @brief Server command parameters + */ +message Command { + string cmd = 1; +} + +/** + * @brief Index params + * @collection_name: target collection + * @field_name: target field + * @index_name: a name for index provided by user, unique within this field + * @extra_params: index parameters in json format + * for vector field: + * extra_params["index_type"] = one of the values: FLAT, IVF_LAT, IVF_SQ8, NSGMIX, IVFSQ8H, + * PQ, HNSW, HNSW_SQ8NM, ANNOY + * extra_params["metric_type"] = one of the values: L2, IP, HAMMING, JACCARD, TANIMOTO + * SUBSTRUCTURE, SUPERSTRUCTURE + * extra_params["params"] = extra parameters for index, for example ivflat: {nlist: 2048} + * for structured field: + * extra_params["index_type"] = one of the values: SORTED + */ +message IndexParam { + Status status = 1; + string collection_name = 2; + string field_name = 3; + string index_name = 4; + repeated KeyValuePair extra_params = 5; +} + +/** + * @brief Parameters for flush action + */ +message FlushParam { + repeated string collection_name_array = 1; +} + +/** + * @brief Parameters for flush action + */ +message CompactParam { + string collection_name = 1; + double threshold = 2; +} + +/** + * @brief Parameters for deleting entities by id + */ +message DeleteByIDParam { + string collection_name = 1; + repeated int64 id_array = 2; +} + +/** + * @brief Return collection stats + * @json_info: collection stats in json format, typically, the format is like: + * { + * row_count: xxx, + * data_size: xxx, + * partitions: [ + * { + * tag: xxx, + * id: xxx, + * row_count: xxx, + * data_size: xxx, + * segments: [ + * { + * id: xxx, + * row_count: xxx, + * data_size: xxx, + * files: [ + * { + * field: xxx, + * name: xxx, + * index_type: xxx, + * path: xxx, + * data_size: xxx, + * } + * ] + * } + * ] + * } + * ] + * } + */ +message CollectionInfo { + Status status = 1; + string json_info = 2; +} + +/** + * @brief Parameters for returning entities id of a segment + */ +message GetEntityIDsParam { + string collection_name = 1; + int64 segment_id = 2; +} + +/** + * @brief Entities identity + */ +message EntityIdentity { + string collection_name = 1; + repeated int64 id_array = 2; + repeated string field_names = 3; +} + +/********************************************SearchPB interface***************************************************/ +/** + * @brief Vector field parameters + */ +message VectorFieldParam { + int64 dimension = 1; +} + +/** + * @brief Field type + */ +message FieldType { + oneof value { + DataType data_type = 1; + VectorFieldParam vector_param = 2; + } +} + +/** + * @brief Field parameters + */ +message FieldParam { + uint64 id = 1; + string name = 2; + DataType type = 3; + repeated KeyValuePair index_params = 4; + repeated KeyValuePair extra_params = 5; +} + +/** + * @brief Vector field record + */ +message VectorFieldRecord { + repeated VectorRowRecord value = 1; +} + +/////////////////////////////////////////////////////////////////// + +message TermQuery { + string field_name = 1; + repeated int64 int_value = 2; + repeated double double_value = 3; + int64 value_num = 4; + float boost = 5; + repeated KeyValuePair extra_params = 6; +} + +enum CompareOperator { + LT = 0; + LTE = 1; + EQ = 2; + GT = 3; + GTE = 4; + NE = 5; +} + +message CompareExpr { + CompareOperator operator = 1; + string operand = 2; +} + +message RangeQuery { + string field_name = 1; + repeated CompareExpr operand = 2; + float boost = 3; + repeated KeyValuePair extra_params = 4; +} + +message VectorQuery { + string field_name = 1; + float query_boost = 2; + repeated VectorRowRecord records = 3; + int64 topk = 4; + repeated KeyValuePair extra_params = 5; +} + +enum Occur { + INVALID = 0; + MUST = 1; + SHOULD = 2; + MUST_NOT = 3; +} + +message BooleanQuery { + Occur occur = 1; + repeated GeneralQuery general_query = 2; +} + +message GeneralQuery { + oneof query { + BooleanQuery boolean_query = 1; + TermQuery term_query = 2; + RangeQuery range_query = 3; + VectorQuery vector_query = 4; + } +} + +message SearchParamPB { + string collection_name = 1; + repeated string partition_tag_array = 2; + GeneralQuery general_query = 3; + repeated KeyValuePair extra_params = 4; +} + +service MilvusService { + /** + * @brief This method is used to create collection + * + * @param CollectionSchema, use to provide collection information to be created. + * + * @return Status + */ + rpc CreateCollection(Mapping) returns (Status){} + + /** + * @brief This method is used to test collection existence. + * + * @param CollectionName, collection name is going to be tested. + * + * @return BoolReply + */ + rpc HasCollection(CollectionName) returns (BoolReply) {} + + /** + * @brief This method is used to get collection schema. + * + * @param CollectionName, target collection name. + * + * @return CollectionSchema + */ + rpc DescribeCollection(CollectionName) returns (Mapping) {} + + /** + * @brief This method is used to get collection schema. + * + * @param CollectionName, target collection name. + * + * @return CollectionRowCount + */ + rpc CountCollection(CollectionName) returns (CollectionRowCount) {} + + /** + * @brief This method is used to list all collections. + * + * @param Command, dummy parameter. + * + * @return CollectionNameList + */ + rpc ShowCollections(Command) returns (CollectionNameList) {} + + /** + * @brief This method is used to get collection detail information. + * + * @param CollectionName, target collection name. + * + * @return CollectionInfo + */ + rpc ShowCollectionInfo(CollectionName) returns (CollectionInfo) {} + + /** + * @brief This method is used to delete collection. + * + * @param CollectionName, collection name is going to be deleted. + * + * @return Status + */ + rpc DropCollection(CollectionName) returns (Status) {} + + /** + * @brief This method is used to build index by collection in sync mode. + * + * @param IndexParam, index paramters. + * + * @return Status + */ + rpc CreateIndex(IndexParam) returns (Status) {} + + /** + * @brief This method is used to describe index + * + * @param IndexParam, target index. + * + * @return IndexParam + */ + rpc DescribeIndex(IndexParam) returns (IndexParam) {} + + /** + * @brief This method is used to drop index + * + * @param IndexParam, target field. if the IndexParam.field_name is empty, will drop all index of the collection + * + * @return Status + */ + rpc DropIndex(IndexParam) returns (Status) {} + + /** + * @brief This method is used to create partition + * + * @param PartitionParam, partition parameters. + * + * @return Status + */ + rpc CreatePartition(PartitionParam) returns (Status) {} + + /** + * @brief This method is used to test partition existence. + * + * @param PartitionParam, target partition. + * + * @return BoolReply + */ + rpc HasPartition(PartitionParam) returns (BoolReply) {} + + /** + * @brief This method is used to show partition information + * + * @param CollectionName, target collection name. + * + * @return PartitionList + */ + rpc ShowPartitions(CollectionName) returns (PartitionList) {} + + /** + * @brief This method is used to drop partition + * + * @param PartitionParam, target partition. + * + * @return Status + */ + rpc DropPartition(PartitionParam) returns (Status) {} + + /** + * @brief This method is used to add vector array to collection. + * + * @param InsertParam, insert parameters. + * + * @return VectorIds + */ + rpc Insert(InsertParam) returns (EntityIds) {} + + /** + * @brief This method is used to get entities data by id array. + * + * @param EntitiesIdentity, target entity id array. + * + * @return EntitiesData + */ + rpc GetEntityByID(EntityIdentity) returns (Entities) {} + + /** + * @brief This method is used to get vector ids from a segment + * + * @param GetVectorIDsParam, target collection and segment + * + * @return VectorIds + */ + rpc GetEntityIDs(GetEntityIDsParam) returns (EntityIds) {} + + /** + * @brief This method is used to query vector in collection. + * + * @param SearchParam, search parameters. + * + * @return KQueryResult + */ + rpc Search(SearchParam) returns (QueryResult) {} + + /** + * @brief This method is used to query vector in specified files. + * + * @param SearchInSegmentParam, target segments to search. + * + * @return TopKQueryResult + */ + rpc SearchInSegment(SearchInSegmentParam) returns (QueryResult) {} + + /** + * @brief This method is used to give the server status. + * + * @param Command, command string + * + * @return StringReply + */ + rpc Cmd(Command) returns (StringReply) {} + + /** + * @brief This method is used to delete vector by id + * + * @param DeleteByIDParam, delete parameters. + * + * @return status + */ + rpc DeleteByID(DeleteByIDParam) returns (Status) {} + + /** + * @brief This method is used to preload collection + * + * @param CollectionName, target collection name. + * + * @return Status + */ + rpc PreloadCollection(CollectionName) returns (Status) {} + + /** + * @brief This method is used to flush buffer into storage. + * + * @param FlushParam, flush parameters + * + * @return Status + */ + rpc Flush(FlushParam) returns (Status) {} + + /** + * @brief This method is used to compact collection + * + * @param CompactParam, compact parameters + * + * @return Status + */ + rpc Compact(CompactParam) returns (Status) {} + + /********************************New Interface********************************************/ + + rpc SearchPB(SearchParamPB) returns (QueryResult) {} +} diff --git a/pulsar/pb/pulsar.pb.go b/pulsar/client-go/pb/pulsar.pb.go similarity index 100% rename from pulsar/pb/pulsar.pb.go rename to pulsar/client-go/pb/pulsar.pb.go diff --git a/pulsar/pb/pulsar.proto b/pulsar/client-go/pb/pulsar.proto similarity index 100% rename from pulsar/pb/pulsar.proto rename to pulsar/client-go/pb/pulsar.proto diff --git a/pulsar/client-go/query_node.go b/pulsar/client-go/query_node.go new file mode 100644 index 0000000000..60b4f737fe --- /dev/null +++ b/pulsar/client-go/query_node.go @@ -0,0 +1,71 @@ +package client_go + +import ( + "fmt" + "suvlim/pulsar/client-go/schema" + "sync" + "time" +) + +var ( + consumerQSchema = "{\"type\":\"record\",\"name\":\"suvlim\",\"namespace\":\"pulsar\",\"fields\":[" + + "{\"name\":\"MsgType\",\"type\":\"OpType\"}," + + "]}" +) + +type QueryNode struct { + mc MessageClient +} + +func (qn *QueryNode)doQueryNode(wg sync.WaitGroup) { + wg.Add(3) + go qn.insert_query(qn.mc.InsertMsg, wg) + go qn.delete_query(qn.mc.DeleteMsg, wg) + go qn.search_query(qn.mc.SearchMsg, wg) + wg.Wait() +} + + +func (qn *QueryNode) PrepareBatchMsg() { + qn.mc.PrepareBatchMsg(JobType(0)) +} + +func (qn *QueryNode)ReceiveMessage() { + qn.mc.ReceiveMessage() +} + +func main() { + + mc := MessageClient{} + topics := []string{"insert", "delete"} + mc.InitClient("pulsar://localhost:6650", topics, consumerQSchema) + + qn := QueryNode{mc} + wg := sync.WaitGroup{} + go qn.ReceiveMessage() + + for { + time.Sleep(200 * time.Millisecond) + qn.PrepareBatchMsg() + qn.doQueryNode(wg) + fmt.Println("do a batch in 200ms") + } +} + +func (qn *QueryNode) insert_query(data []*schema.InsertMsg, wg sync.WaitGroup) schema.Status { + wg.Done() + return schema.Status{schema.ErrorCode_SUCCESS, ""} +} + +func (qn *QueryNode) delete_query(data []*schema.DeleteMsg, wg sync.WaitGroup) schema.Status { + wg.Done() + return schema.Status{schema.ErrorCode_SUCCESS, ""} +} + +func (qn *QueryNode) search_query(data []*schema.SearchMsg, wg sync.WaitGroup) schema.Status { + wg.Done() + return schema.Status{schema.ErrorCode_SUCCESS, ""} +} + + + diff --git a/pulsar/schema/message.go b/pulsar/client-go/schema/message.go similarity index 98% rename from pulsar/schema/message.go rename to pulsar/client-go/schema/message.go index fc91e4d56a..004f4af590 100644 --- a/pulsar/schema/message.go +++ b/pulsar/client-go/schema/message.go @@ -109,6 +109,9 @@ type PulsarMessage struct { Timestamp int64 ClientId int64 MsgType OpType + TopicName string + PartitionId int64 + } type Message interface { @@ -192,3 +195,4 @@ func (kms *Key2SegMsg) GetType() OpType { type SyncEofMsg struct { MsgType OpType } + diff --git a/pulsar/storage_node.go b/pulsar/client-go/storage_node.go similarity index 74% rename from pulsar/storage_node.go rename to pulsar/client-go/storage_node.go index 841eb23f80..b8a37a8098 100644 --- a/pulsar/storage_node.go +++ b/pulsar/client-go/storage_node.go @@ -1,12 +1,18 @@ -package pulsar +package client_go import ( "fmt" - "github.com/czs007/suvlim/pulsar/schema" + "suvlim/pulsar/client-go/schema" "sync" "time" ) +var ( + consumerWSchema = "{\"type\":\"record\",\"name\":\"suvlim\",\"namespace\":\"pulsar\",\"fields\":[" + + "{\"name\":\"MsgType\",\"type\":\"OpType\"}," + + "]}" +) + type WriteNode struct { mc MessageClient } @@ -25,10 +31,10 @@ func main() { mc := MessageClient{} topics := []string{"insert", "delete"} - mc.InitClient("pulsar://localhost:6650", topics) + mc.InitClient("pulsar://localhost:6650", topics, consumerWSchema) go mc.ReceiveMessage() - + wg := sync.WaitGroup{} wn := WriteNode{mc} for { diff --git a/pulsar/client-go/test/client_test.go b/pulsar/client-go/test/client_test.go new file mode 100644 index 0000000000..f13a91cb2c --- /dev/null +++ b/pulsar/client-go/test/client_test.go @@ -0,0 +1,19 @@ +package test + +import "sync" + +var ( + wg sync.WaitGroup + + OriginMsgSchema = "{\"type\":\"record\",\"name\":\"suvlim\",\"namespace\":\"pulsar\",\"fields\":[" + + "{\"name\":\"CollectionName\",\"type\":\"string\"}," + + "{\"name\":\"Fields\",\"type\":\"[]*FieldValue\"}" + + "{\"name\":\"EntityId\",\"type\":\"int64\"}" + + "{\"name\":\"PartitionTag\",\"type\":\"string\"}" + + "{\"name\":\"VectorParam\",\"type\":\"*VectorParam\"}" + + "{\"name\":\"Segments\",\"type\":\"[]string\"}" + + "{\"name\":\"Timestamp\",\"type\":\"int64\"}" + + "{\"name\":\"ClientId\",\"type\":\"int64\"}" + + "{\"name\":\"MsgType\",\"type\":\"OpType\"}" + + "]}" +) \ No newline at end of file diff --git a/pulsar/query_node.go b/pulsar/query_node.go deleted file mode 100644 index 3a11d11708..0000000000 --- a/pulsar/query_node.go +++ /dev/null @@ -1,60 +0,0 @@ -package pulsar - -// import ( -// "fmt" -// "suvlim/pulsar/schema" -// "sync" -// "time" -// ) - -// type QueryNode struct { -// mc MessageClient -// } - -// func (qn *QueryNode)doQueryNode(wg sync.WaitGroup) { -// wg.Add(3) -// go qn.insert_query(qn.mc.InsertMsg, wg) -// go qn.delete_query(qn.mc.DeleteMsg, wg) -// go qn.search_query(qn.mc.SearchMsg, wg) -// wg.Wait() -// } - - -// func (qn *QueryNode) PrepareBatchMsg() { -// qn.mc.PrepareBatchMsg(JobType(0)) -// } -// func main() { - -// mc := MessageClient{} -// topics := []string{"insert", "delete"} -// mc.InitClient("pulsar://localhost:6650", topics) - -// go mc.ReceiveMessage() - -// qn := QueryNode{mc} - -// for { -// time.Sleep(200 * time.Millisecond) -// qn.PrepareBatchMsg() -// qn.doQueryNode(wg) -// fmt.Println("do a batch in 200ms") -// } -// } - -// func (qn *QueryNode) insert_query(data []*schema.InsertMsg, wg sync.WaitGroup) schema.Status{ -// wg.Done() -// return schema.Status{schema.ErrorCode_SUCCESS, ""} -// } - -// func (qn *QueryNode) delete_query(data []*schema.DeleteMsg, wg sync.WaitGroup) schema.Status{ -// wg.Done() -// return schema.Status{schema.ErrorCode_SUCCESS, ""} -// } - -// func (qn *QueryNode) search_query(data []*schema.SearchMsg, wg sync.WaitGroup) schema.Status{ -// wg.Done() -// return schema.Status{schema.ErrorCode_SUCCESS, ""} -// } - - - diff --git a/reader/index.go b/reader/index.go index c735fbd907..879991ac5a 100644 --- a/reader/index.go +++ b/reader/index.go @@ -1,13 +1,15 @@ package reader -import "github.com/czs007/suvlim/pulsar/schema" +import ( + schema2 "suvlim/pulsar/client-go/schema" +) type IndexConfig struct {} -func buildIndex(config IndexConfig) schema.Status { - return schema.Status{Error_code: schema.ErrorCode_SUCCESS} +func buildIndex(config IndexConfig) schema2.Status { + return schema2.Status{Error_code: schema2.ErrorCode_SUCCESS} } -func dropIndex(fieldName string) schema.Status { - return schema.Status{Error_code: schema.ErrorCode_SUCCESS} +func dropIndex(fieldName string) schema2.Status { + return schema2.Status{Error_code: schema2.ErrorCode_SUCCESS} } diff --git a/reader/result.go b/reader/result.go index fc132499fe..405ffef01b 100644 --- a/reader/result.go +++ b/reader/result.go @@ -2,7 +2,7 @@ package reader import ( "fmt" - "github.com/czs007/suvlim/pulsar/schema" + schema2 "suvlim/pulsar/client-go/schema" ) type ResultEntityIds []int64 @@ -12,17 +12,17 @@ func getResultTopicByClientId(clientId int64) string { return "result-topic/partition-" + string(clientId) } -func publishResult(ids *ResultEntityIds, clientId int64) schema.Status { +func publishResult(ids *ResultEntityIds, clientId int64) schema2.Status { // TODO: Pulsar publish var resultTopic = getResultTopicByClientId(clientId) fmt.Println(resultTopic) - return schema.Status{Error_code: schema.ErrorCode_SUCCESS} + return schema2.Status{Error_code: schema2.ErrorCode_SUCCESS} } -func publicStatistic(statisticTopic string) schema.Status { +func publicStatistic(statisticTopic string) schema2.Status { // TODO: get statistic info // getStatisticInfo() // var info = getStatisticInfo() // TODO: Pulsar publish - return schema.Status{Error_code: schema.ErrorCode_SUCCESS} + return schema2.Status{Error_code: schema2.ErrorCode_SUCCESS} }