You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ai...@apache.org on 2015/11/10 21:38:40 UTC
[5/7] hive git commit: HIVE-7575 GetTables thrift call is very slow
(Navis via Aihua Xu, reviewed by Szehon Ho, Aihua Xu)
http://git-wip-us.apache.org/repos/asf/hive/blob/b678ed85/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 3d7cb18..cea9000 100644
--- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
+++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
@@ -43,6 +43,7 @@ class ThriftHiveMetastoreIf : virtual public ::facebook::fb303::FacebookService
virtual void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) = 0;
virtual void drop_table_with_environment_context(const std::string& dbname, const std::string& name, const bool deleteData, const EnvironmentContext& environment_context) = 0;
virtual void get_tables(std::vector<std::string> & _return, const std::string& db_name, const std::string& pattern) = 0;
+ virtual void get_table_meta(std::vector<TableMeta> & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector<std::string> & tbl_types) = 0;
virtual void get_all_tables(std::vector<std::string> & _return, const std::string& db_name) = 0;
virtual void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) = 0;
virtual void get_table_objects_by_name(std::vector<Table> & _return, const std::string& dbname, const std::vector<std::string> & tbl_names) = 0;
@@ -246,6 +247,9 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p
void get_tables(std::vector<std::string> & /* _return */, const std::string& /* db_name */, const std::string& /* pattern */) {
return;
}
+ void get_table_meta(std::vector<TableMeta> & /* _return */, const std::string& /* db_patterns */, const std::string& /* tbl_patterns */, const std::vector<std::string> & /* tbl_types */) {
+ return;
+ }
void get_all_tables(std::vector<std::string> & /* _return */, const std::string& /* db_name */) {
return;
}
@@ -3199,6 +3203,132 @@ class ThriftHiveMetastore_get_tables_presult {
};
+typedef struct _ThriftHiveMetastore_get_table_meta_args__isset {
+ _ThriftHiveMetastore_get_table_meta_args__isset() : db_patterns(false), tbl_patterns(false), tbl_types(false) {}
+ bool db_patterns :1;
+ bool tbl_patterns :1;
+ bool tbl_types :1;
+} _ThriftHiveMetastore_get_table_meta_args__isset;
+
+class ThriftHiveMetastore_get_table_meta_args {
+ public:
+
+ ThriftHiveMetastore_get_table_meta_args(const ThriftHiveMetastore_get_table_meta_args&);
+ ThriftHiveMetastore_get_table_meta_args& operator=(const ThriftHiveMetastore_get_table_meta_args&);
+ ThriftHiveMetastore_get_table_meta_args() : db_patterns(), tbl_patterns() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_table_meta_args() throw();
+ std::string db_patterns;
+ std::string tbl_patterns;
+ std::vector<std::string> tbl_types;
+
+ _ThriftHiveMetastore_get_table_meta_args__isset __isset;
+
+ void __set_db_patterns(const std::string& val);
+
+ void __set_tbl_patterns(const std::string& val);
+
+ void __set_tbl_types(const std::vector<std::string> & val);
+
+ bool operator == (const ThriftHiveMetastore_get_table_meta_args & rhs) const
+ {
+ if (!(db_patterns == rhs.db_patterns))
+ return false;
+ if (!(tbl_patterns == rhs.tbl_patterns))
+ return false;
+ if (!(tbl_types == rhs.tbl_types))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_table_meta_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_table_meta_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_get_table_meta_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_table_meta_pargs() throw();
+ const std::string* db_patterns;
+ const std::string* tbl_patterns;
+ const std::vector<std::string> * tbl_types;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_table_meta_result__isset {
+ _ThriftHiveMetastore_get_table_meta_result__isset() : success(false), o1(false) {}
+ bool success :1;
+ bool o1 :1;
+} _ThriftHiveMetastore_get_table_meta_result__isset;
+
+class ThriftHiveMetastore_get_table_meta_result {
+ public:
+
+ ThriftHiveMetastore_get_table_meta_result(const ThriftHiveMetastore_get_table_meta_result&);
+ ThriftHiveMetastore_get_table_meta_result& operator=(const ThriftHiveMetastore_get_table_meta_result&);
+ ThriftHiveMetastore_get_table_meta_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_table_meta_result() throw();
+ std::vector<TableMeta> success;
+ MetaException o1;
+
+ _ThriftHiveMetastore_get_table_meta_result__isset __isset;
+
+ void __set_success(const std::vector<TableMeta> & val);
+
+ void __set_o1(const MetaException& val);
+
+ bool operator == (const ThriftHiveMetastore_get_table_meta_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_table_meta_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_table_meta_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_table_meta_presult__isset {
+ _ThriftHiveMetastore_get_table_meta_presult__isset() : success(false), o1(false) {}
+ bool success :1;
+ bool o1 :1;
+} _ThriftHiveMetastore_get_table_meta_presult__isset;
+
+class ThriftHiveMetastore_get_table_meta_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_table_meta_presult() throw();
+ std::vector<TableMeta> * success;
+ MetaException o1;
+
+ _ThriftHiveMetastore_get_table_meta_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
typedef struct _ThriftHiveMetastore_get_all_tables_args__isset {
_ThriftHiveMetastore_get_all_tables_args__isset() : db_name(false) {}
bool db_name :1;
@@ -16967,6 +17097,9 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public
void get_tables(std::vector<std::string> & _return, const std::string& db_name, const std::string& pattern);
void send_get_tables(const std::string& db_name, const std::string& pattern);
void recv_get_tables(std::vector<std::string> & _return);
+ void get_table_meta(std::vector<TableMeta> & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector<std::string> & tbl_types);
+ void send_get_table_meta(const std::string& db_patterns, const std::string& tbl_patterns, const std::vector<std::string> & tbl_types);
+ void recv_get_table_meta(std::vector<TableMeta> & _return);
void get_all_tables(std::vector<std::string> & _return, const std::string& db_name);
void send_get_all_tables(const std::string& db_name);
void recv_get_all_tables(std::vector<std::string> & _return);
@@ -17325,6 +17458,7 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP
void process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_drop_table_with_environment_context(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_get_table_meta(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_get_table_objects_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -17459,6 +17593,7 @@ class ThriftHiveMetastoreProcessor : public ::facebook::fb303::FacebookServiceP
processMap_["drop_table"] = &ThriftHiveMetastoreProcessor::process_drop_table;
processMap_["drop_table_with_environment_context"] = &ThriftHiveMetastoreProcessor::process_drop_table_with_environment_context;
processMap_["get_tables"] = &ThriftHiveMetastoreProcessor::process_get_tables;
+ processMap_["get_table_meta"] = &ThriftHiveMetastoreProcessor::process_get_table_meta;
processMap_["get_all_tables"] = &ThriftHiveMetastoreProcessor::process_get_all_tables;
processMap_["get_table"] = &ThriftHiveMetastoreProcessor::process_get_table;
processMap_["get_table_objects_by_name"] = &ThriftHiveMetastoreProcessor::process_get_table_objects_by_name;
@@ -17801,6 +17936,16 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi
return;
}
+ void get_table_meta(std::vector<TableMeta> & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector<std::string> & tbl_types) {
+ size_t sz = ifaces_.size();
+ size_t i = 0;
+ for (; i < (sz - 1); ++i) {
+ ifaces_[i]->get_table_meta(_return, db_patterns, tbl_patterns, tbl_types);
+ }
+ ifaces_[i]->get_table_meta(_return, db_patterns, tbl_patterns, tbl_types);
+ return;
+ }
+
void get_all_tables(std::vector<std::string> & _return, const std::string& db_name) {
size_t sz = ifaces_.size();
size_t i = 0;
@@ -18929,6 +19074,9 @@ class ThriftHiveMetastoreConcurrentClient : virtual public ThriftHiveMetastoreIf
void get_tables(std::vector<std::string> & _return, const std::string& db_name, const std::string& pattern);
int32_t send_get_tables(const std::string& db_name, const std::string& pattern);
void recv_get_tables(std::vector<std::string> & _return, const int32_t seqid);
+ void get_table_meta(std::vector<TableMeta> & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector<std::string> & tbl_types);
+ int32_t send_get_table_meta(const std::string& db_patterns, const std::string& tbl_patterns, const std::vector<std::string> & tbl_types);
+ void recv_get_table_meta(std::vector<TableMeta> & _return, const int32_t seqid);
void get_all_tables(std::vector<std::string> & _return, const std::string& db_name);
int32_t send_get_all_tables(const std::string& db_name);
void recv_get_all_tables(std::vector<std::string> & _return, const int32_t seqid);
http://git-wip-us.apache.org/repos/asf/hive/blob/b678ed85/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 a395729..c0d9401 100644
--- a/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
+++ b/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
@@ -127,6 +127,11 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf {
printf("get_tables\n");
}
+ void get_table_meta(std::vector<TableMeta> & _return, const std::string& db_patterns, const std::string& tbl_patterns, const std::vector<std::string> & tbl_types) {
+ // Your implementation goes here
+ printf("get_table_meta\n");
+ }
+
void get_all_tables(std::vector<std::string> & _return, const std::string& db_name) {
// Your implementation goes here
printf("get_all_tables\n");
http://git-wip-us.apache.org/repos/asf/hive/blob/b678ed85/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 5fd4a90..ee28d0d 100644
--- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
+++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
@@ -15157,6 +15157,163 @@ void GetAllFunctionsResponse::printTo(std::ostream& out) const {
}
+TableMeta::~TableMeta() throw() {
+}
+
+
+void TableMeta::__set_dbName(const std::string& val) {
+ this->dbName = val;
+}
+
+void TableMeta::__set_tableName(const std::string& val) {
+ this->tableName = val;
+}
+
+void TableMeta::__set_tableType(const std::string& val) {
+ this->tableType = val;
+}
+
+void TableMeta::__set_comments(const std::string& val) {
+ this->comments = val;
+__isset.comments = true;
+}
+
+uint32_t TableMeta::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_tableName = false;
+ bool isset_tableType = 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->tableName);
+ isset_tableName = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->tableType);
+ isset_tableType = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->comments);
+ this->__isset.comments = 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_tableName)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ if (!isset_tableType)
+ throw TProtocolException(TProtocolException::INVALID_DATA);
+ return xfer;
+}
+
+uint32_t TableMeta::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+ xfer += oprot->writeStructBegin("TableMeta");
+
+ xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->dbName);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->tableName);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->tableType);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.comments) {
+ xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 4);
+ xfer += oprot->writeString(this->comments);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(TableMeta &a, TableMeta &b) {
+ using ::std::swap;
+ swap(a.dbName, b.dbName);
+ swap(a.tableName, b.tableName);
+ swap(a.tableType, b.tableType);
+ swap(a.comments, b.comments);
+ 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::operator=(const TableMeta& other683) {
+ dbName = other683.dbName;
+ tableName = other683.tableName;
+ tableType = other683.tableType;
+ comments = other683.comments;
+ __isset = other683.__isset;
+ return *this;
+}
+void TableMeta::printTo(std::ostream& out) const {
+ using ::apache::thrift::to_string;
+ out << "TableMeta(";
+ out << "dbName=" << to_string(dbName);
+ out << ", " << "tableName=" << to_string(tableName);
+ out << ", " << "tableType=" << to_string(tableType);
+ out << ", " << "comments="; (__isset.comments ? (out << to_string(comments)) : (out << "<null>"));
+ out << ")";
+}
+
+
MetaException::~MetaException() throw() {
}
@@ -15226,13 +15383,13 @@ void swap(MetaException &a, MetaException &b) {
swap(a.__isset, b.__isset);
}
-MetaException::MetaException(const MetaException& other682) : TException() {
- message = other682.message;
- __isset = other682.__isset;
+MetaException::MetaException(const MetaException& other684) : TException() {
+ message = other684.message;
+ __isset = other684.__isset;
}
-MetaException& MetaException::operator=(const MetaException& other683) {
- message = other683.message;
- __isset = other683.__isset;
+MetaException& MetaException::operator=(const MetaException& other685) {
+ message = other685.message;
+ __isset = other685.__isset;
return *this;
}
void MetaException::printTo(std::ostream& out) const {
@@ -15323,13 +15480,13 @@ void swap(UnknownTableException &a, UnknownTableException &b) {
swap(a.__isset, b.__isset);
}
-UnknownTableException::UnknownTableException(const UnknownTableException& other684) : TException() {
- message = other684.message;
- __isset = other684.__isset;
+UnknownTableException::UnknownTableException(const UnknownTableException& other686) : TException() {
+ message = other686.message;
+ __isset = other686.__isset;
}
-UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other685) {
- message = other685.message;
- __isset = other685.__isset;
+UnknownTableException& UnknownTableException::operator=(const UnknownTableException& other687) {
+ message = other687.message;
+ __isset = other687.__isset;
return *this;
}
void UnknownTableException::printTo(std::ostream& out) const {
@@ -15420,13 +15577,13 @@ void swap(UnknownDBException &a, UnknownDBException &b) {
swap(a.__isset, b.__isset);
}
-UnknownDBException::UnknownDBException(const UnknownDBException& other686) : TException() {
- message = other686.message;
- __isset = other686.__isset;
+UnknownDBException::UnknownDBException(const UnknownDBException& other688) : TException() {
+ message = other688.message;
+ __isset = other688.__isset;
}
-UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other687) {
- message = other687.message;
- __isset = other687.__isset;
+UnknownDBException& UnknownDBException::operator=(const UnknownDBException& other689) {
+ message = other689.message;
+ __isset = other689.__isset;
return *this;
}
void UnknownDBException::printTo(std::ostream& out) const {
@@ -15517,13 +15674,13 @@ void swap(AlreadyExistsException &a, AlreadyExistsException &b) {
swap(a.__isset, b.__isset);
}
-AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other688) : TException() {
- message = other688.message;
- __isset = other688.__isset;
+AlreadyExistsException::AlreadyExistsException(const AlreadyExistsException& other690) : TException() {
+ message = other690.message;
+ __isset = other690.__isset;
}
-AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other689) {
- message = other689.message;
- __isset = other689.__isset;
+AlreadyExistsException& AlreadyExistsException::operator=(const AlreadyExistsException& other691) {
+ message = other691.message;
+ __isset = other691.__isset;
return *this;
}
void AlreadyExistsException::printTo(std::ostream& out) const {
@@ -15614,13 +15771,13 @@ void swap(InvalidPartitionException &a, InvalidPartitionException &b) {
swap(a.__isset, b.__isset);
}
-InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other690) : TException() {
- message = other690.message;
- __isset = other690.__isset;
+InvalidPartitionException::InvalidPartitionException(const InvalidPartitionException& other692) : TException() {
+ message = other692.message;
+ __isset = other692.__isset;
}
-InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other691) {
- message = other691.message;
- __isset = other691.__isset;
+InvalidPartitionException& InvalidPartitionException::operator=(const InvalidPartitionException& other693) {
+ message = other693.message;
+ __isset = other693.__isset;
return *this;
}
void InvalidPartitionException::printTo(std::ostream& out) const {
@@ -15711,13 +15868,13 @@ void swap(UnknownPartitionException &a, UnknownPartitionException &b) {
swap(a.__isset, b.__isset);
}
-UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other692) : TException() {
- message = other692.message;
- __isset = other692.__isset;
+UnknownPartitionException::UnknownPartitionException(const UnknownPartitionException& other694) : TException() {
+ message = other694.message;
+ __isset = other694.__isset;
}
-UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other693) {
- message = other693.message;
- __isset = other693.__isset;
+UnknownPartitionException& UnknownPartitionException::operator=(const UnknownPartitionException& other695) {
+ message = other695.message;
+ __isset = other695.__isset;
return *this;
}
void UnknownPartitionException::printTo(std::ostream& out) const {
@@ -15808,13 +15965,13 @@ void swap(InvalidObjectException &a, InvalidObjectException &b) {
swap(a.__isset, b.__isset);
}
-InvalidObjectException::InvalidObjectException(const InvalidObjectException& other694) : TException() {
- message = other694.message;
- __isset = other694.__isset;
+InvalidObjectException::InvalidObjectException(const InvalidObjectException& other696) : TException() {
+ message = other696.message;
+ __isset = other696.__isset;
}
-InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other695) {
- message = other695.message;
- __isset = other695.__isset;
+InvalidObjectException& InvalidObjectException::operator=(const InvalidObjectException& other697) {
+ message = other697.message;
+ __isset = other697.__isset;
return *this;
}
void InvalidObjectException::printTo(std::ostream& out) const {
@@ -15905,13 +16062,13 @@ void swap(NoSuchObjectException &a, NoSuchObjectException &b) {
swap(a.__isset, b.__isset);
}
-NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other696) : TException() {
- message = other696.message;
- __isset = other696.__isset;
+NoSuchObjectException::NoSuchObjectException(const NoSuchObjectException& other698) : TException() {
+ message = other698.message;
+ __isset = other698.__isset;
}
-NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other697) {
- message = other697.message;
- __isset = other697.__isset;
+NoSuchObjectException& NoSuchObjectException::operator=(const NoSuchObjectException& other699) {
+ message = other699.message;
+ __isset = other699.__isset;
return *this;
}
void NoSuchObjectException::printTo(std::ostream& out) const {
@@ -16002,13 +16159,13 @@ void swap(IndexAlreadyExistsException &a, IndexAlreadyExistsException &b) {
swap(a.__isset, b.__isset);
}
-IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other698) : TException() {
- message = other698.message;
- __isset = other698.__isset;
+IndexAlreadyExistsException::IndexAlreadyExistsException(const IndexAlreadyExistsException& other700) : TException() {
+ message = other700.message;
+ __isset = other700.__isset;
}
-IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other699) {
- message = other699.message;
- __isset = other699.__isset;
+IndexAlreadyExistsException& IndexAlreadyExistsException::operator=(const IndexAlreadyExistsException& other701) {
+ message = other701.message;
+ __isset = other701.__isset;
return *this;
}
void IndexAlreadyExistsException::printTo(std::ostream& out) const {
@@ -16099,13 +16256,13 @@ void swap(InvalidOperationException &a, InvalidOperationException &b) {
swap(a.__isset, b.__isset);
}
-InvalidOperationException::InvalidOperationException(const InvalidOperationException& other700) : TException() {
- message = other700.message;
- __isset = other700.__isset;
+InvalidOperationException::InvalidOperationException(const InvalidOperationException& other702) : TException() {
+ message = other702.message;
+ __isset = other702.__isset;
}
-InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other701) {
- message = other701.message;
- __isset = other701.__isset;
+InvalidOperationException& InvalidOperationException::operator=(const InvalidOperationException& other703) {
+ message = other703.message;
+ __isset = other703.__isset;
return *this;
}
void InvalidOperationException::printTo(std::ostream& out) const {
@@ -16196,13 +16353,13 @@ void swap(ConfigValSecurityException &a, ConfigValSecurityException &b) {
swap(a.__isset, b.__isset);
}
-ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other702) : TException() {
- message = other702.message;
- __isset = other702.__isset;
+ConfigValSecurityException::ConfigValSecurityException(const ConfigValSecurityException& other704) : TException() {
+ message = other704.message;
+ __isset = other704.__isset;
}
-ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other703) {
- message = other703.message;
- __isset = other703.__isset;
+ConfigValSecurityException& ConfigValSecurityException::operator=(const ConfigValSecurityException& other705) {
+ message = other705.message;
+ __isset = other705.__isset;
return *this;
}
void ConfigValSecurityException::printTo(std::ostream& out) const {
@@ -16293,13 +16450,13 @@ void swap(InvalidInputException &a, InvalidInputException &b) {
swap(a.__isset, b.__isset);
}
-InvalidInputException::InvalidInputException(const InvalidInputException& other704) : TException() {
- message = other704.message;
- __isset = other704.__isset;
+InvalidInputException::InvalidInputException(const InvalidInputException& other706) : TException() {
+ message = other706.message;
+ __isset = other706.__isset;
}
-InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other705) {
- message = other705.message;
- __isset = other705.__isset;
+InvalidInputException& InvalidInputException::operator=(const InvalidInputException& other707) {
+ message = other707.message;
+ __isset = other707.__isset;
return *this;
}
void InvalidInputException::printTo(std::ostream& out) const {
@@ -16390,13 +16547,13 @@ void swap(NoSuchTxnException &a, NoSuchTxnException &b) {
swap(a.__isset, b.__isset);
}
-NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other706) : TException() {
- message = other706.message;
- __isset = other706.__isset;
+NoSuchTxnException::NoSuchTxnException(const NoSuchTxnException& other708) : TException() {
+ message = other708.message;
+ __isset = other708.__isset;
}
-NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other707) {
- message = other707.message;
- __isset = other707.__isset;
+NoSuchTxnException& NoSuchTxnException::operator=(const NoSuchTxnException& other709) {
+ message = other709.message;
+ __isset = other709.__isset;
return *this;
}
void NoSuchTxnException::printTo(std::ostream& out) const {
@@ -16487,13 +16644,13 @@ void swap(TxnAbortedException &a, TxnAbortedException &b) {
swap(a.__isset, b.__isset);
}
-TxnAbortedException::TxnAbortedException(const TxnAbortedException& other708) : TException() {
- message = other708.message;
- __isset = other708.__isset;
+TxnAbortedException::TxnAbortedException(const TxnAbortedException& other710) : TException() {
+ message = other710.message;
+ __isset = other710.__isset;
}
-TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other709) {
- message = other709.message;
- __isset = other709.__isset;
+TxnAbortedException& TxnAbortedException::operator=(const TxnAbortedException& other711) {
+ message = other711.message;
+ __isset = other711.__isset;
return *this;
}
void TxnAbortedException::printTo(std::ostream& out) const {
@@ -16584,13 +16741,13 @@ void swap(TxnOpenException &a, TxnOpenException &b) {
swap(a.__isset, b.__isset);
}
-TxnOpenException::TxnOpenException(const TxnOpenException& other710) : TException() {
- message = other710.message;
- __isset = other710.__isset;
+TxnOpenException::TxnOpenException(const TxnOpenException& other712) : TException() {
+ message = other712.message;
+ __isset = other712.__isset;
}
-TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other711) {
- message = other711.message;
- __isset = other711.__isset;
+TxnOpenException& TxnOpenException::operator=(const TxnOpenException& other713) {
+ message = other713.message;
+ __isset = other713.__isset;
return *this;
}
void TxnOpenException::printTo(std::ostream& out) const {
@@ -16681,13 +16838,13 @@ void swap(NoSuchLockException &a, NoSuchLockException &b) {
swap(a.__isset, b.__isset);
}
-NoSuchLockException::NoSuchLockException(const NoSuchLockException& other712) : TException() {
- message = other712.message;
- __isset = other712.__isset;
+NoSuchLockException::NoSuchLockException(const NoSuchLockException& other714) : TException() {
+ message = other714.message;
+ __isset = other714.__isset;
}
-NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other713) {
- message = other713.message;
- __isset = other713.__isset;
+NoSuchLockException& NoSuchLockException::operator=(const NoSuchLockException& other715) {
+ message = other715.message;
+ __isset = other715.__isset;
return *this;
}
void NoSuchLockException::printTo(std::ostream& out) const {
http://git-wip-us.apache.org/repos/asf/hive/blob/b678ed85/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 53ab272..05c288c 100644
--- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
+++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
@@ -349,6 +349,8 @@ class ClearFileMetadataRequest;
class GetAllFunctionsResponse;
+class TableMeta;
+
class MetaException;
class UnknownTableException;
@@ -6158,6 +6160,69 @@ inline std::ostream& operator<<(std::ostream& out, const GetAllFunctionsResponse
return out;
}
+typedef struct _TableMeta__isset {
+ _TableMeta__isset() : comments(false) {}
+ bool comments :1;
+} _TableMeta__isset;
+
+class TableMeta {
+ public:
+
+ TableMeta(const TableMeta&);
+ TableMeta& operator=(const TableMeta&);
+ TableMeta() : dbName(), tableName(), tableType(), comments() {
+ }
+
+ virtual ~TableMeta() throw();
+ std::string dbName;
+ std::string tableName;
+ std::string tableType;
+ std::string comments;
+
+ _TableMeta__isset __isset;
+
+ void __set_dbName(const std::string& val);
+
+ void __set_tableName(const std::string& val);
+
+ void __set_tableType(const std::string& val);
+
+ void __set_comments(const std::string& val);
+
+ bool operator == (const TableMeta & rhs) const
+ {
+ if (!(dbName == rhs.dbName))
+ return false;
+ if (!(tableName == rhs.tableName))
+ return false;
+ if (!(tableType == rhs.tableType))
+ return false;
+ if (__isset.comments != rhs.__isset.comments)
+ return false;
+ else if (__isset.comments && !(comments == rhs.comments))
+ return false;
+ return true;
+ }
+ bool operator != (const TableMeta &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const TableMeta & ) 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(TableMeta &a, TableMeta &b);
+
+inline std::ostream& operator<<(std::ostream& out, const TableMeta& 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/b678ed85/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableMeta.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableMeta.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableMeta.java
new file mode 100644
index 0000000..08a8e36
--- /dev/null
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/TableMeta.java
@@ -0,0 +1,701 @@
+/**
+ * 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 TableMeta implements org.apache.thrift.TBase<TableMeta, TableMeta._Fields>, java.io.Serializable, Cloneable, Comparable<TableMeta> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TableMeta");
+
+ 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 TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField TABLE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("tableType", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField COMMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("comments", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TableMetaStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TableMetaTupleSchemeFactory());
+ }
+
+ private String dbName; // required
+ private String tableName; // required
+ private String tableType; // required
+ private String comments; // 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"),
+ TABLE_NAME((short)2, "tableName"),
+ TABLE_TYPE((short)3, "tableType"),
+ COMMENTS((short)4, "comments");
+
+ 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: // TABLE_NAME
+ return TABLE_NAME;
+ case 3: // TABLE_TYPE
+ return TABLE_TYPE;
+ case 4: // COMMENTS
+ return COMMENTS;
+ 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 _Fields optionals[] = {_Fields.COMMENTS};
+ 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.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TABLE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("tableType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.COMMENTS, new org.apache.thrift.meta_data.FieldMetaData("comments", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TableMeta.class, metaDataMap);
+ }
+
+ public TableMeta() {
+ }
+
+ public TableMeta(
+ String dbName,
+ String tableName,
+ String tableType)
+ {
+ this();
+ this.dbName = dbName;
+ this.tableName = tableName;
+ this.tableType = tableType;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TableMeta(TableMeta other) {
+ if (other.isSetDbName()) {
+ this.dbName = other.dbName;
+ }
+ if (other.isSetTableName()) {
+ this.tableName = other.tableName;
+ }
+ if (other.isSetTableType()) {
+ this.tableType = other.tableType;
+ }
+ if (other.isSetComments()) {
+ this.comments = other.comments;
+ }
+ }
+
+ public TableMeta deepCopy() {
+ return new TableMeta(this);
+ }
+
+ @Override
+ public void clear() {
+ this.dbName = null;
+ this.tableName = null;
+ this.tableType = null;
+ this.comments = null;
+ }
+
+ 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 getTableName() {
+ return this.tableName;
+ }
+
+ public void setTableName(String tableName) {
+ this.tableName = tableName;
+ }
+
+ public void unsetTableName() {
+ this.tableName = null;
+ }
+
+ /** Returns true if field tableName is set (has been assigned a value) and false otherwise */
+ public boolean isSetTableName() {
+ return this.tableName != null;
+ }
+
+ public void setTableNameIsSet(boolean value) {
+ if (!value) {
+ this.tableName = null;
+ }
+ }
+
+ public String getTableType() {
+ return this.tableType;
+ }
+
+ public void setTableType(String tableType) {
+ this.tableType = tableType;
+ }
+
+ public void unsetTableType() {
+ this.tableType = null;
+ }
+
+ /** Returns true if field tableType is set (has been assigned a value) and false otherwise */
+ public boolean isSetTableType() {
+ return this.tableType != null;
+ }
+
+ public void setTableTypeIsSet(boolean value) {
+ if (!value) {
+ this.tableType = null;
+ }
+ }
+
+ public String getComments() {
+ return this.comments;
+ }
+
+ public void setComments(String comments) {
+ this.comments = comments;
+ }
+
+ public void unsetComments() {
+ this.comments = null;
+ }
+
+ /** Returns true if field comments is set (has been assigned a value) and false otherwise */
+ public boolean isSetComments() {
+ return this.comments != null;
+ }
+
+ public void setCommentsIsSet(boolean value) {
+ if (!value) {
+ this.comments = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case DB_NAME:
+ if (value == null) {
+ unsetDbName();
+ } else {
+ setDbName((String)value);
+ }
+ break;
+
+ case TABLE_NAME:
+ if (value == null) {
+ unsetTableName();
+ } else {
+ setTableName((String)value);
+ }
+ break;
+
+ case TABLE_TYPE:
+ if (value == null) {
+ unsetTableType();
+ } else {
+ setTableType((String)value);
+ }
+ break;
+
+ case COMMENTS:
+ if (value == null) {
+ unsetComments();
+ } else {
+ setComments((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case DB_NAME:
+ return getDbName();
+
+ case TABLE_NAME:
+ return getTableName();
+
+ case TABLE_TYPE:
+ return getTableType();
+
+ case COMMENTS:
+ return getComments();
+
+ }
+ 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 TABLE_NAME:
+ return isSetTableName();
+ case TABLE_TYPE:
+ return isSetTableType();
+ case COMMENTS:
+ return isSetComments();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TableMeta)
+ return this.equals((TableMeta)that);
+ return false;
+ }
+
+ public boolean equals(TableMeta 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_tableName = true && this.isSetTableName();
+ boolean that_present_tableName = true && that.isSetTableName();
+ if (this_present_tableName || that_present_tableName) {
+ if (!(this_present_tableName && that_present_tableName))
+ return false;
+ if (!this.tableName.equals(that.tableName))
+ return false;
+ }
+
+ boolean this_present_tableType = true && this.isSetTableType();
+ boolean that_present_tableType = true && that.isSetTableType();
+ if (this_present_tableType || that_present_tableType) {
+ if (!(this_present_tableType && that_present_tableType))
+ return false;
+ if (!this.tableType.equals(that.tableType))
+ return false;
+ }
+
+ boolean this_present_comments = true && this.isSetComments();
+ boolean that_present_comments = true && that.isSetComments();
+ if (this_present_comments || that_present_comments) {
+ if (!(this_present_comments && that_present_comments))
+ return false;
+ if (!this.comments.equals(that.comments))
+ 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_tableName = true && (isSetTableName());
+ list.add(present_tableName);
+ if (present_tableName)
+ list.add(tableName);
+
+ boolean present_tableType = true && (isSetTableType());
+ list.add(present_tableType);
+ if (present_tableType)
+ list.add(tableType);
+
+ boolean present_comments = true && (isSetComments());
+ list.add(present_comments);
+ if (present_comments)
+ list.add(comments);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(TableMeta 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(isSetTableName()).compareTo(other.isSetTableName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTableName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTableType()).compareTo(other.isSetTableType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTableType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableType, other.tableType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComments()).compareTo(other.isSetComments());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComments()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comments, other.comments);
+ 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("TableMeta(");
+ 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("tableName:");
+ if (this.tableName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tableName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("tableType:");
+ if (this.tableType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tableType);
+ }
+ first = false;
+ if (isSetComments()) {
+ if (!first) sb.append(", ");
+ sb.append("comments:");
+ if (this.comments == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.comments);
+ }
+ 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 (!isSetTableName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' is unset! Struct:" + toString());
+ }
+
+ if (!isSetTableType()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableType' 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 {
+ 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 TableMetaStandardSchemeFactory implements SchemeFactory {
+ public TableMetaStandardScheme getScheme() {
+ return new TableMetaStandardScheme();
+ }
+ }
+
+ private static class TableMetaStandardScheme extends StandardScheme<TableMeta> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TableMeta 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: // TABLE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tableName = iprot.readString();
+ struct.setTableNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TABLE_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tableType = iprot.readString();
+ struct.setTableTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // COMMENTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.comments = iprot.readString();
+ struct.setCommentsIsSet(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, TableMeta 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.tableName != null) {
+ oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+ oprot.writeString(struct.tableName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tableType != null) {
+ oprot.writeFieldBegin(TABLE_TYPE_FIELD_DESC);
+ oprot.writeString(struct.tableType);
+ oprot.writeFieldEnd();
+ }
+ if (struct.comments != null) {
+ if (struct.isSetComments()) {
+ oprot.writeFieldBegin(COMMENTS_FIELD_DESC);
+ oprot.writeString(struct.comments);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TableMetaTupleSchemeFactory implements SchemeFactory {
+ public TableMetaTupleScheme getScheme() {
+ return new TableMetaTupleScheme();
+ }
+ }
+
+ private static class TableMetaTupleScheme extends TupleScheme<TableMeta> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TableMeta struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.dbName);
+ oprot.writeString(struct.tableName);
+ oprot.writeString(struct.tableType);
+ BitSet optionals = new BitSet();
+ if (struct.isSetComments()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetComments()) {
+ oprot.writeString(struct.comments);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TableMeta struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.dbName = iprot.readString();
+ struct.setDbNameIsSet(true);
+ struct.tableName = iprot.readString();
+ struct.setTableNameIsSet(true);
+ struct.tableType = iprot.readString();
+ struct.setTableTypeIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.comments = iprot.readString();
+ struct.setCommentsIsSet(true);
+ }
+ }
+ }
+
+}
+