http://git-wip-us.apache.org/repos/asf/hive/blob/f0199500/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h b/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h index da66951..802d8e3 100644 --- a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h +++ b/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h @@ -224,8 +224,6 @@ class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookService virtual void get_serde(SerDeInfo& _return, const GetSerdeRequest& rqst) = 0; virtual void get_lock_materialization_rebuild(LockResponse& _return, const std::string& dbName, const std::string& tableName, const int64_t txnId) = 0; virtual bool heartbeat_lock_materialization_rebuild(const std::string& dbName, const std::string& tableName, const int64_t txnId) = 0; - virtual void add_runtime_stats(const RuntimeStat& stat) = 0; - virtual void get_runtime_stats(std::vector<RuntimeStat> & _return, const GetRuntimeStatsRequest& rqst) = 0; }; class ThriftHiveMetastoreIfFactory : virtual public ::facebook::fb303::FacebookServiceIfFactory { @@ -889,12 +887,6 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p bool _return = false; return _return; } - void add_runtime_stats(const RuntimeStat& /* stat */) { - return; - } - void get_runtime_stats(std::vector<RuntimeStat> & /* _return */, const GetRuntimeStatsRequest& /* rqst */) { - return; - } }; typedef struct _ThriftHiveMetastore_getMetaConf_args__isset { @@ -25652,222 +25644,6 @@ class ThriftHiveMetastore_heartbeat_lock_materialization_rebuild_presult { }; -typedef struct _ThriftHiveMetastore_add_runtime_stats_args__isset { - _ThriftHiveMetastore_add_runtime_stats_args__isset() : stat(false) {} - bool stat :1; -} _ThriftHiveMetastore_add_runtime_stats_args__isset; - -class ThriftHiveMetastore_add_runtime_stats_args { - public: - - ThriftHiveMetastore_add_runtime_stats_args(const ThriftHiveMetastore_add_runtime_stats_args&); - ThriftHiveMetastore_add_runtime_stats_args& operator=(const ThriftHiveMetastore_add_runtime_stats_args&); - ThriftHiveMetastore_add_runtime_stats_args() { - } - - virtual ~ThriftHiveMetastore_add_runtime_stats_args() throw(); - RuntimeStat stat; - - _ThriftHiveMetastore_add_runtime_stats_args__isset __isset; - - void __set_stat(const RuntimeStat& val); - - bool operator == (const ThriftHiveMetastore_add_runtime_stats_args & rhs) const - { - if (!(stat == rhs.stat)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_runtime_stats_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_runtime_stats_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_add_runtime_stats_pargs { - public: - - - virtual ~ThriftHiveMetastore_add_runtime_stats_pargs() throw(); - const RuntimeStat* stat; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_runtime_stats_result__isset { - _ThriftHiveMetastore_add_runtime_stats_result__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_add_runtime_stats_result__isset; - -class ThriftHiveMetastore_add_runtime_stats_result { - public: - - ThriftHiveMetastore_add_runtime_stats_result(const ThriftHiveMetastore_add_runtime_stats_result&); - ThriftHiveMetastore_add_runtime_stats_result& operator=(const ThriftHiveMetastore_add_runtime_stats_result&); - ThriftHiveMetastore_add_runtime_stats_result() { - } - - virtual ~ThriftHiveMetastore_add_runtime_stats_result() throw(); - MetaException o1; - - _ThriftHiveMetastore_add_runtime_stats_result__isset __isset; - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_add_runtime_stats_result & rhs) const - { - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_add_runtime_stats_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_add_runtime_stats_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_add_runtime_stats_presult__isset { - _ThriftHiveMetastore_add_runtime_stats_presult__isset() : o1(false) {} - bool o1 :1; -} _ThriftHiveMetastore_add_runtime_stats_presult__isset; - -class ThriftHiveMetastore_add_runtime_stats_presult { - public: - - - virtual ~ThriftHiveMetastore_add_runtime_stats_presult() throw(); - MetaException o1; - - _ThriftHiveMetastore_add_runtime_stats_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - -typedef struct _ThriftHiveMetastore_get_runtime_stats_args__isset { - _ThriftHiveMetastore_get_runtime_stats_args__isset() : rqst(false) {} - bool rqst :1; -} _ThriftHiveMetastore_get_runtime_stats_args__isset; - -class ThriftHiveMetastore_get_runtime_stats_args { - public: - - ThriftHiveMetastore_get_runtime_stats_args(const ThriftHiveMetastore_get_runtime_stats_args&); - ThriftHiveMetastore_get_runtime_stats_args& operator=(const ThriftHiveMetastore_get_runtime_stats_args&); - ThriftHiveMetastore_get_runtime_stats_args() { - } - - virtual ~ThriftHiveMetastore_get_runtime_stats_args() throw(); - GetRuntimeStatsRequest rqst; - - _ThriftHiveMetastore_get_runtime_stats_args__isset __isset; - - void __set_rqst(const GetRuntimeStatsRequest& val); - - bool operator == (const ThriftHiveMetastore_get_runtime_stats_args & rhs) const - { - if (!(rqst == rhs.rqst)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_runtime_stats_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_runtime_stats_args & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - - -class ThriftHiveMetastore_get_runtime_stats_pargs { - public: - - - virtual ~ThriftHiveMetastore_get_runtime_stats_pargs() throw(); - const GetRuntimeStatsRequest* rqst; - - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_runtime_stats_result__isset { - _ThriftHiveMetastore_get_runtime_stats_result__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_runtime_stats_result__isset; - -class ThriftHiveMetastore_get_runtime_stats_result { - public: - - ThriftHiveMetastore_get_runtime_stats_result(const ThriftHiveMetastore_get_runtime_stats_result&); - ThriftHiveMetastore_get_runtime_stats_result& operator=(const ThriftHiveMetastore_get_runtime_stats_result&); - ThriftHiveMetastore_get_runtime_stats_result() { - } - - virtual ~ThriftHiveMetastore_get_runtime_stats_result() throw(); - std::vector<RuntimeStat> success; - MetaException o1; - - _ThriftHiveMetastore_get_runtime_stats_result__isset __isset; - - void __set_success(const std::vector<RuntimeStat> & val); - - void __set_o1(const MetaException& val); - - bool operator == (const ThriftHiveMetastore_get_runtime_stats_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(o1 == rhs.o1)) - return false; - return true; - } - bool operator != (const ThriftHiveMetastore_get_runtime_stats_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHiveMetastore_get_runtime_stats_result & ) const; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; - -}; - -typedef struct _ThriftHiveMetastore_get_runtime_stats_presult__isset { - _ThriftHiveMetastore_get_runtime_stats_presult__isset() : success(false), o1(false) {} - bool success :1; - bool o1 :1; -} _ThriftHiveMetastore_get_runtime_stats_presult__isset; - -class ThriftHiveMetastore_get_runtime_stats_presult { - public: - - - virtual ~ThriftHiveMetastore_get_runtime_stats_presult() throw(); - std::vector<RuntimeStat> * success; - MetaException o1; - - _ThriftHiveMetastore_get_runtime_stats_presult__isset __isset; - - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - -}; - class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public ::facebook::fb303::FacebookServiceClient { public: ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : @@ -26485,12 +26261,6 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public bool heartbeat_lock_materialization_rebuild(const std::string& dbName, const std::string& tableName, const int64_t txnId); void send_heartbeat_lock_materialization_rebuild(const std::string& dbName, const std::string& tableName, const int64_t txnId); bool recv_heartbeat_lock_materialization_rebuild(); - void add_runtime_stats(const RuntimeStat& stat); - void send_add_runtime_stats(const RuntimeStat& stat); - void recv_add_runtime_stats(); - void get_runtime_stats(std::vector<RuntimeStat> & _return, const GetRuntimeStatsRequest& rqst); - void send_get_runtime_stats(const GetRuntimeStatsRequest& rqst); - void recv_get_runtime_stats(std::vector<RuntimeStat> & _return); }; class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceProcessor { @@ -26703,8 +26473,6 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP void process_get_serde(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_get_lock_materialization_rebuild(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_heartbeat_lock_materialization_rebuild(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_add_runtime_stats(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); - void process_get_runtime_stats(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); public: ThriftHiveMetastoreProcessor(boost::shared_ptr<ThriftHiveMetastoreIf> iface) : ::facebook::fb303::FacebookServiceProcessor(iface), @@ -26911,8 +26679,6 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP processMap_["get_serde"] = &ThriftHiveMetastoreProcessor::process_get_serde; processMap_["get_lock_materialization_rebuild"] = &ThriftHiveMetastoreProcessor::process_get_lock_materialization_rebuild; processMap_["heartbeat_lock_materialization_rebuild"] = &ThriftHiveMetastoreProcessor::process_heartbeat_lock_materialization_rebuild; - processMap_["add_runtime_stats"] = &ThriftHiveMetastoreProcessor::process_add_runtime_stats; - processMap_["get_runtime_stats"] = &ThriftHiveMetastoreProcessor::process_get_runtime_stats; } virtual ~ThriftHiveMetastoreProcessor() {} @@ -28888,25 +28654,6 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi return ifaces_[i]->heartbeat_lock_materialization_rebuild(dbName, tableName, txnId); } - void add_runtime_stats(const RuntimeStat& stat) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->add_runtime_stats(stat); - } - ifaces_[i]->add_runtime_stats(stat); - } - - void get_runtime_stats(std::vector<RuntimeStat> & _return, const GetRuntimeStatsRequest& rqst) { - size_t sz = ifaces_.size(); - size_t i = 0; - for (; i < (sz - 1); ++i) { - ifaces_[i]->get_runtime_stats(_return, rqst); - } - ifaces_[i]->get_runtime_stats(_return, rqst); - return; - } - }; // The 'concurrent' client is a thread safe client that correctly handles @@ -29529,12 +29276,6 @@ class ThriftHiveMetastoreConcurrentClient : virtual public ThriftHiveMetastoreIf bool heartbeat_lock_materialization_rebuild(const std::string& dbName, const std::string& tableName, const int64_t txnId); int32_t send_heartbeat_lock_materialization_rebuild(const std::string& dbName, const std::string& tableName, const int64_t txnId); bool recv_heartbeat_lock_materialization_rebuild(const int32_t seqid); - void add_runtime_stats(const RuntimeStat& stat); - int32_t send_add_runtime_stats(const RuntimeStat& stat); - void recv_add_runtime_stats(const int32_t seqid); - void get_runtime_stats(std::vector<RuntimeStat> & _return, const GetRuntimeStatsRequest& rqst); - int32_t send_get_runtime_stats(const GetRuntimeStatsRequest& rqst); - void recv_get_runtime_stats(std::vector<RuntimeStat> & _return, const int32_t seqid); }; #ifdef _WIN32
http://git-wip-us.apache.org/repos/asf/hive/blob/f0199500/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp b/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp index 3b0b38c..c0a39f8 100644 --- a/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ b/standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -1032,16 +1032,6 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { printf("heartbeat_lock_materialization_rebuild\n"); } - void add_runtime_stats(const RuntimeStat& stat) { - // Your implementation goes here - printf("add_runtime_stats\n"); - } - - void get_runtime_stats(std::vector<RuntimeStat> & _return, const GetRuntimeStatsRequest& rqst) { - // Your implementation goes here - printf("get_runtime_stats\n"); - } - }; int main(int argc, char **argv) { http://git-wip-us.apache.org/repos/asf/hive/blob/f0199500/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp index 2fab857..052b595 100644 --- a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -30551,202 +30551,6 @@ void GetSerdeRequest::printTo(std::ostream& out) const { } -RuntimeStat::~RuntimeStat() throw() { -} - - -void RuntimeStat::__set_createTime(const int32_t val) { - this->createTime = val; -__isset.createTime = true; -} - -void RuntimeStat::__set_weight(const int32_t val) { - this->weight = val; -} - -void RuntimeStat::__set_payload(const std::string& val) { - this->payload = val; -} - -uint32_t RuntimeStat::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; - - bool isset_weight = false; - bool isset_payload = false; - - 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) { - xfer += iprot->readI32(this->createTime); - this->__isset.createTime = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == ::apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->weight); - isset_weight = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == ::apache::thrift::protocol::T_STRING) { - xfer += iprot->readBinary(this->payload); - isset_payload = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - if (!isset_weight) - throw TProtocolException(TProtocolException::INVALID_DATA); - if (!isset_payload) - throw TProtocolException(TProtocolException::INVALID_DATA); - return xfer; -} - -uint32_t RuntimeStat::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("RuntimeStat"); - - if (this->__isset.createTime) { - xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->createTime); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldBegin("weight", ::apache::thrift::protocol::T_I32, 2); - xfer += oprot->writeI32(this->weight); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldBegin("payload", ::apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeBinary(this->payload); - xfer += oprot->writeFieldEnd(); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(RuntimeStat &a, RuntimeStat &b) { - using ::std::swap; - swap(a.createTime, b.createTime); - swap(a.weight, b.weight); - swap(a.payload, b.payload); - swap(a.__isset, b.__isset); -} - -RuntimeStat::RuntimeStat(const RuntimeStat& other1157) { - createTime = other1157.createTime; - weight = other1157.weight; - payload = other1157.payload; - __isset = other1157.__isset; -} -RuntimeStat& RuntimeStat::operator=(const RuntimeStat& other1158) { - createTime = other1158.createTime; - weight = other1158.weight; - payload = other1158.payload; - __isset = other1158.__isset; - return *this; -} -void RuntimeStat::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "RuntimeStat("; - out << "createTime="; (__isset.createTime ? (out << to_string(createTime)) : (out << "<null>")); - out << ", " << "weight=" << to_string(weight); - out << ", " << "payload=" << to_string(payload); - out << ")"; -} - - -GetRuntimeStatsRequest::~GetRuntimeStatsRequest() throw() { -} - - -uint32_t GetRuntimeStatsRequest::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; - } - xfer += iprot->skip(ftype); - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t GetRuntimeStatsRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); - xfer += oprot->writeStructBegin("GetRuntimeStatsRequest"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void swap(GetRuntimeStatsRequest &a, GetRuntimeStatsRequest &b) { - using ::std::swap; - (void) a; - (void) b; -} - -GetRuntimeStatsRequest::GetRuntimeStatsRequest(const GetRuntimeStatsRequest& other1159) { - (void) other1159; -} -GetRuntimeStatsRequest& GetRuntimeStatsRequest::operator=(const GetRuntimeStatsRequest& other1160) { - (void) other1160; - return *this; -} -void GetRuntimeStatsRequest::printTo(std::ostream& out) const { - using ::apache::thrift::to_string; - out << "GetRuntimeStatsRequest("; - out << ")"; -} - - MetaException::~MetaException() throw() { } @@ -30816,13 +30620,13 @@ void swap(MetaException &a, MetaException &b) { swap(a.__isset, b.__isset); } -MetaException::MetaException(const MetaException& other1161) : TException() { - message = other1161.message; - __isset = other1161.__isset; +MetaException::MetaException(const MetaException& other1157) : TException() { + message = other1157.message; + __isset = other1157.__isset; } -MetaException& MetaException::operator=(const MetaException& other1162) { - message = other1162.message; - __isset = other1162.__isset; +MetaException& MetaException::operator=(const MetaException& other1158) { + message = other1158.message; + __isset = other1158.__isset; return *this; } void MetaException::printTo(std::ostream& out) const { @@ -30913,13 +30717,13 @@ void swap(UnknownTableException &a, UnknownTableException &b) { swap(a.__isset, b.__isset); } -UnknownTableException::UnknownTableException(const UnknownTableException& other1163) : TException() { - message = other1163.message; - __isset = other1163.__isset; +UnknownTableException::UnknownTableException(const UnknownTableException& other1159) : TException() { + message = other1159.message; + __isset = other1159.__isset; } -UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other1164) { - message = other1164.message; - __isset = other1164.__isset; +UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other1160) { + message = other1160.message; + __isset = other1160.__isset; return *this; } void UnknownTableException::printTo(std::ostream& out) const { @@ -31010,13 +30814,13 @@ void swap(UnknownDBException &a, UnknownDBException &b) { swap(a.__isset, b.__isset); } -UnknownDBException::UnknownDBException(const UnknownDBException& other1165) : TException() { - message = other1165.message; - __isset = other1165.__isset; +UnknownDBException::UnknownDBException(const UnknownDBException& other1161) : TException() { + message = other1161.message; + __isset = other1161.__isset; } -UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other1166) { - message = other1166.message; - __isset = other1166.__isset; +UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other1162) { + message = other1162.message; + __isset = other1162.__isset; return *this; } void UnknownDBException::printTo(std::ostream& out) const { @@ -31107,13 +30911,13 @@ void swap(AlreadyExistsException &a, AlreadyExistsException &b) { swap(a.__isset, b.__isset); } -AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other1167) : TException() { - message = other1167.message; - __isset = other1167.__isset; +AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other1163) : TException() { + message = other1163.message; + __isset = other1163.__isset; } -AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other1168) { - message = other1168.message; - __isset = other1168.__isset; +AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other1164) { + message = other1164.message; + __isset = other1164.__isset; return *this; } void AlreadyExistsException::printTo(std::ostream& out) const { @@ -31204,13 +31008,13 @@ void swap(InvalidPartitionException &a, InvalidPartitionException &b) { swap(a.__isset, b.__isset); } -InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other1169) : TException() { - message = other1169.message; - __isset = other1169.__isset; +InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other1165) : TException() { + message = other1165.message; + __isset = other1165.__isset; } -InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other1170) { - message = other1170.message; - __isset = other1170.__isset; +InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other1166) { + message = other1166.message; + __isset = other1166.__isset; return *this; } void InvalidPartitionException::printTo(std::ostream& out) const { @@ -31301,13 +31105,13 @@ void swap(UnknownPartitionException &a, UnknownPartitionException &b) { swap(a.__isset, b.__isset); } -UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other1171) : TException() { - message = other1171.message; - __isset = other1171.__isset; +UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other1167) : TException() { + message = other1167.message; + __isset = other1167.__isset; } -UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other1172) { - message = other1172.message; - __isset = other1172.__isset; +UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other1168) { + message = other1168.message; + __isset = other1168.__isset; return *this; } void UnknownPartitionException::printTo(std::ostream& out) const { @@ -31398,13 +31202,13 @@ void swap(InvalidObjectException &a, InvalidObjectException &b) { swap(a.__isset, b.__isset); } -InvalidObjectException::InvalidObjectException(const InvalidObjectException& other1173) : TException() { - message = other1173.message; - __isset = other1173.__isset; +InvalidObjectException::InvalidObjectException(const InvalidObjectException& other1169) : TException() { + message = other1169.message; + __isset = other1169.__isset; } -InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other1174) { - message = other1174.message; - __isset = other1174.__isset; +InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other1170) { + message = other1170.message; + __isset = other1170.__isset; return *this; } void InvalidObjectException::printTo(std::ostream& out) const { @@ -31495,13 +31299,13 @@ void swap(NoSuchObjectException &a, NoSuchObjectException &b) { swap(a.__isset, b.__isset); } -NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other1175) : TException() { - message = other1175.message; - __isset = other1175.__isset; +NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other1171) : TException() { + message = other1171.message; + __isset = other1171.__isset; } -NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other1176) { - message = other1176.message; - __isset = other1176.__isset; +NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other1172) { + message = other1172.message; + __isset = other1172.__isset; return *this; } void NoSuchObjectException::printTo(std::ostream& out) const { @@ -31592,13 +31396,13 @@ void swap(InvalidOperationException &a, InvalidOperationException &b) { swap(a.__isset, b.__isset); } -InvalidOperationException::InvalidOperationException(const InvalidOperationException& other1177) : TException() { - message = other1177.message; - __isset = other1177.__isset; +InvalidOperationException::InvalidOperationException(const InvalidOperationException& other1173) : TException() { + message = other1173.message; + __isset = other1173.__isset; } -InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other1178) { - message = other1178.message; - __isset = other1178.__isset; +InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other1174) { + message = other1174.message; + __isset = other1174.__isset; return *this; } void InvalidOperationException::printTo(std::ostream& out) const { @@ -31689,13 +31493,13 @@ void swap(ConfigValSecurityException &a, ConfigValSecurityException &b) { swap(a.__isset, b.__isset); } -ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other1179) : TException() { - message = other1179.message; - __isset = other1179.__isset; +ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other1175) : TException() { + message = other1175.message; + __isset = other1175.__isset; } -ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other1180) { - message = other1180.message; - __isset = other1180.__isset; +ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other1176) { + message = other1176.message; + __isset = other1176.__isset; return *this; } void ConfigValSecurityException::printTo(std::ostream& out) const { @@ -31786,13 +31590,13 @@ void swap(InvalidInputException &a, InvalidInputException &b) { swap(a.__isset, b.__isset); } -InvalidInputException::InvalidInputException(const InvalidInputException& other1181) : TException() { - message = other1181.message; - __isset = other1181.__isset; +InvalidInputException::InvalidInputException(const InvalidInputException& other1177) : TException() { + message = other1177.message; + __isset = other1177.__isset; } -InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other1182) { - message = other1182.message; - __isset = other1182.__isset; +InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other1178) { + message = other1178.message; + __isset = other1178.__isset; return *this; } void InvalidInputException::printTo(std::ostream& out) const { @@ -31883,13 +31687,13 @@ void swap(NoSuchTxnException &a, NoSuchTxnException &b) { swap(a.__isset, b.__isset); } -NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other1183) : TException() { - message = other1183.message; - __isset = other1183.__isset; +NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other1179) : TException() { + message = other1179.message; + __isset = other1179.__isset; } -NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other1184) { - message = other1184.message; - __isset = other1184.__isset; +NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other1180) { + message = other1180.message; + __isset = other1180.__isset; return *this; } void NoSuchTxnException::printTo(std::ostream& out) const { @@ -31980,13 +31784,13 @@ void swap(TxnAbortedException &a, TxnAbortedException &b) { swap(a.__isset, b.__isset); } -TxnAbortedException::TxnAbortedException(const TxnAbortedException& other1185) : TException() { - message = other1185.message; - __isset = other1185.__isset; +TxnAbortedException::TxnAbortedException(const TxnAbortedException& other1181) : TException() { + message = other1181.message; + __isset = other1181.__isset; } -TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other1186) { - message = other1186.message; - __isset = other1186.__isset; +TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other1182) { + message = other1182.message; + __isset = other1182.__isset; return *this; } void TxnAbortedException::printTo(std::ostream& out) const { @@ -32077,13 +31881,13 @@ void swap(TxnOpenException &a, TxnOpenException &b) { swap(a.__isset, b.__isset); } -TxnOpenException::TxnOpenException(const TxnOpenException& other1187) : TException() { - message = other1187.message; - __isset = other1187.__isset; +TxnOpenException::TxnOpenException(const TxnOpenException& other1183) : TException() { + message = other1183.message; + __isset = other1183.__isset; } -TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other1188) { - message = other1188.message; - __isset = other1188.__isset; +TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other1184) { + message = other1184.message; + __isset = other1184.__isset; return *this; } void TxnOpenException::printTo(std::ostream& out) const { @@ -32174,13 +31978,13 @@ void swap(NoSuchLockException &a, NoSuchLockException &b) { swap(a.__isset, b.__isset); } -NoSuchLockException::NoSuchLockException(const NoSuchLockException& other1189) : TException() { - message = other1189.message; - __isset = other1189.__isset; +NoSuchLockException::NoSuchLockException(const NoSuchLockException& other1185) : TException() { + message = other1185.message; + __isset = other1185.__isset; } -NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other1190) { - message = other1190.message; - __isset = other1190.__isset; +NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other1186) { + message = other1186.message; + __isset = other1186.__isset; return *this; } void NoSuchLockException::printTo(std::ostream& out) const { http://git-wip-us.apache.org/repos/asf/hive/blob/f0199500/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h index cd78f58..6b872a6 100644 --- a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -659,10 +659,6 @@ class SetSchemaVersionStateRequest; class GetSerdeRequest; -class RuntimeStat; - -class GetRuntimeStatsRequest; - class MetaException; class UnknownTableException; @@ -12938,99 +12934,6 @@ inline std::ostream& operator<<(std::ostream& out, const GetSerdeRequest& obj) return out; } -typedef struct _RuntimeStat__isset { - _RuntimeStat__isset() : createTime(false) {} - bool createTime :1; -} _RuntimeStat__isset; - -class RuntimeStat { - public: - - RuntimeStat(const RuntimeStat&); - RuntimeStat& operator=(const RuntimeStat&); - RuntimeStat() : createTime(0), weight(0), payload() { - } - - virtual ~RuntimeStat() throw(); - int32_t createTime; - int32_t weight; - std::string payload; - - _RuntimeStat__isset __isset; - - void __set_createTime(const int32_t val); - - void __set_weight(const int32_t val); - - void __set_payload(const std::string& val); - - bool operator == (const RuntimeStat & rhs) const - { - if (__isset.createTime != rhs.__isset.createTime) - return false; - else if (__isset.createTime && !(createTime == rhs.createTime)) - return false; - if (!(weight == rhs.weight)) - return false; - if (!(payload == rhs.payload)) - return false; - return true; - } - bool operator != (const RuntimeStat &rhs) const { - return !(*this == rhs); - } - - bool operator < (const RuntimeStat & ) 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(RuntimeStat &a, RuntimeStat &b); - -inline std::ostream& operator<<(std::ostream& out, const RuntimeStat& obj) -{ - obj.printTo(out); - return out; -} - - -class GetRuntimeStatsRequest { - public: - - GetRuntimeStatsRequest(const GetRuntimeStatsRequest&); - GetRuntimeStatsRequest& operator=(const GetRuntimeStatsRequest&); - GetRuntimeStatsRequest() { - } - - virtual ~GetRuntimeStatsRequest() throw(); - - bool operator == (const GetRuntimeStatsRequest & /* rhs */) const - { - return true; - } - bool operator != (const GetRuntimeStatsRequest &rhs) const { - return !(*this == rhs); - } - - bool operator < (const GetRuntimeStatsRequest & ) 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(GetRuntimeStatsRequest &a, GetRuntimeStatsRequest &b); - -inline std::ostream& operator<<(std::ostream& out, const GetRuntimeStatsRequest& obj) -{ - obj.printTo(out); - return out; -} - typedef struct _MetaException__isset { _MetaException__isset() : message(false) {} bool message :1; http://git-wip-us.apache.org/repos/asf/hive/blob/f0199500/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRuntimeStatsRequest.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRuntimeStatsRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRuntimeStatsRequest.java deleted file mode 100644 index e5ce97e..0000000 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRuntimeStatsRequest.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") [email protected] @org.apache.hadoop.classification.InterfaceStability.Stable public class GetRuntimeStatsRequest implements org.apache.thrift.TBase<GetRuntimeStatsRequest, GetRuntimeStatsRequest._Fields>, java.io.Serializable, Cloneable, Comparable<GetRuntimeStatsRequest> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetRuntimeStatsRequest"); - - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetRuntimeStatsRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetRuntimeStatsRequestTupleSchemeFactory()); - } - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetRuntimeStatsRequest.class, metaDataMap); - } - - public GetRuntimeStatsRequest() { - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public GetRuntimeStatsRequest(GetRuntimeStatsRequest other) { - } - - public GetRuntimeStatsRequest deepCopy() { - return new GetRuntimeStatsRequest(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetRuntimeStatsRequest) - return this.equals((GetRuntimeStatsRequest)that); - return false; - } - - public boolean equals(GetRuntimeStatsRequest that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - return list.hashCode(); - } - - @Override - public int compareTo(GetRuntimeStatsRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("GetRuntimeStatsRequest("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class GetRuntimeStatsRequestStandardSchemeFactory implements SchemeFactory { - public GetRuntimeStatsRequestStandardScheme getScheme() { - return new GetRuntimeStatsRequestStandardScheme(); - } - } - - private static class GetRuntimeStatsRequestStandardScheme extends StandardScheme<GetRuntimeStatsRequest> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetRuntimeStatsRequest struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, GetRuntimeStatsRequest struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetRuntimeStatsRequestTupleSchemeFactory implements SchemeFactory { - public GetRuntimeStatsRequestTupleScheme getScheme() { - return new GetRuntimeStatsRequestTupleScheme(); - } - } - - private static class GetRuntimeStatsRequestTupleScheme extends TupleScheme<GetRuntimeStatsRequest> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetRuntimeStatsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetRuntimeStatsRequest struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - -} - http://git-wip-us.apache.org/repos/asf/hive/blob/f0199500/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RuntimeStat.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RuntimeStat.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RuntimeStat.java deleted file mode 100644 index b48718c..0000000 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/RuntimeStat.java +++ /dev/null @@ -1,600 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.hadoop.hive.metastore.api; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") [email protected] @org.apache.hadoop.classification.InterfaceStability.Stable public class RuntimeStat implements org.apache.thrift.TBase<RuntimeStat, RuntimeStat._Fields>, java.io.Serializable, Cloneable, Comparable<RuntimeStat> { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RuntimeStat"); - - private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField WEIGHT_FIELD_DESC = new org.apache.thrift.protocol.TField("weight", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField PAYLOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("payload", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new RuntimeStatStandardSchemeFactory()); - schemes.put(TupleScheme.class, new RuntimeStatTupleSchemeFactory()); - } - - private int createTime; // optional - private int weight; // required - private ByteBuffer payload; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - CREATE_TIME((short)1, "createTime"), - WEIGHT((short)2, "weight"), - PAYLOAD((short)3, "payload"); - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // CREATE_TIME - return CREATE_TIME; - case 2: // WEIGHT - return WEIGHT; - case 3: // PAYLOAD - return PAYLOAD; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __CREATETIME_ISSET_ID = 0; - private static final int __WEIGHT_ISSET_ID = 1; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.CREATE_TIME}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.WEIGHT, new org.apache.thrift.meta_data.FieldMetaData("weight", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.PAYLOAD, new org.apache.thrift.meta_data.FieldMetaData("payload", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RuntimeStat.class, metaDataMap); - } - - public RuntimeStat() { - } - - public RuntimeStat( - int weight, - ByteBuffer payload) - { - this(); - this.weight = weight; - setWeightIsSet(true); - this.payload = org.apache.thrift.TBaseHelper.copyBinary(payload); - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public RuntimeStat(RuntimeStat other) { - __isset_bitfield = other.__isset_bitfield; - this.createTime = other.createTime; - this.weight = other.weight; - if (other.isSetPayload()) { - this.payload = org.apache.thrift.TBaseHelper.copyBinary(other.payload); - } - } - - public RuntimeStat deepCopy() { - return new RuntimeStat(this); - } - - @Override - public void clear() { - setCreateTimeIsSet(false); - this.createTime = 0; - setWeightIsSet(false); - this.weight = 0; - this.payload = null; - } - - public int getCreateTime() { - return this.createTime; - } - - public void setCreateTime(int createTime) { - this.createTime = createTime; - setCreateTimeIsSet(true); - } - - public void unsetCreateTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ - public boolean isSetCreateTime() { - return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); - } - - public void setCreateTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); - } - - public int getWeight() { - return this.weight; - } - - public void setWeight(int weight) { - this.weight = weight; - setWeightIsSet(true); - } - - public void unsetWeight() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WEIGHT_ISSET_ID); - } - - /** Returns true if field weight is set (has been assigned a value) and false otherwise */ - public boolean isSetWeight() { - return EncodingUtils.testBit(__isset_bitfield, __WEIGHT_ISSET_ID); - } - - public void setWeightIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WEIGHT_ISSET_ID, value); - } - - public byte[] getPayload() { - setPayload(org.apache.thrift.TBaseHelper.rightSize(payload)); - return payload == null ? null : payload.array(); - } - - public ByteBuffer bufferForPayload() { - return org.apache.thrift.TBaseHelper.copyBinary(payload); - } - - public void setPayload(byte[] payload) { - this.payload = payload == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(payload, payload.length)); - } - - public void setPayload(ByteBuffer payload) { - this.payload = org.apache.thrift.TBaseHelper.copyBinary(payload); - } - - public void unsetPayload() { - this.payload = null; - } - - /** Returns true if field payload is set (has been assigned a value) and false otherwise */ - public boolean isSetPayload() { - return this.payload != null; - } - - public void setPayloadIsSet(boolean value) { - if (!value) { - this.payload = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case CREATE_TIME: - if (value == null) { - unsetCreateTime(); - } else { - setCreateTime((Integer)value); - } - break; - - case WEIGHT: - if (value == null) { - unsetWeight(); - } else { - setWeight((Integer)value); - } - break; - - case PAYLOAD: - if (value == null) { - unsetPayload(); - } else { - setPayload((ByteBuffer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case CREATE_TIME: - return getCreateTime(); - - case WEIGHT: - return getWeight(); - - case PAYLOAD: - return getPayload(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case CREATE_TIME: - return isSetCreateTime(); - case WEIGHT: - return isSetWeight(); - case PAYLOAD: - return isSetPayload(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof RuntimeStat) - return this.equals((RuntimeStat)that); - return false; - } - - public boolean equals(RuntimeStat that) { - if (that == null) - return false; - - boolean this_present_createTime = true && this.isSetCreateTime(); - boolean that_present_createTime = true && that.isSetCreateTime(); - if (this_present_createTime || that_present_createTime) { - if (!(this_present_createTime && that_present_createTime)) - return false; - if (this.createTime != that.createTime) - return false; - } - - boolean this_present_weight = true; - boolean that_present_weight = true; - if (this_present_weight || that_present_weight) { - if (!(this_present_weight && that_present_weight)) - return false; - if (this.weight != that.weight) - return false; - } - - boolean this_present_payload = true && this.isSetPayload(); - boolean that_present_payload = true && that.isSetPayload(); - if (this_present_payload || that_present_payload) { - if (!(this_present_payload && that_present_payload)) - return false; - if (!this.payload.equals(that.payload)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_createTime = true && (isSetCreateTime()); - list.add(present_createTime); - if (present_createTime) - list.add(createTime); - - boolean present_weight = true; - list.add(present_weight); - if (present_weight) - list.add(weight); - - boolean present_payload = true && (isSetPayload()); - list.add(present_payload); - if (present_payload) - list.add(payload); - - return list.hashCode(); - } - - @Override - public int compareTo(RuntimeStat other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetWeight()).compareTo(other.isSetWeight()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWeight()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.weight, other.weight); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPayload()).compareTo(other.isSetPayload()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPayload()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.payload, other.payload); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("RuntimeStat("); - boolean first = true; - - if (isSetCreateTime()) { - sb.append("createTime:"); - sb.append(this.createTime); - first = false; - } - if (!first) sb.append(", "); - sb.append("weight:"); - sb.append(this.weight); - first = false; - if (!first) sb.append(", "); - sb.append("payload:"); - if (this.payload == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.payload, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - if (!isSetWeight()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'weight' is unset! Struct:" + toString()); - } - - if (!isSetPayload()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'payload' is unset! Struct:" + toString()); - } - - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class RuntimeStatStandardSchemeFactory implements SchemeFactory { - public RuntimeStatStandardScheme getScheme() { - return new RuntimeStatStandardScheme(); - } - } - - private static class RuntimeStatStandardScheme extends StandardScheme<RuntimeStat> { - - public void read(org.apache.thrift.protocol.TProtocol iprot, RuntimeStat struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // CREATE_TIME - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.createTime = iprot.readI32(); - struct.setCreateTimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // WEIGHT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.weight = iprot.readI32(); - struct.setWeightIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PAYLOAD - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.payload = iprot.readBinary(); - struct.setPayloadIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, RuntimeStat struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetCreateTime()) { - oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); - oprot.writeI32(struct.createTime); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(WEIGHT_FIELD_DESC); - oprot.writeI32(struct.weight); - oprot.writeFieldEnd(); - if (struct.payload != null) { - oprot.writeFieldBegin(PAYLOAD_FIELD_DESC); - oprot.writeBinary(struct.payload); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class RuntimeStatTupleSchemeFactory implements SchemeFactory { - public RuntimeStatTupleScheme getScheme() { - return new RuntimeStatTupleScheme(); - } - } - - private static class RuntimeStatTupleScheme extends TupleScheme<RuntimeStat> { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, RuntimeStat struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - oprot.writeI32(struct.weight); - oprot.writeBinary(struct.payload); - BitSet optionals = new BitSet(); - if (struct.isSetCreateTime()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetCreateTime()) { - oprot.writeI32(struct.createTime); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, RuntimeStat struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - struct.weight = iprot.readI32(); - struct.setWeightIsSet(true); - struct.payload = iprot.readBinary(); - struct.setPayloadIsSet(true); - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.createTime = iprot.readI32(); - struct.setCreateTimeIsSet(true); - } - } - } - -} -
