http://git-wip-us.apache.org/repos/asf/hive/blob/7df62023/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h index cea9000..62a2007 100644 --- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h +++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h @@ -153,6 +153,7 @@ class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookService virtual void get_file_metadata(GetFileMetadataResult& _return, const GetFileMetadataRequest& req) = 0; virtual void put_file_metadata(PutFileMetadataResult& _return, const PutFileMetadataRequest& req) = 0; virtual void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req) = 0; + virtual void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) = 0; }; class ThriftHiveMetastoreIfFactory : virtual public ::facebook::fb303::FacebookServiceIfFactory { @@ -598,6 +599,9 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p void clear_file_metadata(ClearFileMetadataResult& /* _return */, const ClearFileMetadataRequest& /* req */) { return; } + void cache_file_metadata(CacheFileMetadataResult& /* _return */, const CacheFileMetadataRequest& /* req */) { + return; + } }; typedef struct _ThriftHiveMetastore_getMetaConf_args__isset { @@ -17023,6 +17027,110 @@ class ThriftHiveMetastore_clear_file_metadata_presult { }; +typedef struct _ThriftHiveMetastore_cache_file_metadata_args__isset { + _ThriftHiveMetastore_cache_file_metadata_args__isset() : req(false) {} + bool req :1; +} _ThriftHiveMetastore_cache_file_metadata_args__isset; + +class ThriftHiveMetastore_cache_file_metadata_args { + public: + + ThriftHiveMetastore_cache_file_metadata_args(const ThriftHiveMetastore_cache_file_metadata_args&); + ThriftHiveMetastore_cache_file_metadata_args& operator=(const ThriftHiveMetastore_cache_file_metadata_args&); + ThriftHiveMetastore_cache_file_metadata_args() { + } + + virtual ~ThriftHiveMetastore_cache_file_metadata_args() throw(); + CacheFileMetadataRequest req; + + _ThriftHiveMetastore_cache_file_metadata_args__isset __isset; + + void __set_req(const CacheFileMetadataRequest& val); + + bool operator == (const ThriftHiveMetastore_cache_file_metadata_args & rhs) const + { + if (!(req == rhs.req)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_cache_file_metadata_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_cache_file_metadata_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHiveMetastore_cache_file_metadata_pargs { + public: + + + virtual ~ThriftHiveMetastore_cache_file_metadata_pargs() throw(); + const CacheFileMetadataRequest* req; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_cache_file_metadata_result__isset { + _ThriftHiveMetastore_cache_file_metadata_result__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_cache_file_metadata_result__isset; + +class ThriftHiveMetastore_cache_file_metadata_result { + public: + + ThriftHiveMetastore_cache_file_metadata_result(const ThriftHiveMetastore_cache_file_metadata_result&); + ThriftHiveMetastore_cache_file_metadata_result& operator=(const ThriftHiveMetastore_cache_file_metadata_result&); + ThriftHiveMetastore_cache_file_metadata_result() { + } + + virtual ~ThriftHiveMetastore_cache_file_metadata_result() throw(); + CacheFileMetadataResult success; + + _ThriftHiveMetastore_cache_file_metadata_result__isset __isset; + + void __set_success(const CacheFileMetadataResult& val); + + bool operator == (const ThriftHiveMetastore_cache_file_metadata_result & rhs) const + { + if (!(success == rhs.success)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_cache_file_metadata_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_cache_file_metadata_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHiveMetastore_cache_file_metadata_presult__isset { + _ThriftHiveMetastore_cache_file_metadata_presult__isset() : success(false) {} + bool success :1; +} _ThriftHiveMetastore_cache_file_metadata_presult__isset; + +class ThriftHiveMetastore_cache_file_metadata_presult { + public: + + + virtual ~ThriftHiveMetastore_cache_file_metadata_presult() throw(); + CacheFileMetadataResult* success; + + _ThriftHiveMetastore_cache_file_metadata_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) : @@ -17427,6 +17535,9 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req); void send_clear_file_metadata(const ClearFileMetadataRequest& req); void recv_clear_file_metadata(ClearFileMetadataResult& _return); + void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req); + void send_cache_file_metadata(const CacheFileMetadataRequest& req); + void recv_cache_file_metadata(CacheFileMetadataResult& _return); }; class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceProcessor { @@ -17568,6 +17679,7 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP void process_get_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_put_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_clear_file_metadata(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_cache_file_metadata(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), @@ -17703,6 +17815,7 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP processMap_["get_file_metadata"] = &ThriftHiveMetastoreProcessor::process_get_file_metadata; processMap_["put_file_metadata"] = &ThriftHiveMetastoreProcessor::process_put_file_metadata; processMap_["clear_file_metadata"] = &ThriftHiveMetastoreProcessor::process_clear_file_metadata; + processMap_["cache_file_metadata"] = &ThriftHiveMetastoreProcessor::process_cache_file_metadata; } virtual ~ThriftHiveMetastoreProcessor() {} @@ -18995,6 +19108,16 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi return; } + void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) { + size_t sz = ifaces_.size(); + size_t i = 0; + for (; i < (sz - 1); ++i) { + ifaces_[i]->cache_file_metadata(_return, req); + } + ifaces_[i]->cache_file_metadata(_return, req); + return; + } + }; // The 'concurrent' client is a thread safe client that correctly handles @@ -19404,6 +19527,9 @@ class ThriftHiveMetastoreConcurrentClient : virtual public ThriftHiveMetastoreIf void clear_file_metadata(ClearFileMetadataResult& _return, const ClearFileMetadataRequest& req); int32_t send_clear_file_metadata(const ClearFileMetadataRequest& req); void recv_clear_file_metadata(ClearFileMetadataResult& _return, const int32_t seqid); + void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req); + int32_t send_cache_file_metadata(const CacheFileMetadataRequest& req); + void recv_cache_file_metadata(CacheFileMetadataResult& _return, const int32_t seqid); }; #ifdef _WIN32
http://git-wip-us.apache.org/repos/asf/hive/blob/7df62023/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp index c0d9401..383a0d2 100644 --- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -677,6 +677,11 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf { printf("clear_file_metadata\n"); } + void cache_file_metadata(CacheFileMetadataResult& _return, const CacheFileMetadataRequest& req) { + // Your implementation goes here + printf("cache_file_metadata\n"); + } + }; int main(int argc, char **argv) { http://git-wip-us.apache.org/repos/asf/hive/blob/7df62023/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp index ee28d0d..d997e33 100644 --- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp +++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp @@ -14744,6 +14744,11 @@ void PutFileMetadataRequest::__set_metadata(const std::vector<std::string> & val this->metadata = val; } +void PutFileMetadataRequest::__set_type(const FileMetadataExprType::type val) { + this->type = val; +__isset.type = true; +} + uint32_t PutFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* iprot) { apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); @@ -14807,6 +14812,16 @@ uint32_t PutFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* ipr xfer += iprot->skip(ftype); } break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast660; + xfer += iprot->readI32(ecast660); + this->type = (FileMetadataExprType::type)ecast660; + this->__isset.type = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -14831,10 +14846,10 @@ uint32_t PutFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* op xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->fileIds.size())); - std::vector<int64_t> ::const_iterator _iter660; - for (_iter660 = this->fileIds.begin(); _iter660 != this->fileIds.end(); ++_iter660) + std::vector<int64_t> ::const_iterator _iter661; + for (_iter661 = this->fileIds.begin(); _iter661 != this->fileIds.end(); ++_iter661) { - xfer += oprot->writeI64((*_iter660)); + xfer += oprot->writeI64((*_iter661)); } xfer += oprot->writeListEnd(); } @@ -14843,15 +14858,20 @@ uint32_t PutFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* op xfer += oprot->writeFieldBegin("metadata", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->metadata.size())); - std::vector<std::string> ::const_iterator _iter661; - for (_iter661 = this->metadata.begin(); _iter661 != this->metadata.end(); ++_iter661) + std::vector<std::string> ::const_iterator _iter662; + for (_iter662 = this->metadata.begin(); _iter662 != this->metadata.end(); ++_iter662) { - xfer += oprot->writeBinary((*_iter661)); + xfer += oprot->writeBinary((*_iter662)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + if (this->__isset.type) { + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->type); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -14861,15 +14881,21 @@ void swap(PutFileMetadataRequest &a, PutFileMetadataRequest &b) { using ::std::swap; swap(a.fileIds, b.fileIds); swap(a.metadata, b.metadata); + swap(a.type, b.type); + swap(a.__isset, b.__isset); } -PutFileMetadataRequest::PutFileMetadataRequest(const PutFileMetadataRequest& other662) { - fileIds = other662.fileIds; - metadata = other662.metadata; -} -PutFileMetadataRequest& PutFileMetadataRequest::operator=(const PutFileMetadataRequest& other663) { +PutFileMetadataRequest::PutFileMetadataRequest(const PutFileMetadataRequest& other663) { fileIds = other663.fileIds; metadata = other663.metadata; + type = other663.type; + __isset = other663.__isset; +} +PutFileMetadataRequest& PutFileMetadataRequest::operator=(const PutFileMetadataRequest& other664) { + fileIds = other664.fileIds; + metadata = other664.metadata; + type = other664.type; + __isset = other664.__isset; return *this; } void PutFileMetadataRequest::printTo(std::ostream& out) const { @@ -14877,6 +14903,7 @@ void PutFileMetadataRequest::printTo(std::ostream& out) const { out << "PutFileMetadataRequest("; out << "fileIds=" << to_string(fileIds); out << ", " << "metadata=" << to_string(metadata); + out << ", " << "type="; (__isset.type ? (out << to_string(type)) : (out << "<null>")); out << ")"; } @@ -14929,11 +14956,11 @@ void swap(ClearFileMetadataResult &a, ClearFileMetadataResult &b) { (void) b; } -ClearFileMetadataResult::ClearFileMetadataResult(const ClearFileMetadataResult& other664) { - (void) other664; -} -ClearFileMetadataResult& ClearFileMetadataResult::operator=(const ClearFileMetadataResult& other665) { +ClearFileMetadataResult::ClearFileMetadataResult(const ClearFileMetadataResult& other665) { (void) other665; +} +ClearFileMetadataResult& ClearFileMetadataResult::operator=(const ClearFileMetadataResult& other666) { + (void) other666; return *this; } void ClearFileMetadataResult::printTo(std::ostream& out) const { @@ -14977,14 +15004,14 @@ uint32_t ClearFileMetadataRequest::read(::apache::thrift::protocol::TProtocol* i if (ftype == ::apache::thrift::protocol::T_LIST) { { this->fileIds.clear(); - uint32_t _size666; - ::apache::thrift::protocol::TType _etype669; - xfer += iprot->readListBegin(_etype669, _size666); - this->fileIds.resize(_size666); - uint32_t _i670; - for (_i670 = 0; _i670 < _size666; ++_i670) + uint32_t _size667; + ::apache::thrift::protocol::TType _etype670; + xfer += iprot->readListBegin(_etype670, _size667); + this->fileIds.resize(_size667); + uint32_t _i671; + for (_i671 = 0; _i671 < _size667; ++_i671) { - xfer += iprot->readI64(this->fileIds[_i670]); + xfer += iprot->readI64(this->fileIds[_i671]); } xfer += iprot->readListEnd(); } @@ -15015,10 +15042,10 @@ uint32_t ClearFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* xfer += oprot->writeFieldBegin("fileIds", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->fileIds.size())); - std::vector<int64_t> ::const_iterator _iter671; - for (_iter671 = this->fileIds.begin(); _iter671 != this->fileIds.end(); ++_iter671) + std::vector<int64_t> ::const_iterator _iter672; + for (_iter672 = this->fileIds.begin(); _iter672 != this->fileIds.end(); ++_iter672) { - xfer += oprot->writeI64((*_iter671)); + xfer += oprot->writeI64((*_iter672)); } xfer += oprot->writeListEnd(); } @@ -15034,11 +15061,11 @@ void swap(ClearFileMetadataRequest &a, ClearFileMetadataRequest &b) { swap(a.fileIds, b.fileIds); } -ClearFileMetadataRequest::ClearFileMetadataRequest(const ClearFileMetadataRequest& other672) { - fileIds = other672.fileIds; -} -ClearFileMetadataRequest& ClearFileMetadataRequest::operator=(const ClearFileMetadataRequest& other673) { +ClearFileMetadataRequest::ClearFileMetadataRequest(const ClearFileMetadataRequest& other673) { fileIds = other673.fileIds; +} +ClearFileMetadataRequest& ClearFileMetadataRequest::operator=(const ClearFileMetadataRequest& other674) { + fileIds = other674.fileIds; return *this; } void ClearFileMetadataRequest::printTo(std::ostream& out) const { @@ -15049,6 +15076,248 @@ void ClearFileMetadataRequest::printTo(std::ostream& out) const { } +CacheFileMetadataResult::~CacheFileMetadataResult() throw() { +} + + +void CacheFileMetadataResult::__set_isSupported(const bool val) { + this->isSupported = val; +} + +uint32_t CacheFileMetadataResult::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_isSupported = 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_BOOL) { + xfer += iprot->readBool(this->isSupported); + isset_isSupported = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_isSupported) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CacheFileMetadataResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CacheFileMetadataResult"); + + xfer += oprot->writeFieldBegin("isSupported", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->isSupported); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CacheFileMetadataResult &a, CacheFileMetadataResult &b) { + using ::std::swap; + swap(a.isSupported, b.isSupported); +} + +CacheFileMetadataResult::CacheFileMetadataResult(const CacheFileMetadataResult& other675) { + isSupported = other675.isSupported; +} +CacheFileMetadataResult& CacheFileMetadataResult::operator=(const CacheFileMetadataResult& other676) { + isSupported = other676.isSupported; + return *this; +} +void CacheFileMetadataResult::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CacheFileMetadataResult("; + out << "isSupported=" << to_string(isSupported); + out << ")"; +} + + +CacheFileMetadataRequest::~CacheFileMetadataRequest() throw() { +} + + +void CacheFileMetadataRequest::__set_dbName(const std::string& val) { + this->dbName = val; +} + +void CacheFileMetadataRequest::__set_tblName(const std::string& val) { + this->tblName = val; +} + +void CacheFileMetadataRequest::__set_partName(const std::string& val) { + this->partName = val; +__isset.partName = true; +} + +void CacheFileMetadataRequest::__set_isAllParts(const bool val) { + this->isAllParts = val; +__isset.isAllParts = true; +} + +uint32_t CacheFileMetadataRequest::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_dbName = false; + bool isset_tblName = 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_STRING) { + xfer += iprot->readString(this->dbName); + isset_dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tblName); + isset_tblName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partName); + this->__isset.partName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isAllParts); + this->__isset.isAllParts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_dbName) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_tblName) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t CacheFileMetadataRequest::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("CacheFileMetadataRequest"); + + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("tblName", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tblName); + xfer += oprot->writeFieldEnd(); + + if (this->__isset.partName) { + xfer += oprot->writeFieldBegin("partName", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->partName); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.isAllParts) { + xfer += oprot->writeFieldBegin("isAllParts", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->isAllParts); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(CacheFileMetadataRequest &a, CacheFileMetadataRequest &b) { + using ::std::swap; + swap(a.dbName, b.dbName); + swap(a.tblName, b.tblName); + swap(a.partName, b.partName); + swap(a.isAllParts, b.isAllParts); + swap(a.__isset, b.__isset); +} + +CacheFileMetadataRequest::CacheFileMetadataRequest(const CacheFileMetadataRequest& other677) { + dbName = other677.dbName; + tblName = other677.tblName; + partName = other677.partName; + isAllParts = other677.isAllParts; + __isset = other677.__isset; +} +CacheFileMetadataRequest& CacheFileMetadataRequest::operator=(const CacheFileMetadataRequest& other678) { + dbName = other678.dbName; + tblName = other678.tblName; + partName = other678.partName; + isAllParts = other678.isAllParts; + __isset = other678.__isset; + return *this; +} +void CacheFileMetadataRequest::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "CacheFileMetadataRequest("; + out << "dbName=" << to_string(dbName); + out << ", " << "tblName=" << to_string(tblName); + out << ", " << "partName="; (__isset.partName ? (out << to_string(partName)) : (out << "<null>")); + out << ", " << "isAllParts="; (__isset.isAllParts ? (out << to_string(isAllParts)) : (out << "<null>")); + out << ")"; +} + + GetAllFunctionsResponse::~GetAllFunctionsResponse() throw() { } @@ -15083,14 +15352,14 @@ uint32_t GetAllFunctionsResponse::read(::apache::thrift::protocol::TProtocol* ip if (ftype == ::apache::thrift::protocol::T_LIST) { { this->functions.clear(); - uint32_t _size674; - ::apache::thrift::protocol::TType _etype677; - xfer += iprot->readListBegin(_etype677, _size674); - this->functions.resize(_size674); - uint32_t _i678; - for (_i678 = 0; _i678 < _size674; ++_i678) + uint32_t _size679; + ::apache::thrift::protocol::TType _etype682; + xfer += iprot->readListBegin(_etype682, _size679); + this->functions.resize(_size679); + uint32_t _i683; + for (_i683 = 0; _i683 < _size679; ++_i683) { - xfer += this->functions[_i678].read(iprot); + xfer += this->functions[_i683].read(iprot); } xfer += iprot->readListEnd(); } @@ -15120,10 +15389,10 @@ uint32_t GetAllFunctionsResponse::write(::apache::thrift::protocol::TProtocol* o xfer += oprot->writeFieldBegin("functions", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->functions.size())); - std::vector<Function> ::const_iterator _iter679; - for (_iter679 = this->functions.begin(); _iter679 != this->functions.end(); ++_iter679) + std::vector<Function> ::const_iterator _iter684; + for (_iter684 = this->functions.begin(); _iter684 != this->functions.end(); ++_iter684) { - xfer += (*_iter679).write(oprot); + xfer += (*_iter684).write(oprot); } xfer += oprot->writeListEnd(); } @@ -15140,13 +15409,13 @@ void swap(GetAllFunctionsResponse &a, GetAllFunctionsResponse &b) { swap(a.__isset, b.__isset); } -GetAllFunctionsResponse::GetAllFunctionsResponse(const GetAllFunctionsResponse& other680) { - functions = other680.functions; - __isset = other680.__isset; +GetAllFunctionsResponse::GetAllFunctionsResponse(const GetAllFunctionsResponse& other685) { + functions = other685.functions; + __isset = other685.__isset; } -GetAllFunctionsResponse& GetAllFunctionsResponse::operator=(const GetAllFunctionsResponse& other681) { - functions = other681.functions; - __isset = other681.__isset; +GetAllFunctionsResponse& GetAllFunctionsResponse::operator=(const GetAllFunctionsResponse& other686) { + functions = other686.functions; + __isset = other686.__isset; return *this; } void GetAllFunctionsResponse::printTo(std::ostream& out) const { @@ -15288,19 +15557,19 @@ void swap(TableMeta &a, TableMeta &b) { swap(a.__isset, b.__isset); } -TableMeta::TableMeta(const TableMeta& other682) { - dbName = other682.dbName; - tableName = other682.tableName; - tableType = other682.tableType; - comments = other682.comments; - __isset = other682.__isset; +TableMeta::TableMeta(const TableMeta& other687) { + dbName = other687.dbName; + tableName = other687.tableName; + tableType = other687.tableType; + comments = other687.comments; + __isset = other687.__isset; } -TableMeta& TableMeta::operator=(const TableMeta& other683) { - dbName = other683.dbName; - tableName = other683.tableName; - tableType = other683.tableType; - comments = other683.comments; - __isset = other683.__isset; +TableMeta& TableMeta::operator=(const TableMeta& other688) { + dbName = other688.dbName; + tableName = other688.tableName; + tableType = other688.tableType; + comments = other688.comments; + __isset = other688.__isset; return *this; } void TableMeta::printTo(std::ostream& out) const { @@ -15383,13 +15652,13 @@ void swap(MetaException &a, MetaException &b) { swap(a.__isset, b.__isset); } -MetaException::MetaException(const MetaException& other684) : TException() { - message = other684.message; - __isset = other684.__isset; +MetaException::MetaException(const MetaException& other689) : TException() { + message = other689.message; + __isset = other689.__isset; } -MetaException& MetaException::operator=(const MetaException& other685) { - message = other685.message; - __isset = other685.__isset; +MetaException& MetaException::operator=(const MetaException& other690) { + message = other690.message; + __isset = other690.__isset; return *this; } void MetaException::printTo(std::ostream& out) const { @@ -15480,13 +15749,13 @@ void swap(UnknownTableException &a, UnknownTableException &b) { swap(a.__isset, b.__isset); } -UnknownTableException::UnknownTableException(const UnknownTableException& other686) : TException() { - message = other686.message; - __isset = other686.__isset; +UnknownTableException::UnknownTableException(const UnknownTableException& other691) : TException() { + message = other691.message; + __isset = other691.__isset; } -UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other687) { - message = other687.message; - __isset = other687.__isset; +UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other692) { + message = other692.message; + __isset = other692.__isset; return *this; } void UnknownTableException::printTo(std::ostream& out) const { @@ -15577,13 +15846,13 @@ void swap(UnknownDBException &a, UnknownDBException &b) { swap(a.__isset, b.__isset); } -UnknownDBException::UnknownDBException(const UnknownDBException& other688) : TException() { - message = other688.message; - __isset = other688.__isset; +UnknownDBException::UnknownDBException(const UnknownDBException& other693) : TException() { + message = other693.message; + __isset = other693.__isset; } -UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other689) { - message = other689.message; - __isset = other689.__isset; +UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other694) { + message = other694.message; + __isset = other694.__isset; return *this; } void UnknownDBException::printTo(std::ostream& out) const { @@ -15674,13 +15943,13 @@ void swap(AlreadyExistsException &a, AlreadyExistsException &b) { swap(a.__isset, b.__isset); } -AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other690) : TException() { - message = other690.message; - __isset = other690.__isset; +AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other695) : TException() { + message = other695.message; + __isset = other695.__isset; } -AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other691) { - message = other691.message; - __isset = other691.__isset; +AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other696) { + message = other696.message; + __isset = other696.__isset; return *this; } void AlreadyExistsException::printTo(std::ostream& out) const { @@ -15771,13 +16040,13 @@ void swap(InvalidPartitionException &a, InvalidPartitionException &b) { swap(a.__isset, b.__isset); } -InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other692) : TException() { - message = other692.message; - __isset = other692.__isset; +InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other697) : TException() { + message = other697.message; + __isset = other697.__isset; } -InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other693) { - message = other693.message; - __isset = other693.__isset; +InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other698) { + message = other698.message; + __isset = other698.__isset; return *this; } void InvalidPartitionException::printTo(std::ostream& out) const { @@ -15868,13 +16137,13 @@ void swap(UnknownPartitionException &a, UnknownPartitionException &b) { swap(a.__isset, b.__isset); } -UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other694) : TException() { - message = other694.message; - __isset = other694.__isset; +UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other699) : TException() { + message = other699.message; + __isset = other699.__isset; } -UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other695) { - message = other695.message; - __isset = other695.__isset; +UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other700) { + message = other700.message; + __isset = other700.__isset; return *this; } void UnknownPartitionException::printTo(std::ostream& out) const { @@ -15965,13 +16234,13 @@ void swap(InvalidObjectException &a, InvalidObjectException &b) { swap(a.__isset, b.__isset); } -InvalidObjectException::InvalidObjectException(const InvalidObjectException& other696) : TException() { - message = other696.message; - __isset = other696.__isset; +InvalidObjectException::InvalidObjectException(const InvalidObjectException& other701) : TException() { + message = other701.message; + __isset = other701.__isset; } -InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other697) { - message = other697.message; - __isset = other697.__isset; +InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other702) { + message = other702.message; + __isset = other702.__isset; return *this; } void InvalidObjectException::printTo(std::ostream& out) const { @@ -16062,13 +16331,13 @@ void swap(NoSuchObjectException &a, NoSuchObjectException &b) { swap(a.__isset, b.__isset); } -NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other698) : TException() { - message = other698.message; - __isset = other698.__isset; +NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other703) : TException() { + message = other703.message; + __isset = other703.__isset; } -NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other699) { - message = other699.message; - __isset = other699.__isset; +NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other704) { + message = other704.message; + __isset = other704.__isset; return *this; } void NoSuchObjectException::printTo(std::ostream& out) const { @@ -16159,13 +16428,13 @@ void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b) { swap(a.__isset, b.__isset); } -IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other700) : TException() { - message = other700.message; - __isset = other700.__isset; +IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other705) : TException() { + message = other705.message; + __isset = other705.__isset; } -IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other701) { - message = other701.message; - __isset = other701.__isset; +IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other706) { + message = other706.message; + __isset = other706.__isset; return *this; } void IndexAlreadyExistsException::printTo(std::ostream& out) const { @@ -16256,13 +16525,13 @@ void swap(InvalidOperationException &a, InvalidOperationException &b) { swap(a.__isset, b.__isset); } -InvalidOperationException::InvalidOperationException(const InvalidOperationException& other702) : TException() { - message = other702.message; - __isset = other702.__isset; +InvalidOperationException::InvalidOperationException(const InvalidOperationException& other707) : TException() { + message = other707.message; + __isset = other707.__isset; } -InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other703) { - message = other703.message; - __isset = other703.__isset; +InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other708) { + message = other708.message; + __isset = other708.__isset; return *this; } void InvalidOperationException::printTo(std::ostream& out) const { @@ -16353,13 +16622,13 @@ void swap(ConfigValSecurityException &a, ConfigValSecurityException &b) { swap(a.__isset, b.__isset); } -ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other704) : TException() { - message = other704.message; - __isset = other704.__isset; +ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other709) : TException() { + message = other709.message; + __isset = other709.__isset; } -ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other705) { - message = other705.message; - __isset = other705.__isset; +ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other710) { + message = other710.message; + __isset = other710.__isset; return *this; } void ConfigValSecurityException::printTo(std::ostream& out) const { @@ -16450,13 +16719,13 @@ void swap(InvalidInputException &a, InvalidInputException &b) { swap(a.__isset, b.__isset); } -InvalidInputException::InvalidInputException(const InvalidInputException& other706) : TException() { - message = other706.message; - __isset = other706.__isset; +InvalidInputException::InvalidInputException(const InvalidInputException& other711) : TException() { + message = other711.message; + __isset = other711.__isset; } -InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other707) { - message = other707.message; - __isset = other707.__isset; +InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other712) { + message = other712.message; + __isset = other712.__isset; return *this; } void InvalidInputException::printTo(std::ostream& out) const { @@ -16547,13 +16816,13 @@ void swap(NoSuchTxnException &a, NoSuchTxnException &b) { swap(a.__isset, b.__isset); } -NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other708) : TException() { - message = other708.message; - __isset = other708.__isset; +NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other713) : TException() { + message = other713.message; + __isset = other713.__isset; } -NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other709) { - message = other709.message; - __isset = other709.__isset; +NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other714) { + message = other714.message; + __isset = other714.__isset; return *this; } void NoSuchTxnException::printTo(std::ostream& out) const { @@ -16644,13 +16913,13 @@ void swap(TxnAbortedException &a, TxnAbortedException &b) { swap(a.__isset, b.__isset); } -TxnAbortedException::TxnAbortedException(const TxnAbortedException& other710) : TException() { - message = other710.message; - __isset = other710.__isset; +TxnAbortedException::TxnAbortedException(const TxnAbortedException& other715) : TException() { + message = other715.message; + __isset = other715.__isset; } -TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other711) { - message = other711.message; - __isset = other711.__isset; +TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other716) { + message = other716.message; + __isset = other716.__isset; return *this; } void TxnAbortedException::printTo(std::ostream& out) const { @@ -16741,13 +17010,13 @@ void swap(TxnOpenException &a, TxnOpenException &b) { swap(a.__isset, b.__isset); } -TxnOpenException::TxnOpenException(const TxnOpenException& other712) : TException() { - message = other712.message; - __isset = other712.__isset; +TxnOpenException::TxnOpenException(const TxnOpenException& other717) : TException() { + message = other717.message; + __isset = other717.__isset; } -TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other713) { - message = other713.message; - __isset = other713.__isset; +TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other718) { + message = other718.message; + __isset = other718.__isset; return *this; } void TxnOpenException::printTo(std::ostream& out) const { @@ -16838,13 +17107,13 @@ void swap(NoSuchLockException &a, NoSuchLockException &b) { swap(a.__isset, b.__isset); } -NoSuchLockException::NoSuchLockException(const NoSuchLockException& other714) : TException() { - message = other714.message; - __isset = other714.__isset; +NoSuchLockException::NoSuchLockException(const NoSuchLockException& other719) : TException() { + message = other719.message; + __isset = other719.__isset; } -NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other715) { - message = other715.message; - __isset = other715.__isset; +NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other720) { + message = other720.message; + __isset = other720.__isset; return *this; } void NoSuchLockException::printTo(std::ostream& out) const { http://git-wip-us.apache.org/repos/asf/hive/blob/7df62023/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h index 05c288c..97d3362 100644 --- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h +++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h @@ -347,6 +347,10 @@ class ClearFileMetadataResult; class ClearFileMetadataRequest; +class CacheFileMetadataResult; + +class CacheFileMetadataRequest; + class GetAllFunctionsResponse; class TableMeta; @@ -5992,29 +5996,42 @@ inline std::ostream& operator<<(std::ostream& out, const PutFileMetadataResult& return out; } +typedef struct _PutFileMetadataRequest__isset { + _PutFileMetadataRequest__isset() : type(false) {} + bool type :1; +} _PutFileMetadataRequest__isset; class PutFileMetadataRequest { public: PutFileMetadataRequest(const PutFileMetadataRequest&); PutFileMetadataRequest& operator=(const PutFileMetadataRequest&); - PutFileMetadataRequest() { + PutFileMetadataRequest() : type((FileMetadataExprType::type)0) { } virtual ~PutFileMetadataRequest() throw(); std::vector<int64_t> fileIds; std::vector<std::string> metadata; + FileMetadataExprType::type type; + + _PutFileMetadataRequest__isset __isset; void __set_fileIds(const std::vector<int64_t> & val); void __set_metadata(const std::vector<std::string> & val); + void __set_type(const FileMetadataExprType::type val); + bool operator == (const PutFileMetadataRequest & rhs) const { if (!(fileIds == rhs.fileIds)) return false; if (!(metadata == rhs.metadata)) return false; + if (__isset.type != rhs.__isset.type) + return false; + else if (__isset.type && !(type == rhs.type)) + return false; return true; } bool operator != (const PutFileMetadataRequest &rhs) const { @@ -6112,6 +6129,112 @@ inline std::ostream& operator<<(std::ostream& out, const ClearFileMetadataReques return out; } + +class CacheFileMetadataResult { + public: + + CacheFileMetadataResult(const CacheFileMetadataResult&); + CacheFileMetadataResult& operator=(const CacheFileMetadataResult&); + CacheFileMetadataResult() : isSupported(0) { + } + + virtual ~CacheFileMetadataResult() throw(); + bool isSupported; + + void __set_isSupported(const bool val); + + bool operator == (const CacheFileMetadataResult & rhs) const + { + if (!(isSupported == rhs.isSupported)) + return false; + return true; + } + bool operator != (const CacheFileMetadataResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CacheFileMetadataResult & ) 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(CacheFileMetadataResult &a, CacheFileMetadataResult &b); + +inline std::ostream& operator<<(std::ostream& out, const CacheFileMetadataResult& obj) +{ + obj.printTo(out); + return out; +} + +typedef struct _CacheFileMetadataRequest__isset { + _CacheFileMetadataRequest__isset() : partName(false), isAllParts(false) {} + bool partName :1; + bool isAllParts :1; +} _CacheFileMetadataRequest__isset; + +class CacheFileMetadataRequest { + public: + + CacheFileMetadataRequest(const CacheFileMetadataRequest&); + CacheFileMetadataRequest& operator=(const CacheFileMetadataRequest&); + CacheFileMetadataRequest() : dbName(), tblName(), partName(), isAllParts(0) { + } + + virtual ~CacheFileMetadataRequest() throw(); + std::string dbName; + std::string tblName; + std::string partName; + bool isAllParts; + + _CacheFileMetadataRequest__isset __isset; + + void __set_dbName(const std::string& val); + + void __set_tblName(const std::string& val); + + void __set_partName(const std::string& val); + + void __set_isAllParts(const bool val); + + bool operator == (const CacheFileMetadataRequest & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tblName == rhs.tblName)) + return false; + if (__isset.partName != rhs.__isset.partName) + return false; + else if (__isset.partName && !(partName == rhs.partName)) + return false; + if (__isset.isAllParts != rhs.__isset.isAllParts) + return false; + else if (__isset.isAllParts && !(isAllParts == rhs.isAllParts)) + return false; + return true; + } + bool operator != (const CacheFileMetadataRequest &rhs) const { + return !(*this == rhs); + } + + bool operator < (const CacheFileMetadataRequest & ) 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(CacheFileMetadataRequest &a, CacheFileMetadataRequest &b); + +inline std::ostream& operator<<(std::ostream& out, const CacheFileMetadataRequest& obj) +{ + obj.printTo(out); + return out; +} + typedef struct _GetAllFunctionsResponse__isset { _GetAllFunctionsResponse__isset() : functions(false) {} bool functions :1; http://git-wip-us.apache.org/repos/asf/hive/blob/7df62023/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataRequest.java ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataRequest.java new file mode 100644 index 0000000..6b8ab11 --- /dev/null +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataRequest.java @@ -0,0 +1,702 @@ +/** + * 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)") +public class CacheFileMetadataRequest implements org.apache.thrift.TBase<CacheFileMetadataRequest, CacheFileMetadataRequest._Fields>, java.io.Serializable, Cloneable, Comparable<CacheFileMetadataRequest> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CacheFileMetadataRequest"); + + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tblName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField PART_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("partName", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField IS_ALL_PARTS_FIELD_DESC = new org.apache.thrift.protocol.TField("isAllParts", org.apache.thrift.protocol.TType.BOOL, (short)4); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CacheFileMetadataRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CacheFileMetadataRequestTupleSchemeFactory()); + } + + private String dbName; // required + private String tblName; // required + private String partName; // optional + private boolean isAllParts; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + DB_NAME((short)1, "dbName"), + TBL_NAME((short)2, "tblName"), + PART_NAME((short)3, "partName"), + IS_ALL_PARTS((short)4, "isAllParts"); + + 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: // DB_NAME + return DB_NAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // PART_NAME + return PART_NAME; + case 4: // IS_ALL_PARTS + return IS_ALL_PARTS; + 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 __ISALLPARTS_ISSET_ID = 0; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.PART_NAME,_Fields.IS_ALL_PARTS}; + 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.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PART_NAME, new org.apache.thrift.meta_data.FieldMetaData("partName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_ALL_PARTS, new org.apache.thrift.meta_data.FieldMetaData("isAllParts", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CacheFileMetadataRequest.class, metaDataMap); + } + + public CacheFileMetadataRequest() { + } + + public CacheFileMetadataRequest( + String dbName, + String tblName) + { + this(); + this.dbName = dbName; + this.tblName = tblName; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public CacheFileMetadataRequest(CacheFileMetadataRequest other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTblName()) { + this.tblName = other.tblName; + } + if (other.isSetPartName()) { + this.partName = other.partName; + } + this.isAllParts = other.isAllParts; + } + + public CacheFileMetadataRequest deepCopy() { + return new CacheFileMetadataRequest(this); + } + + @Override + public void clear() { + this.dbName = null; + this.tblName = null; + this.partName = null; + setIsAllPartsIsSet(false); + this.isAllParts = false; + } + + public String getDbName() { + return this.dbName; + } + + public void setDbName(String dbName) { + this.dbName = dbName; + } + + public void unsetDbName() { + this.dbName = null; + } + + /** Returns true if field dbName is set (has been assigned a value) and false otherwise */ + public boolean isSetDbName() { + return this.dbName != null; + } + + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + + public String getTblName() { + return this.tblName; + } + + public void setTblName(String tblName) { + this.tblName = tblName; + } + + public void unsetTblName() { + this.tblName = null; + } + + /** Returns true if field tblName is set (has been assigned a value) and false otherwise */ + public boolean isSetTblName() { + return this.tblName != null; + } + + public void setTblNameIsSet(boolean value) { + if (!value) { + this.tblName = null; + } + } + + public String getPartName() { + return this.partName; + } + + public void setPartName(String partName) { + this.partName = partName; + } + + public void unsetPartName() { + this.partName = null; + } + + /** Returns true if field partName is set (has been assigned a value) and false otherwise */ + public boolean isSetPartName() { + return this.partName != null; + } + + public void setPartNameIsSet(boolean value) { + if (!value) { + this.partName = null; + } + } + + public boolean isIsAllParts() { + return this.isAllParts; + } + + public void setIsAllParts(boolean isAllParts) { + this.isAllParts = isAllParts; + setIsAllPartsIsSet(true); + } + + public void unsetIsAllParts() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISALLPARTS_ISSET_ID); + } + + /** Returns true if field isAllParts is set (has been assigned a value) and false otherwise */ + public boolean isSetIsAllParts() { + return EncodingUtils.testBit(__isset_bitfield, __ISALLPARTS_ISSET_ID); + } + + public void setIsAllPartsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISALLPARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTblName(); + } else { + setTblName((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPartName(); + } else { + setPartName((String)value); + } + break; + + case IS_ALL_PARTS: + if (value == null) { + unsetIsAllParts(); + } else { + setIsAllParts((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case DB_NAME: + return getDbName(); + + case TBL_NAME: + return getTblName(); + + case PART_NAME: + return getPartName(); + + case IS_ALL_PARTS: + return isIsAllParts(); + + } + 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 DB_NAME: + return isSetDbName(); + case TBL_NAME: + return isSetTblName(); + case PART_NAME: + return isSetPartName(); + case IS_ALL_PARTS: + return isSetIsAllParts(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CacheFileMetadataRequest) + return this.equals((CacheFileMetadataRequest)that); + return false; + } + + public boolean equals(CacheFileMetadataRequest that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tblName = true && this.isSetTblName(); + boolean that_present_tblName = true && that.isSetTblName(); + if (this_present_tblName || that_present_tblName) { + if (!(this_present_tblName && that_present_tblName)) + return false; + if (!this.tblName.equals(that.tblName)) + return false; + } + + boolean this_present_partName = true && this.isSetPartName(); + boolean that_present_partName = true && that.isSetPartName(); + if (this_present_partName || that_present_partName) { + if (!(this_present_partName && that_present_partName)) + return false; + if (!this.partName.equals(that.partName)) + return false; + } + + boolean this_present_isAllParts = true && this.isSetIsAllParts(); + boolean that_present_isAllParts = true && that.isSetIsAllParts(); + if (this_present_isAllParts || that_present_isAllParts) { + if (!(this_present_isAllParts && that_present_isAllParts)) + return false; + if (this.isAllParts != that.isAllParts) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + boolean present_tblName = true && (isSetTblName()); + list.add(present_tblName); + if (present_tblName) + list.add(tblName); + + boolean present_partName = true && (isSetPartName()); + list.add(present_partName); + if (present_partName) + list.add(partName); + + boolean present_isAllParts = true && (isSetIsAllParts()); + list.add(present_isAllParts); + if (present_isAllParts) + list.add(isAllParts); + + return list.hashCode(); + } + + @Override + public int compareTo(CacheFileMetadataRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTblName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartName()).compareTo(other.isSetPartName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partName, other.partName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsAllParts()).compareTo(other.isSetIsAllParts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsAllParts()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAllParts, other.isAllParts); + 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("CacheFileMetadataRequest("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tblName:"); + if (this.tblName == null) { + sb.append("null"); + } else { + sb.append(this.tblName); + } + first = false; + if (isSetPartName()) { + if (!first) sb.append(", "); + sb.append("partName:"); + if (this.partName == null) { + sb.append("null"); + } else { + sb.append(this.partName); + } + first = false; + } + if (isSetIsAllParts()) { + if (!first) sb.append(", "); + sb.append("isAllParts:"); + sb.append(this.isAllParts); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + if (!isSetTblName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'tblName' 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 CacheFileMetadataRequestStandardSchemeFactory implements SchemeFactory { + public CacheFileMetadataRequestStandardScheme getScheme() { + return new CacheFileMetadataRequestStandardScheme(); + } + } + + private static class CacheFileMetadataRequestStandardScheme extends StandardScheme<CacheFileMetadataRequest> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CacheFileMetadataRequest 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: // DB_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TBL_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // PART_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.partName = iprot.readString(); + struct.setPartNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // IS_ALL_PARTS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isAllParts = iprot.readBool(); + struct.setIsAllPartsIsSet(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, CacheFileMetadataRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + if (struct.tblName != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(struct.tblName); + oprot.writeFieldEnd(); + } + if (struct.partName != null) { + if (struct.isSetPartName()) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(struct.partName); + oprot.writeFieldEnd(); + } + } + if (struct.isSetIsAllParts()) { + oprot.writeFieldBegin(IS_ALL_PARTS_FIELD_DESC); + oprot.writeBool(struct.isAllParts); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CacheFileMetadataRequestTupleSchemeFactory implements SchemeFactory { + public CacheFileMetadataRequestTupleScheme getScheme() { + return new CacheFileMetadataRequestTupleScheme(); + } + } + + private static class CacheFileMetadataRequestTupleScheme extends TupleScheme<CacheFileMetadataRequest> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeString(struct.dbName); + oprot.writeString(struct.tblName); + BitSet optionals = new BitSet(); + if (struct.isSetPartName()) { + optionals.set(0); + } + if (struct.isSetIsAllParts()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetPartName()) { + oprot.writeString(struct.partName); + } + if (struct.isSetIsAllParts()) { + oprot.writeBool(struct.isAllParts); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + struct.tblName = iprot.readString(); + struct.setTblNameIsSet(true); + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.partName = iprot.readString(); + struct.setPartNameIsSet(true); + } + if (incoming.get(1)) { + struct.isAllParts = iprot.readBool(); + struct.setIsAllPartsIsSet(true); + } + } + } + +} http://git-wip-us.apache.org/repos/asf/hive/blob/7df62023/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataResult.java ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataResult.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataResult.java new file mode 100644 index 0000000..4336f96 --- /dev/null +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/CacheFileMetadataResult.java @@ -0,0 +1,386 @@ +/** + * 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)") +public class CacheFileMetadataResult implements org.apache.thrift.TBase<CacheFileMetadataResult, CacheFileMetadataResult._Fields>, java.io.Serializable, Cloneable, Comparable<CacheFileMetadataResult> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CacheFileMetadataResult"); + + private static final org.apache.thrift.protocol.TField IS_SUPPORTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isSupported", org.apache.thrift.protocol.TType.BOOL, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new CacheFileMetadataResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new CacheFileMetadataResultTupleSchemeFactory()); + } + + private boolean isSupported; // 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 { + IS_SUPPORTED((short)1, "isSupported"); + + 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: // IS_SUPPORTED + return IS_SUPPORTED; + 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 __ISSUPPORTED_ISSET_ID = 0; + private byte __isset_bitfield = 0; + 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.IS_SUPPORTED, new org.apache.thrift.meta_data.FieldMetaData("isSupported", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CacheFileMetadataResult.class, metaDataMap); + } + + public CacheFileMetadataResult() { + } + + public CacheFileMetadataResult( + boolean isSupported) + { + this(); + this.isSupported = isSupported; + setIsSupportedIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public CacheFileMetadataResult(CacheFileMetadataResult other) { + __isset_bitfield = other.__isset_bitfield; + this.isSupported = other.isSupported; + } + + public CacheFileMetadataResult deepCopy() { + return new CacheFileMetadataResult(this); + } + + @Override + public void clear() { + setIsSupportedIsSet(false); + this.isSupported = false; + } + + public boolean isIsSupported() { + return this.isSupported; + } + + public void setIsSupported(boolean isSupported) { + this.isSupported = isSupported; + setIsSupportedIsSet(true); + } + + public void unsetIsSupported() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); + } + + /** Returns true if field isSupported is set (has been assigned a value) and false otherwise */ + public boolean isSetIsSupported() { + return EncodingUtils.testBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID); + } + + public void setIsSupportedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISSUPPORTED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IS_SUPPORTED: + if (value == null) { + unsetIsSupported(); + } else { + setIsSupported((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IS_SUPPORTED: + return isIsSupported(); + + } + 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 IS_SUPPORTED: + return isSetIsSupported(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof CacheFileMetadataResult) + return this.equals((CacheFileMetadataResult)that); + return false; + } + + public boolean equals(CacheFileMetadataResult that) { + if (that == null) + return false; + + boolean this_present_isSupported = true; + boolean that_present_isSupported = true; + if (this_present_isSupported || that_present_isSupported) { + if (!(this_present_isSupported && that_present_isSupported)) + return false; + if (this.isSupported != that.isSupported) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_isSupported = true; + list.add(present_isSupported); + if (present_isSupported) + list.add(isSupported); + + return list.hashCode(); + } + + @Override + public int compareTo(CacheFileMetadataResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetIsSupported()).compareTo(other.isSetIsSupported()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsSupported()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isSupported, other.isSupported); + 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("CacheFileMetadataResult("); + boolean first = true; + + sb.append("isSupported:"); + sb.append(this.isSupported); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetIsSupported()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'isSupported' 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 CacheFileMetadataResultStandardSchemeFactory implements SchemeFactory { + public CacheFileMetadataResultStandardScheme getScheme() { + return new CacheFileMetadataResultStandardScheme(); + } + } + + private static class CacheFileMetadataResultStandardScheme extends StandardScheme<CacheFileMetadataResult> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, CacheFileMetadataResult 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: // IS_SUPPORTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isSupported = iprot.readBool(); + struct.setIsSupportedIsSet(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, CacheFileMetadataResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(IS_SUPPORTED_FIELD_DESC); + oprot.writeBool(struct.isSupported); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class CacheFileMetadataResultTupleSchemeFactory implements SchemeFactory { + public CacheFileMetadataResultTupleScheme getScheme() { + return new CacheFileMetadataResultTupleScheme(); + } + } + + private static class CacheFileMetadataResultTupleScheme extends TupleScheme<CacheFileMetadataResult> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeBool(struct.isSupported); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, CacheFileMetadataResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.isSupported = iprot.readBool(); + struct.setIsSupportedIsSet(true); + } + } + +} http://git-wip-us.apache.org/repos/asf/hive/blob/7df62023/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java index 4e393e2..8ffaa89 100644 --- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FileMetadataExprType.java @@ -7,10 +7,6 @@ package org.apache.hadoop.hive.metastore.api; -import java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - public enum FileMetadataExprType implements org.apache.thrift.TEnum { ORC_SARG(1);