You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2016/04/19 20:42:15 UTC
[11/15] hive git commit: HIVE-13349: Metastore Changes : API calls
for retrieving primary keys and foreign keys information (Hari Subramaniyan,
reviewed by Ashutosh Chauhan)
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/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 97c07a5..d392f67 100644
--- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
+++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
@@ -149,6 +149,10 @@ class Version;
class FieldSchema;
+class SQLPrimaryKey;
+
+class SQLForeignKey;
+
class Type;
class HiveObjectRef;
@@ -239,6 +243,14 @@ class Schema;
class EnvironmentContext;
+class PrimaryKeysRequest;
+
+class PrimaryKeysResponse;
+
+class ForeignKeysRequest;
+
+class ForeignKeysResponse;
+
class PartitionsByExprResult;
class PartitionsByExprRequest;
@@ -501,6 +513,218 @@ inline std::ostream& operator<<(std::ostream& out, const FieldSchema& obj)
return out;
}
+typedef struct _SQLPrimaryKey__isset {
+ _SQLPrimaryKey__isset() : table_db(false), table_name(false), column_name(false), key_seq(false), pk_name(false), enable_cstr(false), validate_cstr(false), rely_cstr(false) {}
+ bool table_db :1;
+ bool table_name :1;
+ bool column_name :1;
+ bool key_seq :1;
+ bool pk_name :1;
+ bool enable_cstr :1;
+ bool validate_cstr :1;
+ bool rely_cstr :1;
+} _SQLPrimaryKey__isset;
+
+class SQLPrimaryKey {
+ public:
+
+ SQLPrimaryKey(const SQLPrimaryKey&);
+ SQLPrimaryKey& operator=(const SQLPrimaryKey&);
+ SQLPrimaryKey() : table_db(), table_name(), column_name(), key_seq(0), pk_name(), enable_cstr(0), validate_cstr(0), rely_cstr(0) {
+ }
+
+ virtual ~SQLPrimaryKey() throw();
+ std::string table_db;
+ std::string table_name;
+ std::string column_name;
+ int32_t key_seq;
+ std::string pk_name;
+ bool enable_cstr;
+ bool validate_cstr;
+ bool rely_cstr;
+
+ _SQLPrimaryKey__isset __isset;
+
+ void __set_table_db(const std::string& val);
+
+ void __set_table_name(const std::string& val);
+
+ void __set_column_name(const std::string& val);
+
+ void __set_key_seq(const int32_t val);
+
+ void __set_pk_name(const std::string& val);
+
+ void __set_enable_cstr(const bool val);
+
+ void __set_validate_cstr(const bool val);
+
+ void __set_rely_cstr(const bool val);
+
+ bool operator == (const SQLPrimaryKey & rhs) const
+ {
+ if (!(table_db == rhs.table_db))
+ return false;
+ if (!(table_name == rhs.table_name))
+ return false;
+ if (!(column_name == rhs.column_name))
+ return false;
+ if (!(key_seq == rhs.key_seq))
+ return false;
+ if (!(pk_name == rhs.pk_name))
+ return false;
+ if (!(enable_cstr == rhs.enable_cstr))
+ return false;
+ if (!(validate_cstr == rhs.validate_cstr))
+ return false;
+ if (!(rely_cstr == rhs.rely_cstr))
+ return false;
+ return true;
+ }
+ bool operator != (const SQLPrimaryKey &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const SQLPrimaryKey & ) 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(SQLPrimaryKey &a, SQLPrimaryKey &b);
+
+inline std::ostream& operator<<(std::ostream& out, const SQLPrimaryKey& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
+typedef struct _SQLForeignKey__isset {
+ _SQLForeignKey__isset() : pktable_db(false), pktable_name(false), pkcolumn_name(false), fktable_db(false), fktable_name(false), fkcolumn_name(false), key_seq(false), update_rule(false), delete_rule(false), fk_name(false), pk_name(false), enable_cstr(false), validate_cstr(false), rely_cstr(false) {}
+ bool pktable_db :1;
+ bool pktable_name :1;
+ bool pkcolumn_name :1;
+ bool fktable_db :1;
+ bool fktable_name :1;
+ bool fkcolumn_name :1;
+ bool key_seq :1;
+ bool update_rule :1;
+ bool delete_rule :1;
+ bool fk_name :1;
+ bool pk_name :1;
+ bool enable_cstr :1;
+ bool validate_cstr :1;
+ bool rely_cstr :1;
+} _SQLForeignKey__isset;
+
+class SQLForeignKey {
+ public:
+
+ SQLForeignKey(const SQLForeignKey&);
+ SQLForeignKey& operator=(const SQLForeignKey&);
+ SQLForeignKey() : pktable_db(), pktable_name(), pkcolumn_name(), fktable_db(), fktable_name(), fkcolumn_name(), key_seq(0), update_rule(0), delete_rule(0), fk_name(), pk_name(), enable_cstr(0), validate_cstr(0), rely_cstr(0) {
+ }
+
+ virtual ~SQLForeignKey() throw();
+ std::string pktable_db;
+ std::string pktable_name;
+ std::string pkcolumn_name;
+ std::string fktable_db;
+ std::string fktable_name;
+ std::string fkcolumn_name;
+ int32_t key_seq;
+ int32_t update_rule;
+ int32_t delete_rule;
+ std::string fk_name;
+ std::string pk_name;
+ bool enable_cstr;
+ bool validate_cstr;
+ bool rely_cstr;
+
+ _SQLForeignKey__isset __isset;
+
+ void __set_pktable_db(const std::string& val);
+
+ void __set_pktable_name(const std::string& val);
+
+ void __set_pkcolumn_name(const std::string& val);
+
+ void __set_fktable_db(const std::string& val);
+
+ void __set_fktable_name(const std::string& val);
+
+ void __set_fkcolumn_name(const std::string& val);
+
+ void __set_key_seq(const int32_t val);
+
+ void __set_update_rule(const int32_t val);
+
+ void __set_delete_rule(const int32_t val);
+
+ void __set_fk_name(const std::string& val);
+
+ void __set_pk_name(const std::string& val);
+
+ void __set_enable_cstr(const bool val);
+
+ void __set_validate_cstr(const bool val);
+
+ void __set_rely_cstr(const bool val);
+
+ bool operator == (const SQLForeignKey & rhs) const
+ {
+ if (!(pktable_db == rhs.pktable_db))
+ return false;
+ if (!(pktable_name == rhs.pktable_name))
+ return false;
+ if (!(pkcolumn_name == rhs.pkcolumn_name))
+ return false;
+ if (!(fktable_db == rhs.fktable_db))
+ return false;
+ if (!(fktable_name == rhs.fktable_name))
+ return false;
+ if (!(fkcolumn_name == rhs.fkcolumn_name))
+ return false;
+ if (!(key_seq == rhs.key_seq))
+ return false;
+ if (!(update_rule == rhs.update_rule))
+ return false;
+ if (!(delete_rule == rhs.delete_rule))
+ return false;
+ if (!(fk_name == rhs.fk_name))
+ return false;
+ if (!(pk_name == rhs.pk_name))
+ return false;
+ if (!(enable_cstr == rhs.enable_cstr))
+ return false;
+ if (!(validate_cstr == rhs.validate_cstr))
+ return false;
+ if (!(rely_cstr == rhs.rely_cstr))
+ return false;
+ return true;
+ }
+ bool operator != (const SQLForeignKey &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const SQLForeignKey & ) 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(SQLForeignKey &a, SQLForeignKey &b);
+
+inline std::ostream& operator<<(std::ostream& out, const SQLForeignKey& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
typedef struct _Type__isset {
_Type__isset() : name(false), type1(false), type2(false), fields(false) {}
bool name :1;
@@ -3375,6 +3599,186 @@ inline std::ostream& operator<<(std::ostream& out, const EnvironmentContext& obj
}
+class PrimaryKeysRequest {
+ public:
+
+ PrimaryKeysRequest(const PrimaryKeysRequest&);
+ PrimaryKeysRequest& operator=(const PrimaryKeysRequest&);
+ PrimaryKeysRequest() : db_name(), tbl_name() {
+ }
+
+ virtual ~PrimaryKeysRequest() throw();
+ std::string db_name;
+ std::string tbl_name;
+
+ void __set_db_name(const std::string& val);
+
+ void __set_tbl_name(const std::string& val);
+
+ bool operator == (const PrimaryKeysRequest & rhs) const
+ {
+ if (!(db_name == rhs.db_name))
+ return false;
+ if (!(tbl_name == rhs.tbl_name))
+ return false;
+ return true;
+ }
+ bool operator != (const PrimaryKeysRequest &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const PrimaryKeysRequest & ) 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(PrimaryKeysRequest &a, PrimaryKeysRequest &b);
+
+inline std::ostream& operator<<(std::ostream& out, const PrimaryKeysRequest& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
+
+class PrimaryKeysResponse {
+ public:
+
+ PrimaryKeysResponse(const PrimaryKeysResponse&);
+ PrimaryKeysResponse& operator=(const PrimaryKeysResponse&);
+ PrimaryKeysResponse() {
+ }
+
+ virtual ~PrimaryKeysResponse() throw();
+ std::vector<SQLPrimaryKey> primaryKeys;
+
+ void __set_primaryKeys(const std::vector<SQLPrimaryKey> & val);
+
+ bool operator == (const PrimaryKeysResponse & rhs) const
+ {
+ if (!(primaryKeys == rhs.primaryKeys))
+ return false;
+ return true;
+ }
+ bool operator != (const PrimaryKeysResponse &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const PrimaryKeysResponse & ) 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(PrimaryKeysResponse &a, PrimaryKeysResponse &b);
+
+inline std::ostream& operator<<(std::ostream& out, const PrimaryKeysResponse& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
+
+class ForeignKeysRequest {
+ public:
+
+ ForeignKeysRequest(const ForeignKeysRequest&);
+ ForeignKeysRequest& operator=(const ForeignKeysRequest&);
+ ForeignKeysRequest() : parent_db_name(), parent_tbl_name(), foreign_db_name(), foreign_tbl_name() {
+ }
+
+ virtual ~ForeignKeysRequest() throw();
+ std::string parent_db_name;
+ std::string parent_tbl_name;
+ std::string foreign_db_name;
+ std::string foreign_tbl_name;
+
+ void __set_parent_db_name(const std::string& val);
+
+ void __set_parent_tbl_name(const std::string& val);
+
+ void __set_foreign_db_name(const std::string& val);
+
+ void __set_foreign_tbl_name(const std::string& val);
+
+ bool operator == (const ForeignKeysRequest & rhs) const
+ {
+ if (!(parent_db_name == rhs.parent_db_name))
+ return false;
+ if (!(parent_tbl_name == rhs.parent_tbl_name))
+ return false;
+ if (!(foreign_db_name == rhs.foreign_db_name))
+ return false;
+ if (!(foreign_tbl_name == rhs.foreign_tbl_name))
+ return false;
+ return true;
+ }
+ bool operator != (const ForeignKeysRequest &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ForeignKeysRequest & ) 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(ForeignKeysRequest &a, ForeignKeysRequest &b);
+
+inline std::ostream& operator<<(std::ostream& out, const ForeignKeysRequest& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
+
+class ForeignKeysResponse {
+ public:
+
+ ForeignKeysResponse(const ForeignKeysResponse&);
+ ForeignKeysResponse& operator=(const ForeignKeysResponse&);
+ ForeignKeysResponse() {
+ }
+
+ virtual ~ForeignKeysResponse() throw();
+ std::vector<SQLForeignKey> foreignKeys;
+
+ void __set_foreignKeys(const std::vector<SQLForeignKey> & val);
+
+ bool operator == (const ForeignKeysResponse & rhs) const
+ {
+ if (!(foreignKeys == rhs.foreignKeys))
+ return false;
+ return true;
+ }
+ bool operator != (const ForeignKeysResponse &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ForeignKeysResponse & ) 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(ForeignKeysResponse &a, ForeignKeysResponse &b);
+
+inline std::ostream& operator<<(std::ostream& out, const ForeignKeysResponse& obj)
+{
+ obj.printTo(out);
+ return out;
+}
+
+
class PartitionsByExprResult {
public:
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
index bb6e584..19bdf10 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddDynamicPartitions.java
@@ -630,13 +630,13 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
case 4: // PARTITIONNAMES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list492 = iprot.readListBegin();
- struct.partitionnames = new ArrayList<String>(_list492.size);
- String _elem493;
- for (int _i494 = 0; _i494 < _list492.size; ++_i494)
+ org.apache.thrift.protocol.TList _list508 = iprot.readListBegin();
+ struct.partitionnames = new ArrayList<String>(_list508.size);
+ String _elem509;
+ for (int _i510 = 0; _i510 < _list508.size; ++_i510)
{
- _elem493 = iprot.readString();
- struct.partitionnames.add(_elem493);
+ _elem509 = iprot.readString();
+ struct.partitionnames.add(_elem509);
}
iprot.readListEnd();
}
@@ -675,9 +675,9 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
oprot.writeFieldBegin(PARTITIONNAMES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionnames.size()));
- for (String _iter495 : struct.partitionnames)
+ for (String _iter511 : struct.partitionnames)
{
- oprot.writeString(_iter495);
+ oprot.writeString(_iter511);
}
oprot.writeListEnd();
}
@@ -705,9 +705,9 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
oprot.writeString(struct.tablename);
{
oprot.writeI32(struct.partitionnames.size());
- for (String _iter496 : struct.partitionnames)
+ for (String _iter512 : struct.partitionnames)
{
- oprot.writeString(_iter496);
+ oprot.writeString(_iter512);
}
}
}
@@ -722,13 +722,13 @@ public class AddDynamicPartitions implements org.apache.thrift.TBase<AddDynamicP
struct.tablename = iprot.readString();
struct.setTablenameIsSet(true);
{
- org.apache.thrift.protocol.TList _list497 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.partitionnames = new ArrayList<String>(_list497.size);
- String _elem498;
- for (int _i499 = 0; _i499 < _list497.size; ++_i499)
+ org.apache.thrift.protocol.TList _list513 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.partitionnames = new ArrayList<String>(_list513.size);
+ String _elem514;
+ for (int _i515 = 0; _i515 < _list513.size; ++_i515)
{
- _elem498 = iprot.readString();
- struct.partitionnames.add(_elem498);
+ _elem514 = iprot.readString();
+ struct.partitionnames.add(_elem514);
}
}
struct.setPartitionnamesIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
index 083d340..6df6fa5 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
@@ -704,14 +704,14 @@ public class AddPartitionsRequest implements org.apache.thrift.TBase<AddPartitio
case 3: // PARTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list388 = iprot.readListBegin();
- struct.parts = new ArrayList<Partition>(_list388.size);
- Partition _elem389;
- for (int _i390 = 0; _i390 < _list388.size; ++_i390)
+ org.apache.thrift.protocol.TList _list404 = iprot.readListBegin();
+ struct.parts = new ArrayList<Partition>(_list404.size);
+ Partition _elem405;
+ for (int _i406 = 0; _i406 < _list404.size; ++_i406)
{
- _elem389 = new Partition();
- _elem389.read(iprot);
- struct.parts.add(_elem389);
+ _elem405 = new Partition();
+ _elem405.read(iprot);
+ struct.parts.add(_elem405);
}
iprot.readListEnd();
}
@@ -763,9 +763,9 @@ public class AddPartitionsRequest implements org.apache.thrift.TBase<AddPartitio
oprot.writeFieldBegin(PARTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.parts.size()));
- for (Partition _iter391 : struct.parts)
+ for (Partition _iter407 : struct.parts)
{
- _iter391.write(oprot);
+ _iter407.write(oprot);
}
oprot.writeListEnd();
}
@@ -800,9 +800,9 @@ public class AddPartitionsRequest implements org.apache.thrift.TBase<AddPartitio
oprot.writeString(struct.tblName);
{
oprot.writeI32(struct.parts.size());
- for (Partition _iter392 : struct.parts)
+ for (Partition _iter408 : struct.parts)
{
- _iter392.write(oprot);
+ _iter408.write(oprot);
}
}
oprot.writeBool(struct.ifNotExists);
@@ -824,14 +824,14 @@ public class AddPartitionsRequest implements org.apache.thrift.TBase<AddPartitio
struct.tblName = iprot.readString();
struct.setTblNameIsSet(true);
{
- org.apache.thrift.protocol.TList _list393 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.parts = new ArrayList<Partition>(_list393.size);
- Partition _elem394;
- for (int _i395 = 0; _i395 < _list393.size; ++_i395)
+ org.apache.thrift.protocol.TList _list409 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.parts = new ArrayList<Partition>(_list409.size);
+ Partition _elem410;
+ for (int _i411 = 0; _i411 < _list409.size; ++_i411)
{
- _elem394 = new Partition();
- _elem394.read(iprot);
- struct.parts.add(_elem394);
+ _elem410 = new Partition();
+ _elem410.read(iprot);
+ struct.parts.add(_elem410);
}
}
struct.setPartsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
index 9004457..521ed38 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
@@ -346,14 +346,14 @@ public class AddPartitionsResult implements org.apache.thrift.TBase<AddPartition
case 1: // PARTITIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list380 = iprot.readListBegin();
- struct.partitions = new ArrayList<Partition>(_list380.size);
- Partition _elem381;
- for (int _i382 = 0; _i382 < _list380.size; ++_i382)
+ org.apache.thrift.protocol.TList _list396 = iprot.readListBegin();
+ struct.partitions = new ArrayList<Partition>(_list396.size);
+ Partition _elem397;
+ for (int _i398 = 0; _i398 < _list396.size; ++_i398)
{
- _elem381 = new Partition();
- _elem381.read(iprot);
- struct.partitions.add(_elem381);
+ _elem397 = new Partition();
+ _elem397.read(iprot);
+ struct.partitions.add(_elem397);
}
iprot.readListEnd();
}
@@ -380,9 +380,9 @@ public class AddPartitionsResult implements org.apache.thrift.TBase<AddPartition
oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
- for (Partition _iter383 : struct.partitions)
+ for (Partition _iter399 : struct.partitions)
{
- _iter383.write(oprot);
+ _iter399.write(oprot);
}
oprot.writeListEnd();
}
@@ -414,9 +414,9 @@ public class AddPartitionsResult implements org.apache.thrift.TBase<AddPartition
if (struct.isSetPartitions()) {
{
oprot.writeI32(struct.partitions.size());
- for (Partition _iter384 : struct.partitions)
+ for (Partition _iter400 : struct.partitions)
{
- _iter384.write(oprot);
+ _iter400.write(oprot);
}
}
}
@@ -428,14 +428,14 @@ public class AddPartitionsResult implements org.apache.thrift.TBase<AddPartition
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list385 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.partitions = new ArrayList<Partition>(_list385.size);
- Partition _elem386;
- for (int _i387 = 0; _i387 < _list385.size; ++_i387)
+ org.apache.thrift.protocol.TList _list401 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.partitions = new ArrayList<Partition>(_list401.size);
+ Partition _elem402;
+ for (int _i403 = 0; _i403 < _list401.size; ++_i403)
{
- _elem386 = new Partition();
- _elem386.read(iprot);
- struct.partitions.add(_elem386);
+ _elem402 = new Partition();
+ _elem402.read(iprot);
+ struct.partitions.add(_elem402);
}
}
struct.setPartitionsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
index 657bb7b..cfec32e 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ClearFileMetadataRequest.java
@@ -351,13 +351,13 @@ public class ClearFileMetadataRequest implements org.apache.thrift.TBase<ClearFi
case 1: // FILE_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list576 = iprot.readListBegin();
- struct.fileIds = new ArrayList<Long>(_list576.size);
- long _elem577;
- for (int _i578 = 0; _i578 < _list576.size; ++_i578)
+ org.apache.thrift.protocol.TList _list592 = iprot.readListBegin();
+ struct.fileIds = new ArrayList<Long>(_list592.size);
+ long _elem593;
+ for (int _i594 = 0; _i594 < _list592.size; ++_i594)
{
- _elem577 = iprot.readI64();
- struct.fileIds.add(_elem577);
+ _elem593 = iprot.readI64();
+ struct.fileIds.add(_elem593);
}
iprot.readListEnd();
}
@@ -383,9 +383,9 @@ public class ClearFileMetadataRequest implements org.apache.thrift.TBase<ClearFi
oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
- for (long _iter579 : struct.fileIds)
+ for (long _iter595 : struct.fileIds)
{
- oprot.writeI64(_iter579);
+ oprot.writeI64(_iter595);
}
oprot.writeListEnd();
}
@@ -410,9 +410,9 @@ public class ClearFileMetadataRequest implements org.apache.thrift.TBase<ClearFi
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.fileIds.size());
- for (long _iter580 : struct.fileIds)
+ for (long _iter596 : struct.fileIds)
{
- oprot.writeI64(_iter580);
+ oprot.writeI64(_iter596);
}
}
}
@@ -421,13 +421,13 @@ public class ClearFileMetadataRequest implements org.apache.thrift.TBase<ClearFi
public void read(org.apache.thrift.protocol.TProtocol prot, ClearFileMetadataRequest struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list581 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.fileIds = new ArrayList<Long>(_list581.size);
- long _elem582;
- for (int _i583 = 0; _i583 < _list581.size; ++_i583)
+ org.apache.thrift.protocol.TList _list597 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.fileIds = new ArrayList<Long>(_list597.size);
+ long _elem598;
+ for (int _i599 = 0; _i599 < _list597.size; ++_i599)
{
- _elem582 = iprot.readI64();
- struct.fileIds.add(_elem582);
+ _elem598 = iprot.readI64();
+ struct.fileIds.add(_elem598);
}
}
struct.setFileIdsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
index adef415..a70730a 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
@@ -346,14 +346,14 @@ public class DropPartitionsResult implements org.apache.thrift.TBase<DropPartiti
case 1: // PARTITIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list396 = iprot.readListBegin();
- struct.partitions = new ArrayList<Partition>(_list396.size);
- Partition _elem397;
- for (int _i398 = 0; _i398 < _list396.size; ++_i398)
+ org.apache.thrift.protocol.TList _list412 = iprot.readListBegin();
+ struct.partitions = new ArrayList<Partition>(_list412.size);
+ Partition _elem413;
+ for (int _i414 = 0; _i414 < _list412.size; ++_i414)
{
- _elem397 = new Partition();
- _elem397.read(iprot);
- struct.partitions.add(_elem397);
+ _elem413 = new Partition();
+ _elem413.read(iprot);
+ struct.partitions.add(_elem413);
}
iprot.readListEnd();
}
@@ -380,9 +380,9 @@ public class DropPartitionsResult implements org.apache.thrift.TBase<DropPartiti
oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
- for (Partition _iter399 : struct.partitions)
+ for (Partition _iter415 : struct.partitions)
{
- _iter399.write(oprot);
+ _iter415.write(oprot);
}
oprot.writeListEnd();
}
@@ -414,9 +414,9 @@ public class DropPartitionsResult implements org.apache.thrift.TBase<DropPartiti
if (struct.isSetPartitions()) {
{
oprot.writeI32(struct.partitions.size());
- for (Partition _iter400 : struct.partitions)
+ for (Partition _iter416 : struct.partitions)
{
- _iter400.write(oprot);
+ _iter416.write(oprot);
}
}
}
@@ -428,14 +428,14 @@ public class DropPartitionsResult implements org.apache.thrift.TBase<DropPartiti
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list401 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.partitions = new ArrayList<Partition>(_list401.size);
- Partition _elem402;
- for (int _i403 = 0; _i403 < _list401.size; ++_i403)
+ org.apache.thrift.protocol.TList _list417 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.partitions = new ArrayList<Partition>(_list417.size);
+ Partition _elem418;
+ for (int _i419 = 0; _i419 < _list417.size; ++_i419)
{
- _elem402 = new Partition();
- _elem402.read(iprot);
- struct.partitions.add(_elem402);
+ _elem418 = new Partition();
+ _elem418.read(iprot);
+ struct.partitions.add(_elem418);
}
}
struct.setPartitionsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
index 6b08234..44308cc 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/FireEventRequest.java
@@ -713,13 +713,13 @@ public class FireEventRequest implements org.apache.thrift.TBase<FireEventReques
case 5: // PARTITION_VALS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list516 = iprot.readListBegin();
- struct.partitionVals = new ArrayList<String>(_list516.size);
- String _elem517;
- for (int _i518 = 0; _i518 < _list516.size; ++_i518)
+ org.apache.thrift.protocol.TList _list532 = iprot.readListBegin();
+ struct.partitionVals = new ArrayList<String>(_list532.size);
+ String _elem533;
+ for (int _i534 = 0; _i534 < _list532.size; ++_i534)
{
- _elem517 = iprot.readString();
- struct.partitionVals.add(_elem517);
+ _elem533 = iprot.readString();
+ struct.partitionVals.add(_elem533);
}
iprot.readListEnd();
}
@@ -768,9 +768,9 @@ public class FireEventRequest implements org.apache.thrift.TBase<FireEventReques
oprot.writeFieldBegin(PARTITION_VALS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partitionVals.size()));
- for (String _iter519 : struct.partitionVals)
+ for (String _iter535 : struct.partitionVals)
{
- oprot.writeString(_iter519);
+ oprot.writeString(_iter535);
}
oprot.writeListEnd();
}
@@ -816,9 +816,9 @@ public class FireEventRequest implements org.apache.thrift.TBase<FireEventReques
if (struct.isSetPartitionVals()) {
{
oprot.writeI32(struct.partitionVals.size());
- for (String _iter520 : struct.partitionVals)
+ for (String _iter536 : struct.partitionVals)
{
- oprot.writeString(_iter520);
+ oprot.writeString(_iter536);
}
}
}
@@ -843,13 +843,13 @@ public class FireEventRequest implements org.apache.thrift.TBase<FireEventReques
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list521 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.partitionVals = new ArrayList<String>(_list521.size);
- String _elem522;
- for (int _i523 = 0; _i523 < _list521.size; ++_i523)
+ org.apache.thrift.protocol.TList _list537 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.partitionVals = new ArrayList<String>(_list537.size);
+ String _elem538;
+ for (int _i539 = 0; _i539 < _list537.size; ++_i539)
{
- _elem522 = iprot.readString();
- struct.partitionVals.add(_elem522);
+ _elem538 = iprot.readString();
+ struct.partitionVals.add(_elem538);
}
}
struct.setPartitionValsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java
new file mode 100644
index 0000000..7788780
--- /dev/null
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysRequest.java
@@ -0,0 +1,692 @@
+/**
+ * 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 ForeignKeysRequest implements org.apache.thrift.TBase<ForeignKeysRequest, ForeignKeysRequest._Fields>, java.io.Serializable, Cloneable, Comparable<ForeignKeysRequest> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ForeignKeysRequest");
+
+ private static final org.apache.thrift.protocol.TField PARENT_DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_db_name", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PARENT_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parent_tbl_name", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField FOREIGN_DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreign_db_name", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField FOREIGN_TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreign_tbl_name", 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 ForeignKeysRequestStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ForeignKeysRequestTupleSchemeFactory());
+ }
+
+ private String parent_db_name; // required
+ private String parent_tbl_name; // required
+ private String foreign_db_name; // required
+ private String foreign_tbl_name; // 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 {
+ PARENT_DB_NAME((short)1, "parent_db_name"),
+ PARENT_TBL_NAME((short)2, "parent_tbl_name"),
+ FOREIGN_DB_NAME((short)3, "foreign_db_name"),
+ FOREIGN_TBL_NAME((short)4, "foreign_tbl_name");
+
+ 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: // PARENT_DB_NAME
+ return PARENT_DB_NAME;
+ case 2: // PARENT_TBL_NAME
+ return PARENT_TBL_NAME;
+ case 3: // FOREIGN_DB_NAME
+ return FOREIGN_DB_NAME;
+ case 4: // FOREIGN_TBL_NAME
+ return FOREIGN_TBL_NAME;
+ 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
+ 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.PARENT_DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_db_name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PARENT_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("parent_tbl_name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.FOREIGN_DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreign_db_name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.FOREIGN_TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreign_tbl_name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ForeignKeysRequest.class, metaDataMap);
+ }
+
+ public ForeignKeysRequest() {
+ }
+
+ public ForeignKeysRequest(
+ String parent_db_name,
+ String parent_tbl_name,
+ String foreign_db_name,
+ String foreign_tbl_name)
+ {
+ this();
+ this.parent_db_name = parent_db_name;
+ this.parent_tbl_name = parent_tbl_name;
+ this.foreign_db_name = foreign_db_name;
+ this.foreign_tbl_name = foreign_tbl_name;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ForeignKeysRequest(ForeignKeysRequest other) {
+ if (other.isSetParent_db_name()) {
+ this.parent_db_name = other.parent_db_name;
+ }
+ if (other.isSetParent_tbl_name()) {
+ this.parent_tbl_name = other.parent_tbl_name;
+ }
+ if (other.isSetForeign_db_name()) {
+ this.foreign_db_name = other.foreign_db_name;
+ }
+ if (other.isSetForeign_tbl_name()) {
+ this.foreign_tbl_name = other.foreign_tbl_name;
+ }
+ }
+
+ public ForeignKeysRequest deepCopy() {
+ return new ForeignKeysRequest(this);
+ }
+
+ @Override
+ public void clear() {
+ this.parent_db_name = null;
+ this.parent_tbl_name = null;
+ this.foreign_db_name = null;
+ this.foreign_tbl_name = null;
+ }
+
+ public String getParent_db_name() {
+ return this.parent_db_name;
+ }
+
+ public void setParent_db_name(String parent_db_name) {
+ this.parent_db_name = parent_db_name;
+ }
+
+ public void unsetParent_db_name() {
+ this.parent_db_name = null;
+ }
+
+ /** Returns true if field parent_db_name is set (has been assigned a value) and false otherwise */
+ public boolean isSetParent_db_name() {
+ return this.parent_db_name != null;
+ }
+
+ public void setParent_db_nameIsSet(boolean value) {
+ if (!value) {
+ this.parent_db_name = null;
+ }
+ }
+
+ public String getParent_tbl_name() {
+ return this.parent_tbl_name;
+ }
+
+ public void setParent_tbl_name(String parent_tbl_name) {
+ this.parent_tbl_name = parent_tbl_name;
+ }
+
+ public void unsetParent_tbl_name() {
+ this.parent_tbl_name = null;
+ }
+
+ /** Returns true if field parent_tbl_name is set (has been assigned a value) and false otherwise */
+ public boolean isSetParent_tbl_name() {
+ return this.parent_tbl_name != null;
+ }
+
+ public void setParent_tbl_nameIsSet(boolean value) {
+ if (!value) {
+ this.parent_tbl_name = null;
+ }
+ }
+
+ public String getForeign_db_name() {
+ return this.foreign_db_name;
+ }
+
+ public void setForeign_db_name(String foreign_db_name) {
+ this.foreign_db_name = foreign_db_name;
+ }
+
+ public void unsetForeign_db_name() {
+ this.foreign_db_name = null;
+ }
+
+ /** Returns true if field foreign_db_name is set (has been assigned a value) and false otherwise */
+ public boolean isSetForeign_db_name() {
+ return this.foreign_db_name != null;
+ }
+
+ public void setForeign_db_nameIsSet(boolean value) {
+ if (!value) {
+ this.foreign_db_name = null;
+ }
+ }
+
+ public String getForeign_tbl_name() {
+ return this.foreign_tbl_name;
+ }
+
+ public void setForeign_tbl_name(String foreign_tbl_name) {
+ this.foreign_tbl_name = foreign_tbl_name;
+ }
+
+ public void unsetForeign_tbl_name() {
+ this.foreign_tbl_name = null;
+ }
+
+ /** Returns true if field foreign_tbl_name is set (has been assigned a value) and false otherwise */
+ public boolean isSetForeign_tbl_name() {
+ return this.foreign_tbl_name != null;
+ }
+
+ public void setForeign_tbl_nameIsSet(boolean value) {
+ if (!value) {
+ this.foreign_tbl_name = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PARENT_DB_NAME:
+ if (value == null) {
+ unsetParent_db_name();
+ } else {
+ setParent_db_name((String)value);
+ }
+ break;
+
+ case PARENT_TBL_NAME:
+ if (value == null) {
+ unsetParent_tbl_name();
+ } else {
+ setParent_tbl_name((String)value);
+ }
+ break;
+
+ case FOREIGN_DB_NAME:
+ if (value == null) {
+ unsetForeign_db_name();
+ } else {
+ setForeign_db_name((String)value);
+ }
+ break;
+
+ case FOREIGN_TBL_NAME:
+ if (value == null) {
+ unsetForeign_tbl_name();
+ } else {
+ setForeign_tbl_name((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PARENT_DB_NAME:
+ return getParent_db_name();
+
+ case PARENT_TBL_NAME:
+ return getParent_tbl_name();
+
+ case FOREIGN_DB_NAME:
+ return getForeign_db_name();
+
+ case FOREIGN_TBL_NAME:
+ return getForeign_tbl_name();
+
+ }
+ 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 PARENT_DB_NAME:
+ return isSetParent_db_name();
+ case PARENT_TBL_NAME:
+ return isSetParent_tbl_name();
+ case FOREIGN_DB_NAME:
+ return isSetForeign_db_name();
+ case FOREIGN_TBL_NAME:
+ return isSetForeign_tbl_name();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ForeignKeysRequest)
+ return this.equals((ForeignKeysRequest)that);
+ return false;
+ }
+
+ public boolean equals(ForeignKeysRequest that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_parent_db_name = true && this.isSetParent_db_name();
+ boolean that_present_parent_db_name = true && that.isSetParent_db_name();
+ if (this_present_parent_db_name || that_present_parent_db_name) {
+ if (!(this_present_parent_db_name && that_present_parent_db_name))
+ return false;
+ if (!this.parent_db_name.equals(that.parent_db_name))
+ return false;
+ }
+
+ boolean this_present_parent_tbl_name = true && this.isSetParent_tbl_name();
+ boolean that_present_parent_tbl_name = true && that.isSetParent_tbl_name();
+ if (this_present_parent_tbl_name || that_present_parent_tbl_name) {
+ if (!(this_present_parent_tbl_name && that_present_parent_tbl_name))
+ return false;
+ if (!this.parent_tbl_name.equals(that.parent_tbl_name))
+ return false;
+ }
+
+ boolean this_present_foreign_db_name = true && this.isSetForeign_db_name();
+ boolean that_present_foreign_db_name = true && that.isSetForeign_db_name();
+ if (this_present_foreign_db_name || that_present_foreign_db_name) {
+ if (!(this_present_foreign_db_name && that_present_foreign_db_name))
+ return false;
+ if (!this.foreign_db_name.equals(that.foreign_db_name))
+ return false;
+ }
+
+ boolean this_present_foreign_tbl_name = true && this.isSetForeign_tbl_name();
+ boolean that_present_foreign_tbl_name = true && that.isSetForeign_tbl_name();
+ if (this_present_foreign_tbl_name || that_present_foreign_tbl_name) {
+ if (!(this_present_foreign_tbl_name && that_present_foreign_tbl_name))
+ return false;
+ if (!this.foreign_tbl_name.equals(that.foreign_tbl_name))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_parent_db_name = true && (isSetParent_db_name());
+ list.add(present_parent_db_name);
+ if (present_parent_db_name)
+ list.add(parent_db_name);
+
+ boolean present_parent_tbl_name = true && (isSetParent_tbl_name());
+ list.add(present_parent_tbl_name);
+ if (present_parent_tbl_name)
+ list.add(parent_tbl_name);
+
+ boolean present_foreign_db_name = true && (isSetForeign_db_name());
+ list.add(present_foreign_db_name);
+ if (present_foreign_db_name)
+ list.add(foreign_db_name);
+
+ boolean present_foreign_tbl_name = true && (isSetForeign_tbl_name());
+ list.add(present_foreign_tbl_name);
+ if (present_foreign_tbl_name)
+ list.add(foreign_tbl_name);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(ForeignKeysRequest other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetParent_db_name()).compareTo(other.isSetParent_db_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParent_db_name()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_db_name, other.parent_db_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetParent_tbl_name()).compareTo(other.isSetParent_tbl_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParent_tbl_name()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parent_tbl_name, other.parent_tbl_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetForeign_db_name()).compareTo(other.isSetForeign_db_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetForeign_db_name()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreign_db_name, other.foreign_db_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetForeign_tbl_name()).compareTo(other.isSetForeign_tbl_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetForeign_tbl_name()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreign_tbl_name, other.foreign_tbl_name);
+ 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("ForeignKeysRequest(");
+ boolean first = true;
+
+ sb.append("parent_db_name:");
+ if (this.parent_db_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parent_db_name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("parent_tbl_name:");
+ if (this.parent_tbl_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parent_tbl_name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("foreign_db_name:");
+ if (this.foreign_db_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.foreign_db_name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("foreign_tbl_name:");
+ if (this.foreign_tbl_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.foreign_tbl_name);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetParent_db_name()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'parent_db_name' is unset! Struct:" + toString());
+ }
+
+ if (!isSetParent_tbl_name()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'parent_tbl_name' is unset! Struct:" + toString());
+ }
+
+ if (!isSetForeign_db_name()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'foreign_db_name' is unset! Struct:" + toString());
+ }
+
+ if (!isSetForeign_tbl_name()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'foreign_tbl_name' 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 ForeignKeysRequestStandardSchemeFactory implements SchemeFactory {
+ public ForeignKeysRequestStandardScheme getScheme() {
+ return new ForeignKeysRequestStandardScheme();
+ }
+ }
+
+ private static class ForeignKeysRequestStandardScheme extends StandardScheme<ForeignKeysRequest> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ForeignKeysRequest 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: // PARENT_DB_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parent_db_name = iprot.readString();
+ struct.setParent_db_nameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // PARENT_TBL_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parent_tbl_name = iprot.readString();
+ struct.setParent_tbl_nameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // FOREIGN_DB_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.foreign_db_name = iprot.readString();
+ struct.setForeign_db_nameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // FOREIGN_TBL_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.foreign_tbl_name = iprot.readString();
+ struct.setForeign_tbl_nameIsSet(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, ForeignKeysRequest struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.parent_db_name != null) {
+ oprot.writeFieldBegin(PARENT_DB_NAME_FIELD_DESC);
+ oprot.writeString(struct.parent_db_name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.parent_tbl_name != null) {
+ oprot.writeFieldBegin(PARENT_TBL_NAME_FIELD_DESC);
+ oprot.writeString(struct.parent_tbl_name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.foreign_db_name != null) {
+ oprot.writeFieldBegin(FOREIGN_DB_NAME_FIELD_DESC);
+ oprot.writeString(struct.foreign_db_name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.foreign_tbl_name != null) {
+ oprot.writeFieldBegin(FOREIGN_TBL_NAME_FIELD_DESC);
+ oprot.writeString(struct.foreign_tbl_name);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ForeignKeysRequestTupleSchemeFactory implements SchemeFactory {
+ public ForeignKeysRequestTupleScheme getScheme() {
+ return new ForeignKeysRequestTupleScheme();
+ }
+ }
+
+ private static class ForeignKeysRequestTupleScheme extends TupleScheme<ForeignKeysRequest> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ForeignKeysRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.parent_db_name);
+ oprot.writeString(struct.parent_tbl_name);
+ oprot.writeString(struct.foreign_db_name);
+ oprot.writeString(struct.foreign_tbl_name);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.parent_db_name = iprot.readString();
+ struct.setParent_db_nameIsSet(true);
+ struct.parent_tbl_name = iprot.readString();
+ struct.setParent_tbl_nameIsSet(true);
+ struct.foreign_db_name = iprot.readString();
+ struct.setForeign_db_nameIsSet(true);
+ struct.foreign_tbl_name = iprot.readString();
+ struct.setForeign_tbl_nameIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
new file mode 100644
index 0000000..7135a65
--- /dev/null
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ForeignKeysResponse.java
@@ -0,0 +1,443 @@
+/**
+ * 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 ForeignKeysResponse implements org.apache.thrift.TBase<ForeignKeysResponse, ForeignKeysResponse._Fields>, java.io.Serializable, Cloneable, Comparable<ForeignKeysResponse> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ForeignKeysResponse");
+
+ private static final org.apache.thrift.protocol.TField FOREIGN_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignKeys", org.apache.thrift.protocol.TType.LIST, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ForeignKeysResponseStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ForeignKeysResponseTupleSchemeFactory());
+ }
+
+ private List<SQLForeignKey> foreignKeys; // 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 {
+ FOREIGN_KEYS((short)1, "foreignKeys");
+
+ 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: // FOREIGN_KEYS
+ return FOREIGN_KEYS;
+ 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
+ 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.FOREIGN_KEYS, new org.apache.thrift.meta_data.FieldMetaData("foreignKeys", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SQLForeignKey.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ForeignKeysResponse.class, metaDataMap);
+ }
+
+ public ForeignKeysResponse() {
+ }
+
+ public ForeignKeysResponse(
+ List<SQLForeignKey> foreignKeys)
+ {
+ this();
+ this.foreignKeys = foreignKeys;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ForeignKeysResponse(ForeignKeysResponse other) {
+ if (other.isSetForeignKeys()) {
+ List<SQLForeignKey> __this__foreignKeys = new ArrayList<SQLForeignKey>(other.foreignKeys.size());
+ for (SQLForeignKey other_element : other.foreignKeys) {
+ __this__foreignKeys.add(new SQLForeignKey(other_element));
+ }
+ this.foreignKeys = __this__foreignKeys;
+ }
+ }
+
+ public ForeignKeysResponse deepCopy() {
+ return new ForeignKeysResponse(this);
+ }
+
+ @Override
+ public void clear() {
+ this.foreignKeys = null;
+ }
+
+ public int getForeignKeysSize() {
+ return (this.foreignKeys == null) ? 0 : this.foreignKeys.size();
+ }
+
+ public java.util.Iterator<SQLForeignKey> getForeignKeysIterator() {
+ return (this.foreignKeys == null) ? null : this.foreignKeys.iterator();
+ }
+
+ public void addToForeignKeys(SQLForeignKey elem) {
+ if (this.foreignKeys == null) {
+ this.foreignKeys = new ArrayList<SQLForeignKey>();
+ }
+ this.foreignKeys.add(elem);
+ }
+
+ public List<SQLForeignKey> getForeignKeys() {
+ return this.foreignKeys;
+ }
+
+ public void setForeignKeys(List<SQLForeignKey> foreignKeys) {
+ this.foreignKeys = foreignKeys;
+ }
+
+ public void unsetForeignKeys() {
+ this.foreignKeys = null;
+ }
+
+ /** Returns true if field foreignKeys is set (has been assigned a value) and false otherwise */
+ public boolean isSetForeignKeys() {
+ return this.foreignKeys != null;
+ }
+
+ public void setForeignKeysIsSet(boolean value) {
+ if (!value) {
+ this.foreignKeys = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case FOREIGN_KEYS:
+ if (value == null) {
+ unsetForeignKeys();
+ } else {
+ setForeignKeys((List<SQLForeignKey>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case FOREIGN_KEYS:
+ return getForeignKeys();
+
+ }
+ 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 FOREIGN_KEYS:
+ return isSetForeignKeys();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ForeignKeysResponse)
+ return this.equals((ForeignKeysResponse)that);
+ return false;
+ }
+
+ public boolean equals(ForeignKeysResponse that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_foreignKeys = true && this.isSetForeignKeys();
+ boolean that_present_foreignKeys = true && that.isSetForeignKeys();
+ if (this_present_foreignKeys || that_present_foreignKeys) {
+ if (!(this_present_foreignKeys && that_present_foreignKeys))
+ return false;
+ if (!this.foreignKeys.equals(that.foreignKeys))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_foreignKeys = true && (isSetForeignKeys());
+ list.add(present_foreignKeys);
+ if (present_foreignKeys)
+ list.add(foreignKeys);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(ForeignKeysResponse other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetForeignKeys()).compareTo(other.isSetForeignKeys());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetForeignKeys()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignKeys, other.foreignKeys);
+ 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("ForeignKeysResponse(");
+ boolean first = true;
+
+ sb.append("foreignKeys:");
+ if (this.foreignKeys == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.foreignKeys);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetForeignKeys()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'foreignKeys' 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 ForeignKeysResponseStandardSchemeFactory implements SchemeFactory {
+ public ForeignKeysResponseStandardScheme getScheme() {
+ return new ForeignKeysResponseStandardScheme();
+ }
+ }
+
+ private static class ForeignKeysResponseStandardScheme extends StandardScheme<ForeignKeysResponse> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ForeignKeysResponse 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: // FOREIGN_KEYS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list330 = iprot.readListBegin();
+ struct.foreignKeys = new ArrayList<SQLForeignKey>(_list330.size);
+ SQLForeignKey _elem331;
+ for (int _i332 = 0; _i332 < _list330.size; ++_i332)
+ {
+ _elem331 = new SQLForeignKey();
+ _elem331.read(iprot);
+ struct.foreignKeys.add(_elem331);
+ }
+ iprot.readListEnd();
+ }
+ struct.setForeignKeysIsSet(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, ForeignKeysResponse struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.foreignKeys != null) {
+ oprot.writeFieldBegin(FOREIGN_KEYS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.foreignKeys.size()));
+ for (SQLForeignKey _iter333 : struct.foreignKeys)
+ {
+ _iter333.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ForeignKeysResponseTupleSchemeFactory implements SchemeFactory {
+ public ForeignKeysResponseTupleScheme getScheme() {
+ return new ForeignKeysResponseTupleScheme();
+ }
+ }
+
+ private static class ForeignKeysResponseTupleScheme extends TupleScheme<ForeignKeysResponse> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ {
+ oprot.writeI32(struct.foreignKeys.size());
+ for (SQLForeignKey _iter334 : struct.foreignKeys)
+ {
+ _iter334.write(oprot);
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ForeignKeysResponse struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ {
+ org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.foreignKeys = new ArrayList<SQLForeignKey>(_list335.size);
+ SQLForeignKey _elem336;
+ for (int _i337 = 0; _i337 < _list335.size; ++_i337)
+ {
+ _elem336 = new SQLForeignKey();
+ _elem336.read(iprot);
+ struct.foreignKeys.add(_elem336);
+ }
+ }
+ struct.setForeignKeysIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
index 5f8ce0d..5cf2f59 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
@@ -997,14 +997,14 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
case 8: // RESOURCE_URIS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list420 = iprot.readListBegin();
- struct.resourceUris = new ArrayList<ResourceUri>(_list420.size);
- ResourceUri _elem421;
- for (int _i422 = 0; _i422 < _list420.size; ++_i422)
+ org.apache.thrift.protocol.TList _list436 = iprot.readListBegin();
+ struct.resourceUris = new ArrayList<ResourceUri>(_list436.size);
+ ResourceUri _elem437;
+ for (int _i438 = 0; _i438 < _list436.size; ++_i438)
{
- _elem421 = new ResourceUri();
- _elem421.read(iprot);
- struct.resourceUris.add(_elem421);
+ _elem437 = new ResourceUri();
+ _elem437.read(iprot);
+ struct.resourceUris.add(_elem437);
}
iprot.readListEnd();
}
@@ -1063,9 +1063,9 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
oprot.writeFieldBegin(RESOURCE_URIS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.resourceUris.size()));
- for (ResourceUri _iter423 : struct.resourceUris)
+ for (ResourceUri _iter439 : struct.resourceUris)
{
- _iter423.write(oprot);
+ _iter439.write(oprot);
}
oprot.writeListEnd();
}
@@ -1138,9 +1138,9 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
if (struct.isSetResourceUris()) {
{
oprot.writeI32(struct.resourceUris.size());
- for (ResourceUri _iter424 : struct.resourceUris)
+ for (ResourceUri _iter440 : struct.resourceUris)
{
- _iter424.write(oprot);
+ _iter440.write(oprot);
}
}
}
@@ -1180,14 +1180,14 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
}
if (incoming.get(7)) {
{
- org.apache.thrift.protocol.TList _list425 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.resourceUris = new ArrayList<ResourceUri>(_list425.size);
- ResourceUri _elem426;
- for (int _i427 = 0; _i427 < _list425.size; ++_i427)
+ org.apache.thrift.protocol.TList _list441 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.resourceUris = new ArrayList<ResourceUri>(_list441.size);
+ ResourceUri _elem442;
+ for (int _i443 = 0; _i443 < _list441.size; ++_i443)
{
- _elem426 = new ResourceUri();
- _elem426.read(iprot);
- struct.resourceUris.add(_elem426);
+ _elem442 = new ResourceUri();
+ _elem442.read(iprot);
+ struct.resourceUris.add(_elem442);
}
}
struct.setResourceUrisIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
index f88e279..2c297ef 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse.java
@@ -346,14 +346,14 @@ public class GetAllFunctionsResponse implements org.apache.thrift.TBase<GetAllFu
case 1: // FUNCTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list584 = iprot.readListBegin();
- struct.functions = new ArrayList<Function>(_list584.size);
- Function _elem585;
- for (int _i586 = 0; _i586 < _list584.size; ++_i586)
+ org.apache.thrift.protocol.TList _list600 = iprot.readListBegin();
+ struct.functions = new ArrayList<Function>(_list600.size);
+ Function _elem601;
+ for (int _i602 = 0; _i602 < _list600.size; ++_i602)
{
- _elem585 = new Function();
- _elem585.read(iprot);
- struct.functions.add(_elem585);
+ _elem601 = new Function();
+ _elem601.read(iprot);
+ struct.functions.add(_elem601);
}
iprot.readListEnd();
}
@@ -380,9 +380,9 @@ public class GetAllFunctionsResponse implements org.apache.thrift.TBase<GetAllFu
oprot.writeFieldBegin(FUNCTIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.functions.size()));
- for (Function _iter587 : struct.functions)
+ for (Function _iter603 : struct.functions)
{
- _iter587.write(oprot);
+ _iter603.write(oprot);
}
oprot.writeListEnd();
}
@@ -414,9 +414,9 @@ public class GetAllFunctionsResponse implements org.apache.thrift.TBase<GetAllFu
if (struct.isSetFunctions()) {
{
oprot.writeI32(struct.functions.size());
- for (Function _iter588 : struct.functions)
+ for (Function _iter604 : struct.functions)
{
- _iter588.write(oprot);
+ _iter604.write(oprot);
}
}
}
@@ -428,14 +428,14 @@ public class GetAllFunctionsResponse implements org.apache.thrift.TBase<GetAllFu
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list589 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.functions = new ArrayList<Function>(_list589.size);
- Function _elem590;
- for (int _i591 = 0; _i591 < _list589.size; ++_i591)
+ org.apache.thrift.protocol.TList _list605 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.functions = new ArrayList<Function>(_list605.size);
+ Function _elem606;
+ for (int _i607 = 0; _i607 < _list605.size; ++_i607)
{
- _elem590 = new Function();
- _elem590.read(iprot);
- struct.functions.add(_elem590);
+ _elem606 = new Function();
+ _elem606.read(iprot);
+ struct.functions.add(_elem606);
}
}
struct.setFunctionsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hive/blob/55375ec1/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
index 0236b4a..af3e4e3 100644
--- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
+++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetFileMetadataByExprRequest.java
@@ -619,13 +619,13 @@ public class GetFileMetadataByExprRequest implements org.apache.thrift.TBase<Get
case 1: // FILE_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list534 = iprot.readListBegin();
- struct.fileIds = new ArrayList<Long>(_list534.size);
- long _elem535;
- for (int _i536 = 0; _i536 < _list534.size; ++_i536)
+ org.apache.thrift.protocol.TList _list550 = iprot.readListBegin();
+ struct.fileIds = new ArrayList<Long>(_list550.size);
+ long _elem551;
+ for (int _i552 = 0; _i552 < _list550.size; ++_i552)
{
- _elem535 = iprot.readI64();
- struct.fileIds.add(_elem535);
+ _elem551 = iprot.readI64();
+ struct.fileIds.add(_elem551);
}
iprot.readListEnd();
}
@@ -675,9 +675,9 @@ public class GetFileMetadataByExprRequest implements org.apache.thrift.TBase<Get
oprot.writeFieldBegin(FILE_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fileIds.size()));
- for (long _iter537 : struct.fileIds)
+ for (long _iter553 : struct.fileIds)
{
- oprot.writeI64(_iter537);
+ oprot.writeI64(_iter553);
}
oprot.writeListEnd();
}
@@ -719,9 +719,9 @@ public class GetFileMetadataByExprRequest implements org.apache.thrift.TBase<Get
TTupleProtocol oprot = (TTupleProtocol) prot;
{
oprot.writeI32(struct.fileIds.size());
- for (long _iter538 : struct.fileIds)
+ for (long _iter554 : struct.fileIds)
{
- oprot.writeI64(_iter538);
+ oprot.writeI64(_iter554);
}
}
oprot.writeBinary(struct.expr);
@@ -745,13 +745,13 @@ public class GetFileMetadataByExprRequest implements org.apache.thrift.TBase<Get
public void read(org.apache.thrift.protocol.TProtocol prot, GetFileMetadataByExprRequest struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
{
- org.apache.thrift.protocol.TList _list539 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.fileIds = new ArrayList<Long>(_list539.size);
- long _elem540;
- for (int _i541 = 0; _i541 < _list539.size; ++_i541)
+ org.apache.thrift.protocol.TList _list555 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.fileIds = new ArrayList<Long>(_list555.size);
+ long _elem556;
+ for (int _i557 = 0; _i557 < _list555.size; ++_i557)
{
- _elem540 = iprot.readI64();
- struct.fileIds.add(_elem540);
+ _elem556 = iprot.readI64();
+ struct.fileIds.add(_elem556);
}
}
struct.setFileIdsIsSet(true);