diff --git a/include/dsn/cpp/serialization_helper/dsn.layer2_types.h b/include/dsn/cpp/serialization_helper/dsn.layer2_types.h index 4898a6bc8e..a477a18eb5 100644 --- a/include/dsn/cpp/serialization_helper/dsn.layer2_types.h +++ b/include/dsn/cpp/serialization_helper/dsn.layer2_types.h @@ -17,24 +17,32 @@ #include + namespace dsn { -struct app_status -{ - enum type - { - AS_INVALID = 0, - AS_AVAILABLE = 1, - AS_CREATING = 2, - AS_CREATE_FAILED = 3, - AS_DROPPING = 4, - AS_DROP_FAILED = 5, - AS_DROPPED = 6, - AS_RECALLING = 7 - }; +struct app_status { + enum type { + AS_INVALID = 0, + AS_AVAILABLE = 1, + AS_CREATING = 2, + AS_CREATE_FAILED = 3, + AS_DROPPING = 4, + AS_DROP_FAILED = 5, + AS_DROPPED = 6, + AS_RECALLING = 7 + }; +}; + +extern const std::map _app_status_VALUES_TO_NAMES; + +struct comparator_type { + enum type { + DEFAULT = 0, + PEGASUS = 1 + }; }; -extern const std::map _app_status_VALUES_TO_NAMES; +extern const std::map _comparator_type_VALUES_TO_NAMES; class partition_configuration; @@ -44,396 +52,362 @@ class configuration_query_by_index_response; class app_info; -typedef struct _partition_configuration__isset -{ - _partition_configuration__isset() - : pid(false), - ballot(false), - max_replica_count(false), - primary(false), - secondaries(false), - last_drops(false), - last_committed_decree(false), - partition_flags(false) - { - } - bool pid : 1; - bool ballot : 1; - bool max_replica_count : 1; - bool primary : 1; - bool secondaries : 1; - bool last_drops : 1; - bool last_committed_decree : 1; - bool partition_flags : 1; +typedef struct _partition_configuration__isset { + _partition_configuration__isset() : pid(false), ballot(false), max_replica_count(false), primary(false), secondaries(false), last_drops(false), last_committed_decree(false), partition_flags(false) {} + bool pid :1; + bool ballot :1; + bool max_replica_count :1; + bool primary :1; + bool secondaries :1; + bool last_drops :1; + bool last_committed_decree :1; + bool partition_flags :1; } _partition_configuration__isset; -class partition_configuration -{ -public: - partition_configuration(const partition_configuration &); - partition_configuration(partition_configuration &&); - partition_configuration &operator=(const partition_configuration &); - partition_configuration &operator=(partition_configuration &&); - partition_configuration() - : ballot(0), max_replica_count(0), last_committed_decree(0), partition_flags(0) - { - } - - virtual ~partition_configuration() throw(); - ::dsn::gpid pid; - int64_t ballot; - int32_t max_replica_count; - ::dsn::rpc_address primary; - std::vector<::dsn::rpc_address> secondaries; - std::vector<::dsn::rpc_address> last_drops; - int64_t last_committed_decree; - int32_t partition_flags; - - _partition_configuration__isset __isset; - - void __set_pid(const ::dsn::gpid &val); - - void __set_ballot(const int64_t val); - - void __set_max_replica_count(const int32_t val); - - void __set_primary(const ::dsn::rpc_address &val); - - void __set_secondaries(const std::vector<::dsn::rpc_address> &val); - - void __set_last_drops(const std::vector<::dsn::rpc_address> &val); - - void __set_last_committed_decree(const int64_t val); - - void __set_partition_flags(const int32_t val); - - bool operator==(const partition_configuration &rhs) const - { - if (!(pid == rhs.pid)) - return false; - if (!(ballot == rhs.ballot)) - return false; - if (!(max_replica_count == rhs.max_replica_count)) - return false; - if (!(primary == rhs.primary)) - return false; - if (!(secondaries == rhs.secondaries)) - return false; - if (!(last_drops == rhs.last_drops)) - return false; - if (!(last_committed_decree == rhs.last_committed_decree)) - return false; - if (!(partition_flags == rhs.partition_flags)) - return false; - return true; - } - bool operator!=(const partition_configuration &rhs) const { return !(*this == rhs); } - - bool operator<(const partition_configuration &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class partition_configuration { + public: + + partition_configuration(const partition_configuration&); + partition_configuration(partition_configuration&&); + partition_configuration& operator=(const partition_configuration&); + partition_configuration& operator=(partition_configuration&&); + partition_configuration() : ballot(0), max_replica_count(0), last_committed_decree(0), partition_flags(0) { + } + + virtual ~partition_configuration() throw(); + ::dsn::gpid pid; + int64_t ballot; + int32_t max_replica_count; + ::dsn::rpc_address primary; + std::vector< ::dsn::rpc_address> secondaries; + std::vector< ::dsn::rpc_address> last_drops; + int64_t last_committed_decree; + int32_t partition_flags; + + _partition_configuration__isset __isset; + + void __set_pid(const ::dsn::gpid& val); + + void __set_ballot(const int64_t val); + + void __set_max_replica_count(const int32_t val); + + void __set_primary(const ::dsn::rpc_address& val); + + void __set_secondaries(const std::vector< ::dsn::rpc_address> & val); + + void __set_last_drops(const std::vector< ::dsn::rpc_address> & val); + + void __set_last_committed_decree(const int64_t val); + + void __set_partition_flags(const int32_t val); + + bool operator == (const partition_configuration & rhs) const + { + if (!(pid == rhs.pid)) + return false; + if (!(ballot == rhs.ballot)) + return false; + if (!(max_replica_count == rhs.max_replica_count)) + return false; + if (!(primary == rhs.primary)) + return false; + if (!(secondaries == rhs.secondaries)) + return false; + if (!(last_drops == rhs.last_drops)) + return false; + if (!(last_committed_decree == rhs.last_committed_decree)) + return false; + if (!(partition_flags == rhs.partition_flags)) + return false; + return true; + } + bool operator != (const partition_configuration &rhs) const { + return !(*this == rhs); + } + + bool operator < (const partition_configuration & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(partition_configuration &a, partition_configuration &b); -inline std::ostream &operator<<(std::ostream &out, const partition_configuration &obj) +inline std::ostream& operator<<(std::ostream& out, const partition_configuration& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_by_index_request__isset -{ - _configuration_query_by_index_request__isset() : app_name(false), partition_indices(false) {} - bool app_name : 1; - bool partition_indices : 1; +typedef struct _configuration_query_by_index_request__isset { + _configuration_query_by_index_request__isset() : app_name(false), partition_indices(false) {} + bool app_name :1; + bool partition_indices :1; } _configuration_query_by_index_request__isset; -class configuration_query_by_index_request -{ -public: - configuration_query_by_index_request(const configuration_query_by_index_request &); - configuration_query_by_index_request(configuration_query_by_index_request &&); - configuration_query_by_index_request &operator=(const configuration_query_by_index_request &); - configuration_query_by_index_request &operator=(configuration_query_by_index_request &&); - configuration_query_by_index_request() : app_name() {} - - virtual ~configuration_query_by_index_request() throw(); - std::string app_name; - std::vector partition_indices; - - _configuration_query_by_index_request__isset __isset; - - void __set_app_name(const std::string &val); - - void __set_partition_indices(const std::vector &val); - - bool operator==(const configuration_query_by_index_request &rhs) const - { - if (!(app_name == rhs.app_name)) - return false; - if (!(partition_indices == rhs.partition_indices)) - return false; - return true; - } - bool operator!=(const configuration_query_by_index_request &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_query_by_index_request &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_query_by_index_request { + public: + + configuration_query_by_index_request(const configuration_query_by_index_request&); + configuration_query_by_index_request(configuration_query_by_index_request&&); + configuration_query_by_index_request& operator=(const configuration_query_by_index_request&); + configuration_query_by_index_request& operator=(configuration_query_by_index_request&&); + configuration_query_by_index_request() : app_name() { + } + + virtual ~configuration_query_by_index_request() throw(); + std::string app_name; + std::vector partition_indices; + + _configuration_query_by_index_request__isset __isset; + + void __set_app_name(const std::string& val); + + void __set_partition_indices(const std::vector & val); + + bool operator == (const configuration_query_by_index_request & rhs) const + { + if (!(app_name == rhs.app_name)) + return false; + if (!(partition_indices == rhs.partition_indices)) + return false; + return true; + } + bool operator != (const configuration_query_by_index_request &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_query_by_index_request & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_query_by_index_request &a, configuration_query_by_index_request &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_query_by_index_request &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_query_by_index_request& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _configuration_query_by_index_response__isset -{ - _configuration_query_by_index_response__isset() - : err(false), app_id(false), partition_count(false), is_stateful(false), partitions(false) - { - } - bool err : 1; - bool app_id : 1; - bool partition_count : 1; - bool is_stateful : 1; - bool partitions : 1; +typedef struct _configuration_query_by_index_response__isset { + _configuration_query_by_index_response__isset() : err(false), app_id(false), partition_count(false), is_stateful(false), partitions(false) {} + bool err :1; + bool app_id :1; + bool partition_count :1; + bool is_stateful :1; + bool partitions :1; } _configuration_query_by_index_response__isset; -class configuration_query_by_index_response -{ -public: - configuration_query_by_index_response(const configuration_query_by_index_response &); - configuration_query_by_index_response(configuration_query_by_index_response &&); - configuration_query_by_index_response &operator=(const configuration_query_by_index_response &); - configuration_query_by_index_response &operator=(configuration_query_by_index_response &&); - configuration_query_by_index_response() : app_id(0), partition_count(0), is_stateful(0) {} - - virtual ~configuration_query_by_index_response() throw(); - ::dsn::error_code err; - int32_t app_id; - int32_t partition_count; - bool is_stateful; - std::vector partitions; - - _configuration_query_by_index_response__isset __isset; - - void __set_err(const ::dsn::error_code &val); - - void __set_app_id(const int32_t val); - - void __set_partition_count(const int32_t val); - - void __set_is_stateful(const bool val); - - void __set_partitions(const std::vector &val); - - bool operator==(const configuration_query_by_index_response &rhs) const - { - if (!(err == rhs.err)) - return false; - if (!(app_id == rhs.app_id)) - return false; - if (!(partition_count == rhs.partition_count)) - return false; - if (!(is_stateful == rhs.is_stateful)) - return false; - if (!(partitions == rhs.partitions)) - return false; - return true; - } - bool operator!=(const configuration_query_by_index_response &rhs) const - { - return !(*this == rhs); - } - - bool operator<(const configuration_query_by_index_response &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class configuration_query_by_index_response { + public: + + configuration_query_by_index_response(const configuration_query_by_index_response&); + configuration_query_by_index_response(configuration_query_by_index_response&&); + configuration_query_by_index_response& operator=(const configuration_query_by_index_response&); + configuration_query_by_index_response& operator=(configuration_query_by_index_response&&); + configuration_query_by_index_response() : app_id(0), partition_count(0), is_stateful(0) { + } + + virtual ~configuration_query_by_index_response() throw(); + ::dsn::error_code err; + int32_t app_id; + int32_t partition_count; + bool is_stateful; + std::vector partitions; + + _configuration_query_by_index_response__isset __isset; + + void __set_err(const ::dsn::error_code& val); + + void __set_app_id(const int32_t val); + + void __set_partition_count(const int32_t val); + + void __set_is_stateful(const bool val); + + void __set_partitions(const std::vector & val); + + bool operator == (const configuration_query_by_index_response & rhs) const + { + if (!(err == rhs.err)) + return false; + if (!(app_id == rhs.app_id)) + return false; + if (!(partition_count == rhs.partition_count)) + return false; + if (!(is_stateful == rhs.is_stateful)) + return false; + if (!(partitions == rhs.partitions)) + return false; + return true; + } + bool operator != (const configuration_query_by_index_response &rhs) const { + return !(*this == rhs); + } + + bool operator < (const configuration_query_by_index_response & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(configuration_query_by_index_response &a, configuration_query_by_index_response &b); -inline std::ostream &operator<<(std::ostream &out, const configuration_query_by_index_response &obj) +inline std::ostream& operator<<(std::ostream& out, const configuration_query_by_index_response& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } -typedef struct _app_info__isset -{ - _app_info__isset() - : status(true), - app_type(false), - app_name(false), - app_id(false), - partition_count(false), - envs(false), - is_stateful(false), - max_replica_count(false), - expire_second(false), - create_second(false), - drop_second(false), - duplicating(false), - init_partition_count(true), - is_bulk_loading(true) - { - } - bool status : 1; - bool app_type : 1; - bool app_name : 1; - bool app_id : 1; - bool partition_count : 1; - bool envs : 1; - bool is_stateful : 1; - bool max_replica_count : 1; - bool expire_second : 1; - bool create_second : 1; - bool drop_second : 1; - bool duplicating : 1; - bool init_partition_count : 1; - bool is_bulk_loading : 1; +typedef struct _app_info__isset { + _app_info__isset() : status(true), app_type(false), app_name(false), app_id(false), partition_count(false), envs(false), is_stateful(false), max_replica_count(false), expire_second(false), create_second(false), drop_second(false), duplicating(true), init_partition_count(true), is_bulk_loading(true), comparator(true) {} + bool status :1; + bool app_type :1; + bool app_name :1; + bool app_id :1; + bool partition_count :1; + bool envs :1; + bool is_stateful :1; + bool max_replica_count :1; + bool expire_second :1; + bool create_second :1; + bool drop_second :1; + bool duplicating :1; + bool init_partition_count :1; + bool is_bulk_loading :1; + bool comparator :1; } _app_info__isset; -class app_info -{ -public: - app_info(const app_info &); - app_info(app_info &&); - app_info &operator=(const app_info &); - app_info &operator=(app_info &&); - app_info() - : status((app_status::type)0), - app_type(), - app_name(), - app_id(0), - partition_count(0), - is_stateful(0), - max_replica_count(0), - expire_second(0), - create_second(0), - drop_second(0), - duplicating(0), - init_partition_count(-1), - is_bulk_loading(false) - { - status = (app_status::type)0; - } - - virtual ~app_info() throw(); - app_status::type status; - std::string app_type; - std::string app_name; - int32_t app_id; - int32_t partition_count; - std::map envs; - bool is_stateful; - int32_t max_replica_count; - int64_t expire_second; - int64_t create_second; - int64_t drop_second; - bool duplicating; - int32_t init_partition_count; - bool is_bulk_loading; - - _app_info__isset __isset; - - void __set_status(const app_status::type val); - - void __set_app_type(const std::string &val); - - void __set_app_name(const std::string &val); - - void __set_app_id(const int32_t val); - - void __set_partition_count(const int32_t val); - - void __set_envs(const std::map &val); - - void __set_is_stateful(const bool val); - - void __set_max_replica_count(const int32_t val); - - void __set_expire_second(const int64_t val); - - void __set_create_second(const int64_t val); - - void __set_drop_second(const int64_t val); - - void __set_duplicating(const bool val); - - void __set_init_partition_count(const int32_t val); - - void __set_is_bulk_loading(const bool val); - - bool operator==(const app_info &rhs) const - { - if (!(status == rhs.status)) - return false; - if (!(app_type == rhs.app_type)) - return false; - if (!(app_name == rhs.app_name)) - return false; - if (!(app_id == rhs.app_id)) - return false; - if (!(partition_count == rhs.partition_count)) - return false; - if (!(envs == rhs.envs)) - return false; - if (!(is_stateful == rhs.is_stateful)) - return false; - if (!(max_replica_count == rhs.max_replica_count)) - return false; - if (!(expire_second == rhs.expire_second)) - return false; - if (!(create_second == rhs.create_second)) - return false; - if (!(drop_second == rhs.drop_second)) - return false; - if (__isset.duplicating != rhs.__isset.duplicating) - return false; - else if (__isset.duplicating && !(duplicating == rhs.duplicating)) - return false; - if (!(init_partition_count == rhs.init_partition_count)) - return false; - if (__isset.is_bulk_loading != rhs.__isset.is_bulk_loading) - return false; - else if (__isset.is_bulk_loading && !(is_bulk_loading == rhs.is_bulk_loading)) - return false; - return true; - } - bool operator!=(const app_info &rhs) const { return !(*this == rhs); } - - bool operator<(const app_info &) const; - - uint32_t read(::apache::thrift::protocol::TProtocol *iprot); - uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const; - - virtual void printTo(std::ostream &out) const; +class app_info { + public: + + app_info(const app_info&); + app_info(app_info&&); + app_info& operator=(const app_info&); + app_info& operator=(app_info&&); + app_info() : status((app_status::type)0), app_type(), app_name(), app_id(0), partition_count(0), is_stateful(0), max_replica_count(0), expire_second(0), create_second(0), drop_second(0), duplicating(false), init_partition_count(-1), is_bulk_loading(false), comparator((comparator_type::type)0) { + status = (app_status::type)0; + + comparator = (comparator_type::type)0; + + } + + virtual ~app_info() throw(); + app_status::type status; + std::string app_type; + std::string app_name; + int32_t app_id; + int32_t partition_count; + std::map envs; + bool is_stateful; + int32_t max_replica_count; + int64_t expire_second; + int64_t create_second; + int64_t drop_second; + bool duplicating; + int32_t init_partition_count; + bool is_bulk_loading; + comparator_type::type comparator; + + _app_info__isset __isset; + + void __set_status(const app_status::type val); + + void __set_app_type(const std::string& val); + + void __set_app_name(const std::string& val); + + void __set_app_id(const int32_t val); + + void __set_partition_count(const int32_t val); + + void __set_envs(const std::map & val); + + void __set_is_stateful(const bool val); + + void __set_max_replica_count(const int32_t val); + + void __set_expire_second(const int64_t val); + + void __set_create_second(const int64_t val); + + void __set_drop_second(const int64_t val); + + void __set_duplicating(const bool val); + + void __set_init_partition_count(const int32_t val); + + void __set_is_bulk_loading(const bool val); + + void __set_comparator(const comparator_type::type val); + + bool operator == (const app_info & rhs) const + { + if (!(status == rhs.status)) + return false; + if (!(app_type == rhs.app_type)) + return false; + if (!(app_name == rhs.app_name)) + return false; + if (!(app_id == rhs.app_id)) + return false; + if (!(partition_count == rhs.partition_count)) + return false; + if (!(envs == rhs.envs)) + return false; + if (!(is_stateful == rhs.is_stateful)) + return false; + if (!(max_replica_count == rhs.max_replica_count)) + return false; + if (!(expire_second == rhs.expire_second)) + return false; + if (!(create_second == rhs.create_second)) + return false; + if (!(drop_second == rhs.drop_second)) + return false; + if (__isset.duplicating != rhs.__isset.duplicating) + return false; + else if (__isset.duplicating && !(duplicating == rhs.duplicating)) + return false; + if (!(init_partition_count == rhs.init_partition_count)) + return false; + if (__isset.is_bulk_loading != rhs.__isset.is_bulk_loading) + return false; + else if (__isset.is_bulk_loading && !(is_bulk_loading == rhs.is_bulk_loading)) + return false; + if (__isset.comparator != rhs.__isset.comparator) + return false; + else if (__isset.comparator && !(comparator == rhs.comparator)) + return false; + return true; + } + bool operator != (const app_info &rhs) const { + return !(*this == rhs); + } + + bool operator < (const app_info & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + + virtual void printTo(std::ostream& out) const; }; void swap(app_info &a, app_info &b); -inline std::ostream &operator<<(std::ostream &out, const app_info &obj) +inline std::ostream& operator<<(std::ostream& out, const app_info& obj) { - obj.printTo(out); - return out; + obj.printTo(out); + return out; } } // namespace diff --git a/src/dsn.layer2.thrift b/src/dsn.layer2.thrift index 1b764c3ecf..69b2929582 100644 --- a/src/dsn.layer2.thrift +++ b/src/dsn.layer2.thrift @@ -45,6 +45,12 @@ enum app_status AS_RECALLING } +enum comparator_type +{ + DEFAULT, + PEGASUS +} + struct app_info { 1:app_status status = app_status.AS_INVALID; @@ -75,4 +81,11 @@ struct app_info // New fields for bulk load // Whether this app is executing bulk load 14:optional bool is_bulk_loading = false; + + // New fields for rocksdb comparator, Should not change it after app(table) created. + // "comparator_type.DEFAULT": BytesComparator, + // "comparator_type.PEGASUS": a new comparator defined by pegasus. + // new table will use "comparator_type.PEGASUS", + // if no comparator set, use "comparator_type.DEFAULT" for compatible. + 15:optional comparator_type comparator = comparator_type.DEFAULT; } diff --git a/src/meta/server_state.cpp b/src/meta/server_state.cpp index 2bffc266b2..c58ba82dc1 100644 --- a/src/meta/server_state.cpp +++ b/src/meta/server_state.cpp @@ -1148,6 +1148,7 @@ void server_state::create_app(dsn::message_ex *msg) info.status = app_status::AS_CREATING; info.create_second = dsn_now_ms() / 1000; info.init_partition_count = request.options.partition_count; + info.comparator = dsn::comparator_type::PEGASUS; app = app_state::create(info); app->helpers->pending_response = msg; diff --git a/src/runtime/dsn.layer2_types.cpp b/src/runtime/dsn.layer2_types.cpp index 1940a0f544..6c487f642a 100644 --- a/src/runtime/dsn.layer2_types.cpp +++ b/src/runtime/dsn.layer2_types.cpp @@ -13,1088 +13,1102 @@ namespace dsn { -int _kapp_statusValues[] = {app_status::AS_INVALID, - app_status::AS_AVAILABLE, - app_status::AS_CREATING, - app_status::AS_CREATE_FAILED, - app_status::AS_DROPPING, - app_status::AS_DROP_FAILED, - app_status::AS_DROPPED, - app_status::AS_RECALLING}; -const char *_kapp_statusNames[] = {"AS_INVALID", - "AS_AVAILABLE", - "AS_CREATING", - "AS_CREATE_FAILED", - "AS_DROPPING", - "AS_DROP_FAILED", - "AS_DROPPED", - "AS_RECALLING"}; -const std::map _app_status_VALUES_TO_NAMES( - ::apache::thrift::TEnumIterator(8, _kapp_statusValues, _kapp_statusNames), - ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +int _kapp_statusValues[] = { + app_status::AS_INVALID, + app_status::AS_AVAILABLE, + app_status::AS_CREATING, + app_status::AS_CREATE_FAILED, + app_status::AS_DROPPING, + app_status::AS_DROP_FAILED, + app_status::AS_DROPPED, + app_status::AS_RECALLING +}; +const char* _kapp_statusNames[] = { + "AS_INVALID", + "AS_AVAILABLE", + "AS_CREATING", + "AS_CREATE_FAILED", + "AS_DROPPING", + "AS_DROP_FAILED", + "AS_DROPPED", + "AS_RECALLING" +}; +const std::map _app_status_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(8, _kapp_statusValues, _kapp_statusNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + +int _kcomparator_typeValues[] = { + comparator_type::DEFAULT, + comparator_type::PEGASUS +}; +const char* _kcomparator_typeNames[] = { + "DEFAULT", + "PEGASUS" +}; +const std::map _comparator_type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kcomparator_typeValues, _kcomparator_typeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); + + +partition_configuration::~partition_configuration() throw() { +} -partition_configuration::~partition_configuration() throw() {} -void partition_configuration::__set_pid(const ::dsn::gpid &val) { this->pid = val; } +void partition_configuration::__set_pid(const ::dsn::gpid& val) { + this->pid = val; +} -void partition_configuration::__set_ballot(const int64_t val) { this->ballot = val; } +void partition_configuration::__set_ballot(const int64_t val) { + this->ballot = val; +} -void partition_configuration::__set_max_replica_count(const int32_t val) -{ - this->max_replica_count = val; +void partition_configuration::__set_max_replica_count(const int32_t val) { + this->max_replica_count = val; } -void partition_configuration::__set_primary(const ::dsn::rpc_address &val) { this->primary = val; } +void partition_configuration::__set_primary(const ::dsn::rpc_address& val) { + this->primary = val; +} -void partition_configuration::__set_secondaries(const std::vector<::dsn::rpc_address> &val) -{ - this->secondaries = val; +void partition_configuration::__set_secondaries(const std::vector< ::dsn::rpc_address> & val) { + this->secondaries = val; } -void partition_configuration::__set_last_drops(const std::vector<::dsn::rpc_address> &val) -{ - this->last_drops = val; +void partition_configuration::__set_last_drops(const std::vector< ::dsn::rpc_address> & val) { + this->last_drops = val; } -void partition_configuration::__set_last_committed_decree(const int64_t val) -{ - this->last_committed_decree = val; +void partition_configuration::__set_last_committed_decree(const int64_t val) { + this->last_committed_decree = val; } -void partition_configuration::__set_partition_flags(const int32_t val) -{ - this->partition_flags = val; +void partition_configuration::__set_partition_flags(const int32_t val) { + this->partition_flags = val; } -uint32_t partition_configuration::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t partition_configuration::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructBegin(fname); - xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->pid.read(iprot); + this->__isset.pid = true; + } else { + xfer += iprot->skip(ftype); } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->pid.read(iprot); - this->__isset.pid = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->ballot); - this->__isset.ballot = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->max_replica_count); - this->__isset.max_replica_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->primary.read(iprot); - this->__isset.primary = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->secondaries.clear(); - uint32_t _size0; - ::apache::thrift::protocol::TType _etype3; - xfer += iprot->readListBegin(_etype3, _size0); - this->secondaries.resize(_size0); - uint32_t _i4; - for (_i4 = 0; _i4 < _size0; ++_i4) { - xfer += this->secondaries[_i4].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.secondaries = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->last_drops.clear(); - uint32_t _size5; - ::apache::thrift::protocol::TType _etype8; - xfer += iprot->readListBegin(_etype8, _size5); - this->last_drops.resize(_size5); - uint32_t _i9; - for (_i9 = 0; _i9 < _size5; ++_i9) { - xfer += this->last_drops[_i9].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.last_drops = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->last_committed_decree); - this->__isset.last_committed_decree = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ballot); + this->__isset.ballot = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max_replica_count); + this->__isset.max_replica_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->primary.read(iprot); + this->__isset.primary = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->secondaries.clear(); + uint32_t _size0; + ::apache::thrift::protocol::TType _etype3; + xfer += iprot->readListBegin(_etype3, _size0); + this->secondaries.resize(_size0); + uint32_t _i4; + for (_i4 = 0; _i4 < _size0; ++_i4) + { + xfer += this->secondaries[_i4].read(iprot); } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_flags); - this->__isset.partition_flags = true; - } else { - xfer += iprot->skip(ftype); + xfer += iprot->readListEnd(); + } + this->__isset.secondaries = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->last_drops.clear(); + uint32_t _size5; + ::apache::thrift::protocol::TType _etype8; + xfer += iprot->readListBegin(_etype8, _size5); + this->last_drops.resize(_size5); + uint32_t _i9; + for (_i9 = 0; _i9 < _size5; ++_i9) + { + xfer += this->last_drops[_i9].read(iprot); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.last_drops = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->last_committed_decree); + this->__isset.last_committed_decree = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_flags); + this->__isset.partition_flags = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t partition_configuration::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("partition_configuration"); +uint32_t partition_configuration::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("partition_configuration"); - xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->pid.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("pid", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->pid.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); - xfer += oprot->writeI64(this->ballot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ballot", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->ballot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->max_replica_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->max_replica_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("primary", ::apache::thrift::protocol::T_STRUCT, 4); - xfer += this->primary.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("primary", ::apache::thrift::protocol::T_STRUCT, 4); + xfer += this->primary.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("secondaries", ::apache::thrift::protocol::T_LIST, 5); + xfer += oprot->writeFieldBegin("secondaries", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->secondaries.size())); + std::vector< ::dsn::rpc_address> ::const_iterator _iter10; + for (_iter10 = this->secondaries.begin(); _iter10 != this->secondaries.end(); ++_iter10) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->secondaries.size())); - std::vector<::dsn::rpc_address>::const_iterator _iter10; - for (_iter10 = this->secondaries.begin(); _iter10 != this->secondaries.end(); ++_iter10) { - xfer += (*_iter10).write(oprot); - } - xfer += oprot->writeListEnd(); + xfer += (*_iter10).write(oprot); } - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("last_drops", ::apache::thrift::protocol::T_LIST, 6); + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("last_drops", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->last_drops.size())); + std::vector< ::dsn::rpc_address> ::const_iterator _iter11; + for (_iter11 = this->last_drops.begin(); _iter11 != this->last_drops.end(); ++_iter11) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->last_drops.size())); - std::vector<::dsn::rpc_address>::const_iterator _iter11; - for (_iter11 = this->last_drops.begin(); _iter11 != this->last_drops.end(); ++_iter11) { - xfer += (*_iter11).write(oprot); - } - xfer += oprot->writeListEnd(); + xfer += (*_iter11).write(oprot); } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 7); - xfer += oprot->writeI64(this->last_committed_decree); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("last_committed_decree", ::apache::thrift::protocol::T_I64, 7); + xfer += oprot->writeI64(this->last_committed_decree); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_flags", ::apache::thrift::protocol::T_I32, 8); - xfer += oprot->writeI32(this->partition_flags); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_flags", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32(this->partition_flags); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(partition_configuration &a, partition_configuration &b) { + using ::std::swap; + swap(a.pid, b.pid); + swap(a.ballot, b.ballot); + swap(a.max_replica_count, b.max_replica_count); + swap(a.primary, b.primary); + swap(a.secondaries, b.secondaries); + swap(a.last_drops, b.last_drops); + swap(a.last_committed_decree, b.last_committed_decree); + swap(a.partition_flags, b.partition_flags); + swap(a.__isset, b.__isset); +} + +partition_configuration::partition_configuration(const partition_configuration& other12) { + pid = other12.pid; + ballot = other12.ballot; + max_replica_count = other12.max_replica_count; + primary = other12.primary; + secondaries = other12.secondaries; + last_drops = other12.last_drops; + last_committed_decree = other12.last_committed_decree; + partition_flags = other12.partition_flags; + __isset = other12.__isset; +} +partition_configuration::partition_configuration( partition_configuration&& other13) { + pid = std::move(other13.pid); + ballot = std::move(other13.ballot); + max_replica_count = std::move(other13.max_replica_count); + primary = std::move(other13.primary); + secondaries = std::move(other13.secondaries); + last_drops = std::move(other13.last_drops); + last_committed_decree = std::move(other13.last_committed_decree); + partition_flags = std::move(other13.partition_flags); + __isset = std::move(other13.__isset); +} +partition_configuration& partition_configuration::operator=(const partition_configuration& other14) { + pid = other14.pid; + ballot = other14.ballot; + max_replica_count = other14.max_replica_count; + primary = other14.primary; + secondaries = other14.secondaries; + last_drops = other14.last_drops; + last_committed_decree = other14.last_committed_decree; + partition_flags = other14.partition_flags; + __isset = other14.__isset; + return *this; +} +partition_configuration& partition_configuration::operator=(partition_configuration&& other15) { + pid = std::move(other15.pid); + ballot = std::move(other15.ballot); + max_replica_count = std::move(other15.max_replica_count); + primary = std::move(other15.primary); + secondaries = std::move(other15.secondaries); + last_drops = std::move(other15.last_drops); + last_committed_decree = std::move(other15.last_committed_decree); + partition_flags = std::move(other15.partition_flags); + __isset = std::move(other15.__isset); + return *this; +} +void partition_configuration::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "partition_configuration("; + out << "pid=" << to_string(pid); + out << ", " << "ballot=" << to_string(ballot); + out << ", " << "max_replica_count=" << to_string(max_replica_count); + out << ", " << "primary=" << to_string(primary); + out << ", " << "secondaries=" << to_string(secondaries); + out << ", " << "last_drops=" << to_string(last_drops); + out << ", " << "last_committed_decree=" << to_string(last_committed_decree); + out << ", " << "partition_flags=" << to_string(partition_flags); + out << ")"; +} + + +configuration_query_by_index_request::~configuration_query_by_index_request() throw() { +} + + +void configuration_query_by_index_request::__set_app_name(const std::string& val) { + this->app_name = val; +} + +void configuration_query_by_index_request::__set_partition_indices(const std::vector & val) { + this->partition_indices = val; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(partition_configuration &a, partition_configuration &b) -{ - using ::std::swap; - swap(a.pid, b.pid); - swap(a.ballot, b.ballot); - swap(a.max_replica_count, b.max_replica_count); - swap(a.primary, b.primary); - swap(a.secondaries, b.secondaries); - swap(a.last_drops, b.last_drops); - swap(a.last_committed_decree, b.last_committed_decree); - swap(a.partition_flags, b.partition_flags); - swap(a.__isset, b.__isset); -} - -partition_configuration::partition_configuration(const partition_configuration &other12) -{ - pid = other12.pid; - ballot = other12.ballot; - max_replica_count = other12.max_replica_count; - primary = other12.primary; - secondaries = other12.secondaries; - last_drops = other12.last_drops; - last_committed_decree = other12.last_committed_decree; - partition_flags = other12.partition_flags; - __isset = other12.__isset; -} -partition_configuration::partition_configuration(partition_configuration &&other13) -{ - pid = std::move(other13.pid); - ballot = std::move(other13.ballot); - max_replica_count = std::move(other13.max_replica_count); - primary = std::move(other13.primary); - secondaries = std::move(other13.secondaries); - last_drops = std::move(other13.last_drops); - last_committed_decree = std::move(other13.last_committed_decree); - partition_flags = std::move(other13.partition_flags); - __isset = std::move(other13.__isset); -} -partition_configuration &partition_configuration::operator=(const partition_configuration &other14) -{ - pid = other14.pid; - ballot = other14.ballot; - max_replica_count = other14.max_replica_count; - primary = other14.primary; - secondaries = other14.secondaries; - last_drops = other14.last_drops; - last_committed_decree = other14.last_committed_decree; - partition_flags = other14.partition_flags; - __isset = other14.__isset; - return *this; -} -partition_configuration &partition_configuration::operator=(partition_configuration &&other15) -{ - pid = std::move(other15.pid); - ballot = std::move(other15.ballot); - max_replica_count = std::move(other15.max_replica_count); - primary = std::move(other15.primary); - secondaries = std::move(other15.secondaries); - last_drops = std::move(other15.last_drops); - last_committed_decree = std::move(other15.last_committed_decree); - partition_flags = std::move(other15.partition_flags); - __isset = std::move(other15.__isset); - return *this; -} -void partition_configuration::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "partition_configuration("; - out << "pid=" << to_string(pid); - out << ", " - << "ballot=" << to_string(ballot); - out << ", " - << "max_replica_count=" << to_string(max_replica_count); - out << ", " - << "primary=" << to_string(primary); - out << ", " - << "secondaries=" << to_string(secondaries); - out << ", " - << "last_drops=" << to_string(last_drops); - out << ", " - << "last_committed_decree=" << to_string(last_committed_decree); - out << ", " - << "partition_flags=" << to_string(partition_flags); - out << ")"; -} - -configuration_query_by_index_request::~configuration_query_by_index_request() throw() {} - -void configuration_query_by_index_request::__set_app_name(const std::string &val) -{ - this->app_name = val; -} - -void configuration_query_by_index_request::__set_partition_indices(const std::vector &val) -{ - this->partition_indices = val; -} - -uint32_t configuration_query_by_index_request::read(::apache::thrift::protocol::TProtocol *iprot) -{ - - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using ::apache::thrift::protocol::TProtocolException; - - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; +uint32_t configuration_query_by_index_request::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partition_indices.clear(); + uint32_t _size16; + ::apache::thrift::protocol::TType _etype19; + xfer += iprot->readListBegin(_etype19, _size16); + this->partition_indices.resize(_size16); + uint32_t _i20; + for (_i20 = 0; _i20 < _size16; ++_i20) + { + xfer += iprot->readI32(this->partition_indices[_i20]); } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partition_indices.clear(); - uint32_t _size16; - ::apache::thrift::protocol::TType _etype19; - xfer += iprot->readListBegin(_etype19, _size16); - this->partition_indices.resize(_size16); - uint32_t _i20; - for (_i20 = 0; _i20 < _size16; ++_i20) { - xfer += iprot->readI32(this->partition_indices[_i20]); - } - xfer += iprot->readListEnd(); - } - this->__isset.partition_indices = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.partition_indices = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_query_by_index_request::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_by_index_request"); +uint32_t configuration_query_by_index_request::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_by_index_request"); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_indices", ::apache::thrift::protocol::T_LIST, 2); + xfer += oprot->writeFieldBegin("partition_indices", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast(this->partition_indices.size())); + std::vector ::const_iterator _iter21; + for (_iter21 = this->partition_indices.begin(); _iter21 != this->partition_indices.end(); ++_iter21) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, - static_cast(this->partition_indices.size())); - std::vector::const_iterator _iter21; - for (_iter21 = this->partition_indices.begin(); _iter21 != this->partition_indices.end(); - ++_iter21) { - xfer += oprot->writeI32((*_iter21)); - } - xfer += oprot->writeListEnd(); + xfer += oprot->writeI32((*_iter21)); } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void swap(configuration_query_by_index_request &a, configuration_query_by_index_request &b) -{ - using ::std::swap; - swap(a.app_name, b.app_name); - swap(a.partition_indices, b.partition_indices); - swap(a.__isset, b.__isset); +void swap(configuration_query_by_index_request &a, configuration_query_by_index_request &b) { + using ::std::swap; + swap(a.app_name, b.app_name); + swap(a.partition_indices, b.partition_indices); + swap(a.__isset, b.__isset); } -configuration_query_by_index_request::configuration_query_by_index_request( - const configuration_query_by_index_request &other22) -{ - app_name = other22.app_name; - partition_indices = other22.partition_indices; - __isset = other22.__isset; +configuration_query_by_index_request::configuration_query_by_index_request(const configuration_query_by_index_request& other22) { + app_name = other22.app_name; + partition_indices = other22.partition_indices; + __isset = other22.__isset; +} +configuration_query_by_index_request::configuration_query_by_index_request( configuration_query_by_index_request&& other23) { + app_name = std::move(other23.app_name); + partition_indices = std::move(other23.partition_indices); + __isset = std::move(other23.__isset); } -configuration_query_by_index_request::configuration_query_by_index_request( - configuration_query_by_index_request &&other23) -{ - app_name = std::move(other23.app_name); - partition_indices = std::move(other23.partition_indices); - __isset = std::move(other23.__isset); +configuration_query_by_index_request& configuration_query_by_index_request::operator=(const configuration_query_by_index_request& other24) { + app_name = other24.app_name; + partition_indices = other24.partition_indices; + __isset = other24.__isset; + return *this; } -configuration_query_by_index_request &configuration_query_by_index_request:: -operator=(const configuration_query_by_index_request &other24) -{ - app_name = other24.app_name; - partition_indices = other24.partition_indices; - __isset = other24.__isset; - return *this; +configuration_query_by_index_request& configuration_query_by_index_request::operator=(configuration_query_by_index_request&& other25) { + app_name = std::move(other25.app_name); + partition_indices = std::move(other25.partition_indices); + __isset = std::move(other25.__isset); + return *this; } -configuration_query_by_index_request &configuration_query_by_index_request:: -operator=(configuration_query_by_index_request &&other25) -{ - app_name = std::move(other25.app_name); - partition_indices = std::move(other25.partition_indices); - __isset = std::move(other25.__isset); - return *this; +void configuration_query_by_index_request::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_query_by_index_request("; + out << "app_name=" << to_string(app_name); + out << ", " << "partition_indices=" << to_string(partition_indices); + out << ")"; } -void configuration_query_by_index_request::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_query_by_index_request("; - out << "app_name=" << to_string(app_name); - out << ", " - << "partition_indices=" << to_string(partition_indices); - out << ")"; + + +configuration_query_by_index_response::~configuration_query_by_index_response() throw() { } -configuration_query_by_index_response::~configuration_query_by_index_response() throw() {} -void configuration_query_by_index_response::__set_err(const ::dsn::error_code &val) -{ - this->err = val; +void configuration_query_by_index_response::__set_err(const ::dsn::error_code& val) { + this->err = val; } -void configuration_query_by_index_response::__set_app_id(const int32_t val) { this->app_id = val; } +void configuration_query_by_index_response::__set_app_id(const int32_t val) { + this->app_id = val; +} -void configuration_query_by_index_response::__set_partition_count(const int32_t val) -{ - this->partition_count = val; +void configuration_query_by_index_response::__set_partition_count(const int32_t val) { + this->partition_count = val; } -void configuration_query_by_index_response::__set_is_stateful(const bool val) -{ - this->is_stateful = val; +void configuration_query_by_index_response::__set_is_stateful(const bool val) { + this->is_stateful = val; } -void configuration_query_by_index_response::__set_partitions( - const std::vector &val) -{ - this->partitions = val; +void configuration_query_by_index_response::__set_partitions(const std::vector & val) { + this->partitions = val; } -uint32_t configuration_query_by_index_response::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t configuration_query_by_index_response::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructBegin(fname); - xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->err.read(iprot); + this->__isset.err = true; + } else { + xfer += iprot->skip(ftype); } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_STRUCT) { - xfer += this->err.read(iprot); - this->__isset.err = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_count); - this->__isset.partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_stateful); - this->__isset.is_stateful = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_LIST) { - { - this->partitions.clear(); - uint32_t _size26; - ::apache::thrift::protocol::TType _etype29; - xfer += iprot->readListBegin(_etype29, _size26); - this->partitions.resize(_size26); - uint32_t _i30; - for (_i30 = 0; _i30 < _size26; ++_i30) { - xfer += this->partitions[_i30].read(iprot); - } - xfer += iprot->readListEnd(); - } - this->__isset.partitions = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_count); + this->__isset.partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_stateful); + this->__isset.is_stateful = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->partitions.clear(); + uint32_t _size26; + ::apache::thrift::protocol::TType _etype29; + xfer += iprot->readListBegin(_etype29, _size26); + this->partitions.resize(_size26); + uint32_t _i30; + for (_i30 = 0; _i30 < _size26; ++_i30) + { + xfer += this->partitions[_i30].read(iprot); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readListEnd(); + } + this->__isset.partitions = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t -configuration_query_by_index_response::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("configuration_query_by_index_response"); +uint32_t configuration_query_by_index_response::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("configuration_query_by_index_response"); - xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); - xfer += this->err.write(oprot); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("err", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->err.write(oprot); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 3); - xfer += oprot->writeI32(this->partition_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->partition_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->is_stateful); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->is_stateful); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 5); + xfer += oprot->writeFieldBegin("partitions", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->partitions.size())); + std::vector ::const_iterator _iter31; + for (_iter31 = this->partitions.begin(); _iter31 != this->partitions.end(); ++_iter31) { - xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, - static_cast(this->partitions.size())); - std::vector::const_iterator _iter31; - for (_iter31 = this->partitions.begin(); _iter31 != this->partitions.end(); ++_iter31) { - xfer += (*_iter31).write(oprot); - } - xfer += oprot->writeListEnd(); + xfer += (*_iter31).write(oprot); } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(configuration_query_by_index_response &a, configuration_query_by_index_response &b) -{ - using ::std::swap; - swap(a.err, b.err); - swap(a.app_id, b.app_id); - swap(a.partition_count, b.partition_count); - swap(a.is_stateful, b.is_stateful); - swap(a.partitions, b.partitions); - swap(a.__isset, b.__isset); +void swap(configuration_query_by_index_response &a, configuration_query_by_index_response &b) { + using ::std::swap; + swap(a.err, b.err); + swap(a.app_id, b.app_id); + swap(a.partition_count, b.partition_count); + swap(a.is_stateful, b.is_stateful); + swap(a.partitions, b.partitions); + swap(a.__isset, b.__isset); } -configuration_query_by_index_response::configuration_query_by_index_response( - const configuration_query_by_index_response &other32) -{ - err = other32.err; - app_id = other32.app_id; - partition_count = other32.partition_count; - is_stateful = other32.is_stateful; - partitions = other32.partitions; - __isset = other32.__isset; +configuration_query_by_index_response::configuration_query_by_index_response(const configuration_query_by_index_response& other32) { + err = other32.err; + app_id = other32.app_id; + partition_count = other32.partition_count; + is_stateful = other32.is_stateful; + partitions = other32.partitions; + __isset = other32.__isset; } -configuration_query_by_index_response::configuration_query_by_index_response( - configuration_query_by_index_response &&other33) -{ - err = std::move(other33.err); - app_id = std::move(other33.app_id); - partition_count = std::move(other33.partition_count); - is_stateful = std::move(other33.is_stateful); - partitions = std::move(other33.partitions); - __isset = std::move(other33.__isset); +configuration_query_by_index_response::configuration_query_by_index_response( configuration_query_by_index_response&& other33) { + err = std::move(other33.err); + app_id = std::move(other33.app_id); + partition_count = std::move(other33.partition_count); + is_stateful = std::move(other33.is_stateful); + partitions = std::move(other33.partitions); + __isset = std::move(other33.__isset); } -configuration_query_by_index_response &configuration_query_by_index_response:: -operator=(const configuration_query_by_index_response &other34) -{ - err = other34.err; - app_id = other34.app_id; - partition_count = other34.partition_count; - is_stateful = other34.is_stateful; - partitions = other34.partitions; - __isset = other34.__isset; - return *this; +configuration_query_by_index_response& configuration_query_by_index_response::operator=(const configuration_query_by_index_response& other34) { + err = other34.err; + app_id = other34.app_id; + partition_count = other34.partition_count; + is_stateful = other34.is_stateful; + partitions = other34.partitions; + __isset = other34.__isset; + return *this; } -configuration_query_by_index_response &configuration_query_by_index_response:: -operator=(configuration_query_by_index_response &&other35) -{ - err = std::move(other35.err); - app_id = std::move(other35.app_id); - partition_count = std::move(other35.partition_count); - is_stateful = std::move(other35.is_stateful); - partitions = std::move(other35.partitions); - __isset = std::move(other35.__isset); - return *this; +configuration_query_by_index_response& configuration_query_by_index_response::operator=(configuration_query_by_index_response&& other35) { + err = std::move(other35.err); + app_id = std::move(other35.app_id); + partition_count = std::move(other35.partition_count); + is_stateful = std::move(other35.is_stateful); + partitions = std::move(other35.partitions); + __isset = std::move(other35.__isset); + return *this; } -void configuration_query_by_index_response::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "configuration_query_by_index_response("; - out << "err=" << to_string(err); - out << ", " - << "app_id=" << to_string(app_id); - out << ", " - << "partition_count=" << to_string(partition_count); - out << ", " - << "is_stateful=" << to_string(is_stateful); - out << ", " - << "partitions=" << to_string(partitions); - out << ")"; +void configuration_query_by_index_response::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "configuration_query_by_index_response("; + out << "err=" << to_string(err); + out << ", " << "app_id=" << to_string(app_id); + out << ", " << "partition_count=" << to_string(partition_count); + out << ", " << "is_stateful=" << to_string(is_stateful); + out << ", " << "partitions=" << to_string(partitions); + out << ")"; } -app_info::~app_info() throw() {} -void app_info::__set_status(const app_status::type val) { this->status = val; } +app_info::~app_info() throw() { +} -void app_info::__set_app_type(const std::string &val) { this->app_type = val; } -void app_info::__set_app_name(const std::string &val) { this->app_name = val; } +void app_info::__set_status(const app_status::type val) { + this->status = val; +} -void app_info::__set_app_id(const int32_t val) { this->app_id = val; } +void app_info::__set_app_type(const std::string& val) { + this->app_type = val; +} -void app_info::__set_partition_count(const int32_t val) { this->partition_count = val; } +void app_info::__set_app_name(const std::string& val) { + this->app_name = val; +} -void app_info::__set_envs(const std::map &val) { this->envs = val; } +void app_info::__set_app_id(const int32_t val) { + this->app_id = val; +} -void app_info::__set_is_stateful(const bool val) { this->is_stateful = val; } +void app_info::__set_partition_count(const int32_t val) { + this->partition_count = val; +} + +void app_info::__set_envs(const std::map & val) { + this->envs = val; +} + +void app_info::__set_is_stateful(const bool val) { + this->is_stateful = val; +} + +void app_info::__set_max_replica_count(const int32_t val) { + this->max_replica_count = val; +} + +void app_info::__set_expire_second(const int64_t val) { + this->expire_second = val; +} -void app_info::__set_max_replica_count(const int32_t val) { this->max_replica_count = val; } +void app_info::__set_create_second(const int64_t val) { + this->create_second = val; +} -void app_info::__set_expire_second(const int64_t val) { this->expire_second = val; } +void app_info::__set_drop_second(const int64_t val) { + this->drop_second = val; +} -void app_info::__set_create_second(const int64_t val) { this->create_second = val; } +void app_info::__set_duplicating(const bool val) { + this->duplicating = val; +__isset.duplicating = true; +} -void app_info::__set_drop_second(const int64_t val) { this->drop_second = val; } +void app_info::__set_init_partition_count(const int32_t val) { + this->init_partition_count = val; +} -void app_info::__set_duplicating(const bool val) -{ - this->duplicating = val; - __isset.duplicating = true; +void app_info::__set_is_bulk_loading(const bool val) { + this->is_bulk_loading = val; +__isset.is_bulk_loading = true; } -void app_info::__set_init_partition_count(const int32_t val) { this->init_partition_count = val; } - -void app_info::__set_is_bulk_loading(const bool val) -{ - this->is_bulk_loading = val; - __isset.is_bulk_loading = true; +void app_info::__set_comparator(const comparator_type::type val) { + this->comparator = val; +__isset.comparator = true; } -uint32_t app_info::read(::apache::thrift::protocol::TProtocol *iprot) -{ +uint32_t app_info::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); - uint32_t xfer = 0; - std::string fname; - ::apache::thrift::protocol::TType ftype; - int16_t fid; + xfer += iprot->readStructBegin(fname); - xfer += iprot->readStructBegin(fname); + using ::apache::thrift::protocol::TProtocolException; - using ::apache::thrift::protocol::TProtocolException; - while (true) { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == ::apache::thrift::protocol::T_STOP) { - break; + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast36; + xfer += iprot->readI32(ecast36); + this->status = (app_status::type)ecast36; + this->__isset.status = true; + } else { + xfer += iprot->skip(ftype); } - switch (fid) { - case 1: - if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast36; - xfer += iprot->readI32(ecast36); - this->status = (app_status::type)ecast36; - this->__isset.status = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_type); - this->__isset.app_type = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->app_name); - this->__isset.app_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->app_id); - this->__isset.app_id = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->partition_count); - this->__isset.partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == ::apache::thrift::protocol::T_MAP) { - { - this->envs.clear(); - uint32_t _size37; - ::apache::thrift::protocol::TType _ktype38; - ::apache::thrift::protocol::TType _vtype39; - xfer += iprot->readMapBegin(_ktype38, _vtype39, _size37); - uint32_t _i41; - for (_i41 = 0; _i41 < _size37; ++_i41) { - std::string _key42; - xfer += iprot->readString(_key42); - std::string &_val43 = this->envs[_key42]; - xfer += iprot->readString(_val43); - } - xfer += iprot->readMapEnd(); - } - this->__isset.envs = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 7: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_stateful); - this->__isset.is_stateful = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 8: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->max_replica_count); - this->__isset.max_replica_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 9: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->expire_second); - this->__isset.expire_second = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 10: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->create_second); - this->__isset.create_second = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 11: - if (ftype == ::apache::thrift::protocol::T_I64) { - xfer += iprot->readI64(this->drop_second); - this->__isset.drop_second = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 12: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->duplicating); - this->__isset.duplicating = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 13: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->init_partition_count); - this->__isset.init_partition_count = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 14: - if (ftype == ::apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->is_bulk_loading); - this->__isset.is_bulk_loading = true; - } else { - xfer += iprot->skip(ftype); + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_type); + this->__isset.app_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->app_name); + this->__isset.app_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->app_id); + this->__isset.app_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->partition_count); + this->__isset.partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->envs.clear(); + uint32_t _size37; + ::apache::thrift::protocol::TType _ktype38; + ::apache::thrift::protocol::TType _vtype39; + xfer += iprot->readMapBegin(_ktype38, _vtype39, _size37); + uint32_t _i41; + for (_i41 = 0; _i41 < _size37; ++_i41) + { + std::string _key42; + xfer += iprot->readString(_key42); + std::string& _val43 = this->envs[_key42]; + xfer += iprot->readString(_val43); } - break; - default: - xfer += iprot->skip(ftype); - break; + xfer += iprot->readMapEnd(); + } + this->__isset.envs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_stateful); + this->__isset.is_stateful = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->max_replica_count); + this->__isset.max_replica_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->expire_second); + this->__isset.expire_second = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 10: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->create_second); + this->__isset.create_second = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 11: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->drop_second); + this->__isset.drop_second = true; + } else { + xfer += iprot->skip(ftype); } - xfer += iprot->readFieldEnd(); + break; + case 12: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->duplicating); + this->__isset.duplicating = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 13: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->init_partition_count); + this->__isset.init_partition_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 14: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_bulk_loading); + this->__isset.is_bulk_loading = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 15: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast44; + xfer += iprot->readI32(ecast44); + this->comparator = (comparator_type::type)ecast44; + this->__isset.comparator = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; } + xfer += iprot->readFieldEnd(); + } - xfer += iprot->readStructEnd(); + xfer += iprot->readStructEnd(); - return xfer; + return xfer; } -uint32_t app_info::write(::apache::thrift::protocol::TProtocol *oprot) const -{ - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("app_info"); +uint32_t app_info::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("app_info"); - xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((int32_t)this->status); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("status", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->status); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->app_type); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_type", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->app_type); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->app_name); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_name", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->app_name); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 4); - xfer += oprot->writeI32(this->app_id); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("app_id", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->app_id); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 5); - xfer += oprot->writeI32(this->partition_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition_count", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->partition_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("envs", ::apache::thrift::protocol::T_MAP, 6); + xfer += oprot->writeFieldBegin("envs", ::apache::thrift::protocol::T_MAP, 6); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->envs.size())); + std::map ::const_iterator _iter45; + for (_iter45 = this->envs.begin(); _iter45 != this->envs.end(); ++_iter45) { - xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, - ::apache::thrift::protocol::T_STRING, - static_cast(this->envs.size())); - std::map::const_iterator _iter44; - for (_iter44 = this->envs.begin(); _iter44 != this->envs.end(); ++_iter44) { - xfer += oprot->writeString(_iter44->first); - xfer += oprot->writeString(_iter44->second); - } - xfer += oprot->writeMapEnd(); + xfer += oprot->writeString(_iter45->first); + xfer += oprot->writeString(_iter45->second); } - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 7); - xfer += oprot->writeBool(this->is_stateful); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_stateful", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->is_stateful); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 8); - xfer += oprot->writeI32(this->max_replica_count); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_replica_count", ::apache::thrift::protocol::T_I32, 8); + xfer += oprot->writeI32(this->max_replica_count); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("expire_second", ::apache::thrift::protocol::T_I64, 9); - xfer += oprot->writeI64(this->expire_second); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("expire_second", ::apache::thrift::protocol::T_I64, 9); + xfer += oprot->writeI64(this->expire_second); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("create_second", ::apache::thrift::protocol::T_I64, 10); - xfer += oprot->writeI64(this->create_second); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("create_second", ::apache::thrift::protocol::T_I64, 10); + xfer += oprot->writeI64(this->create_second); + xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("drop_second", ::apache::thrift::protocol::T_I64, 11); - xfer += oprot->writeI64(this->drop_second); - xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("drop_second", ::apache::thrift::protocol::T_I64, 11); + xfer += oprot->writeI64(this->drop_second); + xfer += oprot->writeFieldEnd(); - if (this->__isset.duplicating) { - xfer += oprot->writeFieldBegin("duplicating", ::apache::thrift::protocol::T_BOOL, 12); - xfer += oprot->writeBool(this->duplicating); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("init_partition_count", ::apache::thrift::protocol::T_I32, 13); - xfer += oprot->writeI32(this->init_partition_count); + if (this->__isset.duplicating) { + xfer += oprot->writeFieldBegin("duplicating", ::apache::thrift::protocol::T_BOOL, 12); + xfer += oprot->writeBool(this->duplicating); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("init_partition_count", ::apache::thrift::protocol::T_I32, 13); + xfer += oprot->writeI32(this->init_partition_count); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.is_bulk_loading) { + xfer += oprot->writeFieldBegin("is_bulk_loading", ::apache::thrift::protocol::T_BOOL, 14); + xfer += oprot->writeBool(this->is_bulk_loading); xfer += oprot->writeFieldEnd(); + } + if (this->__isset.comparator) { + xfer += oprot->writeFieldBegin("comparator", ::apache::thrift::protocol::T_I32, 15); + xfer += oprot->writeI32((int32_t)this->comparator); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} - if (this->__isset.is_bulk_loading) { - xfer += oprot->writeFieldBegin("is_bulk_loading", ::apache::thrift::protocol::T_BOOL, 14); - xfer += oprot->writeBool(this->is_bulk_loading); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(app_info &a, app_info &b) -{ - using ::std::swap; - swap(a.status, b.status); - swap(a.app_type, b.app_type); - swap(a.app_name, b.app_name); - swap(a.app_id, b.app_id); - swap(a.partition_count, b.partition_count); - swap(a.envs, b.envs); - swap(a.is_stateful, b.is_stateful); - swap(a.max_replica_count, b.max_replica_count); - swap(a.expire_second, b.expire_second); - swap(a.create_second, b.create_second); - swap(a.drop_second, b.drop_second); - swap(a.duplicating, b.duplicating); - swap(a.init_partition_count, b.init_partition_count); - swap(a.is_bulk_loading, b.is_bulk_loading); - swap(a.__isset, b.__isset); -} - -app_info::app_info(const app_info &other45) -{ - status = other45.status; - app_type = other45.app_type; - app_name = other45.app_name; - app_id = other45.app_id; - partition_count = other45.partition_count; - envs = other45.envs; - is_stateful = other45.is_stateful; - max_replica_count = other45.max_replica_count; - expire_second = other45.expire_second; - create_second = other45.create_second; - drop_second = other45.drop_second; - duplicating = other45.duplicating; - init_partition_count = other45.init_partition_count; - is_bulk_loading = other45.is_bulk_loading; - __isset = other45.__isset; -} -app_info::app_info(app_info &&other46) -{ - status = std::move(other46.status); - app_type = std::move(other46.app_type); - app_name = std::move(other46.app_name); - app_id = std::move(other46.app_id); - partition_count = std::move(other46.partition_count); - envs = std::move(other46.envs); - is_stateful = std::move(other46.is_stateful); - max_replica_count = std::move(other46.max_replica_count); - expire_second = std::move(other46.expire_second); - create_second = std::move(other46.create_second); - drop_second = std::move(other46.drop_second); - duplicating = std::move(other46.duplicating); - init_partition_count = std::move(other46.init_partition_count); - is_bulk_loading = std::move(other46.is_bulk_loading); - __isset = std::move(other46.__isset); -} -app_info &app_info::operator=(const app_info &other47) -{ - status = other47.status; - app_type = other47.app_type; - app_name = other47.app_name; - app_id = other47.app_id; - partition_count = other47.partition_count; - envs = other47.envs; - is_stateful = other47.is_stateful; - max_replica_count = other47.max_replica_count; - expire_second = other47.expire_second; - create_second = other47.create_second; - drop_second = other47.drop_second; - duplicating = other47.duplicating; - init_partition_count = other47.init_partition_count; - is_bulk_loading = other47.is_bulk_loading; - __isset = other47.__isset; - return *this; -} -app_info &app_info::operator=(app_info &&other48) -{ - status = std::move(other48.status); - app_type = std::move(other48.app_type); - app_name = std::move(other48.app_name); - app_id = std::move(other48.app_id); - partition_count = std::move(other48.partition_count); - envs = std::move(other48.envs); - is_stateful = std::move(other48.is_stateful); - max_replica_count = std::move(other48.max_replica_count); - expire_second = std::move(other48.expire_second); - create_second = std::move(other48.create_second); - drop_second = std::move(other48.drop_second); - duplicating = std::move(other48.duplicating); - init_partition_count = std::move(other48.init_partition_count); - is_bulk_loading = std::move(other48.is_bulk_loading); - __isset = std::move(other48.__isset); - return *this; -} -void app_info::printTo(std::ostream &out) const -{ - using ::apache::thrift::to_string; - out << "app_info("; - out << "status=" << to_string(status); - out << ", " - << "app_type=" << to_string(app_type); - out << ", " - << "app_name=" << to_string(app_name); - out << ", " - << "app_id=" << to_string(app_id); - out << ", " - << "partition_count=" << to_string(partition_count); - out << ", " - << "envs=" << to_string(envs); - out << ", " - << "is_stateful=" << to_string(is_stateful); - out << ", " - << "max_replica_count=" << to_string(max_replica_count); - out << ", " - << "expire_second=" << to_string(expire_second); - out << ", " - << "create_second=" << to_string(create_second); - out << ", " - << "drop_second=" << to_string(drop_second); - out << ", " - << "duplicating="; - (__isset.duplicating ? (out << to_string(duplicating)) : (out << "")); - out << ", " - << "init_partition_count=" << to_string(init_partition_count); - out << ", " - << "is_bulk_loading="; - (__isset.is_bulk_loading ? (out << to_string(is_bulk_loading)) : (out << "")); - out << ")"; +void swap(app_info &a, app_info &b) { + using ::std::swap; + swap(a.status, b.status); + swap(a.app_type, b.app_type); + swap(a.app_name, b.app_name); + swap(a.app_id, b.app_id); + swap(a.partition_count, b.partition_count); + swap(a.envs, b.envs); + swap(a.is_stateful, b.is_stateful); + swap(a.max_replica_count, b.max_replica_count); + swap(a.expire_second, b.expire_second); + swap(a.create_second, b.create_second); + swap(a.drop_second, b.drop_second); + swap(a.duplicating, b.duplicating); + swap(a.init_partition_count, b.init_partition_count); + swap(a.is_bulk_loading, b.is_bulk_loading); + swap(a.comparator, b.comparator); + swap(a.__isset, b.__isset); +} + +app_info::app_info(const app_info& other46) { + status = other46.status; + app_type = other46.app_type; + app_name = other46.app_name; + app_id = other46.app_id; + partition_count = other46.partition_count; + envs = other46.envs; + is_stateful = other46.is_stateful; + max_replica_count = other46.max_replica_count; + expire_second = other46.expire_second; + create_second = other46.create_second; + drop_second = other46.drop_second; + duplicating = other46.duplicating; + init_partition_count = other46.init_partition_count; + is_bulk_loading = other46.is_bulk_loading; + comparator = other46.comparator; + __isset = other46.__isset; +} +app_info::app_info( app_info&& other47) { + status = std::move(other47.status); + app_type = std::move(other47.app_type); + app_name = std::move(other47.app_name); + app_id = std::move(other47.app_id); + partition_count = std::move(other47.partition_count); + envs = std::move(other47.envs); + is_stateful = std::move(other47.is_stateful); + max_replica_count = std::move(other47.max_replica_count); + expire_second = std::move(other47.expire_second); + create_second = std::move(other47.create_second); + drop_second = std::move(other47.drop_second); + duplicating = std::move(other47.duplicating); + init_partition_count = std::move(other47.init_partition_count); + is_bulk_loading = std::move(other47.is_bulk_loading); + comparator = std::move(other47.comparator); + __isset = std::move(other47.__isset); +} +app_info& app_info::operator=(const app_info& other48) { + status = other48.status; + app_type = other48.app_type; + app_name = other48.app_name; + app_id = other48.app_id; + partition_count = other48.partition_count; + envs = other48.envs; + is_stateful = other48.is_stateful; + max_replica_count = other48.max_replica_count; + expire_second = other48.expire_second; + create_second = other48.create_second; + drop_second = other48.drop_second; + duplicating = other48.duplicating; + init_partition_count = other48.init_partition_count; + is_bulk_loading = other48.is_bulk_loading; + comparator = other48.comparator; + __isset = other48.__isset; + return *this; +} +app_info& app_info::operator=(app_info&& other49) { + status = std::move(other49.status); + app_type = std::move(other49.app_type); + app_name = std::move(other49.app_name); + app_id = std::move(other49.app_id); + partition_count = std::move(other49.partition_count); + envs = std::move(other49.envs); + is_stateful = std::move(other49.is_stateful); + max_replica_count = std::move(other49.max_replica_count); + expire_second = std::move(other49.expire_second); + create_second = std::move(other49.create_second); + drop_second = std::move(other49.drop_second); + duplicating = std::move(other49.duplicating); + init_partition_count = std::move(other49.init_partition_count); + is_bulk_loading = std::move(other49.is_bulk_loading); + comparator = std::move(other49.comparator); + __isset = std::move(other49.__isset); + return *this; +} +void app_info::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "app_info("; + out << "status=" << to_string(status); + out << ", " << "app_type=" << to_string(app_type); + out << ", " << "app_name=" << to_string(app_name); + out << ", " << "app_id=" << to_string(app_id); + out << ", " << "partition_count=" << to_string(partition_count); + out << ", " << "envs=" << to_string(envs); + out << ", " << "is_stateful=" << to_string(is_stateful); + out << ", " << "max_replica_count=" << to_string(max_replica_count); + out << ", " << "expire_second=" << to_string(expire_second); + out << ", " << "create_second=" << to_string(create_second); + out << ", " << "drop_second=" << to_string(drop_second); + out << ", " << "duplicating="; (__isset.duplicating ? (out << to_string(duplicating)) : (out << "")); + out << ", " << "init_partition_count=" << to_string(init_partition_count); + out << ", " << "is_bulk_loading="; (__isset.is_bulk_loading ? (out << to_string(is_bulk_loading)) : (out << "")); + out << ", " << "comparator="; (__isset.comparator ? (out << to_string(comparator)) : (out << "")); + out << ")"; } } // namespace