diff --git .gitignore .gitignore
index 376cdc6..e54804f 100644
--- .gitignore
+++ .gitignore
@@ -6,3 +6,4 @@ build-eclipse
.settings
*.launch
*~
+metastore_db
diff --git build-common.xml build-common.xml
index 7e435ce..f78d11d 100644
--- build-common.xml
+++ build-common.xml
@@ -428,7 +428,7 @@
+ excludes="**/TestSerDe.class,**/TestHiveMetaStore.class,**/*$*.class" />
diff --git eclipse-templates/TestCliDriver.launchtemplate eclipse-templates/TestCliDriver.launchtemplate
index 8833251..8984d3c 100644
--- eclipse-templates/TestCliDriver.launchtemplate
+++ eclipse-templates/TestCliDriver.launchtemplate
@@ -21,6 +21,6 @@
-
+
diff --git eclipse-templates/TestEmbeddedHiveMetaStore.launchtemplate eclipse-templates/TestEmbeddedHiveMetaStore.launchtemplate
new file mode 100644
index 0000000..c4d8e9a
--- /dev/null
+++ eclipse-templates/TestEmbeddedHiveMetaStore.launchtemplate
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git eclipse-templates/TestHive.launchtemplate eclipse-templates/TestHive.launchtemplate
index 4d740ad..e040f38 100644
--- eclipse-templates/TestHive.launchtemplate
+++ eclipse-templates/TestHive.launchtemplate
@@ -21,6 +21,6 @@
-
+
diff --git eclipse-templates/TestHiveMetaStoreChecker.launchtemplate eclipse-templates/TestHiveMetaStoreChecker.launchtemplate
new file mode 100644
index 0000000..78c022c
--- /dev/null
+++ eclipse-templates/TestHiveMetaStoreChecker.launchtemplate
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git eclipse-templates/TestRemoteMetaStore.launchtemplate eclipse-templates/TestRemoteMetaStore.launchtemplate
new file mode 100644
index 0000000..3600e5c
--- /dev/null
+++ eclipse-templates/TestRemoteMetaStore.launchtemplate
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift
index 537c093..f316451 100755
--- metastore/if/hive_metastore.thrift
+++ metastore/if/hive_metastore.thrift
@@ -33,6 +33,7 @@ struct Type {
struct Database {
1: string name,
2: string description,
+ 3: string locationUri,
}
// This object holds the information needed by SerDes
@@ -148,16 +149,16 @@ exception ConfigValSecurityException {
*/
service ThriftHiveMetastore extends fb303.FacebookService
{
- bool create_database(1:string name, 2:string description)
- throws(1:AlreadyExistsException o1, 2:MetaException o2)
+ void create_database(1:Database database) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3)
Database get_database(1:string name) throws(1:NoSuchObjectException o1, 2:MetaException o2)
- bool drop_database(1:string name) throws(2:MetaException o2)
- list get_databases() throws(1:MetaException o1)
+ void drop_database(1:string name, 2:bool deleteData) throws(1:NoSuchObjectException o1, 2:InvalidOperationException o2, 3:MetaException o3)
+ list get_databases(1:string pattern) throws(1:MetaException o1)
+ list get_all_databases() throws(1:MetaException o1)
// returns the type with given name (make seperate calls for the dependent types if needed)
- Type get_type(1:string name) throws(1:MetaException o2)
+ Type get_type(1:string name) throws(1:MetaException o1, 2:NoSuchObjectException o2)
bool create_type(1:Type type) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3)
- bool drop_type(1:string type) throws(1:MetaException o2)
+ bool drop_type(1:string type) throws(1:MetaException o1, 2:NoSuchObjectException o2)
map get_type_all(1:string name)
throws(1:MetaException o2)
@@ -180,8 +181,8 @@ service ThriftHiveMetastore extends fb303.FacebookService
// delete data (including partitions) if deleteData is set to true
void drop_table(1:string dbname, 2:string name, 3:bool deleteData)
throws(1:NoSuchObjectException o1, 2:MetaException o3)
- list get_tables(1: string db_name, 2: string pattern)
- throws (1: MetaException o1)
+ list get_tables(1: string db_name, 2: string pattern) throws (1: MetaException o1)
+ list get_all_tables(1: string db_name) throws (1: MetaException o1)
Table get_table(1:string dbname, 2:string tbl_name)
throws (1:MetaException o1, 2:NoSuchObjectException o2)
diff --git metastore/src/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen-cpp/ThriftHiveMetastore.cpp
index d6eddca..010323c 100644
--- metastore/src/gen-cpp/ThriftHiveMetastore.cpp
+++ metastore/src/gen-cpp/ThriftHiveMetastore.cpp
@@ -28,17 +28,9 @@ uint32_t ThriftHiveMetastore_create_database_args::read(apache::thrift::protocol
switch (fid)
{
case 1:
- if (ftype == apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->name);
- this->__isset.name = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 2:
- if (ftype == apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->description);
- this->__isset.description = true;
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->database.read(iprot);
+ this->__isset.database = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -58,11 +50,8 @@ uint32_t ThriftHiveMetastore_create_database_args::read(apache::thrift::protocol
uint32_t ThriftHiveMetastore_create_database_args::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_args");
- xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1);
- xfer += oprot->writeString(this->name);
- xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("description", apache::thrift::protocol::T_STRING, 2);
- xfer += oprot->writeString(this->description);
+ xfer += oprot->writeFieldBegin("database", apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->database.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
@@ -72,11 +61,8 @@ uint32_t ThriftHiveMetastore_create_database_args::write(apache::thrift::protoco
uint32_t ThriftHiveMetastore_create_database_pargs::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_pargs");
- xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1);
- xfer += oprot->writeString((*(this->name)));
- xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("description", apache::thrift::protocol::T_STRING, 2);
- xfer += oprot->writeString((*(this->description)));
+ xfer += oprot->writeFieldBegin("database", apache::thrift::protocol::T_STRUCT, 1);
+ xfer += (*(this->database)).write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
@@ -103,14 +89,6 @@ uint32_t ThriftHiveMetastore_create_database_result::read(apache::thrift::protoc
}
switch (fid)
{
- case 0:
- if (ftype == apache::thrift::protocol::T_BOOL) {
- xfer += iprot->readBool(this->success);
- this->__isset.success = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
case 1:
if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->o1.read(iprot);
@@ -127,6 +105,14 @@ uint32_t ThriftHiveMetastore_create_database_result::read(apache::thrift::protoc
xfer += iprot->skip(ftype);
}
break;
+ case 3:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o3.read(iprot);
+ this->__isset.o3 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -145,11 +131,7 @@ uint32_t ThriftHiveMetastore_create_database_result::write(apache::thrift::proto
xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_result");
- if (this->__isset.success) {
- xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0);
- xfer += oprot->writeBool(this->success);
- xfer += oprot->writeFieldEnd();
- } else if (this->__isset.o1) {
+ if (this->__isset.o1) {
xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1);
xfer += this->o1.write(oprot);
xfer += oprot->writeFieldEnd();
@@ -157,6 +139,10 @@ uint32_t ThriftHiveMetastore_create_database_result::write(apache::thrift::proto
xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2);
xfer += this->o2.write(oprot);
xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.o3) {
+ xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3);
+ xfer += this->o3.write(oprot);
+ xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
@@ -183,14 +169,6 @@ uint32_t ThriftHiveMetastore_create_database_presult::read(apache::thrift::proto
}
switch (fid)
{
- case 0:
- if (ftype == apache::thrift::protocol::T_BOOL) {
- xfer += iprot->readBool((*(this->success)));
- this->__isset.success = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
case 1:
if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->o1.read(iprot);
@@ -207,6 +185,14 @@ uint32_t ThriftHiveMetastore_create_database_presult::read(apache::thrift::proto
xfer += iprot->skip(ftype);
}
break;
+ case 3:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o3.read(iprot);
+ this->__isset.o3 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -445,6 +431,14 @@ uint32_t ThriftHiveMetastore_drop_database_args::read(apache::thrift::protocol::
xfer += iprot->skip(ftype);
}
break;
+ case 2:
+ if (ftype == apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->deleteData);
+ this->__isset.deleteData = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -463,6 +457,9 @@ uint32_t ThriftHiveMetastore_drop_database_args::write(apache::thrift::protocol:
xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->name);
xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 2);
+ xfer += oprot->writeBool(this->deleteData);
+ xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -474,6 +471,9 @@ uint32_t ThriftHiveMetastore_drop_database_pargs::write(apache::thrift::protocol
xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString((*(this->name)));
xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 2);
+ xfer += oprot->writeBool((*(this->deleteData)));
+ xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -499,10 +499,10 @@ uint32_t ThriftHiveMetastore_drop_database_result::read(apache::thrift::protocol
}
switch (fid)
{
- case 0:
- if (ftype == apache::thrift::protocol::T_BOOL) {
- xfer += iprot->readBool(this->success);
- this->__isset.success = true;
+ case 1:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o1.read(iprot);
+ this->__isset.o1 = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -515,6 +515,14 @@ uint32_t ThriftHiveMetastore_drop_database_result::read(apache::thrift::protocol
xfer += iprot->skip(ftype);
}
break;
+ case 3:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o3.read(iprot);
+ this->__isset.o3 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -533,14 +541,18 @@ uint32_t ThriftHiveMetastore_drop_database_result::write(apache::thrift::protoco
xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_database_result");
- if (this->__isset.success) {
- xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0);
- xfer += oprot->writeBool(this->success);
+ if (this->__isset.o1) {
+ xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->o1.write(oprot);
xfer += oprot->writeFieldEnd();
} else if (this->__isset.o2) {
xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2);
xfer += this->o2.write(oprot);
xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.o3) {
+ xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3);
+ xfer += this->o3.write(oprot);
+ xfer += oprot->writeFieldEnd();
}
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
@@ -567,10 +579,10 @@ uint32_t ThriftHiveMetastore_drop_database_presult::read(apache::thrift::protoco
}
switch (fid)
{
- case 0:
- if (ftype == apache::thrift::protocol::T_BOOL) {
- xfer += iprot->readBool((*(this->success)));
- this->__isset.success = true;
+ case 1:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o1.read(iprot);
+ this->__isset.o1 = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -583,6 +595,14 @@ uint32_t ThriftHiveMetastore_drop_database_presult::read(apache::thrift::protoco
xfer += iprot->skip(ftype);
}
break;
+ case 3:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o3.read(iprot);
+ this->__isset.o3 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -615,6 +635,14 @@ uint32_t ThriftHiveMetastore_get_databases_args::read(apache::thrift::protocol::
}
switch (fid)
{
+ case 1:
+ if (ftype == apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->pattern);
+ this->__isset.pattern = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -630,6 +658,9 @@ uint32_t ThriftHiveMetastore_get_databases_args::read(apache::thrift::protocol::
uint32_t ThriftHiveMetastore_get_databases_args::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_args");
+ xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->pattern);
+ xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -638,6 +669,9 @@ uint32_t ThriftHiveMetastore_get_databases_args::write(apache::thrift::protocol:
uint32_t ThriftHiveMetastore_get_databases_pargs::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_pargs");
+ xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString((*(this->pattern)));
+ xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -791,6 +825,202 @@ uint32_t ThriftHiveMetastore_get_databases_presult::read(apache::thrift::protoco
return xfer;
}
+uint32_t ThriftHiveMetastore_get_all_databases_args::read(apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_all_databases_args::write(apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_args");
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_all_databases_pargs::write(apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_pargs");
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_all_databases_result::read(apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 0:
+ if (ftype == apache::thrift::protocol::T_LIST) {
+ {
+ this->success.clear();
+ uint32_t _size99;
+ apache::thrift::protocol::TType _etype102;
+ iprot->readListBegin(_etype102, _size99);
+ this->success.resize(_size99);
+ uint32_t _i103;
+ for (_i103 = 0; _i103 < _size99; ++_i103)
+ {
+ xfer += iprot->readString(this->success[_i103]);
+ }
+ iprot->readListEnd();
+ }
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 1:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o1.read(iprot);
+ this->__isset.o1 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_all_databases_result::write(apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_result");
+
+ if (this->__isset.success) {
+ xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0);
+ {
+ xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size());
+ std::vector ::const_iterator _iter104;
+ for (_iter104 = this->success.begin(); _iter104 != this->success.end(); ++_iter104)
+ {
+ xfer += oprot->writeString((*_iter104));
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.o1) {
+ xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->o1.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_all_databases_presult::read(apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 0:
+ if (ftype == apache::thrift::protocol::T_LIST) {
+ {
+ (*(this->success)).clear();
+ uint32_t _size105;
+ apache::thrift::protocol::TType _etype108;
+ iprot->readListBegin(_etype108, _size105);
+ (*(this->success)).resize(_size105);
+ uint32_t _i109;
+ for (_i109 = 0; _i109 < _size105; ++_i109)
+ {
+ xfer += iprot->readString((*(this->success))[_i109]);
+ }
+ iprot->readListEnd();
+ }
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 1:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o1.read(iprot);
+ this->__isset.o1 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
uint32_t ThriftHiveMetastore_get_type_args::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
@@ -883,6 +1113,14 @@ uint32_t ThriftHiveMetastore_get_type_result::read(apache::thrift::protocol::TPr
break;
case 1:
if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o1.read(iprot);
+ this->__isset.o1 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->o2.read(iprot);
this->__isset.o2 = true;
} else {
@@ -911,8 +1149,12 @@ uint32_t ThriftHiveMetastore_get_type_result::write(apache::thrift::protocol::TP
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0);
xfer += this->success.write(oprot);
xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.o1) {
+ xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->o1.write(oprot);
+ xfer += oprot->writeFieldEnd();
} else if (this->__isset.o2) {
- xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1);
+ xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2);
xfer += this->o2.write(oprot);
xfer += oprot->writeFieldEnd();
}
@@ -951,6 +1193,14 @@ uint32_t ThriftHiveMetastore_get_type_presult::read(apache::thrift::protocol::TP
break;
case 1:
if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o1.read(iprot);
+ this->__isset.o1 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->o2.read(iprot);
this->__isset.o2 = true;
} else {
@@ -1279,6 +1529,14 @@ uint32_t ThriftHiveMetastore_drop_type_result::read(apache::thrift::protocol::TP
break;
case 1:
if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o1.read(iprot);
+ this->__isset.o1 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->o2.read(iprot);
this->__isset.o2 = true;
} else {
@@ -1307,8 +1565,12 @@ uint32_t ThriftHiveMetastore_drop_type_result::write(apache::thrift::protocol::T
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0);
xfer += oprot->writeBool(this->success);
xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.o1) {
+ xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->o1.write(oprot);
+ xfer += oprot->writeFieldEnd();
} else if (this->__isset.o2) {
- xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1);
+ xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2);
xfer += this->o2.write(oprot);
xfer += oprot->writeFieldEnd();
}
@@ -1345,7 +1607,15 @@ uint32_t ThriftHiveMetastore_drop_type_presult::read(apache::thrift::protocol::T
xfer += iprot->skip(ftype);
}
break;
- case 1:
+ case 1:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o1.read(iprot);
+ this->__isset.o1 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
if (ftype == apache::thrift::protocol::T_STRUCT) {
xfer += this->o2.read(iprot);
this->__isset.o2 = true;
@@ -1451,17 +1721,17 @@ uint32_t ThriftHiveMetastore_get_type_all_result::read(apache::thrift::protocol:
if (ftype == apache::thrift::protocol::T_MAP) {
{
this->success.clear();
- uint32_t _size99;
- apache::thrift::protocol::TType _ktype100;
- apache::thrift::protocol::TType _vtype101;
- iprot->readMapBegin(_ktype100, _vtype101, _size99);
- uint32_t _i103;
- for (_i103 = 0; _i103 < _size99; ++_i103)
+ uint32_t _size110;
+ apache::thrift::protocol::TType _ktype111;
+ apache::thrift::protocol::TType _vtype112;
+ iprot->readMapBegin(_ktype111, _vtype112, _size110);
+ uint32_t _i114;
+ for (_i114 = 0; _i114 < _size110; ++_i114)
{
- std::string _key104;
- xfer += iprot->readString(_key104);
- Type& _val105 = this->success[_key104];
- xfer += _val105.read(iprot);
+ std::string _key115;
+ xfer += iprot->readString(_key115);
+ Type& _val116 = this->success[_key115];
+ xfer += _val116.read(iprot);
}
iprot->readMapEnd();
}
@@ -1500,11 +1770,11 @@ uint32_t ThriftHiveMetastore_get_type_all_result::write(apache::thrift::protocol
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0);
{
xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRUCT, this->success.size());
- std::map ::const_iterator _iter106;
- for (_iter106 = this->success.begin(); _iter106 != this->success.end(); ++_iter106)
+ std::map ::const_iterator _iter117;
+ for (_iter117 = this->success.begin(); _iter117 != this->success.end(); ++_iter117)
{
- xfer += oprot->writeString(_iter106->first);
- xfer += _iter106->second.write(oprot);
+ xfer += oprot->writeString(_iter117->first);
+ xfer += _iter117->second.write(oprot);
}
xfer += oprot->writeMapEnd();
}
@@ -1543,17 +1813,17 @@ uint32_t ThriftHiveMetastore_get_type_all_presult::read(apache::thrift::protocol
if (ftype == apache::thrift::protocol::T_MAP) {
{
(*(this->success)).clear();
- uint32_t _size107;
- apache::thrift::protocol::TType _ktype108;
- apache::thrift::protocol::TType _vtype109;
- iprot->readMapBegin(_ktype108, _vtype109, _size107);
- uint32_t _i111;
- for (_i111 = 0; _i111 < _size107; ++_i111)
+ uint32_t _size118;
+ apache::thrift::protocol::TType _ktype119;
+ apache::thrift::protocol::TType _vtype120;
+ iprot->readMapBegin(_ktype119, _vtype120, _size118);
+ uint32_t _i122;
+ for (_i122 = 0; _i122 < _size118; ++_i122)
{
- std::string _key112;
- xfer += iprot->readString(_key112);
- Type& _val113 = (*(this->success))[_key112];
- xfer += _val113.read(iprot);
+ std::string _key123;
+ xfer += iprot->readString(_key123);
+ Type& _val124 = (*(this->success))[_key123];
+ xfer += _val124.read(iprot);
}
iprot->readMapEnd();
}
@@ -1682,14 +1952,14 @@ uint32_t ThriftHiveMetastore_get_fields_result::read(apache::thrift::protocol::T
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size114;
- apache::thrift::protocol::TType _etype117;
- iprot->readListBegin(_etype117, _size114);
- this->success.resize(_size114);
- uint32_t _i118;
- for (_i118 = 0; _i118 < _size114; ++_i118)
+ uint32_t _size125;
+ apache::thrift::protocol::TType _etype128;
+ iprot->readListBegin(_etype128, _size125);
+ this->success.resize(_size125);
+ uint32_t _i129;
+ for (_i129 = 0; _i129 < _size125; ++_i129)
{
- xfer += this->success[_i118].read(iprot);
+ xfer += this->success[_i129].read(iprot);
}
iprot->readListEnd();
}
@@ -1744,10 +2014,10 @@ uint32_t ThriftHiveMetastore_get_fields_result::write(apache::thrift::protocol::
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size());
- std::vector ::const_iterator _iter119;
- for (_iter119 = this->success.begin(); _iter119 != this->success.end(); ++_iter119)
+ std::vector ::const_iterator _iter130;
+ for (_iter130 = this->success.begin(); _iter130 != this->success.end(); ++_iter130)
{
- xfer += (*_iter119).write(oprot);
+ xfer += (*_iter130).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -1794,14 +2064,14 @@ uint32_t ThriftHiveMetastore_get_fields_presult::read(apache::thrift::protocol::
if (ftype == apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size120;
- apache::thrift::protocol::TType _etype123;
- iprot->readListBegin(_etype123, _size120);
- (*(this->success)).resize(_size120);
- uint32_t _i124;
- for (_i124 = 0; _i124 < _size120; ++_i124)
+ uint32_t _size131;
+ apache::thrift::protocol::TType _etype134;
+ iprot->readListBegin(_etype134, _size131);
+ (*(this->success)).resize(_size131);
+ uint32_t _i135;
+ for (_i135 = 0; _i135 < _size131; ++_i135)
{
- xfer += (*(this->success))[_i124].read(iprot);
+ xfer += (*(this->success))[_i135].read(iprot);
}
iprot->readListEnd();
}
@@ -1946,14 +2216,14 @@ uint32_t ThriftHiveMetastore_get_schema_result::read(apache::thrift::protocol::T
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size125;
- apache::thrift::protocol::TType _etype128;
- iprot->readListBegin(_etype128, _size125);
- this->success.resize(_size125);
- uint32_t _i129;
- for (_i129 = 0; _i129 < _size125; ++_i129)
+ uint32_t _size136;
+ apache::thrift::protocol::TType _etype139;
+ iprot->readListBegin(_etype139, _size136);
+ this->success.resize(_size136);
+ uint32_t _i140;
+ for (_i140 = 0; _i140 < _size136; ++_i140)
{
- xfer += this->success[_i129].read(iprot);
+ xfer += this->success[_i140].read(iprot);
}
iprot->readListEnd();
}
@@ -2008,10 +2278,10 @@ uint32_t ThriftHiveMetastore_get_schema_result::write(apache::thrift::protocol::
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size());
- std::vector ::const_iterator _iter130;
- for (_iter130 = this->success.begin(); _iter130 != this->success.end(); ++_iter130)
+ std::vector ::const_iterator _iter141;
+ for (_iter141 = this->success.begin(); _iter141 != this->success.end(); ++_iter141)
{
- xfer += (*_iter130).write(oprot);
+ xfer += (*_iter141).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -2058,14 +2328,14 @@ uint32_t ThriftHiveMetastore_get_schema_presult::read(apache::thrift::protocol::
if (ftype == apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size131;
- apache::thrift::protocol::TType _etype134;
- iprot->readListBegin(_etype134, _size131);
- (*(this->success)).resize(_size131);
- uint32_t _i135;
- for (_i135 = 0; _i135 < _size131; ++_i135)
+ uint32_t _size142;
+ apache::thrift::protocol::TType _etype145;
+ iprot->readListBegin(_etype145, _size142);
+ (*(this->success)).resize(_size142);
+ uint32_t _i146;
+ for (_i146 = 0; _i146 < _size142; ++_i146)
{
- xfer += (*(this->success))[_i135].read(iprot);
+ xfer += (*(this->success))[_i146].read(iprot);
}
iprot->readListEnd();
}
@@ -2582,35 +2852,245 @@ uint32_t ThriftHiveMetastore_get_tables_args::read(apache::thrift::protocol::TPr
return xfer;
}
-uint32_t ThriftHiveMetastore_get_tables_args::write(apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t ThriftHiveMetastore_get_tables_args::write(apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_args");
+ xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->db_name);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->pattern);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_tables_pargs::write(apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_pargs");
+ xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString((*(this->db_name)));
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString((*(this->pattern)));
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_tables_result::read(apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 0:
+ if (ftype == apache::thrift::protocol::T_LIST) {
+ {
+ this->success.clear();
+ uint32_t _size147;
+ apache::thrift::protocol::TType _etype150;
+ iprot->readListBegin(_etype150, _size147);
+ this->success.resize(_size147);
+ uint32_t _i151;
+ for (_i151 = 0; _i151 < _size147; ++_i151)
+ {
+ xfer += iprot->readString(this->success[_i151]);
+ }
+ iprot->readListEnd();
+ }
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 1:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o1.read(iprot);
+ this->__isset.o1 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_tables_result::write(apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_result");
+
+ if (this->__isset.success) {
+ xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0);
+ {
+ xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size());
+ std::vector ::const_iterator _iter152;
+ for (_iter152 = this->success.begin(); _iter152 != this->success.end(); ++_iter152)
+ {
+ xfer += oprot->writeString((*_iter152));
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+ } else if (this->__isset.o1) {
+ xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->o1.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_tables_presult::read(apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 0:
+ if (ftype == apache::thrift::protocol::T_LIST) {
+ {
+ (*(this->success)).clear();
+ uint32_t _size153;
+ apache::thrift::protocol::TType _etype156;
+ iprot->readListBegin(_etype156, _size153);
+ (*(this->success)).resize(_size153);
+ uint32_t _i157;
+ for (_i157 = 0; _i157 < _size153; ++_i157)
+ {
+ xfer += iprot->readString((*(this->success))[_i157]);
+ }
+ iprot->readListEnd();
+ }
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 1:
+ if (ftype == apache::thrift::protocol::T_STRUCT) {
+ xfer += this->o1.read(iprot);
+ this->__isset.o1 = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_all_tables_args::read(apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->db_name);
+ this->__isset.db_name = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_all_tables_args::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
- xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_args");
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_args");
xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(this->db_name);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 2);
- xfer += oprot->writeString(this->pattern);
- xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
-uint32_t ThriftHiveMetastore_get_tables_pargs::write(apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t ThriftHiveMetastore_get_all_tables_pargs::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
- xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_pargs");
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_pargs");
xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString((*(this->db_name)));
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 2);
- xfer += oprot->writeString((*(this->pattern)));
- xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
-uint32_t ThriftHiveMetastore_get_tables_result::read(apache::thrift::protocol::TProtocol* iprot) {
+uint32_t ThriftHiveMetastore_get_all_tables_result::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
@@ -2634,14 +3114,14 @@ uint32_t ThriftHiveMetastore_get_tables_result::read(apache::thrift::protocol::T
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size136;
- apache::thrift::protocol::TType _etype139;
- iprot->readListBegin(_etype139, _size136);
- this->success.resize(_size136);
- uint32_t _i140;
- for (_i140 = 0; _i140 < _size136; ++_i140)
+ uint32_t _size158;
+ apache::thrift::protocol::TType _etype161;
+ iprot->readListBegin(_etype161, _size158);
+ this->success.resize(_size158);
+ uint32_t _i162;
+ for (_i162 = 0; _i162 < _size158; ++_i162)
{
- xfer += iprot->readString(this->success[_i140]);
+ xfer += iprot->readString(this->success[_i162]);
}
iprot->readListEnd();
}
@@ -2670,20 +3150,20 @@ uint32_t ThriftHiveMetastore_get_tables_result::read(apache::thrift::protocol::T
return xfer;
}
-uint32_t ThriftHiveMetastore_get_tables_result::write(apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t ThriftHiveMetastore_get_all_tables_result::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
- xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_result");
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_result");
if (this->__isset.success) {
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size());
- std::vector ::const_iterator _iter141;
- for (_iter141 = this->success.begin(); _iter141 != this->success.end(); ++_iter141)
+ std::vector ::const_iterator _iter163;
+ for (_iter163 = this->success.begin(); _iter163 != this->success.end(); ++_iter163)
{
- xfer += oprot->writeString((*_iter141));
+ xfer += oprot->writeString((*_iter163));
}
xfer += oprot->writeListEnd();
}
@@ -2698,7 +3178,7 @@ uint32_t ThriftHiveMetastore_get_tables_result::write(apache::thrift::protocol::
return xfer;
}
-uint32_t ThriftHiveMetastore_get_tables_presult::read(apache::thrift::protocol::TProtocol* iprot) {
+uint32_t ThriftHiveMetastore_get_all_tables_presult::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
@@ -2722,14 +3202,14 @@ uint32_t ThriftHiveMetastore_get_tables_presult::read(apache::thrift::protocol::
if (ftype == apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size142;
- apache::thrift::protocol::TType _etype145;
- iprot->readListBegin(_etype145, _size142);
- (*(this->success)).resize(_size142);
- uint32_t _i146;
- for (_i146 = 0; _i146 < _size142; ++_i146)
+ uint32_t _size164;
+ apache::thrift::protocol::TType _etype167;
+ iprot->readListBegin(_etype167, _size164);
+ (*(this->success)).resize(_size164);
+ uint32_t _i168;
+ for (_i168 = 0; _i168 < _size164; ++_i168)
{
- xfer += iprot->readString((*(this->success))[_i146]);
+ xfer += iprot->readString((*(this->success))[_i168]);
}
iprot->readListEnd();
}
@@ -3434,14 +3914,14 @@ uint32_t ThriftHiveMetastore_append_partition_args::read(apache::thrift::protoco
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->part_vals.clear();
- uint32_t _size147;
- apache::thrift::protocol::TType _etype150;
- iprot->readListBegin(_etype150, _size147);
- this->part_vals.resize(_size147);
- uint32_t _i151;
- for (_i151 = 0; _i151 < _size147; ++_i151)
+ uint32_t _size169;
+ apache::thrift::protocol::TType _etype172;
+ iprot->readListBegin(_etype172, _size169);
+ this->part_vals.resize(_size169);
+ uint32_t _i173;
+ for (_i173 = 0; _i173 < _size169; ++_i173)
{
- xfer += iprot->readString(this->part_vals[_i151]);
+ xfer += iprot->readString(this->part_vals[_i173]);
}
iprot->readListEnd();
}
@@ -3474,10 +3954,10 @@ uint32_t ThriftHiveMetastore_append_partition_args::write(apache::thrift::protoc
xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size());
- std::vector ::const_iterator _iter152;
- for (_iter152 = this->part_vals.begin(); _iter152 != this->part_vals.end(); ++_iter152)
+ std::vector ::const_iterator _iter174;
+ for (_iter174 = this->part_vals.begin(); _iter174 != this->part_vals.end(); ++_iter174)
{
- xfer += oprot->writeString((*_iter152));
+ xfer += oprot->writeString((*_iter174));
}
xfer += oprot->writeListEnd();
}
@@ -3499,10 +3979,10 @@ uint32_t ThriftHiveMetastore_append_partition_pargs::write(apache::thrift::proto
xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size());
- std::vector ::const_iterator _iter153;
- for (_iter153 = (*(this->part_vals)).begin(); _iter153 != (*(this->part_vals)).end(); ++_iter153)
+ std::vector ::const_iterator _iter175;
+ for (_iter175 = (*(this->part_vals)).begin(); _iter175 != (*(this->part_vals)).end(); ++_iter175)
{
- xfer += oprot->writeString((*_iter153));
+ xfer += oprot->writeString((*_iter175));
}
xfer += oprot->writeListEnd();
}
@@ -3954,14 +4434,14 @@ uint32_t ThriftHiveMetastore_drop_partition_args::read(apache::thrift::protocol:
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->part_vals.clear();
- uint32_t _size154;
- apache::thrift::protocol::TType _etype157;
- iprot->readListBegin(_etype157, _size154);
- this->part_vals.resize(_size154);
- uint32_t _i158;
- for (_i158 = 0; _i158 < _size154; ++_i158)
+ uint32_t _size176;
+ apache::thrift::protocol::TType _etype179;
+ iprot->readListBegin(_etype179, _size176);
+ this->part_vals.resize(_size176);
+ uint32_t _i180;
+ for (_i180 = 0; _i180 < _size176; ++_i180)
{
- xfer += iprot->readString(this->part_vals[_i158]);
+ xfer += iprot->readString(this->part_vals[_i180]);
}
iprot->readListEnd();
}
@@ -4002,10 +4482,10 @@ uint32_t ThriftHiveMetastore_drop_partition_args::write(apache::thrift::protocol
xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size());
- std::vector ::const_iterator _iter159;
- for (_iter159 = this->part_vals.begin(); _iter159 != this->part_vals.end(); ++_iter159)
+ std::vector ::const_iterator _iter181;
+ for (_iter181 = this->part_vals.begin(); _iter181 != this->part_vals.end(); ++_iter181)
{
- xfer += oprot->writeString((*_iter159));
+ xfer += oprot->writeString((*_iter181));
}
xfer += oprot->writeListEnd();
}
@@ -4030,10 +4510,10 @@ uint32_t ThriftHiveMetastore_drop_partition_pargs::write(apache::thrift::protoco
xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size());
- std::vector ::const_iterator _iter160;
- for (_iter160 = (*(this->part_vals)).begin(); _iter160 != (*(this->part_vals)).end(); ++_iter160)
+ std::vector ::const_iterator _iter182;
+ for (_iter182 = (*(this->part_vals)).begin(); _iter182 != (*(this->part_vals)).end(); ++_iter182)
{
- xfer += oprot->writeString((*_iter160));
+ xfer += oprot->writeString((*_iter182));
}
xfer += oprot->writeListEnd();
}
@@ -4462,14 +4942,14 @@ uint32_t ThriftHiveMetastore_get_partition_args::read(apache::thrift::protocol::
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->part_vals.clear();
- uint32_t _size161;
- apache::thrift::protocol::TType _etype164;
- iprot->readListBegin(_etype164, _size161);
- this->part_vals.resize(_size161);
- uint32_t _i165;
- for (_i165 = 0; _i165 < _size161; ++_i165)
+ uint32_t _size183;
+ apache::thrift::protocol::TType _etype186;
+ iprot->readListBegin(_etype186, _size183);
+ this->part_vals.resize(_size183);
+ uint32_t _i187;
+ for (_i187 = 0; _i187 < _size183; ++_i187)
{
- xfer += iprot->readString(this->part_vals[_i165]);
+ xfer += iprot->readString(this->part_vals[_i187]);
}
iprot->readListEnd();
}
@@ -4502,10 +4982,10 @@ uint32_t ThriftHiveMetastore_get_partition_args::write(apache::thrift::protocol:
xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size());
- std::vector ::const_iterator _iter166;
- for (_iter166 = this->part_vals.begin(); _iter166 != this->part_vals.end(); ++_iter166)
+ std::vector ::const_iterator _iter188;
+ for (_iter188 = this->part_vals.begin(); _iter188 != this->part_vals.end(); ++_iter188)
{
- xfer += oprot->writeString((*_iter166));
+ xfer += oprot->writeString((*_iter188));
}
xfer += oprot->writeListEnd();
}
@@ -4527,10 +5007,10 @@ uint32_t ThriftHiveMetastore_get_partition_pargs::write(apache::thrift::protocol
xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size());
- std::vector ::const_iterator _iter167;
- for (_iter167 = (*(this->part_vals)).begin(); _iter167 != (*(this->part_vals)).end(); ++_iter167)
+ std::vector ::const_iterator _iter189;
+ for (_iter189 = (*(this->part_vals)).begin(); _iter189 != (*(this->part_vals)).end(); ++_iter189)
{
- xfer += oprot->writeString((*_iter167));
+ xfer += oprot->writeString((*_iter189));
}
xfer += oprot->writeListEnd();
}
@@ -5016,14 +5496,14 @@ uint32_t ThriftHiveMetastore_get_partitions_result::read(apache::thrift::protoco
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size168;
- apache::thrift::protocol::TType _etype171;
- iprot->readListBegin(_etype171, _size168);
- this->success.resize(_size168);
- uint32_t _i172;
- for (_i172 = 0; _i172 < _size168; ++_i172)
+ uint32_t _size190;
+ apache::thrift::protocol::TType _etype193;
+ iprot->readListBegin(_etype193, _size190);
+ this->success.resize(_size190);
+ uint32_t _i194;
+ for (_i194 = 0; _i194 < _size190; ++_i194)
{
- xfer += this->success[_i172].read(iprot);
+ xfer += this->success[_i194].read(iprot);
}
iprot->readListEnd();
}
@@ -5070,10 +5550,10 @@ uint32_t ThriftHiveMetastore_get_partitions_result::write(apache::thrift::protoc
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size());
- std::vector ::const_iterator _iter173;
- for (_iter173 = this->success.begin(); _iter173 != this->success.end(); ++_iter173)
+ std::vector ::const_iterator _iter195;
+ for (_iter195 = this->success.begin(); _iter195 != this->success.end(); ++_iter195)
{
- xfer += (*_iter173).write(oprot);
+ xfer += (*_iter195).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -5116,14 +5596,14 @@ uint32_t ThriftHiveMetastore_get_partitions_presult::read(apache::thrift::protoc
if (ftype == apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size174;
- apache::thrift::protocol::TType _etype177;
- iprot->readListBegin(_etype177, _size174);
- (*(this->success)).resize(_size174);
- uint32_t _i178;
- for (_i178 = 0; _i178 < _size174; ++_i178)
+ uint32_t _size196;
+ apache::thrift::protocol::TType _etype199;
+ iprot->readListBegin(_etype199, _size196);
+ (*(this->success)).resize(_size196);
+ uint32_t _i200;
+ for (_i200 = 0; _i200 < _size196; ++_i200)
{
- xfer += (*(this->success))[_i178].read(iprot);
+ xfer += (*(this->success))[_i200].read(iprot);
}
iprot->readListEnd();
}
@@ -5274,14 +5754,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::read(apache::thrift::pr
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size179;
- apache::thrift::protocol::TType _etype182;
- iprot->readListBegin(_etype182, _size179);
- this->success.resize(_size179);
- uint32_t _i183;
- for (_i183 = 0; _i183 < _size179; ++_i183)
+ uint32_t _size201;
+ apache::thrift::protocol::TType _etype204;
+ iprot->readListBegin(_etype204, _size201);
+ this->success.resize(_size201);
+ uint32_t _i205;
+ for (_i205 = 0; _i205 < _size201; ++_i205)
{
- xfer += iprot->readString(this->success[_i183]);
+ xfer += iprot->readString(this->success[_i205]);
}
iprot->readListEnd();
}
@@ -5320,10 +5800,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::write(apache::thrift::p
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size());
- std::vector ::const_iterator _iter184;
- for (_iter184 = this->success.begin(); _iter184 != this->success.end(); ++_iter184)
+ std::vector ::const_iterator _iter206;
+ for (_iter206 = this->success.begin(); _iter206 != this->success.end(); ++_iter206)
{
- xfer += oprot->writeString((*_iter184));
+ xfer += oprot->writeString((*_iter206));
}
xfer += oprot->writeListEnd();
}
@@ -5362,14 +5842,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_presult::read(apache::thrift::p
if (ftype == apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size185;
- apache::thrift::protocol::TType _etype188;
- iprot->readListBegin(_etype188, _size185);
- (*(this->success)).resize(_size185);
- uint32_t _i189;
- for (_i189 = 0; _i189 < _size185; ++_i189)
+ uint32_t _size207;
+ apache::thrift::protocol::TType _etype210;
+ iprot->readListBegin(_etype210, _size207);
+ (*(this->success)).resize(_size207);
+ uint32_t _i211;
+ for (_i211 = 0; _i211 < _size207; ++_i211)
{
- xfer += iprot->readString((*(this->success))[_i189]);
+ xfer += iprot->readString((*(this->success))[_i211]);
}
iprot->readListEnd();
}
@@ -5438,14 +5918,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(apache::thrift::protoc
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->part_vals.clear();
- uint32_t _size190;
- apache::thrift::protocol::TType _etype193;
- iprot->readListBegin(_etype193, _size190);
- this->part_vals.resize(_size190);
- uint32_t _i194;
- for (_i194 = 0; _i194 < _size190; ++_i194)
+ uint32_t _size212;
+ apache::thrift::protocol::TType _etype215;
+ iprot->readListBegin(_etype215, _size212);
+ this->part_vals.resize(_size212);
+ uint32_t _i216;
+ for (_i216 = 0; _i216 < _size212; ++_i216)
{
- xfer += iprot->readString(this->part_vals[_i194]);
+ xfer += iprot->readString(this->part_vals[_i216]);
}
iprot->readListEnd();
}
@@ -5486,10 +5966,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(apache::thrift::proto
xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size());
- std::vector ::const_iterator _iter195;
- for (_iter195 = this->part_vals.begin(); _iter195 != this->part_vals.end(); ++_iter195)
+ std::vector ::const_iterator _iter217;
+ for (_iter217 = this->part_vals.begin(); _iter217 != this->part_vals.end(); ++_iter217)
{
- xfer += oprot->writeString((*_iter195));
+ xfer += oprot->writeString((*_iter217));
}
xfer += oprot->writeListEnd();
}
@@ -5514,10 +5994,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(apache::thrift::prot
xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size());
- std::vector ::const_iterator _iter196;
- for (_iter196 = (*(this->part_vals)).begin(); _iter196 != (*(this->part_vals)).end(); ++_iter196)
+ std::vector ::const_iterator _iter218;
+ for (_iter218 = (*(this->part_vals)).begin(); _iter218 != (*(this->part_vals)).end(); ++_iter218)
{
- xfer += oprot->writeString((*_iter196));
+ xfer += oprot->writeString((*_iter218));
}
xfer += oprot->writeListEnd();
}
@@ -5554,14 +6034,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(apache::thrift::prot
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size197;
- apache::thrift::protocol::TType _etype200;
- iprot->readListBegin(_etype200, _size197);
- this->success.resize(_size197);
- uint32_t _i201;
- for (_i201 = 0; _i201 < _size197; ++_i201)
+ uint32_t _size219;
+ apache::thrift::protocol::TType _etype222;
+ iprot->readListBegin(_etype222, _size219);
+ this->success.resize(_size219);
+ uint32_t _i223;
+ for (_i223 = 0; _i223 < _size219; ++_i223)
{
- xfer += this->success[_i201].read(iprot);
+ xfer += this->success[_i223].read(iprot);
}
iprot->readListEnd();
}
@@ -5600,10 +6080,10 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(apache::thrift::pro
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size());
- std::vector ::const_iterator _iter202;
- for (_iter202 = this->success.begin(); _iter202 != this->success.end(); ++_iter202)
+ std::vector ::const_iterator _iter224;
+ for (_iter224 = this->success.begin(); _iter224 != this->success.end(); ++_iter224)
{
- xfer += (*_iter202).write(oprot);
+ xfer += (*_iter224).write(oprot);
}
xfer += oprot->writeListEnd();
}
@@ -5642,14 +6122,14 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(apache::thrift::pro
if (ftype == apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size203;
- apache::thrift::protocol::TType _etype206;
- iprot->readListBegin(_etype206, _size203);
- (*(this->success)).resize(_size203);
- uint32_t _i207;
- for (_i207 = 0; _i207 < _size203; ++_i207)
+ uint32_t _size225;
+ apache::thrift::protocol::TType _etype228;
+ iprot->readListBegin(_etype228, _size225);
+ (*(this->success)).resize(_size225);
+ uint32_t _i229;
+ for (_i229 = 0; _i229 < _size225; ++_i229)
{
- xfer += (*(this->success))[_i207].read(iprot);
+ xfer += (*(this->success))[_i229].read(iprot);
}
iprot->readListEnd();
}
@@ -5718,14 +6198,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(apache::thrift::p
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->part_vals.clear();
- uint32_t _size208;
- apache::thrift::protocol::TType _etype211;
- iprot->readListBegin(_etype211, _size208);
- this->part_vals.resize(_size208);
- uint32_t _i212;
- for (_i212 = 0; _i212 < _size208; ++_i212)
+ uint32_t _size230;
+ apache::thrift::protocol::TType _etype233;
+ iprot->readListBegin(_etype233, _size230);
+ this->part_vals.resize(_size230);
+ uint32_t _i234;
+ for (_i234 = 0; _i234 < _size230; ++_i234)
{
- xfer += iprot->readString(this->part_vals[_i212]);
+ xfer += iprot->readString(this->part_vals[_i234]);
}
iprot->readListEnd();
}
@@ -5766,10 +6246,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(apache::thrift::
xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size());
- std::vector ::const_iterator _iter213;
- for (_iter213 = this->part_vals.begin(); _iter213 != this->part_vals.end(); ++_iter213)
+ std::vector ::const_iterator _iter235;
+ for (_iter235 = this->part_vals.begin(); _iter235 != this->part_vals.end(); ++_iter235)
{
- xfer += oprot->writeString((*_iter213));
+ xfer += oprot->writeString((*_iter235));
}
xfer += oprot->writeListEnd();
}
@@ -5794,10 +6274,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(apache::thrift:
xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size());
- std::vector ::const_iterator _iter214;
- for (_iter214 = (*(this->part_vals)).begin(); _iter214 != (*(this->part_vals)).end(); ++_iter214)
+ std::vector ::const_iterator _iter236;
+ for (_iter236 = (*(this->part_vals)).begin(); _iter236 != (*(this->part_vals)).end(); ++_iter236)
{
- xfer += oprot->writeString((*_iter214));
+ xfer += oprot->writeString((*_iter236));
}
xfer += oprot->writeListEnd();
}
@@ -5834,14 +6314,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(apache::thrift:
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size215;
- apache::thrift::protocol::TType _etype218;
- iprot->readListBegin(_etype218, _size215);
- this->success.resize(_size215);
- uint32_t _i219;
- for (_i219 = 0; _i219 < _size215; ++_i219)
+ uint32_t _size237;
+ apache::thrift::protocol::TType _etype240;
+ iprot->readListBegin(_etype240, _size237);
+ this->success.resize(_size237);
+ uint32_t _i241;
+ for (_i241 = 0; _i241 < _size237; ++_i241)
{
- xfer += iprot->readString(this->success[_i219]);
+ xfer += iprot->readString(this->success[_i241]);
}
iprot->readListEnd();
}
@@ -5880,10 +6360,10 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(apache::thrift
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size());
- std::vector ::const_iterator _iter220;
- for (_iter220 = this->success.begin(); _iter220 != this->success.end(); ++_iter220)
+ std::vector ::const_iterator _iter242;
+ for (_iter242 = this->success.begin(); _iter242 != this->success.end(); ++_iter242)
{
- xfer += oprot->writeString((*_iter220));
+ xfer += oprot->writeString((*_iter242));
}
xfer += oprot->writeListEnd();
}
@@ -5922,14 +6402,14 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(apache::thrift
if (ftype == apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size221;
- apache::thrift::protocol::TType _etype224;
- iprot->readListBegin(_etype224, _size221);
- (*(this->success)).resize(_size221);
- uint32_t _i225;
- for (_i225 = 0; _i225 < _size221; ++_i225)
+ uint32_t _size243;
+ apache::thrift::protocol::TType _etype246;
+ iprot->readListBegin(_etype246, _size243);
+ (*(this->success)).resize(_size243);
+ uint32_t _i247;
+ for (_i247 = 0; _i247 < _size243; ++_i247)
{
- xfer += iprot->readString((*(this->success))[_i225]);
+ xfer += iprot->readString((*(this->success))[_i247]);
}
iprot->readListEnd();
}
@@ -6442,14 +6922,14 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(apache::thrift:
if (ftype == apache::thrift::protocol::T_LIST) {
{
this->success.clear();
- uint32_t _size226;
- apache::thrift::protocol::TType _etype229;
- iprot->readListBegin(_etype229, _size226);
- this->success.resize(_size226);
- uint32_t _i230;
- for (_i230 = 0; _i230 < _size226; ++_i230)
+ uint32_t _size248;
+ apache::thrift::protocol::TType _etype251;
+ iprot->readListBegin(_etype251, _size248);
+ this->success.resize(_size248);
+ uint32_t _i252;
+ for (_i252 = 0; _i252 < _size248; ++_i252)
{
- xfer += iprot->readString(this->success[_i230]);
+ xfer += iprot->readString(this->success[_i252]);
}
iprot->readListEnd();
}
@@ -6488,10 +6968,10 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(apache::thrift
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0);
{
xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size());
- std::vector ::const_iterator _iter231;
- for (_iter231 = this->success.begin(); _iter231 != this->success.end(); ++_iter231)
+ std::vector ::const_iterator _iter253;
+ for (_iter253 = this->success.begin(); _iter253 != this->success.end(); ++_iter253)
{
- xfer += oprot->writeString((*_iter231));
+ xfer += oprot->writeString((*_iter253));
}
xfer += oprot->writeListEnd();
}
@@ -6530,14 +7010,14 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(apache::thrift
if (ftype == apache::thrift::protocol::T_LIST) {
{
(*(this->success)).clear();
- uint32_t _size232;
- apache::thrift::protocol::TType _etype235;
- iprot->readListBegin(_etype235, _size232);
- (*(this->success)).resize(_size232);
- uint32_t _i236;
- for (_i236 = 0; _i236 < _size232; ++_i236)
+ uint32_t _size254;
+ apache::thrift::protocol::TType _etype257;
+ iprot->readListBegin(_etype257, _size254);
+ (*(this->success)).resize(_size254);
+ uint32_t _i258;
+ for (_i258 = 0; _i258 < _size254; ++_i258)
{
- xfer += iprot->readString((*(this->success))[_i236]);
+ xfer += iprot->readString((*(this->success))[_i258]);
}
iprot->readListEnd();
}
@@ -6652,17 +7132,17 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(apache::thrift:
if (ftype == apache::thrift::protocol::T_MAP) {
{
this->success.clear();
- uint32_t _size237;
- apache::thrift::protocol::TType _ktype238;
- apache::thrift::protocol::TType _vtype239;
- iprot->readMapBegin(_ktype238, _vtype239, _size237);
- uint32_t _i241;
- for (_i241 = 0; _i241 < _size237; ++_i241)
+ uint32_t _size259;
+ apache::thrift::protocol::TType _ktype260;
+ apache::thrift::protocol::TType _vtype261;
+ iprot->readMapBegin(_ktype260, _vtype261, _size259);
+ uint32_t _i263;
+ for (_i263 = 0; _i263 < _size259; ++_i263)
{
- std::string _key242;
- xfer += iprot->readString(_key242);
- std::string& _val243 = this->success[_key242];
- xfer += iprot->readString(_val243);
+ std::string _key264;
+ xfer += iprot->readString(_key264);
+ std::string& _val265 = this->success[_key264];
+ xfer += iprot->readString(_val265);
}
iprot->readMapEnd();
}
@@ -6701,11 +7181,11 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(apache::thrift
xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0);
{
xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->success.size());
- std::map ::const_iterator _iter244;
- for (_iter244 = this->success.begin(); _iter244 != this->success.end(); ++_iter244)
+ std::map ::const_iterator _iter266;
+ for (_iter266 = this->success.begin(); _iter266 != this->success.end(); ++_iter266)
{
- xfer += oprot->writeString(_iter244->first);
- xfer += oprot->writeString(_iter244->second);
+ xfer += oprot->writeString(_iter266->first);
+ xfer += oprot->writeString(_iter266->second);
}
xfer += oprot->writeMapEnd();
}
@@ -6744,17 +7224,17 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(apache::thrift
if (ftype == apache::thrift::protocol::T_MAP) {
{
(*(this->success)).clear();
- uint32_t _size245;
- apache::thrift::protocol::TType _ktype246;
- apache::thrift::protocol::TType _vtype247;
- iprot->readMapBegin(_ktype246, _vtype247, _size245);
- uint32_t _i249;
- for (_i249 = 0; _i249 < _size245; ++_i249)
+ uint32_t _size267;
+ apache::thrift::protocol::TType _ktype268;
+ apache::thrift::protocol::TType _vtype269;
+ iprot->readMapBegin(_ktype268, _vtype269, _size267);
+ uint32_t _i271;
+ for (_i271 = 0; _i271 < _size267; ++_i271)
{
- std::string _key250;
- xfer += iprot->readString(_key250);
- std::string& _val251 = (*(this->success))[_key250];
- xfer += iprot->readString(_val251);
+ std::string _key272;
+ xfer += iprot->readString(_key272);
+ std::string& _val273 = (*(this->success))[_key272];
+ xfer += iprot->readString(_val273);
}
iprot->readMapEnd();
}
@@ -6783,20 +7263,19 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(apache::thrift
return xfer;
}
-bool ThriftHiveMetastoreClient::create_database(const std::string& name, const std::string& description)
+void ThriftHiveMetastoreClient::create_database(const Database& database)
{
- send_create_database(name, description);
- return recv_create_database();
+ send_create_database(database);
+ recv_create_database();
}
-void ThriftHiveMetastoreClient::send_create_database(const std::string& name, const std::string& description)
+void ThriftHiveMetastoreClient::send_create_database(const Database& database)
{
int32_t cseqid = 0;
oprot_->writeMessageBegin("create_database", apache::thrift::protocol::T_CALL, cseqid);
ThriftHiveMetastore_create_database_pargs args;
- args.name = &name;
- args.description = &description;
+ args.database = &database;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -6804,7 +7283,7 @@ void ThriftHiveMetastoreClient::send_create_database(const std::string& name, co
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_create_database()
+void ThriftHiveMetastoreClient::recv_create_database()
{
int32_t rseqid = 0;
@@ -6831,23 +7310,21 @@ bool ThriftHiveMetastoreClient::recv_create_database()
iprot_->getTransport()->readEnd();
throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- bool _return;
ThriftHiveMetastore_create_database_presult result;
- result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- if (result.__isset.success) {
- return _return;
- }
if (result.__isset.o1) {
throw result.o1;
}
if (result.__isset.o2) {
throw result.o2;
}
- throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "create_database failed: unknown result");
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ return;
}
void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name)
@@ -6916,19 +7393,20 @@ void ThriftHiveMetastoreClient::recv_get_database(Database& _return)
throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result");
}
-bool ThriftHiveMetastoreClient::drop_database(const std::string& name)
+void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData)
{
- send_drop_database(name);
- return recv_drop_database();
+ send_drop_database(name, deleteData);
+ recv_drop_database();
}
-void ThriftHiveMetastoreClient::send_drop_database(const std::string& name)
+void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData)
{
int32_t cseqid = 0;
oprot_->writeMessageBegin("drop_database", apache::thrift::protocol::T_CALL, cseqid);
ThriftHiveMetastore_drop_database_pargs args;
args.name = &name;
+ args.deleteData = &deleteData;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -6936,7 +7414,7 @@ void ThriftHiveMetastoreClient::send_drop_database(const std::string& name)
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_drop_database()
+void ThriftHiveMetastoreClient::recv_drop_database()
{
int32_t rseqid = 0;
@@ -6963,34 +7441,36 @@ bool ThriftHiveMetastoreClient::recv_drop_database()
iprot_->getTransport()->readEnd();
throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- bool _return;
ThriftHiveMetastore_drop_database_presult result;
- result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- if (result.__isset.success) {
- return _return;
+ if (result.__isset.o1) {
+ throw result.o1;
}
if (result.__isset.o2) {
throw result.o2;
}
- throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_database failed: unknown result");
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ return;
}
-void ThriftHiveMetastoreClient::get_databases(std::vector & _return)
+void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern)
{
- send_get_databases();
+ send_get_databases(pattern);
recv_get_databases(_return);
}
-void ThriftHiveMetastoreClient::send_get_databases()
+void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern)
{
int32_t cseqid = 0;
oprot_->writeMessageBegin("get_databases", apache::thrift::protocol::T_CALL, cseqid);
ThriftHiveMetastore_get_databases_pargs args;
+ args.pattern = &pattern;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -7041,6 +7521,68 @@ void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _r
throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result");
}
+void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return)
+{
+ send_get_all_databases();
+ recv_get_all_databases(_return);
+}
+
+void ThriftHiveMetastoreClient::send_get_all_databases()
+{
+ int32_t cseqid = 0;
+ oprot_->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_CALL, cseqid);
+
+ ThriftHiveMetastore_get_all_databases_pargs args;
+ args.write(oprot_);
+
+ oprot_->writeMessageEnd();
+ oprot_->getTransport()->flush();
+ oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return)
+{
+
+ int32_t rseqid = 0;
+ std::string fname;
+ apache::thrift::protocol::TMessageType mtype;
+
+ iprot_->readMessageBegin(fname, mtype, rseqid);
+ if (mtype == apache::thrift::protocol::T_EXCEPTION) {
+ apache::thrift::TApplicationException x;
+ x.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw x;
+ }
+ if (mtype != apache::thrift::protocol::T_REPLY) {
+ iprot_->skip(apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+ }
+ if (fname.compare("get_all_databases") != 0) {
+ iprot_->skip(apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME);
+ }
+ ThriftHiveMetastore_get_all_databases_presult result;
+ result.success = &_return;
+ result.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+
+ if (result.__isset.success) {
+ // _return pointer has now been filled
+ return;
+ }
+ if (result.__isset.o1) {
+ throw result.o1;
+ }
+ throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result");
+}
+
void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name)
{
send_get_type(name);
@@ -7098,6 +7640,9 @@ void ThriftHiveMetastoreClient::recv_get_type(Type& _return)
// _return pointer has now been filled
return;
}
+ if (result.__isset.o1) {
+ throw result.o1;
+ }
if (result.__isset.o2) {
throw result.o2;
}
@@ -7230,6 +7775,9 @@ bool ThriftHiveMetastoreClient::recv_drop_type()
if (result.__isset.success) {
return _return;
}
+ if (result.__isset.o1) {
+ throw result.o1;
+ }
if (result.__isset.o2) {
throw result.o2;
}
@@ -7633,6 +8181,69 @@ void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _retu
throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result");
}
+void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name)
+{
+ send_get_all_tables(db_name);
+ recv_get_all_tables(_return);
+}
+
+void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name)
+{
+ int32_t cseqid = 0;
+ oprot_->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_CALL, cseqid);
+
+ ThriftHiveMetastore_get_all_tables_pargs args;
+ args.db_name = &db_name;
+ args.write(oprot_);
+
+ oprot_->writeMessageEnd();
+ oprot_->getTransport()->flush();
+ oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return)
+{
+
+ int32_t rseqid = 0;
+ std::string fname;
+ apache::thrift::protocol::TMessageType mtype;
+
+ iprot_->readMessageBegin(fname, mtype, rseqid);
+ if (mtype == apache::thrift::protocol::T_EXCEPTION) {
+ apache::thrift::TApplicationException x;
+ x.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw x;
+ }
+ if (mtype != apache::thrift::protocol::T_REPLY) {
+ iprot_->skip(apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
+ }
+ if (fname.compare("get_all_tables") != 0) {
+ iprot_->skip(apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME);
+ }
+ ThriftHiveMetastore_get_all_tables_presult result;
+ result.success = &_return;
+ result.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+
+ if (result.__isset.success) {
+ // _return pointer has now been filled
+ return;
+ }
+ if (result.__isset.o1) {
+ throw result.o1;
+ }
+ throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result");
+}
+
void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name)
{
send_get_table(dbname, tbl_name);
@@ -8811,14 +9422,16 @@ void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, apache
ThriftHiveMetastore_create_database_result result;
try {
- result.success = iface_->create_database(args.name, args.description);
- result.__isset.success = true;
+ iface_->create_database(args.database);
} catch (AlreadyExistsException &o1) {
result.o1 = o1;
result.__isset.o1 = true;
- } catch (MetaException &o2) {
+ } catch (InvalidObjectException &o2) {
result.o2 = o2;
result.__isset.o2 = true;
+ } catch (MetaException &o3) {
+ result.o3 = o3;
+ result.__isset.o3 = true;
} catch (const std::exception& e) {
apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_EXCEPTION, seqid);
@@ -8879,11 +9492,16 @@ void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, apache::
ThriftHiveMetastore_drop_database_result result;
try {
- result.success = iface_->drop_database(args.name);
- result.__isset.success = true;
- } catch (MetaException &o2) {
+ iface_->drop_database(args.name, args.deleteData);
+ } catch (NoSuchObjectException &o1) {
+ result.o1 = o1;
+ result.__isset.o1 = true;
+ } catch (InvalidOperationException &o2) {
result.o2 = o2;
result.__isset.o2 = true;
+ } catch (MetaException &o3) {
+ result.o3 = o3;
+ result.__isset.o3 = true;
} catch (const std::exception& e) {
apache::thrift::TApplicationException x(e.what());
oprot->writeMessageBegin("drop_database", apache::thrift::protocol::T_EXCEPTION, seqid);
@@ -8910,7 +9528,7 @@ void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, apache::
ThriftHiveMetastore_get_databases_result result;
try {
- iface_->get_databases(result.success);
+ iface_->get_databases(result.success, args.pattern);
result.__isset.success = true;
} catch (MetaException &o1) {
result.o1 = o1;
@@ -8932,6 +9550,37 @@ void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, apache::
oprot->getTransport()->writeEnd();
}
+void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot)
+{
+ ThriftHiveMetastore_get_all_databases_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ iprot->getTransport()->readEnd();
+
+ ThriftHiveMetastore_get_all_databases_result result;
+ try {
+ iface_->get_all_databases(result.success);
+ result.__isset.success = true;
+ } catch (MetaException &o1) {
+ result.o1 = o1;
+ result.__isset.o1 = true;
+ } catch (const std::exception& e) {
+ apache::thrift::TApplicationException x(e.what());
+ oprot->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_EXCEPTION, seqid);
+ x.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+ return;
+ }
+
+ oprot->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_REPLY, seqid);
+ result.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+}
+
void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot)
{
ThriftHiveMetastore_get_type_args args;
@@ -8943,7 +9592,10 @@ void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, apache::thrif
try {
iface_->get_type(result.success, args.name);
result.__isset.success = true;
- } catch (MetaException &o2) {
+ } catch (MetaException &o1) {
+ result.o1 = o1;
+ result.__isset.o1 = true;
+ } catch (NoSuchObjectException &o2) {
result.o2 = o2;
result.__isset.o2 = true;
} catch (const std::exception& e) {
@@ -9011,7 +9663,10 @@ void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, apache::thri
try {
result.success = iface_->drop_type(args.type);
result.__isset.success = true;
- } catch (MetaException &o2) {
+ } catch (MetaException &o1) {
+ result.o1 = o1;
+ result.__isset.o1 = true;
+ } catch (NoSuchObjectException &o2) {
result.o2 = o2;
result.__isset.o2 = true;
} catch (const std::exception& e) {
@@ -9239,6 +9894,37 @@ void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, apache::thr
oprot->getTransport()->writeEnd();
}
+void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot)
+{
+ ThriftHiveMetastore_get_all_tables_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ iprot->getTransport()->readEnd();
+
+ ThriftHiveMetastore_get_all_tables_result result;
+ try {
+ iface_->get_all_tables(result.success, args.db_name);
+ result.__isset.success = true;
+ } catch (MetaException &o1) {
+ result.o1 = o1;
+ result.__isset.o1 = true;
+ } catch (const std::exception& e) {
+ apache::thrift::TApplicationException x(e.what());
+ oprot->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_EXCEPTION, seqid);
+ x.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+ return;
+ }
+
+ oprot->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_REPLY, seqid);
+ result.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+}
+
void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot)
{
ThriftHiveMetastore_get_table_args args;
diff --git metastore/src/gen-cpp/ThriftHiveMetastore.h metastore/src/gen-cpp/ThriftHiveMetastore.h
index aae1c2e..1b7cbdc 100644
--- metastore/src/gen-cpp/ThriftHiveMetastore.h
+++ metastore/src/gen-cpp/ThriftHiveMetastore.h
@@ -15,10 +15,11 @@ namespace Apache { namespace Hadoop { namespace Hive {
class ThriftHiveMetastoreIf : virtual public facebook::fb303::FacebookServiceIf {
public:
virtual ~ThriftHiveMetastoreIf() {}
- virtual bool create_database(const std::string& name, const std::string& description) = 0;
+ virtual void create_database(const Database& database) = 0;
virtual void get_database(Database& _return, const std::string& name) = 0;
- virtual bool drop_database(const std::string& name) = 0;
- virtual void get_databases(std::vector & _return) = 0;
+ virtual void drop_database(const std::string& name, const bool deleteData) = 0;
+ virtual void get_databases(std::vector & _return, const std::string& pattern) = 0;
+ virtual void get_all_databases(std::vector & _return) = 0;
virtual void get_type(Type& _return, const std::string& name) = 0;
virtual bool create_type(const Type& type) = 0;
virtual bool drop_type(const std::string& type) = 0;
@@ -28,6 +29,7 @@ class ThriftHiveMetastoreIf : virtual public facebook::fb303::FacebookServiceIf
virtual void create_table(const Table& tbl) = 0;
virtual void drop_table(const std::string& dbname, const std::string& name, const bool deleteData) = 0;
virtual void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) = 0;
+ virtual void get_all_tables(std::vector & _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 alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) = 0;
virtual void add_partition(Partition& _return, const Partition& new_part) = 0;
@@ -50,18 +52,19 @@ class ThriftHiveMetastoreIf : virtual public facebook::fb303::FacebookServiceIf
class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public facebook::fb303::FacebookServiceNull {
public:
virtual ~ThriftHiveMetastoreNull() {}
- bool create_database(const std::string& /* name */, const std::string& /* description */) {
- bool _return = false;
- return _return;
+ void create_database(const Database& /* database */) {
+ return;
}
void get_database(Database& /* _return */, const std::string& /* name */) {
return;
}
- bool drop_database(const std::string& /* name */) {
- bool _return = false;
- return _return;
+ void drop_database(const std::string& /* name */, const bool /* deleteData */) {
+ return;
+ }
+ void get_databases(std::vector & /* _return */, const std::string& /* pattern */) {
+ return;
}
- void get_databases(std::vector & /* _return */) {
+ void get_all_databases(std::vector & /* _return */) {
return;
}
void get_type(Type& /* _return */, const std::string& /* name */) {
@@ -93,6 +96,9 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p
void get_tables(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* pattern */) {
return;
}
+ void get_all_tables(std::vector & /* _return */, const std::string& /* db_name */) {
+ return;
+ }
void get_table(Table& /* _return */, const std::string& /* dbname */, const std::string& /* tbl_name */) {
return;
}
@@ -151,25 +157,21 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p
class ThriftHiveMetastore_create_database_args {
public:
- ThriftHiveMetastore_create_database_args() : name(""), description("") {
+ ThriftHiveMetastore_create_database_args() {
}
virtual ~ThriftHiveMetastore_create_database_args() throw() {}
- std::string name;
- std::string description;
+ Database database;
struct __isset {
- __isset() : name(false), description(false) {}
- bool name;
- bool description;
+ __isset() : database(false) {}
+ bool database;
} __isset;
bool operator == (const ThriftHiveMetastore_create_database_args & rhs) const
{
- if (!(name == rhs.name))
- return false;
- if (!(description == rhs.description))
+ if (!(database == rhs.database))
return false;
return true;
}
@@ -190,8 +192,7 @@ class ThriftHiveMetastore_create_database_pargs {
virtual ~ThriftHiveMetastore_create_database_pargs() throw() {}
- const std::string* name;
- const std::string* description;
+ const Database* database;
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
@@ -200,30 +201,30 @@ class ThriftHiveMetastore_create_database_pargs {
class ThriftHiveMetastore_create_database_result {
public:
- ThriftHiveMetastore_create_database_result() : success(0) {
+ ThriftHiveMetastore_create_database_result() {
}
virtual ~ThriftHiveMetastore_create_database_result() throw() {}
- bool success;
AlreadyExistsException o1;
- MetaException o2;
+ InvalidObjectException o2;
+ MetaException o3;
struct __isset {
- __isset() : success(false), o1(false), o2(false) {}
- bool success;
+ __isset() : o1(false), o2(false), o3(false) {}
bool o1;
bool o2;
+ bool o3;
} __isset;
bool operator == (const ThriftHiveMetastore_create_database_result & rhs) const
{
- if (!(success == rhs.success))
- return false;
if (!(o1 == rhs.o1))
return false;
if (!(o2 == rhs.o2))
return false;
+ if (!(o3 == rhs.o3))
+ return false;
return true;
}
bool operator != (const ThriftHiveMetastore_create_database_result &rhs) const {
@@ -243,15 +244,15 @@ class ThriftHiveMetastore_create_database_presult {
virtual ~ThriftHiveMetastore_create_database_presult() throw() {}
- bool* success;
AlreadyExistsException o1;
- MetaException o2;
+ InvalidObjectException o2;
+ MetaException o3;
struct __isset {
- __isset() : success(false), o1(false), o2(false) {}
- bool success;
+ __isset() : o1(false), o2(false), o3(false) {}
bool o1;
bool o2;
+ bool o3;
} __isset;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
@@ -366,22 +367,26 @@ class ThriftHiveMetastore_get_database_presult {
class ThriftHiveMetastore_drop_database_args {
public:
- ThriftHiveMetastore_drop_database_args() : name("") {
+ ThriftHiveMetastore_drop_database_args() : name(""), deleteData(0) {
}
virtual ~ThriftHiveMetastore_drop_database_args() throw() {}
std::string name;
+ bool deleteData;
struct __isset {
- __isset() : name(false) {}
+ __isset() : name(false), deleteData(false) {}
bool name;
+ bool deleteData;
} __isset;
bool operator == (const ThriftHiveMetastore_drop_database_args & rhs) const
{
if (!(name == rhs.name))
return false;
+ if (!(deleteData == rhs.deleteData))
+ return false;
return true;
}
bool operator != (const ThriftHiveMetastore_drop_database_args &rhs) const {
@@ -402,6 +407,7 @@ class ThriftHiveMetastore_drop_database_pargs {
virtual ~ThriftHiveMetastore_drop_database_pargs() throw() {}
const std::string* name;
+ const bool* deleteData;
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
@@ -410,26 +416,30 @@ class ThriftHiveMetastore_drop_database_pargs {
class ThriftHiveMetastore_drop_database_result {
public:
- ThriftHiveMetastore_drop_database_result() : success(0) {
+ ThriftHiveMetastore_drop_database_result() {
}
virtual ~ThriftHiveMetastore_drop_database_result() throw() {}
- bool success;
- MetaException o2;
+ NoSuchObjectException o1;
+ InvalidOperationException o2;
+ MetaException o3;
struct __isset {
- __isset() : success(false), o2(false) {}
- bool success;
+ __isset() : o1(false), o2(false), o3(false) {}
+ bool o1;
bool o2;
+ bool o3;
} __isset;
bool operator == (const ThriftHiveMetastore_drop_database_result & rhs) const
{
- if (!(success == rhs.success))
+ if (!(o1 == rhs.o1))
return false;
if (!(o2 == rhs.o2))
return false;
+ if (!(o3 == rhs.o3))
+ return false;
return true;
}
bool operator != (const ThriftHiveMetastore_drop_database_result &rhs) const {
@@ -449,13 +459,15 @@ class ThriftHiveMetastore_drop_database_presult {
virtual ~ThriftHiveMetastore_drop_database_presult() throw() {}
- bool* success;
- MetaException o2;
+ NoSuchObjectException o1;
+ InvalidOperationException o2;
+ MetaException o3;
struct __isset {
- __isset() : success(false), o2(false) {}
- bool success;
+ __isset() : o1(false), o2(false), o3(false) {}
+ bool o1;
bool o2;
+ bool o3;
} __isset;
uint32_t read(apache::thrift::protocol::TProtocol* iprot);
@@ -465,14 +477,22 @@ class ThriftHiveMetastore_drop_database_presult {
class ThriftHiveMetastore_get_databases_args {
public:
- ThriftHiveMetastore_get_databases_args() {
+ ThriftHiveMetastore_get_databases_args() : pattern("") {
}
virtual ~ThriftHiveMetastore_get_databases_args() throw() {}
+ std::string pattern;
- bool operator == (const ThriftHiveMetastore_get_databases_args & /* rhs */) const
+ struct __isset {
+ __isset() : pattern(false) {}
+ bool pattern;
+ } __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_databases_args & rhs) const
{
+ if (!(pattern == rhs.pattern))
+ return false;
return true;
}
bool operator != (const ThriftHiveMetastore_get_databases_args &rhs) const {
@@ -492,6 +512,7 @@ class ThriftHiveMetastore_get_databases_pargs {
virtual ~ThriftHiveMetastore_get_databases_pargs() throw() {}
+ const std::string* pattern;
uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
@@ -552,6 +573,96 @@ class ThriftHiveMetastore_get_databases_presult {
};
+class ThriftHiveMetastore_get_all_databases_args {
+ public:
+
+ ThriftHiveMetastore_get_all_databases_args() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_all_databases_args() throw() {}
+
+
+ bool operator == (const ThriftHiveMetastore_get_all_databases_args & /* rhs */) const
+ {
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_all_databases_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_all_databases_args & ) const;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_databases_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_all_databases_pargs() throw() {}
+
+
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_databases_result {
+ public:
+
+ ThriftHiveMetastore_get_all_databases_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_all_databases_result() throw() {}
+
+ std::vector success;
+ MetaException o1;
+
+ struct __isset {
+ __isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+ } __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_all_databases_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_all_databases_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_all_databases_result & ) const;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_databases_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_all_databases_presult() throw() {}
+
+ std::vector * success;
+ MetaException o1;
+
+ struct __isset {
+ __isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+ } __isset;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+
+};
+
class ThriftHiveMetastore_get_type_args {
public:
@@ -605,11 +716,13 @@ class ThriftHiveMetastore_get_type_result {
virtual ~ThriftHiveMetastore_get_type_result() throw() {}
Type success;
- MetaException o2;
+ MetaException o1;
+ NoSuchObjectException o2;
struct __isset {
- __isset() : success(false), o2(false) {}
+ __isset() : success(false), o1(false), o2(false) {}
bool success;
+ bool o1;
bool o2;
} __isset;
@@ -617,6 +730,8 @@ class ThriftHiveMetastore_get_type_result {
{
if (!(success == rhs.success))
return false;
+ if (!(o1 == rhs.o1))
+ return false;
if (!(o2 == rhs.o2))
return false;
return true;
@@ -639,11 +754,13 @@ class ThriftHiveMetastore_get_type_presult {
virtual ~ThriftHiveMetastore_get_type_presult() throw() {}
Type* success;
- MetaException o2;
+ MetaException o1;
+ NoSuchObjectException o2;
struct __isset {
- __isset() : success(false), o2(false) {}
+ __isset() : success(false), o1(false), o2(false) {}
bool success;
+ bool o1;
bool o2;
} __isset;
@@ -815,11 +932,13 @@ class ThriftHiveMetastore_drop_type_result {
virtual ~ThriftHiveMetastore_drop_type_result() throw() {}
bool success;
- MetaException o2;
+ MetaException o1;
+ NoSuchObjectException o2;
struct __isset {
- __isset() : success(false), o2(false) {}
+ __isset() : success(false), o1(false), o2(false) {}
bool success;
+ bool o1;
bool o2;
} __isset;
@@ -827,6 +946,8 @@ class ThriftHiveMetastore_drop_type_result {
{
if (!(success == rhs.success))
return false;
+ if (!(o1 == rhs.o1))
+ return false;
if (!(o2 == rhs.o2))
return false;
return true;
@@ -849,11 +970,13 @@ class ThriftHiveMetastore_drop_type_presult {
virtual ~ThriftHiveMetastore_drop_type_presult() throw() {}
bool* success;
- MetaException o2;
+ MetaException o1;
+ NoSuchObjectException o2;
struct __isset {
- __isset() : success(false), o2(false) {}
+ __isset() : success(false), o1(false), o2(false) {}
bool success;
+ bool o1;
bool o2;
} __isset;
@@ -1516,6 +1639,105 @@ class ThriftHiveMetastore_get_tables_presult {
};
+class ThriftHiveMetastore_get_all_tables_args {
+ public:
+
+ ThriftHiveMetastore_get_all_tables_args() : db_name("") {
+ }
+
+ virtual ~ThriftHiveMetastore_get_all_tables_args() throw() {}
+
+ std::string db_name;
+
+ struct __isset {
+ __isset() : db_name(false) {}
+ bool db_name;
+ } __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_all_tables_args & rhs) const
+ {
+ if (!(db_name == rhs.db_name))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_all_tables_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_all_tables_args & ) const;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_tables_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_all_tables_pargs() throw() {}
+
+ const std::string* db_name;
+
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_tables_result {
+ public:
+
+ ThriftHiveMetastore_get_all_tables_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_get_all_tables_result() throw() {}
+
+ std::vector success;
+ MetaException o1;
+
+ struct __isset {
+ __isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+ } __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_all_tables_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_all_tables_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_all_tables_result & ) const;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+class ThriftHiveMetastore_get_all_tables_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_all_tables_presult() throw() {}
+
+ std::vector * success;
+ MetaException o1;
+
+ struct __isset {
+ __isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+ } __isset;
+
+ uint32_t read(apache::thrift::protocol::TProtocol* iprot);
+
+};
+
class ThriftHiveMetastore_get_table_args {
public:
@@ -3433,18 +3655,21 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public f
boost::shared_ptr getOutputProtocol() {
return poprot_;
}
- bool create_database(const std::string& name, const std::string& description);
- void send_create_database(const std::string& name, const std::string& description);
- bool recv_create_database();
+ void create_database(const Database& database);
+ void send_create_database(const Database& database);
+ void recv_create_database();
void get_database(Database& _return, const std::string& name);
void send_get_database(const std::string& name);
void recv_get_database(Database& _return);
- bool drop_database(const std::string& name);
- void send_drop_database(const std::string& name);
- bool recv_drop_database();
- void get_databases(std::vector & _return);
- void send_get_databases();
+ void drop_database(const std::string& name, const bool deleteData);
+ void send_drop_database(const std::string& name, const bool deleteData);
+ void recv_drop_database();
+ void get_databases(std::vector & _return, const std::string& pattern);
+ void send_get_databases(const std::string& pattern);
void recv_get_databases(std::vector & _return);
+ void get_all_databases(std::vector & _return);
+ void send_get_all_databases();
+ void recv_get_all_databases(std::vector & _return);
void get_type(Type& _return, const std::string& name);
void send_get_type(const std::string& name);
void recv_get_type(Type& _return);
@@ -3472,6 +3697,9 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public f
void get_tables(std::vector & _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 & _return);
+ void get_all_tables(std::vector & _return, const std::string& db_name);
+ void send_get_all_tables(const std::string& db_name);
+ void recv_get_all_tables(std::vector & _return);
void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name);
void send_get_table(const std::string& dbname, const std::string& tbl_name);
void recv_get_table(Table& _return);
@@ -3535,6 +3763,7 @@ class ThriftHiveMetastoreProcessor : virtual public apache::thrift::TProcessor,
void process_get_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_drop_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_get_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
+ void process_get_all_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_get_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_create_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_drop_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
@@ -3544,6 +3773,7 @@ class ThriftHiveMetastoreProcessor : virtual public apache::thrift::TProcessor,
void process_create_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_drop_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_get_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
+ void process_get_all_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_get_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_alter_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
void process_add_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);
@@ -3569,6 +3799,7 @@ class ThriftHiveMetastoreProcessor : virtual public apache::thrift::TProcessor,
processMap_["get_database"] = &ThriftHiveMetastoreProcessor::process_get_database;
processMap_["drop_database"] = &ThriftHiveMetastoreProcessor::process_drop_database;
processMap_["get_databases"] = &ThriftHiveMetastoreProcessor::process_get_databases;
+ processMap_["get_all_databases"] = &ThriftHiveMetastoreProcessor::process_get_all_databases;
processMap_["get_type"] = &ThriftHiveMetastoreProcessor::process_get_type;
processMap_["create_type"] = &ThriftHiveMetastoreProcessor::process_create_type;
processMap_["drop_type"] = &ThriftHiveMetastoreProcessor::process_drop_type;
@@ -3578,6 +3809,7 @@ class ThriftHiveMetastoreProcessor : virtual public apache::thrift::TProcessor,
processMap_["create_table"] = &ThriftHiveMetastoreProcessor::process_create_table;
processMap_["drop_table"] = &ThriftHiveMetastoreProcessor::process_drop_table;
processMap_["get_tables"] = &ThriftHiveMetastoreProcessor::process_get_tables;
+ processMap_["get_all_tables"] = &ThriftHiveMetastoreProcessor::process_get_all_tables;
processMap_["get_table"] = &ThriftHiveMetastoreProcessor::process_get_table;
processMap_["alter_table"] = &ThriftHiveMetastoreProcessor::process_alter_table;
processMap_["add_partition"] = &ThriftHiveMetastoreProcessor::process_add_partition;
@@ -3618,14 +3850,10 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi
ifaces_.push_back(iface);
}
public:
- bool create_database(const std::string& name, const std::string& description) {
+ void create_database(const Database& database) {
uint32_t sz = ifaces_.size();
for (uint32_t i = 0; i < sz; ++i) {
- if (i == sz - 1) {
- return ifaces_[i]->create_database(name, description);
- } else {
- ifaces_[i]->create_database(name, description);
- }
+ ifaces_[i]->create_database(database);
}
}
@@ -3641,25 +3869,33 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi
}
}
- bool drop_database(const std::string& name) {
+ void drop_database(const std::string& name, const bool deleteData) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ ifaces_[i]->drop_database(name, deleteData);
+ }
+ }
+
+ void get_databases(std::vector & _return, const std::string& pattern) {
uint32_t sz = ifaces_.size();
for (uint32_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
- return ifaces_[i]->drop_database(name);
+ ifaces_[i]->get_databases(_return, pattern);
+ return;
} else {
- ifaces_[i]->drop_database(name);
+ ifaces_[i]->get_databases(_return, pattern);
}
}
}
- void get_databases(std::vector & _return) {
+ void get_all_databases(std::vector & _return) {
uint32_t sz = ifaces_.size();
for (uint32_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
- ifaces_[i]->get_databases(_return);
+ ifaces_[i]->get_all_databases(_return);
return;
} else {
- ifaces_[i]->get_databases(_return);
+ ifaces_[i]->get_all_databases(_return);
}
}
}
@@ -3760,6 +3996,18 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi
}
}
+ void get_all_tables(std::vector & _return, const std::string& db_name) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->get_all_tables(_return, db_name);
+ return;
+ } else {
+ ifaces_[i]->get_all_tables(_return, db_name);
+ }
+ }
+ }
+
void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) {
uint32_t sz = ifaces_.size();
for (uint32_t i = 0; i < sz; ++i) {
diff --git metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
index 903090b..360acdc 100644
--- metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
+++ metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
@@ -22,7 +22,7 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf {
// Your initialization goes here
}
- bool create_database(const std::string& name, const std::string& description) {
+ void create_database(const Database& database) {
// Your implementation goes here
printf("create_database\n");
}
@@ -32,16 +32,21 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf {
printf("get_database\n");
}
- bool drop_database(const std::string& name) {
+ void drop_database(const std::string& name, const bool deleteData) {
// Your implementation goes here
printf("drop_database\n");
}
- void get_databases(std::vector & _return) {
+ void get_databases(std::vector & _return, const std::string& pattern) {
// Your implementation goes here
printf("get_databases\n");
}
+ void get_all_databases(std::vector & _return) {
+ // Your implementation goes here
+ printf("get_all_databases\n");
+ }
+
void get_type(Type& _return, const std::string& name) {
// Your implementation goes here
printf("get_type\n");
@@ -87,6 +92,11 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf {
printf("get_tables\n");
}
+ void get_all_tables(std::vector & _return, const std::string& db_name) {
+ // Your implementation goes here
+ printf("get_all_tables\n");
+ }
+
void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) {
// Your implementation goes here
printf("get_table\n");
diff --git metastore/src/gen-cpp/hive_metastore_types.cpp metastore/src/gen-cpp/hive_metastore_types.cpp
index 5ca3b9f..5e277d4 100644
--- metastore/src/gen-cpp/hive_metastore_types.cpp
+++ metastore/src/gen-cpp/hive_metastore_types.cpp
@@ -261,8 +261,8 @@ uint32_t Type::write(apache::thrift::protocol::TProtocol* oprot) const {
return xfer;
}
-const char* Database::ascii_fingerprint = "07A9615F837F7D0A952B595DD3020972";
-const uint8_t Database::binary_fingerprint[16] = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
+const char* Database::ascii_fingerprint = "AB879940BD15B6B25691265F7384B271";
+const uint8_t Database::binary_fingerprint[16] = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71};
uint32_t Database::read(apache::thrift::protocol::TProtocol* iprot) {
@@ -300,6 +300,14 @@ uint32_t Database::read(apache::thrift::protocol::TProtocol* iprot) {
xfer += iprot->skip(ftype);
}
break;
+ case 3:
+ if (ftype == apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->locationUri);
+ this->__isset.locationUri = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -321,6 +329,9 @@ uint32_t Database::write(apache::thrift::protocol::TProtocol* oprot) const {
xfer += oprot->writeFieldBegin("description", apache::thrift::protocol::T_STRING, 2);
xfer += oprot->writeString(this->description);
xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("locationUri", apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->locationUri);
+ xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
diff --git metastore/src/gen-cpp/hive_metastore_types.h metastore/src/gen-cpp/hive_metastore_types.h
index 5b9e0b3..2a01e48 100644
--- metastore/src/gen-cpp/hive_metastore_types.h
+++ metastore/src/gen-cpp/hive_metastore_types.h
@@ -153,21 +153,23 @@ class Type {
class Database {
public:
- static const char* ascii_fingerprint; // = "07A9615F837F7D0A952B595DD3020972";
- static const uint8_t binary_fingerprint[16]; // = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72};
+ static const char* ascii_fingerprint; // = "AB879940BD15B6B25691265F7384B271";
+ static const uint8_t binary_fingerprint[16]; // = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71};
- Database() : name(""), description("") {
+ Database() : name(""), description(""), locationUri("") {
}
virtual ~Database() throw() {}
std::string name;
std::string description;
+ std::string locationUri;
struct __isset {
- __isset() : name(false), description(false) {}
+ __isset() : name(false), description(false), locationUri(false) {}
bool name;
bool description;
+ bool locationUri;
} __isset;
bool operator == (const Database & rhs) const
@@ -176,6 +178,8 @@ class Database {
return false;
if (!(description == rhs.description))
return false;
+ if (!(locationUri == rhs.locationUri))
+ return false;
return true;
}
bool operator != (const Database &rhs) const {
diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
index 78c78d9..e916cb8 100644
--- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
+++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
@@ -22,11 +22,14 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("Database");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)2);
+ private static final TField LOCATION_URI_FIELD_DESC = new TField("locationUri", TType.STRING, (short)3);
private String name;
public static final int NAME = 1;
private String description;
public static final int DESCRIPTION = 2;
+ private String locationUri;
+ public static final int LOCATIONURI = 3;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
@@ -37,6 +40,8 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
new FieldValueMetaData(TType.STRING)));
put(DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
+ put(LOCATIONURI, new FieldMetaData("locationUri", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
}});
static {
@@ -48,11 +53,13 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
public Database(
String name,
- String description)
+ String description,
+ String locationUri)
{
this();
this.name = name;
this.description = description;
+ this.locationUri = locationUri;
}
/**
@@ -65,6 +72,9 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
if (other.isSetDescription()) {
this.description = other.description;
}
+ if (other.isSetLocationUri()) {
+ this.locationUri = other.locationUri;
+ }
}
@Override
@@ -106,6 +116,23 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
return this.description != null;
}
+ public String getLocationUri() {
+ return this.locationUri;
+ }
+
+ public void setLocationUri(String locationUri) {
+ this.locationUri = locationUri;
+ }
+
+ public void unsetLocationUri() {
+ this.locationUri = null;
+ }
+
+ // Returns true if field locationUri is set (has been asigned a value) and false otherwise
+ public boolean isSetLocationUri() {
+ return this.locationUri != null;
+ }
+
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
case NAME:
@@ -124,6 +151,14 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
}
break;
+ case LOCATIONURI:
+ if (value == null) {
+ unsetLocationUri();
+ } else {
+ setLocationUri((String)value);
+ }
+ break;
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -137,6 +172,9 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
case DESCRIPTION:
return getDescription();
+ case LOCATIONURI:
+ return getLocationUri();
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -149,6 +187,8 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
return isSetName();
case DESCRIPTION:
return isSetDescription();
+ case LOCATIONURI:
+ return isSetLocationUri();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -185,6 +225,15 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
return false;
}
+ boolean this_present_locationUri = true && this.isSetLocationUri();
+ boolean that_present_locationUri = true && that.isSetLocationUri();
+ if (this_present_locationUri || that_present_locationUri) {
+ if (!(this_present_locationUri && that_present_locationUri))
+ return false;
+ if (!this.locationUri.equals(that.locationUri))
+ return false;
+ }
+
return true;
}
@@ -218,6 +267,13 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
TProtocolUtil.skip(iprot, field.type);
}
break;
+ case LOCATIONURI:
+ if (field.type == TType.STRING) {
+ this.locationUri = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -243,6 +299,11 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
oprot.writeString(this.description);
oprot.writeFieldEnd();
}
+ if (this.locationUri != null) {
+ oprot.writeFieldBegin(LOCATION_URI_FIELD_DESC);
+ oprot.writeString(this.locationUri);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -267,6 +328,14 @@ public class Database implements TBase, java.io.Serializable, Cloneable {
sb.append(this.description);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("locationUri:");
+ if (this.locationUri == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.locationUri);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
index c99e0ed..054167d 100644
--- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
+++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
@@ -25,19 +25,21 @@ public class ThriftHiveMetastore {
*/
public interface Iface extends com.facebook.fb303.FacebookService.Iface {
- public boolean create_database(String name, String description) throws AlreadyExistsException, MetaException, TException;
+ public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException;
public Database get_database(String name) throws NoSuchObjectException, MetaException, TException;
- public boolean drop_database(String name) throws MetaException, TException;
+ public void drop_database(String name, boolean deleteData) throws NoSuchObjectException, InvalidOperationException, MetaException, TException;
- public List get_databases() throws MetaException, TException;
+ public List get_databases(String pattern) throws MetaException, TException;
- public Type get_type(String name) throws MetaException, TException;
+ public List get_all_databases() throws MetaException, TException;
+
+ public Type get_type(String name) throws MetaException, NoSuchObjectException, TException;
public boolean create_type(Type type) throws AlreadyExistsException, InvalidObjectException, MetaException, TException;
- public boolean drop_type(String type) throws MetaException, TException;
+ public boolean drop_type(String type) throws MetaException, NoSuchObjectException, TException;
public Map get_type_all(String name) throws MetaException, TException;
@@ -51,6 +53,8 @@ public class ThriftHiveMetastore {
public List get_tables(String db_name, String pattern) throws MetaException, TException;
+ public List get_all_tables(String db_name) throws MetaException, TException;
+
public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, TException;
public void alter_table(String dbname, String tbl_name, Table new_tbl) throws InvalidOperationException, MetaException, TException;
@@ -98,24 +102,23 @@ public class ThriftHiveMetastore {
super(iprot, oprot);
}
- public boolean create_database(String name, String description) throws AlreadyExistsException, MetaException, TException
+ public void create_database(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException
{
- send_create_database(name, description);
- return recv_create_database();
+ send_create_database(database);
+ recv_create_database();
}
- public void send_create_database(String name, String description) throws TException
+ public void send_create_database(Database database) throws TException
{
oprot_.writeMessageBegin(new TMessage("create_database", TMessageType.CALL, seqid_));
create_database_args args = new create_database_args();
- args.name = name;
- args.description = description;
+ args.database = database;
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
- public boolean recv_create_database() throws AlreadyExistsException, MetaException, TException
+ public void recv_create_database() throws AlreadyExistsException, InvalidObjectException, MetaException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -126,16 +129,16 @@ public class ThriftHiveMetastore {
create_database_result result = new create_database_result();
result.read(iprot_);
iprot_.readMessageEnd();
- if (result.isSetSuccess()) {
- return result.success;
- }
if (result.o1 != null) {
throw result.o1;
}
if (result.o2 != null) {
throw result.o2;
}
- throw new TApplicationException(TApplicationException.MISSING_RESULT, "create_database failed: unknown result");
+ if (result.o3 != null) {
+ throw result.o3;
+ }
+ return;
}
public Database get_database(String name) throws NoSuchObjectException, MetaException, TException
@@ -177,23 +180,24 @@ public class ThriftHiveMetastore {
throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result");
}
- public boolean drop_database(String name) throws MetaException, TException
+ public void drop_database(String name, boolean deleteData) throws NoSuchObjectException, InvalidOperationException, MetaException, TException
{
- send_drop_database(name);
- return recv_drop_database();
+ send_drop_database(name, deleteData);
+ recv_drop_database();
}
- public void send_drop_database(String name) throws TException
+ public void send_drop_database(String name, boolean deleteData) throws TException
{
oprot_.writeMessageBegin(new TMessage("drop_database", TMessageType.CALL, seqid_));
drop_database_args args = new drop_database_args();
args.name = name;
+ args.deleteData = deleteData;
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
}
- public boolean recv_drop_database() throws MetaException, TException
+ public void recv_drop_database() throws NoSuchObjectException, InvalidOperationException, MetaException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -204,25 +208,29 @@ public class ThriftHiveMetastore {
drop_database_result result = new drop_database_result();
result.read(iprot_);
iprot_.readMessageEnd();
- if (result.isSetSuccess()) {
- return result.success;
+ if (result.o1 != null) {
+ throw result.o1;
}
if (result.o2 != null) {
throw result.o2;
}
- throw new TApplicationException(TApplicationException.MISSING_RESULT, "drop_database failed: unknown result");
+ if (result.o3 != null) {
+ throw result.o3;
+ }
+ return;
}
- public List get_databases() throws MetaException, TException
+ public List get_databases(String pattern) throws MetaException, TException
{
- send_get_databases();
+ send_get_databases(pattern);
return recv_get_databases();
}
- public void send_get_databases() throws TException
+ public void send_get_databases(String pattern) throws TException
{
oprot_.writeMessageBegin(new TMessage("get_databases", TMessageType.CALL, seqid_));
get_databases_args args = new get_databases_args();
+ args.pattern = pattern;
args.write(oprot_);
oprot_.writeMessageEnd();
oprot_.getTransport().flush();
@@ -248,7 +256,42 @@ public class ThriftHiveMetastore {
throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result");
}
- public Type get_type(String name) throws MetaException, TException
+ public List get_all_databases() throws MetaException, TException
+ {
+ send_get_all_databases();
+ return recv_get_all_databases();
+ }
+
+ public void send_get_all_databases() throws TException
+ {
+ oprot_.writeMessageBegin(new TMessage("get_all_databases", TMessageType.CALL, seqid_));
+ get_all_databases_args args = new get_all_databases_args();
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ }
+
+ public List recv_get_all_databases() throws MetaException, TException
+ {
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ get_all_databases_result result = new get_all_databases_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.o1 != null) {
+ throw result.o1;
+ }
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result");
+ }
+
+ public Type get_type(String name) throws MetaException, NoSuchObjectException, TException
{
send_get_type(name);
return recv_get_type();
@@ -264,7 +307,7 @@ public class ThriftHiveMetastore {
oprot_.getTransport().flush();
}
- public Type recv_get_type() throws MetaException, TException
+ public Type recv_get_type() throws MetaException, NoSuchObjectException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -278,6 +321,9 @@ public class ThriftHiveMetastore {
if (result.isSetSuccess()) {
return result.success;
}
+ if (result.o1 != null) {
+ throw result.o1;
+ }
if (result.o2 != null) {
throw result.o2;
}
@@ -326,7 +372,7 @@ public class ThriftHiveMetastore {
throw new TApplicationException(TApplicationException.MISSING_RESULT, "create_type failed: unknown result");
}
- public boolean drop_type(String type) throws MetaException, TException
+ public boolean drop_type(String type) throws MetaException, NoSuchObjectException, TException
{
send_drop_type(type);
return recv_drop_type();
@@ -342,7 +388,7 @@ public class ThriftHiveMetastore {
oprot_.getTransport().flush();
}
- public boolean recv_drop_type() throws MetaException, TException
+ public boolean recv_drop_type() throws MetaException, NoSuchObjectException, TException
{
TMessage msg = iprot_.readMessageBegin();
if (msg.type == TMessageType.EXCEPTION) {
@@ -356,6 +402,9 @@ public class ThriftHiveMetastore {
if (result.isSetSuccess()) {
return result.success;
}
+ if (result.o1 != null) {
+ throw result.o1;
+ }
if (result.o2 != null) {
throw result.o2;
}
@@ -601,6 +650,42 @@ public class ThriftHiveMetastore {
throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result");
}
+ public List get_all_tables(String db_name) throws MetaException, TException
+ {
+ send_get_all_tables(db_name);
+ return recv_get_all_tables();
+ }
+
+ public void send_get_all_tables(String db_name) throws TException
+ {
+ oprot_.writeMessageBegin(new TMessage("get_all_tables", TMessageType.CALL, seqid_));
+ get_all_tables_args args = new get_all_tables_args();
+ args.db_name = db_name;
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ }
+
+ public List recv_get_all_tables() throws MetaException, TException
+ {
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ get_all_tables_result result = new get_all_tables_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.o1 != null) {
+ throw result.o1;
+ }
+ throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result");
+ }
+
public Table get_table(String dbname, String tbl_name) throws MetaException, NoSuchObjectException, TException
{
send_get_table(dbname, tbl_name);
@@ -1290,6 +1375,7 @@ public class ThriftHiveMetastore {
processMap_.put("get_database", new get_database());
processMap_.put("drop_database", new drop_database());
processMap_.put("get_databases", new get_databases());
+ processMap_.put("get_all_databases", new get_all_databases());
processMap_.put("get_type", new get_type());
processMap_.put("create_type", new create_type());
processMap_.put("drop_type", new drop_type());
@@ -1299,6 +1385,7 @@ public class ThriftHiveMetastore {
processMap_.put("create_table", new create_table());
processMap_.put("drop_table", new drop_table());
processMap_.put("get_tables", new get_tables());
+ processMap_.put("get_all_tables", new get_all_tables());
processMap_.put("get_table", new get_table());
processMap_.put("alter_table", new alter_table());
processMap_.put("add_partition", new add_partition());
@@ -1346,12 +1433,13 @@ public class ThriftHiveMetastore {
iprot.readMessageEnd();
create_database_result result = new create_database_result();
try {
- result.success = iface_.create_database(args.name, args.description);
- result.__isset.success = true;
+ iface_.create_database(args.database);
} catch (AlreadyExistsException o1) {
result.o1 = o1;
- } catch (MetaException o2) {
+ } catch (InvalidObjectException o2) {
result.o2 = o2;
+ } catch (MetaException o3) {
+ result.o3 = o3;
} catch (Throwable th) {
LOGGER.error("Internal error processing create_database", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_database");
@@ -1407,10 +1495,13 @@ public class ThriftHiveMetastore {
iprot.readMessageEnd();
drop_database_result result = new drop_database_result();
try {
- result.success = iface_.drop_database(args.name);
- result.__isset.success = true;
- } catch (MetaException o2) {
+ iface_.drop_database(args.name, args.deleteData);
+ } catch (NoSuchObjectException o1) {
+ result.o1 = o1;
+ } catch (InvalidOperationException o2) {
result.o2 = o2;
+ } catch (MetaException o3) {
+ result.o3 = o3;
} catch (Throwable th) {
LOGGER.error("Internal error processing drop_database", th);
TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_database");
@@ -1436,7 +1527,7 @@ public class ThriftHiveMetastore {
iprot.readMessageEnd();
get_databases_result result = new get_databases_result();
try {
- result.success = iface_.get_databases();
+ result.success = iface_.get_databases(args.pattern);
} catch (MetaException o1) {
result.o1 = o1;
} catch (Throwable th) {
@@ -1456,6 +1547,34 @@ public class ThriftHiveMetastore {
}
+ private class get_all_databases implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+ {
+ get_all_databases_args args = new get_all_databases_args();
+ args.read(iprot);
+ iprot.readMessageEnd();
+ get_all_databases_result result = new get_all_databases_result();
+ try {
+ result.success = iface_.get_all_databases();
+ } catch (MetaException o1) {
+ result.o1 = o1;
+ } catch (Throwable th) {
+ LOGGER.error("Internal error processing get_all_databases", th);
+ TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_databases");
+ oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ }
+
+ }
+
private class get_type implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
@@ -1465,7 +1584,9 @@ public class ThriftHiveMetastore {
get_type_result result = new get_type_result();
try {
result.success = iface_.get_type(args.name);
- } catch (MetaException o2) {
+ } catch (MetaException o1) {
+ result.o1 = o1;
+ } catch (NoSuchObjectException o2) {
result.o2 = o2;
} catch (Throwable th) {
LOGGER.error("Internal error processing get_type", th);
@@ -1527,7 +1648,9 @@ public class ThriftHiveMetastore {
try {
result.success = iface_.drop_type(args.type);
result.__isset.success = true;
- } catch (MetaException o2) {
+ } catch (MetaException o1) {
+ result.o1 = o1;
+ } catch (NoSuchObjectException o2) {
result.o2 = o2;
} catch (Throwable th) {
LOGGER.error("Internal error processing drop_type", th);
@@ -1730,6 +1853,34 @@ public class ThriftHiveMetastore {
}
+ private class get_all_tables implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+ {
+ get_all_tables_args args = new get_all_tables_args();
+ args.read(iprot);
+ iprot.readMessageEnd();
+ get_all_tables_result result = new get_all_tables_result();
+ try {
+ result.success = iface_.get_all_tables(args.db_name);
+ } catch (MetaException o1) {
+ result.o1 = o1;
+ } catch (Throwable th) {
+ LOGGER.error("Internal error processing get_all_tables", th);
+ TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_tables");
+ oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ }
+
+ }
+
private class get_table implements ProcessFunction {
public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
{
@@ -2240,23 +2391,18 @@ public class ThriftHiveMetastore {
public static class create_database_args implements TBase, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("create_database_args");
- private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
- private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)2);
+ private static final TField DATABASE_FIELD_DESC = new TField("database", TType.STRUCT, (short)1);
- private String name;
- public static final int NAME = 1;
- private String description;
- public static final int DESCRIPTION = 2;
+ private Database database;
+ public static final int DATABASE = 1;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
- put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
- put(DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
+ put(DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, Database.class)));
}});
static {
@@ -2267,23 +2413,18 @@ public class ThriftHiveMetastore {
}
public create_database_args(
- String name,
- String description)
+ Database database)
{
this();
- this.name = name;
- this.description = description;
+ this.database = database;
}
/**
* Performs a deep copy on other.
*/
public create_database_args(create_database_args other) {
- if (other.isSetName()) {
- this.name = other.name;
- }
- if (other.isSetDescription()) {
- this.description = other.description;
+ if (other.isSetDatabase()) {
+ this.database = new Database(other.database);
}
}
@@ -2292,55 +2433,30 @@ public class ThriftHiveMetastore {
return new create_database_args(this);
}
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- // Returns true if field name is set (has been asigned a value) and false otherwise
- public boolean isSetName() {
- return this.name != null;
- }
-
- public String getDescription() {
- return this.description;
+ public Database getDatabase() {
+ return this.database;
}
- public void setDescription(String description) {
- this.description = description;
+ public void setDatabase(Database database) {
+ this.database = database;
}
- public void unsetDescription() {
- this.description = null;
+ public void unsetDatabase() {
+ this.database = null;
}
- // Returns true if field description is set (has been asigned a value) and false otherwise
- public boolean isSetDescription() {
- return this.description != null;
+ // Returns true if field database is set (has been asigned a value) and false otherwise
+ public boolean isSetDatabase() {
+ return this.database != null;
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
- case NAME:
+ case DATABASE:
if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
- case DESCRIPTION:
- if (value == null) {
- unsetDescription();
+ unsetDatabase();
} else {
- setDescription((String)value);
+ setDatabase((Database)value);
}
break;
@@ -2351,11 +2467,8 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
- case NAME:
- return getName();
-
- case DESCRIPTION:
- return getDescription();
+ case DATABASE:
+ return getDatabase();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
@@ -2365,10 +2478,8 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
- case NAME:
- return isSetName();
- case DESCRIPTION:
- return isSetDescription();
+ case DATABASE:
+ return isSetDatabase();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -2387,21 +2498,12 @@ public class ThriftHiveMetastore {
if (that == null)
return false;
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
- boolean this_present_description = true && this.isSetDescription();
- boolean that_present_description = true && that.isSetDescription();
- if (this_present_description || that_present_description) {
- if (!(this_present_description && that_present_description))
+ boolean this_present_database = true && this.isSetDatabase();
+ boolean that_present_database = true && that.isSetDatabase();
+ if (this_present_database || that_present_database) {
+ if (!(this_present_database && that_present_database))
return false;
- if (!this.description.equals(that.description))
+ if (!this.database.equals(that.database))
return false;
}
@@ -2424,16 +2526,10 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
- case NAME:
- if (field.type == TType.STRING) {
- this.name = iprot.readString();
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case DESCRIPTION:
- if (field.type == TType.STRING) {
- this.description = iprot.readString();
+ case DATABASE:
+ if (field.type == TType.STRUCT) {
+ this.database = new Database();
+ this.database.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -2453,14 +2549,9 @@ public class ThriftHiveMetastore {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(this.name);
- oprot.writeFieldEnd();
- }
- if (this.description != null) {
- oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
- oprot.writeString(this.description);
+ if (this.database != null) {
+ oprot.writeFieldBegin(DATABASE_FIELD_DESC);
+ this.database.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -2472,19 +2563,11 @@ public class ThriftHiveMetastore {
StringBuilder sb = new StringBuilder("create_database_args(");
boolean first = true;
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("description:");
- if (this.description == null) {
+ sb.append("database:");
+ if (this.database == null) {
sb.append("null");
} else {
- sb.append(this.description);
+ sb.append(this.database);
}
first = false;
sb.append(")");
@@ -2500,29 +2583,28 @@ public class ThriftHiveMetastore {
public static class create_database_result implements TBase, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("create_database_result");
- private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2);
+ private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3);
- private boolean success;
- public static final int SUCCESS = 0;
private AlreadyExistsException o1;
public static final int O1 = 1;
- private MetaException o2;
+ private InvalidObjectException o2;
public static final int O2 = 2;
+ private MetaException o3;
+ public static final int O3 = 3;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
- public boolean success = false;
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
- put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.BOOL)));
put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
+ put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
}});
static {
@@ -2533,28 +2615,28 @@ public class ThriftHiveMetastore {
}
public create_database_result(
- boolean success,
AlreadyExistsException o1,
- MetaException o2)
+ InvalidObjectException o2,
+ MetaException o3)
{
this();
- this.success = success;
- this.__isset.success = true;
this.o1 = o1;
this.o2 = o2;
+ this.o3 = o3;
}
/**
* Performs a deep copy on other.
*/
public create_database_result(create_database_result other) {
- __isset.success = other.__isset.success;
- this.success = other.success;
if (other.isSetO1()) {
this.o1 = new AlreadyExistsException(other.o1);
}
if (other.isSetO2()) {
- this.o2 = new MetaException(other.o2);
+ this.o2 = new InvalidObjectException(other.o2);
+ }
+ if (other.isSetO3()) {
+ this.o3 = new MetaException(other.o3);
}
}
@@ -2563,24 +2645,6 @@ public class ThriftHiveMetastore {
return new create_database_result(this);
}
- public boolean isSuccess() {
- return this.success;
- }
-
- public void setSuccess(boolean success) {
- this.success = success;
- this.__isset.success = true;
- }
-
- public void unsetSuccess() {
- this.__isset.success = false;
- }
-
- // Returns true if field success is set (has been asigned a value) and false otherwise
- public boolean isSetSuccess() {
- return this.__isset.success;
- }
-
public AlreadyExistsException getO1() {
return this.o1;
}
@@ -2598,11 +2662,11 @@ public class ThriftHiveMetastore {
return this.o1 != null;
}
- public MetaException getO2() {
+ public InvalidObjectException getO2() {
return this.o2;
}
- public void setO2(MetaException o2) {
+ public void setO2(InvalidObjectException o2) {
this.o2 = o2;
}
@@ -2615,16 +2679,25 @@ public class ThriftHiveMetastore {
return this.o2 != null;
}
+ public MetaException getO3() {
+ return this.o3;
+ }
+
+ public void setO3(MetaException o3) {
+ this.o3 = o3;
+ }
+
+ public void unsetO3() {
+ this.o3 = null;
+ }
+
+ // Returns true if field o3 is set (has been asigned a value) and false otherwise
+ public boolean isSetO3() {
+ return this.o3 != null;
+ }
+
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((Boolean)value);
- }
- break;
-
case O1:
if (value == null) {
unsetO1();
@@ -2637,7 +2710,15 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetO2();
} else {
- setO2((MetaException)value);
+ setO2((InvalidObjectException)value);
+ }
+ break;
+
+ case O3:
+ if (value == null) {
+ unsetO3();
+ } else {
+ setO3((MetaException)value);
}
break;
@@ -2648,15 +2729,15 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
- case SUCCESS:
- return new Boolean(isSuccess());
-
case O1:
return getO1();
case O2:
return getO2();
+ case O3:
+ return getO3();
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -2665,12 +2746,12 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
- case SUCCESS:
- return isSetSuccess();
case O1:
return isSetO1();
case O2:
return isSetO2();
+ case O3:
+ return isSetO3();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -2689,15 +2770,6 @@ public class ThriftHiveMetastore {
if (that == null)
return false;
- boolean this_present_success = true;
- boolean that_present_success = true;
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (this.success != that.success)
- return false;
- }
-
boolean this_present_o1 = true && this.isSetO1();
boolean that_present_o1 = true && that.isSetO1();
if (this_present_o1 || that_present_o1) {
@@ -2716,6 +2788,15 @@ public class ThriftHiveMetastore {
return false;
}
+ boolean this_present_o3 = true && this.isSetO3();
+ boolean that_present_o3 = true && that.isSetO3();
+ if (this_present_o3 || that_present_o3) {
+ if (!(this_present_o3 && that_present_o3))
+ return false;
+ if (!this.o3.equals(that.o3))
+ return false;
+ }
+
return true;
}
@@ -2735,14 +2816,6 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
- case SUCCESS:
- if (field.type == TType.BOOL) {
- this.success = iprot.readBool();
- this.__isset.success = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
case O1:
if (field.type == TType.STRUCT) {
this.o1 = new AlreadyExistsException();
@@ -2753,12 +2826,20 @@ public class ThriftHiveMetastore {
break;
case O2:
if (field.type == TType.STRUCT) {
- this.o2 = new MetaException();
+ this.o2 = new InvalidObjectException();
this.o2.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
+ case O3:
+ if (field.type == TType.STRUCT) {
+ this.o3 = new MetaException();
+ this.o3.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -2773,11 +2854,7 @@ public class ThriftHiveMetastore {
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
- if (this.isSetSuccess()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeBool(this.success);
- oprot.writeFieldEnd();
- } else if (this.isSetO1()) {
+ if (this.isSetO1()) {
oprot.writeFieldBegin(O1_FIELD_DESC);
this.o1.write(oprot);
oprot.writeFieldEnd();
@@ -2785,6 +2862,10 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(O2_FIELD_DESC);
this.o2.write(oprot);
oprot.writeFieldEnd();
+ } else if (this.isSetO3()) {
+ oprot.writeFieldBegin(O3_FIELD_DESC);
+ this.o3.write(oprot);
+ oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
@@ -2795,10 +2876,6 @@ public class ThriftHiveMetastore {
StringBuilder sb = new StringBuilder("create_database_result(");
boolean first = true;
- sb.append("success:");
- sb.append(this.success);
- first = false;
- if (!first) sb.append(", ");
sb.append("o1:");
if (this.o1 == null) {
sb.append("null");
@@ -2814,6 +2891,14 @@ public class ThriftHiveMetastore {
sb.append(this.o2);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("o3:");
+ if (this.o3 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o3);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -3348,17 +3433,23 @@ public class ThriftHiveMetastore {
public static class drop_database_args implements TBase, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("drop_database_args");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
+ private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)2);
private String name;
public static final int NAME = 1;
+ private boolean deleteData;
+ public static final int DELETEDATA = 2;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
+ public boolean deleteData = false;
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
+ put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.BOOL)));
}});
static {
@@ -3369,10 +3460,13 @@ public class ThriftHiveMetastore {
}
public drop_database_args(
- String name)
+ String name,
+ boolean deleteData)
{
this();
this.name = name;
+ this.deleteData = deleteData;
+ this.__isset.deleteData = true;
}
/**
@@ -3382,6 +3476,8 @@ public class ThriftHiveMetastore {
if (other.isSetName()) {
this.name = other.name;
}
+ __isset.deleteData = other.__isset.deleteData;
+ this.deleteData = other.deleteData;
}
@Override
@@ -3406,6 +3502,24 @@ public class ThriftHiveMetastore {
return this.name != null;
}
+ public boolean isDeleteData() {
+ return this.deleteData;
+ }
+
+ public void setDeleteData(boolean deleteData) {
+ this.deleteData = deleteData;
+ this.__isset.deleteData = true;
+ }
+
+ public void unsetDeleteData() {
+ this.__isset.deleteData = false;
+ }
+
+ // Returns true if field deleteData is set (has been asigned a value) and false otherwise
+ public boolean isSetDeleteData() {
+ return this.__isset.deleteData;
+ }
+
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
case NAME:
@@ -3416,6 +3530,14 @@ public class ThriftHiveMetastore {
}
break;
+ case DELETEDATA:
+ if (value == null) {
+ unsetDeleteData();
+ } else {
+ setDeleteData((Boolean)value);
+ }
+ break;
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -3426,6 +3548,9 @@ public class ThriftHiveMetastore {
case NAME:
return getName();
+ case DELETEDATA:
+ return new Boolean(isDeleteData());
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -3436,6 +3561,8 @@ public class ThriftHiveMetastore {
switch (fieldID) {
case NAME:
return isSetName();
+ case DELETEDATA:
+ return isSetDeleteData();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -3463,6 +3590,15 @@ public class ThriftHiveMetastore {
return false;
}
+ boolean this_present_deleteData = true;
+ boolean that_present_deleteData = true;
+ if (this_present_deleteData || that_present_deleteData) {
+ if (!(this_present_deleteData && that_present_deleteData))
+ return false;
+ if (this.deleteData != that.deleteData)
+ return false;
+ }
+
return true;
}
@@ -3489,6 +3625,14 @@ public class ThriftHiveMetastore {
TProtocolUtil.skip(iprot, field.type);
}
break;
+ case DELETEDATA:
+ if (field.type == TType.BOOL) {
+ this.deleteData = iprot.readBool();
+ this.__isset.deleteData = true;
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -3509,6 +3653,9 @@ public class ThriftHiveMetastore {
oprot.writeString(this.name);
oprot.writeFieldEnd();
}
+ oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC);
+ oprot.writeBool(this.deleteData);
+ oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -3525,6 +3672,10 @@ public class ThriftHiveMetastore {
sb.append(this.name);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("deleteData:");
+ sb.append(this.deleteData);
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -3538,24 +3689,28 @@ public class ThriftHiveMetastore {
public static class drop_database_result implements TBase, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("drop_database_result");
- private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
+ private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2);
+ private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3);
- private boolean success;
- public static final int SUCCESS = 0;
- private MetaException o2;
+ private NoSuchObjectException o1;
+ public static final int O1 = 1;
+ private InvalidOperationException o2;
public static final int O2 = 2;
+ private MetaException o3;
+ public static final int O3 = 3;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
- public boolean success = false;
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
- put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.BOOL)));
+ put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
+ put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
}});
static {
@@ -3566,23 +3721,28 @@ public class ThriftHiveMetastore {
}
public drop_database_result(
- boolean success,
- MetaException o2)
+ NoSuchObjectException o1,
+ InvalidOperationException o2,
+ MetaException o3)
{
this();
- this.success = success;
- this.__isset.success = true;
+ this.o1 = o1;
this.o2 = o2;
+ this.o3 = o3;
}
/**
* Performs a deep copy on other.
*/
public drop_database_result(drop_database_result other) {
- __isset.success = other.__isset.success;
- this.success = other.success;
+ if (other.isSetO1()) {
+ this.o1 = new NoSuchObjectException(other.o1);
+ }
if (other.isSetO2()) {
- this.o2 = new MetaException(other.o2);
+ this.o2 = new InvalidOperationException(other.o2);
+ }
+ if (other.isSetO3()) {
+ this.o3 = new MetaException(other.o3);
}
}
@@ -3591,29 +3751,28 @@ public class ThriftHiveMetastore {
return new drop_database_result(this);
}
- public boolean isSuccess() {
- return this.success;
+ public NoSuchObjectException getO1() {
+ return this.o1;
}
- public void setSuccess(boolean success) {
- this.success = success;
- this.__isset.success = true;
+ public void setO1(NoSuchObjectException o1) {
+ this.o1 = o1;
}
- public void unsetSuccess() {
- this.__isset.success = false;
+ public void unsetO1() {
+ this.o1 = null;
}
- // Returns true if field success is set (has been asigned a value) and false otherwise
- public boolean isSetSuccess() {
- return this.__isset.success;
+ // Returns true if field o1 is set (has been asigned a value) and false otherwise
+ public boolean isSetO1() {
+ return this.o1 != null;
}
- public MetaException getO2() {
+ public InvalidOperationException getO2() {
return this.o2;
}
- public void setO2(MetaException o2) {
+ public void setO2(InvalidOperationException o2) {
this.o2 = o2;
}
@@ -3626,13 +3785,30 @@ public class ThriftHiveMetastore {
return this.o2 != null;
}
+ public MetaException getO3() {
+ return this.o3;
+ }
+
+ public void setO3(MetaException o3) {
+ this.o3 = o3;
+ }
+
+ public void unsetO3() {
+ this.o3 = null;
+ }
+
+ // Returns true if field o3 is set (has been asigned a value) and false otherwise
+ public boolean isSetO3() {
+ return this.o3 != null;
+ }
+
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
- case SUCCESS:
+ case O1:
if (value == null) {
- unsetSuccess();
+ unsetO1();
} else {
- setSuccess((Boolean)value);
+ setO1((NoSuchObjectException)value);
}
break;
@@ -3640,23 +3816,34 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetO2();
} else {
- setO2((MetaException)value);
+ setO2((InvalidOperationException)value);
}
break;
- default:
- throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
- }
- }
+ case O3:
+ if (value == null) {
+ unsetO3();
+ } else {
+ setO3((MetaException)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
public Object getFieldValue(int fieldID) {
switch (fieldID) {
- case SUCCESS:
- return new Boolean(isSuccess());
+ case O1:
+ return getO1();
case O2:
return getO2();
+ case O3:
+ return getO3();
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -3665,10 +3852,12 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
- case SUCCESS:
- return isSetSuccess();
+ case O1:
+ return isSetO1();
case O2:
return isSetO2();
+ case O3:
+ return isSetO3();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -3687,12 +3876,12 @@ public class ThriftHiveMetastore {
if (that == null)
return false;
- boolean this_present_success = true;
- boolean that_present_success = true;
- if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
+ boolean this_present_o1 = true && this.isSetO1();
+ boolean that_present_o1 = true && that.isSetO1();
+ if (this_present_o1 || that_present_o1) {
+ if (!(this_present_o1 && that_present_o1))
return false;
- if (this.success != that.success)
+ if (!this.o1.equals(that.o1))
return false;
}
@@ -3705,6 +3894,15 @@ public class ThriftHiveMetastore {
return false;
}
+ boolean this_present_o3 = true && this.isSetO3();
+ boolean that_present_o3 = true && that.isSetO3();
+ if (this_present_o3 || that_present_o3) {
+ if (!(this_present_o3 && that_present_o3))
+ return false;
+ if (!this.o3.equals(that.o3))
+ return false;
+ }
+
return true;
}
@@ -3724,22 +3922,30 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
- case SUCCESS:
- if (field.type == TType.BOOL) {
- this.success = iprot.readBool();
- this.__isset.success = true;
+ case O1:
+ if (field.type == TType.STRUCT) {
+ this.o1 = new NoSuchObjectException();
+ this.o1.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case O2:
if (field.type == TType.STRUCT) {
- this.o2 = new MetaException();
+ this.o2 = new InvalidOperationException();
this.o2.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
+ case O3:
+ if (field.type == TType.STRUCT) {
+ this.o3 = new MetaException();
+ this.o3.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -3754,14 +3960,18 @@ public class ThriftHiveMetastore {
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
- if (this.isSetSuccess()) {
- oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeBool(this.success);
+ if (this.isSetO1()) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ this.o1.write(oprot);
oprot.writeFieldEnd();
} else if (this.isSetO2()) {
oprot.writeFieldBegin(O2_FIELD_DESC);
this.o2.write(oprot);
oprot.writeFieldEnd();
+ } else if (this.isSetO3()) {
+ oprot.writeFieldBegin(O3_FIELD_DESC);
+ this.o3.write(oprot);
+ oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
@@ -3772,8 +3982,12 @@ public class ThriftHiveMetastore {
StringBuilder sb = new StringBuilder("drop_database_result(");
boolean first = true;
- sb.append("success:");
- sb.append(this.success);
+ sb.append("o1:");
+ if (this.o1 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o1);
+ }
first = false;
if (!first) sb.append(", ");
sb.append("o2:");
@@ -3783,6 +3997,14 @@ public class ThriftHiveMetastore {
sb.append(this.o2);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("o3:");
+ if (this.o3 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o3);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -3796,8 +4018,18 @@ public class ThriftHiveMetastore {
public static class get_databases_args implements TBase, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("get_databases_args");
+ private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)1);
+
+ private String pattern;
+ public static final int PATTERN = 1;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
+ put(PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
}});
static {
@@ -3807,10 +4039,20 @@ public class ThriftHiveMetastore {
public get_databases_args() {
}
+ public get_databases_args(
+ String pattern)
+ {
+ this();
+ this.pattern = pattern;
+ }
+
/**
* Performs a deep copy on other.
*/
public get_databases_args(get_databases_args other) {
+ if (other.isSetPattern()) {
+ this.pattern = other.pattern;
+ }
}
@Override
@@ -3818,8 +4060,33 @@ public class ThriftHiveMetastore {
return new get_databases_args(this);
}
+ public String getPattern() {
+ return this.pattern;
+ }
+
+ public void setPattern(String pattern) {
+ this.pattern = pattern;
+ }
+
+ public void unsetPattern() {
+ this.pattern = null;
+ }
+
+ // Returns true if field pattern is set (has been asigned a value) and false otherwise
+ public boolean isSetPattern() {
+ return this.pattern != null;
+ }
+
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
+ case PATTERN:
+ if (value == null) {
+ unsetPattern();
+ } else {
+ setPattern((String)value);
+ }
+ break;
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -3827,6 +4094,9 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
+ case PATTERN:
+ return getPattern();
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -3835,6 +4105,8 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
+ case PATTERN:
+ return isSetPattern();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -3853,6 +4125,15 @@ public class ThriftHiveMetastore {
if (that == null)
return false;
+ boolean this_present_pattern = true && this.isSetPattern();
+ boolean that_present_pattern = true && that.isSetPattern();
+ if (this_present_pattern || that_present_pattern) {
+ if (!(this_present_pattern && that_present_pattern))
+ return false;
+ if (!this.pattern.equals(that.pattern))
+ return false;
+ }
+
return true;
}
@@ -3872,6 +4153,13 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
+ case PATTERN:
+ if (field.type == TType.STRING) {
+ this.pattern = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -3887,6 +4175,11 @@ public class ThriftHiveMetastore {
validate();
oprot.writeStructBegin(STRUCT_DESC);
+ if (this.pattern != null) {
+ oprot.writeFieldBegin(PATTERN_FIELD_DESC);
+ oprot.writeString(this.pattern);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -3896,6 +4189,13 @@ public class ThriftHiveMetastore {
StringBuilder sb = new StringBuilder("get_databases_args(");
boolean first = true;
+ sb.append("pattern:");
+ if (this.pattern == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.pattern);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -4202,77 +4502,32 @@ public class ThriftHiveMetastore {
}
- public static class get_type_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_type_args");
- private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
-
- private String name;
- public static final int NAME = 1;
-
- private final Isset __isset = new Isset();
- private static final class Isset implements java.io.Serializable {
- }
+ public static class get_all_databases_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_args");
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
- put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
}});
static {
- FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap);
- }
-
- public get_type_args() {
+ FieldMetaData.addStructMetaDataMap(get_all_databases_args.class, metaDataMap);
}
- public get_type_args(
- String name)
- {
- this();
- this.name = name;
+ public get_all_databases_args() {
}
/**
* Performs a deep copy on other.
*/
- public get_type_args(get_type_args other) {
- if (other.isSetName()) {
- this.name = other.name;
- }
+ public get_all_databases_args(get_all_databases_args other) {
}
@Override
- public get_type_args clone() {
- return new get_type_args(this);
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void unsetName() {
- this.name = null;
- }
-
- // Returns true if field name is set (has been asigned a value) and false otherwise
- public boolean isSetName() {
- return this.name != null;
+ public get_all_databases_args clone() {
+ return new get_all_databases_args(this);
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String)value);
- }
- break;
-
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -4280,9 +4535,6 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
- case NAME:
- return getName();
-
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -4291,8 +4543,6 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
- case NAME:
- return isSetName();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -4302,24 +4552,15 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_type_args)
- return this.equals((get_type_args)that);
+ if (that instanceof get_all_databases_args)
+ return this.equals((get_all_databases_args)that);
return false;
}
- public boolean equals(get_type_args that) {
+ public boolean equals(get_all_databases_args that) {
if (that == null)
return false;
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
- return false;
- if (!this.name.equals(that.name))
- return false;
- }
-
return true;
}
@@ -4339,13 +4580,6 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
- case NAME:
- if (field.type == TType.STRING) {
- this.name = iprot.readString();
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -4361,27 +4595,15 @@ public class ThriftHiveMetastore {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(this.name);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_type_args(");
+ StringBuilder sb = new StringBuilder("get_all_databases_args(");
boolean first = true;
- sb.append("name:");
- if (this.name == null) {
- sb.append("null");
- } else {
- sb.append(this.name);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -4393,15 +4615,15 @@ public class ThriftHiveMetastore {
}
- public static class get_type_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_type_result");
- private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
- private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1);
-
- private Type success;
+ public static class get_all_databases_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
+ private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
+
+ private List success;
public static final int SUCCESS = 0;
- private MetaException o2;
- public static final int O2 = 1;
+ private MetaException o1;
+ public static final int O1 = 1;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
@@ -4409,49 +4631,69 @@ public class ThriftHiveMetastore {
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, Type.class)));
- put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new FieldValueMetaData(TType.STRING))));
+ put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
}});
static {
- FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_all_databases_result.class, metaDataMap);
}
- public get_type_result() {
+ public get_all_databases_result() {
}
- public get_type_result(
- Type success,
- MetaException o2)
+ public get_all_databases_result(
+ List success,
+ MetaException o1)
{
this();
this.success = success;
- this.o2 = o2;
+ this.o1 = o1;
}
/**
* Performs a deep copy on other.
*/
- public get_type_result(get_type_result other) {
+ public get_all_databases_result(get_all_databases_result other) {
if (other.isSetSuccess()) {
- this.success = new Type(other.success);
+ List __this__success = new ArrayList();
+ for (String other_element : other.success) {
+ __this__success.add(other_element);
+ }
+ this.success = __this__success;
}
- if (other.isSetO2()) {
- this.o2 = new MetaException(other.o2);
+ if (other.isSetO1()) {
+ this.o1 = new MetaException(other.o1);
}
}
@Override
- public get_type_result clone() {
- return new get_type_result(this);
+ public get_all_databases_result clone() {
+ return new get_all_databases_result(this);
}
- public Type getSuccess() {
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(String elem) {
+ if (this.success == null) {
+ this.success = new ArrayList();
+ }
+ this.success.add(elem);
+ }
+
+ public List getSuccess() {
return this.success;
}
- public void setSuccess(Type success) {
+ public void setSuccess(List success) {
this.success = success;
}
@@ -4464,21 +4706,21 @@ public class ThriftHiveMetastore {
return this.success != null;
}
- public MetaException getO2() {
- return this.o2;
+ public MetaException getO1() {
+ return this.o1;
}
- public void setO2(MetaException o2) {
- this.o2 = o2;
+ public void setO1(MetaException o1) {
+ this.o1 = o1;
}
- public void unsetO2() {
- this.o2 = null;
+ public void unsetO1() {
+ this.o1 = null;
}
- // Returns true if field o2 is set (has been asigned a value) and false otherwise
- public boolean isSetO2() {
- return this.o2 != null;
+ // Returns true if field o1 is set (has been asigned a value) and false otherwise
+ public boolean isSetO1() {
+ return this.o1 != null;
}
public void setFieldValue(int fieldID, Object value) {
@@ -4487,15 +4729,15 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Type)value);
+ setSuccess((List)value);
}
break;
- case O2:
+ case O1:
if (value == null) {
- unsetO2();
+ unsetO1();
} else {
- setO2((MetaException)value);
+ setO1((MetaException)value);
}
break;
@@ -4509,8 +4751,8 @@ public class ThriftHiveMetastore {
case SUCCESS:
return getSuccess();
- case O2:
- return getO2();
+ case O1:
+ return getO1();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
@@ -4522,8 +4764,8 @@ public class ThriftHiveMetastore {
switch (fieldID) {
case SUCCESS:
return isSetSuccess();
- case O2:
- return isSetO2();
+ case O1:
+ return isSetO1();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -4533,12 +4775,12 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_type_result)
- return this.equals((get_type_result)that);
+ if (that instanceof get_all_databases_result)
+ return this.equals((get_all_databases_result)that);
return false;
}
- public boolean equals(get_type_result that) {
+ public boolean equals(get_all_databases_result that) {
if (that == null)
return false;
@@ -4551,12 +4793,12 @@ public class ThriftHiveMetastore {
return false;
}
- boolean this_present_o2 = true && this.isSetO2();
- boolean that_present_o2 = true && that.isSetO2();
- if (this_present_o2 || that_present_o2) {
- if (!(this_present_o2 && that_present_o2))
+ boolean this_present_o1 = true && this.isSetO1();
+ boolean that_present_o1 = true && that.isSetO1();
+ if (this_present_o1 || that_present_o1) {
+ if (!(this_present_o1 && that_present_o1))
return false;
- if (!this.o2.equals(that.o2))
+ if (!this.o1.equals(that.o1))
return false;
}
@@ -4580,17 +4822,26 @@ public class ThriftHiveMetastore {
switch (field.id)
{
case SUCCESS:
- if (field.type == TType.STRUCT) {
- this.success = new Type();
- this.success.read(iprot);
+ if (field.type == TType.LIST) {
+ {
+ TList _list61 = iprot.readListBegin();
+ this.success = new ArrayList(_list61.size);
+ for (int _i62 = 0; _i62 < _list61.size; ++_i62)
+ {
+ String _elem63;
+ _elem63 = iprot.readString();
+ this.success.add(_elem63);
+ }
+ iprot.readListEnd();
+ }
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
- case O2:
+ case O1:
if (field.type == TType.STRUCT) {
- this.o2 = new MetaException();
- this.o2.read(iprot);
+ this.o1 = new MetaException();
+ this.o1.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -4611,11 +4862,17 @@ public class ThriftHiveMetastore {
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- this.success.write(oprot);
+ {
+ oprot.writeListBegin(new TList(TType.STRING, this.success.size()));
+ for (String _iter64 : this.success) {
+ oprot.writeString(_iter64);
+ }
+ oprot.writeListEnd();
+ }
oprot.writeFieldEnd();
- } else if (this.isSetO2()) {
- oprot.writeFieldBegin(O2_FIELD_DESC);
- this.o2.write(oprot);
+ } else if (this.isSetO1()) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ this.o1.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -4624,7 +4881,7 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_type_result(");
+ StringBuilder sb = new StringBuilder("get_all_databases_result(");
boolean first = true;
sb.append("success:");
@@ -4635,11 +4892,11 @@ public class ThriftHiveMetastore {
}
first = false;
if (!first) sb.append(", ");
- sb.append("o2:");
- if (this.o2 == null) {
+ sb.append("o1:");
+ if (this.o1 == null) {
sb.append("null");
} else {
- sb.append(this.o2);
+ sb.append(this.o1);
}
first = false;
sb.append(")");
@@ -4653,74 +4910,74 @@ public class ThriftHiveMetastore {
}
- public static class create_type_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("create_type_args");
- private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRUCT, (short)1);
+ public static class get_type_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_type_args");
+ private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
- private Type type;
- public static final int TYPE = 1;
+ private String name;
+ public static final int NAME = 1;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
- put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, Type.class)));
+ put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
}});
static {
- FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap);
}
- public create_type_args() {
+ public get_type_args() {
}
- public create_type_args(
- Type type)
+ public get_type_args(
+ String name)
{
this();
- this.type = type;
+ this.name = name;
}
/**
* Performs a deep copy on other.
*/
- public create_type_args(create_type_args other) {
- if (other.isSetType()) {
- this.type = new Type(other.type);
+ public get_type_args(get_type_args other) {
+ if (other.isSetName()) {
+ this.name = other.name;
}
}
@Override
- public create_type_args clone() {
- return new create_type_args(this);
+ public get_type_args clone() {
+ return new get_type_args(this);
}
- public Type getType() {
- return this.type;
+ public String getName() {
+ return this.name;
}
- public void setType(Type type) {
- this.type = type;
+ public void setName(String name) {
+ this.name = name;
}
- public void unsetType() {
- this.type = null;
+ public void unsetName() {
+ this.name = null;
}
- // Returns true if field type is set (has been asigned a value) and false otherwise
- public boolean isSetType() {
- return this.type != null;
+ // Returns true if field name is set (has been asigned a value) and false otherwise
+ public boolean isSetName() {
+ return this.name != null;
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
- case TYPE:
+ case NAME:
if (value == null) {
- unsetType();
+ unsetName();
} else {
- setType((Type)value);
+ setName((String)value);
}
break;
@@ -4731,8 +4988,8 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
- case TYPE:
- return getType();
+ case NAME:
+ return getName();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
@@ -4742,8 +4999,8 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
- case TYPE:
- return isSetType();
+ case NAME:
+ return isSetName();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -4753,21 +5010,21 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof create_type_args)
- return this.equals((create_type_args)that);
+ if (that instanceof get_type_args)
+ return this.equals((get_type_args)that);
return false;
}
- public boolean equals(create_type_args that) {
+ public boolean equals(get_type_args that) {
if (that == null)
return false;
- boolean this_present_type = true && this.isSetType();
- boolean that_present_type = true && that.isSetType();
- if (this_present_type || that_present_type) {
- if (!(this_present_type && that_present_type))
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
return false;
- if (!this.type.equals(that.type))
+ if (!this.name.equals(that.name))
return false;
}
@@ -4790,10 +5047,9 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
- case TYPE:
- if (field.type == TType.STRUCT) {
- this.type = new Type();
- this.type.read(iprot);
+ case NAME:
+ if (field.type == TType.STRING) {
+ this.name = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -4813,9 +5069,9 @@ public class ThriftHiveMetastore {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.type != null) {
- oprot.writeFieldBegin(TYPE_FIELD_DESC);
- this.type.write(oprot);
+ if (this.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(this.name);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -4824,14 +5080,14 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("create_type_args(");
+ StringBuilder sb = new StringBuilder("get_type_args(");
boolean first = true;
- sb.append("type:");
- if (this.type == null) {
+ sb.append("name:");
+ if (this.name == null) {
sb.append("null");
} else {
- sb.append(this.type);
+ sb.append(this.name);
}
first = false;
sb.append(")");
@@ -4845,104 +5101,92 @@ public class ThriftHiveMetastore {
}
- public static class create_type_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("create_type_result");
- private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
+ public static class get_type_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_type_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2);
- private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3);
- private boolean success;
+ private Type success;
public static final int SUCCESS = 0;
- private AlreadyExistsException o1;
+ private MetaException o1;
public static final int O1 = 1;
- private InvalidObjectException o2;
+ private NoSuchObjectException o2;
public static final int O2 = 2;
- private MetaException o3;
- public static final int O3 = 3;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
- public boolean success = false;
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.BOOL)));
+ new StructMetaData(TType.STRUCT, Type.class)));
put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
- put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRUCT)));
}});
static {
- FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap);
}
- public create_type_result() {
+ public get_type_result() {
}
- public create_type_result(
- boolean success,
- AlreadyExistsException o1,
- InvalidObjectException o2,
- MetaException o3)
+ public get_type_result(
+ Type success,
+ MetaException o1,
+ NoSuchObjectException o2)
{
this();
this.success = success;
- this.__isset.success = true;
this.o1 = o1;
this.o2 = o2;
- this.o3 = o3;
}
/**
* Performs a deep copy on other.
*/
- public create_type_result(create_type_result other) {
- __isset.success = other.__isset.success;
- this.success = other.success;
+ public get_type_result(get_type_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new Type(other.success);
+ }
if (other.isSetO1()) {
- this.o1 = new AlreadyExistsException(other.o1);
+ this.o1 = new MetaException(other.o1);
}
if (other.isSetO2()) {
- this.o2 = new InvalidObjectException(other.o2);
- }
- if (other.isSetO3()) {
- this.o3 = new MetaException(other.o3);
+ this.o2 = new NoSuchObjectException(other.o2);
}
}
@Override
- public create_type_result clone() {
- return new create_type_result(this);
+ public get_type_result clone() {
+ return new get_type_result(this);
}
- public boolean isSuccess() {
+ public Type getSuccess() {
return this.success;
}
- public void setSuccess(boolean success) {
+ public void setSuccess(Type success) {
this.success = success;
- this.__isset.success = true;
}
public void unsetSuccess() {
- this.__isset.success = false;
+ this.success = null;
}
// Returns true if field success is set (has been asigned a value) and false otherwise
public boolean isSetSuccess() {
- return this.__isset.success;
+ return this.success != null;
}
- public AlreadyExistsException getO1() {
+ public MetaException getO1() {
return this.o1;
}
- public void setO1(AlreadyExistsException o1) {
+ public void setO1(MetaException o1) {
this.o1 = o1;
}
@@ -4955,11 +5199,11 @@ public class ThriftHiveMetastore {
return this.o1 != null;
}
- public InvalidObjectException getO2() {
+ public NoSuchObjectException getO2() {
return this.o2;
}
- public void setO2(InvalidObjectException o2) {
+ public void setO2(NoSuchObjectException o2) {
this.o2 = o2;
}
@@ -4972,30 +5216,13 @@ public class ThriftHiveMetastore {
return this.o2 != null;
}
- public MetaException getO3() {
- return this.o3;
- }
-
- public void setO3(MetaException o3) {
- this.o3 = o3;
- }
-
- public void unsetO3() {
- this.o3 = null;
- }
-
- // Returns true if field o3 is set (has been asigned a value) and false otherwise
- public boolean isSetO3() {
- return this.o3 != null;
- }
-
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Boolean)value);
+ setSuccess((Type)value);
}
break;
@@ -5003,7 +5230,7 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetO1();
} else {
- setO1((AlreadyExistsException)value);
+ setO1((MetaException)value);
}
break;
@@ -5011,15 +5238,7 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetO2();
} else {
- setO2((InvalidObjectException)value);
- }
- break;
-
- case O3:
- if (value == null) {
- unsetO3();
- } else {
- setO3((MetaException)value);
+ setO2((NoSuchObjectException)value);
}
break;
@@ -5031,7 +5250,7 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
case SUCCESS:
- return new Boolean(isSuccess());
+ return getSuccess();
case O1:
return getO1();
@@ -5039,9 +5258,6 @@ public class ThriftHiveMetastore {
case O2:
return getO2();
- case O3:
- return getO3();
-
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -5056,8 +5272,6 @@ public class ThriftHiveMetastore {
return isSetO1();
case O2:
return isSetO2();
- case O3:
- return isSetO3();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -5067,21 +5281,21 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof create_type_result)
- return this.equals((create_type_result)that);
+ if (that instanceof get_type_result)
+ return this.equals((get_type_result)that);
return false;
}
- public boolean equals(create_type_result that) {
+ public boolean equals(get_type_result that) {
if (that == null)
return false;
- boolean this_present_success = true;
- boolean that_present_success = true;
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
- if (this.success != that.success)
+ if (!this.success.equals(that.success))
return false;
}
@@ -5103,15 +5317,6 @@ public class ThriftHiveMetastore {
return false;
}
- boolean this_present_o3 = true && this.isSetO3();
- boolean that_present_o3 = true && that.isSetO3();
- if (this_present_o3 || that_present_o3) {
- if (!(this_present_o3 && that_present_o3))
- return false;
- if (!this.o3.equals(that.o3))
- return false;
- }
-
return true;
}
@@ -5132,16 +5337,16 @@ public class ThriftHiveMetastore {
switch (field.id)
{
case SUCCESS:
- if (field.type == TType.BOOL) {
- this.success = iprot.readBool();
- this.__isset.success = true;
+ if (field.type == TType.STRUCT) {
+ this.success = new Type();
+ this.success.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case O1:
if (field.type == TType.STRUCT) {
- this.o1 = new AlreadyExistsException();
+ this.o1 = new MetaException();
this.o1.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
@@ -5149,20 +5354,12 @@ public class ThriftHiveMetastore {
break;
case O2:
if (field.type == TType.STRUCT) {
- this.o2 = new InvalidObjectException();
+ this.o2 = new NoSuchObjectException();
this.o2.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
- case O3:
- if (field.type == TType.STRUCT) {
- this.o3 = new MetaException();
- this.o3.read(iprot);
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -5179,7 +5376,7 @@ public class ThriftHiveMetastore {
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeBool(this.success);
+ this.success.write(oprot);
oprot.writeFieldEnd();
} else if (this.isSetO1()) {
oprot.writeFieldBegin(O1_FIELD_DESC);
@@ -5189,10 +5386,6 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(O2_FIELD_DESC);
this.o2.write(oprot);
oprot.writeFieldEnd();
- } else if (this.isSetO3()) {
- oprot.writeFieldBegin(O3_FIELD_DESC);
- this.o3.write(oprot);
- oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
@@ -5200,11 +5393,15 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("create_type_result(");
+ StringBuilder sb = new StringBuilder("get_type_result(");
boolean first = true;
sb.append("success:");
- sb.append(this.success);
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
first = false;
if (!first) sb.append(", ");
sb.append("o1:");
@@ -5222,14 +5419,6 @@ public class ThriftHiveMetastore {
sb.append(this.o2);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("o3:");
- if (this.o3 == null) {
- sb.append("null");
- } else {
- sb.append(this.o3);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -5241,11 +5430,11 @@ public class ThriftHiveMetastore {
}
- public static class drop_type_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("drop_type_args");
- private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRING, (short)1);
+ public static class create_type_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("create_type_args");
+ private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRUCT, (short)1);
- private String type;
+ private Type type;
public static final int TYPE = 1;
private final Isset __isset = new Isset();
@@ -5254,18 +5443,18 @@ public class ThriftHiveMetastore {
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
+ new StructMetaData(TType.STRUCT, Type.class)));
}});
static {
- FieldMetaData.addStructMetaDataMap(drop_type_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap);
}
- public drop_type_args() {
+ public create_type_args() {
}
- public drop_type_args(
- String type)
+ public create_type_args(
+ Type type)
{
this();
this.type = type;
@@ -5274,22 +5463,22 @@ public class ThriftHiveMetastore {
/**
* Performs a deep copy on other.
*/
- public drop_type_args(drop_type_args other) {
+ public create_type_args(create_type_args other) {
if (other.isSetType()) {
- this.type = other.type;
+ this.type = new Type(other.type);
}
}
@Override
- public drop_type_args clone() {
- return new drop_type_args(this);
+ public create_type_args clone() {
+ return new create_type_args(this);
}
- public String getType() {
+ public Type getType() {
return this.type;
}
- public void setType(String type) {
+ public void setType(Type type) {
this.type = type;
}
@@ -5308,7 +5497,7 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetType();
} else {
- setType((String)value);
+ setType((Type)value);
}
break;
@@ -5341,12 +5530,12 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof drop_type_args)
- return this.equals((drop_type_args)that);
+ if (that instanceof create_type_args)
+ return this.equals((create_type_args)that);
return false;
}
- public boolean equals(drop_type_args that) {
+ public boolean equals(create_type_args that) {
if (that == null)
return false;
@@ -5379,8 +5568,9 @@ public class ThriftHiveMetastore {
switch (field.id)
{
case TYPE:
- if (field.type == TType.STRING) {
- this.type = iprot.readString();
+ if (field.type == TType.STRUCT) {
+ this.type = new Type();
+ this.type.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -5402,7 +5592,7 @@ public class ThriftHiveMetastore {
oprot.writeStructBegin(STRUCT_DESC);
if (this.type != null) {
oprot.writeFieldBegin(TYPE_FIELD_DESC);
- oprot.writeString(this.type);
+ this.type.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -5411,7 +5601,7 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("drop_type_args(");
+ StringBuilder sb = new StringBuilder("create_type_args(");
boolean first = true;
sb.append("type:");
@@ -5432,15 +5622,21 @@ public class ThriftHiveMetastore {
}
- public static class drop_type_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("drop_type_result");
+ public static class create_type_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("create_type_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
- private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1);
+ private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
+ private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2);
+ private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3);
private boolean success;
public static final int SUCCESS = 0;
- private MetaException o2;
- public static final int O2 = 1;
+ private AlreadyExistsException o1;
+ public static final int O1 = 1;
+ private InvalidObjectException o2;
+ public static final int O2 = 2;
+ private MetaException o3;
+ public static final int O3 = 3;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
@@ -5450,41 +5646,55 @@ public class ThriftHiveMetastore {
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
+ put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
+ put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
}});
static {
- FieldMetaData.addStructMetaDataMap(drop_type_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap);
}
- public drop_type_result() {
+ public create_type_result() {
}
- public drop_type_result(
+ public create_type_result(
boolean success,
- MetaException o2)
+ AlreadyExistsException o1,
+ InvalidObjectException o2,
+ MetaException o3)
{
this();
this.success = success;
this.__isset.success = true;
+ this.o1 = o1;
this.o2 = o2;
+ this.o3 = o3;
}
/**
* Performs a deep copy on other.
*/
- public drop_type_result(drop_type_result other) {
+ public create_type_result(create_type_result other) {
__isset.success = other.__isset.success;
this.success = other.success;
+ if (other.isSetO1()) {
+ this.o1 = new AlreadyExistsException(other.o1);
+ }
if (other.isSetO2()) {
- this.o2 = new MetaException(other.o2);
+ this.o2 = new InvalidObjectException(other.o2);
+ }
+ if (other.isSetO3()) {
+ this.o3 = new MetaException(other.o3);
}
}
@Override
- public drop_type_result clone() {
- return new drop_type_result(this);
+ public create_type_result clone() {
+ return new create_type_result(this);
}
public boolean isSuccess() {
@@ -5505,23 +5715,57 @@ public class ThriftHiveMetastore {
return this.__isset.success;
}
- public MetaException getO2() {
- return this.o2;
+ public AlreadyExistsException getO1() {
+ return this.o1;
}
- public void setO2(MetaException o2) {
- this.o2 = o2;
+ public void setO1(AlreadyExistsException o1) {
+ this.o1 = o1;
}
- public void unsetO2() {
- this.o2 = null;
- }
+ public void unsetO1() {
+ this.o1 = null;
+ }
+
+ // Returns true if field o1 is set (has been asigned a value) and false otherwise
+ public boolean isSetO1() {
+ return this.o1 != null;
+ }
+
+ public InvalidObjectException getO2() {
+ return this.o2;
+ }
+
+ public void setO2(InvalidObjectException o2) {
+ this.o2 = o2;
+ }
+
+ public void unsetO2() {
+ this.o2 = null;
+ }
// Returns true if field o2 is set (has been asigned a value) and false otherwise
public boolean isSetO2() {
return this.o2 != null;
}
+ public MetaException getO3() {
+ return this.o3;
+ }
+
+ public void setO3(MetaException o3) {
+ this.o3 = o3;
+ }
+
+ public void unsetO3() {
+ this.o3 = null;
+ }
+
+ // Returns true if field o3 is set (has been asigned a value) and false otherwise
+ public boolean isSetO3() {
+ return this.o3 != null;
+ }
+
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
case SUCCESS:
@@ -5532,11 +5776,27 @@ public class ThriftHiveMetastore {
}
break;
+ case O1:
+ if (value == null) {
+ unsetO1();
+ } else {
+ setO1((AlreadyExistsException)value);
+ }
+ break;
+
case O2:
if (value == null) {
unsetO2();
} else {
- setO2((MetaException)value);
+ setO2((InvalidObjectException)value);
+ }
+ break;
+
+ case O3:
+ if (value == null) {
+ unsetO3();
+ } else {
+ setO3((MetaException)value);
}
break;
@@ -5550,9 +5810,15 @@ public class ThriftHiveMetastore {
case SUCCESS:
return new Boolean(isSuccess());
+ case O1:
+ return getO1();
+
case O2:
return getO2();
+ case O3:
+ return getO3();
+
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -5563,8 +5829,12 @@ public class ThriftHiveMetastore {
switch (fieldID) {
case SUCCESS:
return isSetSuccess();
+ case O1:
+ return isSetO1();
case O2:
return isSetO2();
+ case O3:
+ return isSetO3();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -5574,12 +5844,12 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof drop_type_result)
- return this.equals((drop_type_result)that);
+ if (that instanceof create_type_result)
+ return this.equals((create_type_result)that);
return false;
}
- public boolean equals(drop_type_result that) {
+ public boolean equals(create_type_result that) {
if (that == null)
return false;
@@ -5592,6 +5862,15 @@ public class ThriftHiveMetastore {
return false;
}
+ boolean this_present_o1 = true && this.isSetO1();
+ boolean that_present_o1 = true && that.isSetO1();
+ if (this_present_o1 || that_present_o1) {
+ if (!(this_present_o1 && that_present_o1))
+ return false;
+ if (!this.o1.equals(that.o1))
+ return false;
+ }
+
boolean this_present_o2 = true && this.isSetO2();
boolean that_present_o2 = true && that.isSetO2();
if (this_present_o2 || that_present_o2) {
@@ -5601,6 +5880,15 @@ public class ThriftHiveMetastore {
return false;
}
+ boolean this_present_o3 = true && this.isSetO3();
+ boolean that_present_o3 = true && that.isSetO3();
+ if (this_present_o3 || that_present_o3) {
+ if (!(this_present_o3 && that_present_o3))
+ return false;
+ if (!this.o3.equals(that.o3))
+ return false;
+ }
+
return true;
}
@@ -5628,14 +5916,30 @@ public class ThriftHiveMetastore {
TProtocolUtil.skip(iprot, field.type);
}
break;
+ case O1:
+ if (field.type == TType.STRUCT) {
+ this.o1 = new AlreadyExistsException();
+ this.o1.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
case O2:
if (field.type == TType.STRUCT) {
- this.o2 = new MetaException();
+ this.o2 = new InvalidObjectException();
this.o2.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
+ case O3:
+ if (field.type == TType.STRUCT) {
+ this.o3 = new MetaException();
+ this.o3.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -5654,10 +5958,18 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(this.success);
oprot.writeFieldEnd();
+ } else if (this.isSetO1()) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ this.o1.write(oprot);
+ oprot.writeFieldEnd();
} else if (this.isSetO2()) {
oprot.writeFieldBegin(O2_FIELD_DESC);
this.o2.write(oprot);
oprot.writeFieldEnd();
+ } else if (this.isSetO3()) {
+ oprot.writeFieldBegin(O3_FIELD_DESC);
+ this.o3.write(oprot);
+ oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
@@ -5665,13 +5977,21 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("drop_type_result(");
+ StringBuilder sb = new StringBuilder("create_type_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
+ sb.append("o1:");
+ if (this.o1 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o1);
+ }
+ first = false;
+ if (!first) sb.append(", ");
sb.append("o2:");
if (this.o2 == null) {
sb.append("null");
@@ -5679,6 +5999,14 @@ public class ThriftHiveMetastore {
sb.append(this.o2);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("o3:");
+ if (this.o3 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o3);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -5690,74 +6018,74 @@ public class ThriftHiveMetastore {
}
- public static class get_type_all_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_type_all_args");
- private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
+ public static class drop_type_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("drop_type_args");
+ private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRING, (short)1);
- private String name;
- public static final int NAME = 1;
+ private String type;
+ public static final int TYPE = 1;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
- put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
+ put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
}});
static {
- FieldMetaData.addStructMetaDataMap(get_type_all_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(drop_type_args.class, metaDataMap);
}
- public get_type_all_args() {
+ public drop_type_args() {
}
- public get_type_all_args(
- String name)
+ public drop_type_args(
+ String type)
{
this();
- this.name = name;
+ this.type = type;
}
/**
* Performs a deep copy on other.
*/
- public get_type_all_args(get_type_all_args other) {
- if (other.isSetName()) {
- this.name = other.name;
+ public drop_type_args(drop_type_args other) {
+ if (other.isSetType()) {
+ this.type = other.type;
}
}
@Override
- public get_type_all_args clone() {
- return new get_type_all_args(this);
+ public drop_type_args clone() {
+ return new drop_type_args(this);
}
- public String getName() {
- return this.name;
+ public String getType() {
+ return this.type;
}
- public void setName(String name) {
- this.name = name;
+ public void setType(String type) {
+ this.type = type;
}
- public void unsetName() {
- this.name = null;
+ public void unsetType() {
+ this.type = null;
}
- // Returns true if field name is set (has been asigned a value) and false otherwise
- public boolean isSetName() {
- return this.name != null;
+ // Returns true if field type is set (has been asigned a value) and false otherwise
+ public boolean isSetType() {
+ return this.type != null;
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
- case NAME:
+ case TYPE:
if (value == null) {
- unsetName();
+ unsetType();
} else {
- setName((String)value);
+ setType((String)value);
}
break;
@@ -5768,8 +6096,8 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
- case NAME:
- return getName();
+ case TYPE:
+ return getType();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
@@ -5779,8 +6107,8 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
- case NAME:
- return isSetName();
+ case TYPE:
+ return isSetType();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -5790,21 +6118,21 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_type_all_args)
- return this.equals((get_type_all_args)that);
+ if (that instanceof drop_type_args)
+ return this.equals((drop_type_args)that);
return false;
}
- public boolean equals(get_type_all_args that) {
+ public boolean equals(drop_type_args that) {
if (that == null)
return false;
- boolean this_present_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
+ boolean this_present_type = true && this.isSetType();
+ boolean that_present_type = true && that.isSetType();
+ if (this_present_type || that_present_type) {
+ if (!(this_present_type && that_present_type))
return false;
- if (!this.name.equals(that.name))
+ if (!this.type.equals(that.type))
return false;
}
@@ -5827,9 +6155,9 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
- case NAME:
+ case TYPE:
if (field.type == TType.STRING) {
- this.name = iprot.readString();
+ this.type = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -5849,9 +6177,9 @@ public class ThriftHiveMetastore {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(this.name);
+ if (this.type != null) {
+ oprot.writeFieldBegin(TYPE_FIELD_DESC);
+ oprot.writeString(this.type);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -5860,14 +6188,14 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_type_all_args(");
+ StringBuilder sb = new StringBuilder("drop_type_args(");
boolean first = true;
- sb.append("name:");
- if (this.name == null) {
+ sb.append("type:");
+ if (this.type == null) {
sb.append("null");
} else {
- sb.append(this.name);
+ sb.append(this.type);
}
first = false;
sb.append(")");
@@ -5881,107 +6209,111 @@ public class ThriftHiveMetastore {
}
- public static class get_type_all_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_type_all_result");
- private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0);
- private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1);
+ public static class drop_type_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("drop_type_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
+ private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
+ private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2);
- private Map success;
+ private boolean success;
public static final int SUCCESS = 0;
- private MetaException o2;
- public static final int O2 = 1;
+ private MetaException o1;
+ public static final int O1 = 1;
+ private NoSuchObjectException o2;
+ public static final int O2 = 2;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
+ public boolean success = false;
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
- new MapMetaData(TType.MAP,
- new FieldValueMetaData(TType.STRING),
- new StructMetaData(TType.STRUCT, Type.class))));
+ new FieldValueMetaData(TType.BOOL)));
+ put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
}});
static {
- FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(drop_type_result.class, metaDataMap);
}
- public get_type_all_result() {
+ public drop_type_result() {
}
- public get_type_all_result(
- Map success,
- MetaException o2)
+ public drop_type_result(
+ boolean success,
+ MetaException o1,
+ NoSuchObjectException o2)
{
this();
this.success = success;
+ this.__isset.success = true;
+ this.o1 = o1;
this.o2 = o2;
}
/**
* Performs a deep copy on other.
*/
- public get_type_all_result(get_type_all_result other) {
- if (other.isSetSuccess()) {
- Map __this__success = new HashMap();
- for (Map.Entry other_element : other.success.entrySet()) {
-
- String other_element_key = other_element.getKey();
- Type other_element_value = other_element.getValue();
-
- String __this__success_copy_key = other_element_key;
-
- Type __this__success_copy_value = new Type(other_element_value);
-
- __this__success.put(__this__success_copy_key, __this__success_copy_value);
- }
- this.success = __this__success;
+ public drop_type_result(drop_type_result other) {
+ __isset.success = other.__isset.success;
+ this.success = other.success;
+ if (other.isSetO1()) {
+ this.o1 = new MetaException(other.o1);
}
if (other.isSetO2()) {
- this.o2 = new MetaException(other.o2);
+ this.o2 = new NoSuchObjectException(other.o2);
}
}
@Override
- public get_type_all_result clone() {
- return new get_type_all_result(this);
- }
-
- public int getSuccessSize() {
- return (this.success == null) ? 0 : this.success.size();
- }
-
- public void putToSuccess(String key, Type val) {
- if (this.success == null) {
- this.success = new HashMap();
- }
- this.success.put(key, val);
+ public drop_type_result clone() {
+ return new drop_type_result(this);
}
- public Map getSuccess() {
+ public boolean isSuccess() {
return this.success;
}
- public void setSuccess(Map success) {
+ public void setSuccess(boolean success) {
this.success = success;
+ this.__isset.success = true;
}
public void unsetSuccess() {
- this.success = null;
+ this.__isset.success = false;
}
// Returns true if field success is set (has been asigned a value) and false otherwise
public boolean isSetSuccess() {
- return this.success != null;
+ return this.__isset.success;
}
- public MetaException getO2() {
+ public MetaException getO1() {
+ return this.o1;
+ }
+
+ public void setO1(MetaException o1) {
+ this.o1 = o1;
+ }
+
+ public void unsetO1() {
+ this.o1 = null;
+ }
+
+ // Returns true if field o1 is set (has been asigned a value) and false otherwise
+ public boolean isSetO1() {
+ return this.o1 != null;
+ }
+
+ public NoSuchObjectException getO2() {
return this.o2;
}
- public void setO2(MetaException o2) {
+ public void setO2(NoSuchObjectException o2) {
this.o2 = o2;
}
@@ -6000,7 +6332,15 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Map)value);
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case O1:
+ if (value == null) {
+ unsetO1();
+ } else {
+ setO1((MetaException)value);
}
break;
@@ -6008,7 +6348,7 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetO2();
} else {
- setO2((MetaException)value);
+ setO2((NoSuchObjectException)value);
}
break;
@@ -6020,7 +6360,10 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
case SUCCESS:
- return getSuccess();
+ return new Boolean(isSuccess());
+
+ case O1:
+ return getO1();
case O2:
return getO2();
@@ -6035,6 +6378,8 @@ public class ThriftHiveMetastore {
switch (fieldID) {
case SUCCESS:
return isSetSuccess();
+ case O1:
+ return isSetO1();
case O2:
return isSetO2();
default:
@@ -6046,21 +6391,30 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_type_all_result)
- return this.equals((get_type_all_result)that);
+ if (that instanceof drop_type_result)
+ return this.equals((drop_type_result)that);
return false;
}
- public boolean equals(get_type_all_result that) {
+ public boolean equals(drop_type_result that) {
if (that == null)
return false;
- boolean this_present_success = true && this.isSetSuccess();
- boolean that_present_success = true && that.isSetSuccess();
+ boolean this_present_success = true;
+ boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
- if (!this.success.equals(that.success))
+ if (this.success != that.success)
+ return false;
+ }
+
+ boolean this_present_o1 = true && this.isSetO1();
+ boolean that_present_o1 = true && that.isSetO1();
+ if (this_present_o1 || that_present_o1) {
+ if (!(this_present_o1 && that_present_o1))
+ return false;
+ if (!this.o1.equals(that.o1))
return false;
}
@@ -6093,28 +6447,24 @@ public class ThriftHiveMetastore {
switch (field.id)
{
case SUCCESS:
- if (field.type == TType.MAP) {
- {
- TMap _map61 = iprot.readMapBegin();
- this.success = new HashMap(2*_map61.size);
- for (int _i62 = 0; _i62 < _map61.size; ++_i62)
- {
- String _key63;
- Type _val64;
- _key63 = iprot.readString();
- _val64 = new Type();
- _val64.read(iprot);
- this.success.put(_key63, _val64);
- }
- iprot.readMapEnd();
- }
+ if (field.type == TType.BOOL) {
+ this.success = iprot.readBool();
+ this.__isset.success = true;
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case O1:
+ if (field.type == TType.STRUCT) {
+ this.o1 = new MetaException();
+ this.o1.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case O2:
if (field.type == TType.STRUCT) {
- this.o2 = new MetaException();
+ this.o2 = new NoSuchObjectException();
this.o2.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
@@ -6136,14 +6486,11 @@ public class ThriftHiveMetastore {
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size()));
- for (Map.Entry _iter65 : this.success.entrySet()) {
- oprot.writeString(_iter65.getKey());
- _iter65.getValue().write(oprot);
- }
- oprot.writeMapEnd();
- }
+ oprot.writeBool(this.success);
+ oprot.writeFieldEnd();
+ } else if (this.isSetO1()) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ this.o1.write(oprot);
oprot.writeFieldEnd();
} else if (this.isSetO2()) {
oprot.writeFieldBegin(O2_FIELD_DESC);
@@ -6156,14 +6503,18 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_type_all_result(");
+ StringBuilder sb = new StringBuilder("drop_type_result(");
boolean first = true;
sb.append("success:");
- if (this.success == null) {
+ sb.append(this.success);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("o1:");
+ if (this.o1 == null) {
sb.append("null");
} else {
- sb.append(this.success);
+ sb.append(this.o1);
}
first = false;
if (!first) sb.append(", ");
@@ -6185,109 +6536,74 @@ public class ThriftHiveMetastore {
}
- public static class get_fields_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_fields_args");
- private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1);
- private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2);
+ public static class get_type_all_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_type_all_args");
+ private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
- private String db_name;
- public static final int DB_NAME = 1;
- private String table_name;
- public static final int TABLE_NAME = 2;
+ private String name;
+ public static final int NAME = 1;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
- put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
- put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT,
+ put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
}});
static {
- FieldMetaData.addStructMetaDataMap(get_fields_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_type_all_args.class, metaDataMap);
}
- public get_fields_args() {
+ public get_type_all_args() {
}
- public get_fields_args(
- String db_name,
- String table_name)
+ public get_type_all_args(
+ String name)
{
this();
- this.db_name = db_name;
- this.table_name = table_name;
+ this.name = name;
}
/**
* Performs a deep copy on other.
*/
- public get_fields_args(get_fields_args other) {
- if (other.isSetDb_name()) {
- this.db_name = other.db_name;
- }
- if (other.isSetTable_name()) {
- this.table_name = other.table_name;
+ public get_type_all_args(get_type_all_args other) {
+ if (other.isSetName()) {
+ this.name = other.name;
}
}
@Override
- public get_fields_args clone() {
- return new get_fields_args(this);
- }
-
- public String getDb_name() {
- return this.db_name;
- }
-
- public void setDb_name(String db_name) {
- this.db_name = db_name;
- }
-
- public void unsetDb_name() {
- this.db_name = null;
- }
-
- // Returns true if field db_name is set (has been asigned a value) and false otherwise
- public boolean isSetDb_name() {
- return this.db_name != null;
+ public get_type_all_args clone() {
+ return new get_type_all_args(this);
}
- public String getTable_name() {
- return this.table_name;
+ public String getName() {
+ return this.name;
}
- public void setTable_name(String table_name) {
- this.table_name = table_name;
+ public void setName(String name) {
+ this.name = name;
}
- public void unsetTable_name() {
- this.table_name = null;
+ public void unsetName() {
+ this.name = null;
}
- // Returns true if field table_name is set (has been asigned a value) and false otherwise
- public boolean isSetTable_name() {
- return this.table_name != null;
+ // Returns true if field name is set (has been asigned a value) and false otherwise
+ public boolean isSetName() {
+ return this.name != null;
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
- case DB_NAME:
- if (value == null) {
- unsetDb_name();
- } else {
- setDb_name((String)value);
- }
- break;
-
- case TABLE_NAME:
+ case NAME:
if (value == null) {
- unsetTable_name();
+ unsetName();
} else {
- setTable_name((String)value);
+ setName((String)value);
}
break;
@@ -6298,11 +6614,8 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
- case DB_NAME:
- return getDb_name();
-
- case TABLE_NAME:
- return getTable_name();
+ case NAME:
+ return getName();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
@@ -6312,10 +6625,8 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
- case DB_NAME:
- return isSetDb_name();
- case TABLE_NAME:
- return isSetTable_name();
+ case NAME:
+ return isSetName();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -6325,30 +6636,21 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_fields_args)
- return this.equals((get_fields_args)that);
+ if (that instanceof get_type_all_args)
+ return this.equals((get_type_all_args)that);
return false;
}
- public boolean equals(get_fields_args that) {
+ public boolean equals(get_type_all_args that) {
if (that == null)
return false;
- boolean this_present_db_name = true && this.isSetDb_name();
- boolean that_present_db_name = true && that.isSetDb_name();
- if (this_present_db_name || that_present_db_name) {
- if (!(this_present_db_name && that_present_db_name))
- return false;
- if (!this.db_name.equals(that.db_name))
- return false;
- }
-
- boolean this_present_table_name = true && this.isSetTable_name();
- boolean that_present_table_name = true && that.isSetTable_name();
- if (this_present_table_name || that_present_table_name) {
- if (!(this_present_table_name && that_present_table_name))
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
return false;
- if (!this.table_name.equals(that.table_name))
+ if (!this.name.equals(that.name))
return false;
}
@@ -6371,16 +6673,9 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
- case DB_NAME:
- if (field.type == TType.STRING) {
- this.db_name = iprot.readString();
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case TABLE_NAME:
+ case NAME:
if (field.type == TType.STRING) {
- this.table_name = iprot.readString();
+ this.name = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -6400,14 +6695,9 @@ public class ThriftHiveMetastore {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.db_name != null) {
- oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
- oprot.writeString(this.db_name);
- oprot.writeFieldEnd();
- }
- if (this.table_name != null) {
- oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
- oprot.writeString(this.table_name);
+ if (this.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(this.name);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -6416,22 +6706,14 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_fields_args(");
+ StringBuilder sb = new StringBuilder("get_type_all_args(");
boolean first = true;
- sb.append("db_name:");
- if (this.db_name == null) {
- sb.append("null");
- } else {
- sb.append(this.db_name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("table_name:");
- if (this.table_name == null) {
+ sb.append("name:");
+ if (this.name == null) {
sb.append("null");
} else {
- sb.append(this.table_name);
+ sb.append(this.name);
}
first = false;
sb.append(")");
@@ -6445,21 +6727,15 @@ public class ThriftHiveMetastore {
}
- public static class get_fields_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_fields_result");
- private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
- private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
- private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2);
- private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3);
+ public static class get_type_all_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_type_all_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0);
+ private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1);
- private List success;
+ private Map success;
public static final int SUCCESS = 0;
- private MetaException o1;
- public static final int O1 = 1;
- private UnknownTableException o2;
- public static final int O2 = 2;
- private UnknownDBException o3;
- public static final int O3 = 3;
+ private MetaException o2;
+ public static final int O2 = 1;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
@@ -6467,83 +6743,74 @@ public class ThriftHiveMetastore {
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
- new ListMetaData(TType.LIST,
- new StructMetaData(TType.STRUCT, FieldSchema.class))));
- put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRUCT)));
+ new MapMetaData(TType.MAP,
+ new FieldValueMetaData(TType.STRING),
+ new StructMetaData(TType.STRUCT, Type.class))));
put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
- put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRUCT)));
}});
static {
- FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap);
}
- public get_fields_result() {
+ public get_type_all_result() {
}
- public get_fields_result(
- List success,
- MetaException o1,
- UnknownTableException o2,
- UnknownDBException o3)
+ public get_type_all_result(
+ Map success,
+ MetaException o2)
{
this();
this.success = success;
- this.o1 = o1;
this.o2 = o2;
- this.o3 = o3;
}
/**
* Performs a deep copy on other.
*/
- public get_fields_result(get_fields_result other) {
+ public get_type_all_result(get_type_all_result other) {
if (other.isSetSuccess()) {
- List __this__success = new ArrayList();
- for (FieldSchema other_element : other.success) {
- __this__success.add(new FieldSchema(other_element));
+ Map __this__success = new HashMap();
+ for (Map.Entry other_element : other.success.entrySet()) {
+
+ String other_element_key = other_element.getKey();
+ Type other_element_value = other_element.getValue();
+
+ String __this__success_copy_key = other_element_key;
+
+ Type __this__success_copy_value = new Type(other_element_value);
+
+ __this__success.put(__this__success_copy_key, __this__success_copy_value);
}
this.success = __this__success;
}
- if (other.isSetO1()) {
- this.o1 = new MetaException(other.o1);
- }
if (other.isSetO2()) {
- this.o2 = new UnknownTableException(other.o2);
- }
- if (other.isSetO3()) {
- this.o3 = new UnknownDBException(other.o3);
+ this.o2 = new MetaException(other.o2);
}
}
@Override
- public get_fields_result clone() {
- return new get_fields_result(this);
+ public get_type_all_result clone() {
+ return new get_type_all_result(this);
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
- public java.util.Iterator getSuccessIterator() {
- return (this.success == null) ? null : this.success.iterator();
- }
-
- public void addToSuccess(FieldSchema elem) {
+ public void putToSuccess(String key, Type val) {
if (this.success == null) {
- this.success = new ArrayList();
+ this.success = new HashMap();
}
- this.success.add(elem);
+ this.success.put(key, val);
}
- public List getSuccess() {
+ public Map getSuccess() {
return this.success;
}
- public void setSuccess(List success) {
+ public void setSuccess(Map success) {
this.success = success;
}
@@ -6556,28 +6823,11 @@ public class ThriftHiveMetastore {
return this.success != null;
}
- public MetaException getO1() {
- return this.o1;
- }
-
- public void setO1(MetaException o1) {
- this.o1 = o1;
- }
-
- public void unsetO1() {
- this.o1 = null;
- }
-
- // Returns true if field o1 is set (has been asigned a value) and false otherwise
- public boolean isSetO1() {
- return this.o1 != null;
- }
-
- public UnknownTableException getO2() {
+ public MetaException getO2() {
return this.o2;
}
- public void setO2(UnknownTableException o2) {
+ public void setO2(MetaException o2) {
this.o2 = o2;
}
@@ -6590,38 +6840,13 @@ public class ThriftHiveMetastore {
return this.o2 != null;
}
- public UnknownDBException getO3() {
- return this.o3;
- }
-
- public void setO3(UnknownDBException o3) {
- this.o3 = o3;
- }
-
- public void unsetO3() {
- this.o3 = null;
- }
-
- // Returns true if field o3 is set (has been asigned a value) and false otherwise
- public boolean isSetO3() {
- return this.o3 != null;
- }
-
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List)value);
- }
- break;
-
- case O1:
- if (value == null) {
- unsetO1();
- } else {
- setO1((MetaException)value);
+ setSuccess((Map)value);
}
break;
@@ -6629,15 +6854,7 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetO2();
} else {
- setO2((UnknownTableException)value);
- }
- break;
-
- case O3:
- if (value == null) {
- unsetO3();
- } else {
- setO3((UnknownDBException)value);
+ setO2((MetaException)value);
}
break;
@@ -6651,15 +6868,9 @@ public class ThriftHiveMetastore {
case SUCCESS:
return getSuccess();
- case O1:
- return getO1();
-
case O2:
return getO2();
- case O3:
- return getO3();
-
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -6670,12 +6881,8 @@ public class ThriftHiveMetastore {
switch (fieldID) {
case SUCCESS:
return isSetSuccess();
- case O1:
- return isSetO1();
case O2:
return isSetO2();
- case O3:
- return isSetO3();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -6685,12 +6892,12 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_fields_result)
- return this.equals((get_fields_result)that);
+ if (that instanceof get_type_all_result)
+ return this.equals((get_type_all_result)that);
return false;
}
- public boolean equals(get_fields_result that) {
+ public boolean equals(get_type_all_result that) {
if (that == null)
return false;
@@ -6703,15 +6910,6 @@ public class ThriftHiveMetastore {
return false;
}
- boolean this_present_o1 = true && this.isSetO1();
- boolean that_present_o1 = true && that.isSetO1();
- if (this_present_o1 || that_present_o1) {
- if (!(this_present_o1 && that_present_o1))
- return false;
- if (!this.o1.equals(that.o1))
- return false;
- }
-
boolean this_present_o2 = true && this.isSetO2();
boolean that_present_o2 = true && that.isSetO2();
if (this_present_o2 || that_present_o2) {
@@ -6721,15 +6919,6 @@ public class ThriftHiveMetastore {
return false;
}
- boolean this_present_o3 = true && this.isSetO3();
- boolean that_present_o3 = true && that.isSetO3();
- if (this_present_o3 || that_present_o3) {
- if (!(this_present_o3 && that_present_o3))
- return false;
- if (!this.o3.equals(that.o3))
- return false;
- }
-
return true;
}
@@ -6750,43 +6939,29 @@ public class ThriftHiveMetastore {
switch (field.id)
{
case SUCCESS:
- if (field.type == TType.LIST) {
+ if (field.type == TType.MAP) {
{
- TList _list66 = iprot.readListBegin();
- this.success = new ArrayList(_list66.size);
- for (int _i67 = 0; _i67 < _list66.size; ++_i67)
+ TMap _map65 = iprot.readMapBegin();
+ this.success = new HashMap(2*_map65.size);
+ for (int _i66 = 0; _i66 < _map65.size; ++_i66)
{
- FieldSchema _elem68;
- _elem68 = new FieldSchema();
- _elem68.read(iprot);
- this.success.add(_elem68);
+ String _key67;
+ Type _val68;
+ _key67 = iprot.readString();
+ _val68 = new Type();
+ _val68.read(iprot);
+ this.success.put(_key67, _val68);
}
- iprot.readListEnd();
+ iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
- case O1:
+ case O2:
if (field.type == TType.STRUCT) {
- this.o1 = new MetaException();
- this.o1.read(iprot);
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case O2:
- if (field.type == TType.STRUCT) {
- this.o2 = new UnknownTableException();
- this.o2.read(iprot);
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case O3:
- if (field.type == TType.STRUCT) {
- this.o3 = new UnknownDBException();
- this.o3.read(iprot);
+ this.o2 = new MetaException();
+ this.o2.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -6808,25 +6983,18 @@ public class ThriftHiveMetastore {
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
- oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
- for (FieldSchema _iter69 : this.success) {
- _iter69.write(oprot);
+ oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size()));
+ for (Map.Entry _iter69 : this.success.entrySet()) {
+ oprot.writeString(_iter69.getKey());
+ _iter69.getValue().write(oprot);
}
- oprot.writeListEnd();
+ oprot.writeMapEnd();
}
oprot.writeFieldEnd();
- } else if (this.isSetO1()) {
- oprot.writeFieldBegin(O1_FIELD_DESC);
- this.o1.write(oprot);
- oprot.writeFieldEnd();
} else if (this.isSetO2()) {
oprot.writeFieldBegin(O2_FIELD_DESC);
this.o2.write(oprot);
oprot.writeFieldEnd();
- } else if (this.isSetO3()) {
- oprot.writeFieldBegin(O3_FIELD_DESC);
- this.o3.write(oprot);
- oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
@@ -6834,7 +7002,7 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_fields_result(");
+ StringBuilder sb = new StringBuilder("get_type_all_result(");
boolean first = true;
sb.append("success:");
@@ -6845,14 +7013,6 @@ public class ThriftHiveMetastore {
}
first = false;
if (!first) sb.append(", ");
- sb.append("o1:");
- if (this.o1 == null) {
- sb.append("null");
- } else {
- sb.append(this.o1);
- }
- first = false;
- if (!first) sb.append(", ");
sb.append("o2:");
if (this.o2 == null) {
sb.append("null");
@@ -6860,14 +7020,6 @@ public class ThriftHiveMetastore {
sb.append(this.o2);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("o3:");
- if (this.o3 == null) {
- sb.append("null");
- } else {
- sb.append(this.o3);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -6879,8 +7031,8 @@ public class ThriftHiveMetastore {
}
- public static class get_schema_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_schema_args");
+ public static class get_fields_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_fields_args");
private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1);
private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2);
@@ -6901,13 +7053,13 @@ public class ThriftHiveMetastore {
}});
static {
- FieldMetaData.addStructMetaDataMap(get_schema_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_fields_args.class, metaDataMap);
}
- public get_schema_args() {
+ public get_fields_args() {
}
- public get_schema_args(
+ public get_fields_args(
String db_name,
String table_name)
{
@@ -6919,7 +7071,7 @@ public class ThriftHiveMetastore {
/**
* Performs a deep copy on other.
*/
- public get_schema_args(get_schema_args other) {
+ public get_fields_args(get_fields_args other) {
if (other.isSetDb_name()) {
this.db_name = other.db_name;
}
@@ -6929,8 +7081,8 @@ public class ThriftHiveMetastore {
}
@Override
- public get_schema_args clone() {
- return new get_schema_args(this);
+ public get_fields_args clone() {
+ return new get_fields_args(this);
}
public String getDb_name() {
@@ -7019,12 +7171,12 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_schema_args)
- return this.equals((get_schema_args)that);
+ if (that instanceof get_fields_args)
+ return this.equals((get_fields_args)that);
return false;
}
- public boolean equals(get_schema_args that) {
+ public boolean equals(get_fields_args that) {
if (that == null)
return false;
@@ -7110,7 +7262,7 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_schema_args(");
+ StringBuilder sb = new StringBuilder("get_fields_args(");
boolean first = true;
sb.append("db_name:");
@@ -7139,8 +7291,8 @@ public class ThriftHiveMetastore {
}
- public static class get_schema_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_schema_result");
+ public static class get_fields_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_fields_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2);
@@ -7172,13 +7324,13 @@ public class ThriftHiveMetastore {
}});
static {
- FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap);
}
- public get_schema_result() {
+ public get_fields_result() {
}
- public get_schema_result(
+ public get_fields_result(
List success,
MetaException o1,
UnknownTableException o2,
@@ -7194,7 +7346,7 @@ public class ThriftHiveMetastore {
/**
* Performs a deep copy on other.
*/
- public get_schema_result(get_schema_result other) {
+ public get_fields_result(get_fields_result other) {
if (other.isSetSuccess()) {
List __this__success = new ArrayList();
for (FieldSchema other_element : other.success) {
@@ -7214,8 +7366,8 @@ public class ThriftHiveMetastore {
}
@Override
- public get_schema_result clone() {
- return new get_schema_result(this);
+ public get_fields_result clone() {
+ return new get_fields_result(this);
}
public int getSuccessSize() {
@@ -7379,12 +7531,12 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_schema_result)
- return this.equals((get_schema_result)that);
+ if (that instanceof get_fields_result)
+ return this.equals((get_fields_result)that);
return false;
}
- public boolean equals(get_schema_result that) {
+ public boolean equals(get_fields_result that) {
if (that == null)
return false;
@@ -7528,7 +7680,7 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_schema_result(");
+ StringBuilder sb = new StringBuilder("get_fields_result(");
boolean first = true;
sb.append("success:");
@@ -7573,74 +7725,109 @@ public class ThriftHiveMetastore {
}
- public static class create_table_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("create_table_args");
- private static final TField TBL_FIELD_DESC = new TField("tbl", TType.STRUCT, (short)1);
+ public static class get_schema_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_schema_args");
+ private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1);
+ private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2);
- private Table tbl;
- public static final int TBL = 1;
+ private String db_name;
+ public static final int DB_NAME = 1;
+ private String table_name;
+ public static final int TABLE_NAME = 2;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
- put(TBL, new FieldMetaData("tbl", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, Table.class)));
+ put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
}});
static {
- FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_schema_args.class, metaDataMap);
}
- public create_table_args() {
+ public get_schema_args() {
}
- public create_table_args(
- Table tbl)
+ public get_schema_args(
+ String db_name,
+ String table_name)
{
this();
- this.tbl = tbl;
+ this.db_name = db_name;
+ this.table_name = table_name;
}
/**
* Performs a deep copy on other.
*/
- public create_table_args(create_table_args other) {
- if (other.isSetTbl()) {
- this.tbl = new Table(other.tbl);
+ public get_schema_args(get_schema_args other) {
+ if (other.isSetDb_name()) {
+ this.db_name = other.db_name;
+ }
+ if (other.isSetTable_name()) {
+ this.table_name = other.table_name;
}
}
@Override
- public create_table_args clone() {
- return new create_table_args(this);
+ public get_schema_args clone() {
+ return new get_schema_args(this);
}
- public Table getTbl() {
- return this.tbl;
+ public String getDb_name() {
+ return this.db_name;
}
- public void setTbl(Table tbl) {
- this.tbl = tbl;
+ public void setDb_name(String db_name) {
+ this.db_name = db_name;
}
- public void unsetTbl() {
- this.tbl = null;
+ public void unsetDb_name() {
+ this.db_name = null;
}
- // Returns true if field tbl is set (has been asigned a value) and false otherwise
- public boolean isSetTbl() {
- return this.tbl != null;
+ // Returns true if field db_name is set (has been asigned a value) and false otherwise
+ public boolean isSetDb_name() {
+ return this.db_name != null;
+ }
+
+ public String getTable_name() {
+ return this.table_name;
+ }
+
+ public void setTable_name(String table_name) {
+ this.table_name = table_name;
+ }
+
+ public void unsetTable_name() {
+ this.table_name = null;
+ }
+
+ // Returns true if field table_name is set (has been asigned a value) and false otherwise
+ public boolean isSetTable_name() {
+ return this.table_name != null;
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
- case TBL:
+ case DB_NAME:
if (value == null) {
- unsetTbl();
+ unsetDb_name();
} else {
- setTbl((Table)value);
+ setDb_name((String)value);
+ }
+ break;
+
+ case TABLE_NAME:
+ if (value == null) {
+ unsetTable_name();
+ } else {
+ setTable_name((String)value);
}
break;
@@ -7651,8 +7838,11 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
- case TBL:
- return getTbl();
+ case DB_NAME:
+ return getDb_name();
+
+ case TABLE_NAME:
+ return getTable_name();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
@@ -7662,8 +7852,10 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
- case TBL:
- return isSetTbl();
+ case DB_NAME:
+ return isSetDb_name();
+ case TABLE_NAME:
+ return isSetTable_name();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -7673,21 +7865,30 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof create_table_args)
- return this.equals((create_table_args)that);
+ if (that instanceof get_schema_args)
+ return this.equals((get_schema_args)that);
return false;
}
- public boolean equals(create_table_args that) {
+ public boolean equals(get_schema_args that) {
if (that == null)
return false;
- boolean this_present_tbl = true && this.isSetTbl();
- boolean that_present_tbl = true && that.isSetTbl();
- if (this_present_tbl || that_present_tbl) {
- if (!(this_present_tbl && that_present_tbl))
+ boolean this_present_db_name = true && this.isSetDb_name();
+ boolean that_present_db_name = true && that.isSetDb_name();
+ if (this_present_db_name || that_present_db_name) {
+ if (!(this_present_db_name && that_present_db_name))
return false;
- if (!this.tbl.equals(that.tbl))
+ if (!this.db_name.equals(that.db_name))
+ return false;
+ }
+
+ boolean this_present_table_name = true && this.isSetTable_name();
+ boolean that_present_table_name = true && that.isSetTable_name();
+ if (this_present_table_name || that_present_table_name) {
+ if (!(this_present_table_name && that_present_table_name))
+ return false;
+ if (!this.table_name.equals(that.table_name))
return false;
}
@@ -7710,10 +7911,16 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
- case TBL:
- if (field.type == TType.STRUCT) {
- this.tbl = new Table();
- this.tbl.read(iprot);
+ case DB_NAME:
+ if (field.type == TType.STRING) {
+ this.db_name = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case TABLE_NAME:
+ if (field.type == TType.STRING) {
+ this.table_name = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -7733,9 +7940,14 @@ public class ThriftHiveMetastore {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.tbl != null) {
- oprot.writeFieldBegin(TBL_FIELD_DESC);
- this.tbl.write(oprot);
+ if (this.db_name != null) {
+ oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+ oprot.writeString(this.db_name);
+ oprot.writeFieldEnd();
+ }
+ if (this.table_name != null) {
+ oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+ oprot.writeString(this.table_name);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -7744,14 +7956,22 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("create_table_args(");
+ StringBuilder sb = new StringBuilder("get_schema_args(");
boolean first = true;
- sb.append("tbl:");
- if (this.tbl == null) {
+ sb.append("db_name:");
+ if (this.db_name == null) {
sb.append("null");
} else {
- sb.append(this.tbl);
+ sb.append(this.db_name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("table_name:");
+ if (this.table_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.table_name);
}
first = false;
sb.append(")");
@@ -7765,85 +7985,122 @@ public class ThriftHiveMetastore {
}
- public static class create_table_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("create_table_result");
+ public static class get_schema_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_schema_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2);
private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3);
- private static final TField O4_FIELD_DESC = new TField("o4", TType.STRUCT, (short)4);
- private AlreadyExistsException o1;
+ private List success;
+ public static final int SUCCESS = 0;
+ private MetaException o1;
public static final int O1 = 1;
- private InvalidObjectException o2;
+ private UnknownTableException o2;
public static final int O2 = 2;
- private MetaException o3;
+ private UnknownDBException o3;
public static final int O3 = 3;
- private NoSuchObjectException o4;
- public static final int O4 = 4;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
+ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new StructMetaData(TType.STRUCT, FieldSchema.class))));
put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
- put(O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRUCT)));
}});
static {
- FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap);
}
- public create_table_result() {
+ public get_schema_result() {
}
- public create_table_result(
- AlreadyExistsException o1,
- InvalidObjectException o2,
- MetaException o3,
- NoSuchObjectException o4)
+ public get_schema_result(
+ List success,
+ MetaException o1,
+ UnknownTableException o2,
+ UnknownDBException o3)
{
this();
+ this.success = success;
this.o1 = o1;
this.o2 = o2;
this.o3 = o3;
- this.o4 = o4;
}
/**
* Performs a deep copy on other.
*/
- public create_table_result(create_table_result other) {
+ public get_schema_result(get_schema_result other) {
+ if (other.isSetSuccess()) {
+ List __this__success = new ArrayList();
+ for (FieldSchema other_element : other.success) {
+ __this__success.add(new FieldSchema(other_element));
+ }
+ this.success = __this__success;
+ }
if (other.isSetO1()) {
- this.o1 = new AlreadyExistsException(other.o1);
+ this.o1 = new MetaException(other.o1);
}
if (other.isSetO2()) {
- this.o2 = new InvalidObjectException(other.o2);
+ this.o2 = new UnknownTableException(other.o2);
}
if (other.isSetO3()) {
- this.o3 = new MetaException(other.o3);
- }
- if (other.isSetO4()) {
- this.o4 = new NoSuchObjectException(other.o4);
+ this.o3 = new UnknownDBException(other.o3);
}
}
@Override
- public create_table_result clone() {
- return new create_table_result(this);
+ public get_schema_result clone() {
+ return new get_schema_result(this);
}
- public AlreadyExistsException getO1() {
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
+ }
+
+ public java.util.Iterator getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
+ }
+
+ public void addToSuccess(FieldSchema elem) {
+ if (this.success == null) {
+ this.success = new ArrayList();
+ }
+ this.success.add(elem);
+ }
+
+ public List getSuccess() {
+ return this.success;
+ }
+
+ public void setSuccess(List success) {
+ this.success = success;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ // Returns true if field success is set (has been asigned a value) and false otherwise
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public MetaException getO1() {
return this.o1;
}
- public void setO1(AlreadyExistsException o1) {
+ public void setO1(MetaException o1) {
this.o1 = o1;
}
@@ -7856,11 +8113,11 @@ public class ThriftHiveMetastore {
return this.o1 != null;
}
- public InvalidObjectException getO2() {
+ public UnknownTableException getO2() {
return this.o2;
}
- public void setO2(InvalidObjectException o2) {
+ public void setO2(UnknownTableException o2) {
this.o2 = o2;
}
@@ -7873,11 +8130,11 @@ public class ThriftHiveMetastore {
return this.o2 != null;
}
- public MetaException getO3() {
+ public UnknownDBException getO3() {
return this.o3;
}
- public void setO3(MetaException o3) {
+ public void setO3(UnknownDBException o3) {
this.o3 = o3;
}
@@ -7890,30 +8147,21 @@ public class ThriftHiveMetastore {
return this.o3 != null;
}
- public NoSuchObjectException getO4() {
- return this.o4;
- }
-
- public void setO4(NoSuchObjectException o4) {
- this.o4 = o4;
- }
-
- public void unsetO4() {
- this.o4 = null;
- }
-
- // Returns true if field o4 is set (has been asigned a value) and false otherwise
- public boolean isSetO4() {
- return this.o4 != null;
- }
-
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List)value);
+ }
+ break;
+
case O1:
if (value == null) {
unsetO1();
} else {
- setO1((AlreadyExistsException)value);
+ setO1((MetaException)value);
}
break;
@@ -7921,7 +8169,7 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetO2();
} else {
- setO2((InvalidObjectException)value);
+ setO2((UnknownTableException)value);
}
break;
@@ -7929,15 +8177,7 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetO3();
} else {
- setO3((MetaException)value);
- }
- break;
-
- case O4:
- if (value == null) {
- unsetO4();
- } else {
- setO4((NoSuchObjectException)value);
+ setO3((UnknownDBException)value);
}
break;
@@ -7948,6 +8188,9 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
+ case SUCCESS:
+ return getSuccess();
+
case O1:
return getO1();
@@ -7957,9 +8200,6 @@ public class ThriftHiveMetastore {
case O3:
return getO3();
- case O4:
- return getO4();
-
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -7968,14 +8208,14 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
+ case SUCCESS:
+ return isSetSuccess();
case O1:
return isSetO1();
case O2:
return isSetO2();
case O3:
return isSetO3();
- case O4:
- return isSetO4();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -7985,15 +8225,24 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof create_table_result)
- return this.equals((create_table_result)that);
+ if (that instanceof get_schema_result)
+ return this.equals((get_schema_result)that);
return false;
}
- public boolean equals(create_table_result that) {
+ public boolean equals(get_schema_result that) {
if (that == null)
return false;
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
boolean this_present_o1 = true && this.isSetO1();
boolean that_present_o1 = true && that.isSetO1();
if (this_present_o1 || that_present_o1) {
@@ -8021,15 +8270,6 @@ public class ThriftHiveMetastore {
return false;
}
- boolean this_present_o4 = true && this.isSetO4();
- boolean that_present_o4 = true && that.isSetO4();
- if (this_present_o4 || that_present_o4) {
- if (!(this_present_o4 && that_present_o4))
- return false;
- if (!this.o4.equals(that.o4))
- return false;
- }
-
return true;
}
@@ -8049,9 +8289,27 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
+ case SUCCESS:
+ if (field.type == TType.LIST) {
+ {
+ TList _list74 = iprot.readListBegin();
+ this.success = new ArrayList(_list74.size);
+ for (int _i75 = 0; _i75 < _list74.size; ++_i75)
+ {
+ FieldSchema _elem76;
+ _elem76 = new FieldSchema();
+ _elem76.read(iprot);
+ this.success.add(_elem76);
+ }
+ iprot.readListEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
case O1:
if (field.type == TType.STRUCT) {
- this.o1 = new AlreadyExistsException();
+ this.o1 = new MetaException();
this.o1.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
@@ -8059,7 +8317,7 @@ public class ThriftHiveMetastore {
break;
case O2:
if (field.type == TType.STRUCT) {
- this.o2 = new InvalidObjectException();
+ this.o2 = new UnknownTableException();
this.o2.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
@@ -8067,20 +8325,12 @@ public class ThriftHiveMetastore {
break;
case O3:
if (field.type == TType.STRUCT) {
- this.o3 = new MetaException();
+ this.o3 = new UnknownDBException();
this.o3.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
- case O4:
- if (field.type == TType.STRUCT) {
- this.o4 = new NoSuchObjectException();
- this.o4.read(iprot);
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -8095,7 +8345,17 @@ public class ThriftHiveMetastore {
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
- if (this.isSetO1()) {
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
+ for (FieldSchema _iter77 : this.success) {
+ _iter77.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ } else if (this.isSetO1()) {
oprot.writeFieldBegin(O1_FIELD_DESC);
this.o1.write(oprot);
oprot.writeFieldEnd();
@@ -8107,10 +8367,6 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(O3_FIELD_DESC);
this.o3.write(oprot);
oprot.writeFieldEnd();
- } else if (this.isSetO4()) {
- oprot.writeFieldBegin(O4_FIELD_DESC);
- this.o4.write(oprot);
- oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
@@ -8118,9 +8374,17 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("create_table_result(");
+ StringBuilder sb = new StringBuilder("get_schema_result(");
boolean first = true;
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
sb.append("o1:");
if (this.o1 == null) {
sb.append("null");
@@ -8144,14 +8408,6 @@ public class ThriftHiveMetastore {
sb.append(this.o3);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("o4:");
- if (this.o4 == null) {
- sb.append("null");
- } else {
- sb.append(this.o4);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -8163,146 +8419,1285 @@ public class ThriftHiveMetastore {
}
- public static class drop_table_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("drop_table_args");
- private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1);
- private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2);
- private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)3);
+ public static class create_table_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("create_table_args");
+ private static final TField TBL_FIELD_DESC = new TField("tbl", TType.STRUCT, (short)1);
- private String dbname;
- public static final int DBNAME = 1;
- private String name;
- public static final int NAME = 2;
- private boolean deleteData;
- public static final int DELETEDATA = 3;
+ private Table tbl;
+ public static final int TBL = 1;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
- public boolean deleteData = false;
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
- put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
- put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
- put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.BOOL)));
+ put(TBL, new FieldMetaData("tbl", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, Table.class)));
}});
static {
- FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap);
}
- public drop_table_args() {
+ public create_table_args() {
}
- public drop_table_args(
- String dbname,
- String name,
- boolean deleteData)
+ public create_table_args(
+ Table tbl)
{
this();
- this.dbname = dbname;
- this.name = name;
- this.deleteData = deleteData;
- this.__isset.deleteData = true;
+ this.tbl = tbl;
}
/**
* Performs a deep copy on other.
*/
- public drop_table_args(drop_table_args other) {
- if (other.isSetDbname()) {
- this.dbname = other.dbname;
+ public create_table_args(create_table_args other) {
+ if (other.isSetTbl()) {
+ this.tbl = new Table(other.tbl);
}
- if (other.isSetName()) {
- this.name = other.name;
+ }
+
+ @Override
+ public create_table_args clone() {
+ return new create_table_args(this);
+ }
+
+ public Table getTbl() {
+ return this.tbl;
+ }
+
+ public void setTbl(Table tbl) {
+ this.tbl = tbl;
+ }
+
+ public void unsetTbl() {
+ this.tbl = null;
+ }
+
+ // Returns true if field tbl is set (has been asigned a value) and false otherwise
+ public boolean isSetTbl() {
+ return this.tbl != null;
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case TBL:
+ if (value == null) {
+ unsetTbl();
+ } else {
+ setTbl((Table)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case TBL:
+ return getTbl();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case TBL:
+ return isSetTbl();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
- __isset.deleteData = other.__isset.deleteData;
- this.deleteData = other.deleteData;
}
@Override
- public drop_table_args clone() {
- return new drop_table_args(this);
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof create_table_args)
+ return this.equals((create_table_args)that);
+ return false;
}
- public String getDbname() {
- return this.dbname;
+ public boolean equals(create_table_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_tbl = true && this.isSetTbl();
+ boolean that_present_tbl = true && that.isSetTbl();
+ if (this_present_tbl || that_present_tbl) {
+ if (!(this_present_tbl && that_present_tbl))
+ return false;
+ if (!this.tbl.equals(that.tbl))
+ return false;
+ }
+
+ return true;
}
- public void setDbname(String dbname) {
- this.dbname = dbname;
+ @Override
+ public int hashCode() {
+ return 0;
}
- public void unsetDbname() {
- this.dbname = null;
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case TBL:
+ if (field.type == TType.STRUCT) {
+ this.tbl = new Table();
+ this.tbl.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ validate();
}
- // Returns true if field dbname is set (has been asigned a value) and false otherwise
- public boolean isSetDbname() {
- return this.dbname != null;
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.tbl != null) {
+ oprot.writeFieldBegin(TBL_FIELD_DESC);
+ this.tbl.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
}
- public String getName() {
- return this.name;
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("create_table_args(");
+ boolean first = true;
+
+ sb.append("tbl:");
+ if (this.tbl == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tbl);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
}
- public void setName(String name) {
- this.name = name;
+ public void validate() throws TException {
+ // check for required fields
+ // check that fields of type enum have valid values
}
- public void unsetName() {
- this.name = null;
+ }
+
+ public static class create_table_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("create_table_result");
+ private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
+ private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2);
+ private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3);
+ private static final TField O4_FIELD_DESC = new TField("o4", TType.STRUCT, (short)4);
+
+ private AlreadyExistsException o1;
+ public static final int O1 = 1;
+ private InvalidObjectException o2;
+ public static final int O2 = 2;
+ private MetaException o3;
+ public static final int O3 = 3;
+ private NoSuchObjectException o4;
+ public static final int O4 = 4;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
}
- // Returns true if field name is set (has been asigned a value) and false otherwise
- public boolean isSetName() {
- return this.name != null;
+ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
+ put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ put(O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap);
}
- public boolean isDeleteData() {
- return this.deleteData;
+ public create_table_result() {
}
- public void setDeleteData(boolean deleteData) {
- this.deleteData = deleteData;
- this.__isset.deleteData = true;
+ public create_table_result(
+ AlreadyExistsException o1,
+ InvalidObjectException o2,
+ MetaException o3,
+ NoSuchObjectException o4)
+ {
+ this();
+ this.o1 = o1;
+ this.o2 = o2;
+ this.o3 = o3;
+ this.o4 = o4;
}
- public void unsetDeleteData() {
- this.__isset.deleteData = false;
+ /**
+ * Performs a deep copy on other.
+ */
+ public create_table_result(create_table_result other) {
+ if (other.isSetO1()) {
+ this.o1 = new AlreadyExistsException(other.o1);
+ }
+ if (other.isSetO2()) {
+ this.o2 = new InvalidObjectException(other.o2);
+ }
+ if (other.isSetO3()) {
+ this.o3 = new MetaException(other.o3);
+ }
+ if (other.isSetO4()) {
+ this.o4 = new NoSuchObjectException(other.o4);
+ }
+ }
+
+ @Override
+ public create_table_result clone() {
+ return new create_table_result(this);
+ }
+
+ public AlreadyExistsException getO1() {
+ return this.o1;
+ }
+
+ public void setO1(AlreadyExistsException o1) {
+ this.o1 = o1;
+ }
+
+ public void unsetO1() {
+ this.o1 = null;
+ }
+
+ // Returns true if field o1 is set (has been asigned a value) and false otherwise
+ public boolean isSetO1() {
+ return this.o1 != null;
+ }
+
+ public InvalidObjectException getO2() {
+ return this.o2;
+ }
+
+ public void setO2(InvalidObjectException o2) {
+ this.o2 = o2;
+ }
+
+ public void unsetO2() {
+ this.o2 = null;
+ }
+
+ // Returns true if field o2 is set (has been asigned a value) and false otherwise
+ public boolean isSetO2() {
+ return this.o2 != null;
+ }
+
+ public MetaException getO3() {
+ return this.o3;
+ }
+
+ public void setO3(MetaException o3) {
+ this.o3 = o3;
+ }
+
+ public void unsetO3() {
+ this.o3 = null;
+ }
+
+ // Returns true if field o3 is set (has been asigned a value) and false otherwise
+ public boolean isSetO3() {
+ return this.o3 != null;
+ }
+
+ public NoSuchObjectException getO4() {
+ return this.o4;
+ }
+
+ public void setO4(NoSuchObjectException o4) {
+ this.o4 = o4;
+ }
+
+ public void unsetO4() {
+ this.o4 = null;
+ }
+
+ // Returns true if field o4 is set (has been asigned a value) and false otherwise
+ public boolean isSetO4() {
+ return this.o4 != null;
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case O1:
+ if (value == null) {
+ unsetO1();
+ } else {
+ setO1((AlreadyExistsException)value);
+ }
+ break;
+
+ case O2:
+ if (value == null) {
+ unsetO2();
+ } else {
+ setO2((InvalidObjectException)value);
+ }
+ break;
+
+ case O3:
+ if (value == null) {
+ unsetO3();
+ } else {
+ setO3((MetaException)value);
+ }
+ break;
+
+ case O4:
+ if (value == null) {
+ unsetO4();
+ } else {
+ setO4((NoSuchObjectException)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case O1:
+ return getO1();
+
+ case O2:
+ return getO2();
+
+ case O3:
+ return getO3();
+
+ case O4:
+ return getO4();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case O1:
+ return isSetO1();
+ case O2:
+ return isSetO2();
+ case O3:
+ return isSetO3();
+ case O4:
+ return isSetO4();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof create_table_result)
+ return this.equals((create_table_result)that);
+ return false;
+ }
+
+ public boolean equals(create_table_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_o1 = true && this.isSetO1();
+ boolean that_present_o1 = true && that.isSetO1();
+ if (this_present_o1 || that_present_o1) {
+ if (!(this_present_o1 && that_present_o1))
+ return false;
+ if (!this.o1.equals(that.o1))
+ return false;
+ }
+
+ boolean this_present_o2 = true && this.isSetO2();
+ boolean that_present_o2 = true && that.isSetO2();
+ if (this_present_o2 || that_present_o2) {
+ if (!(this_present_o2 && that_present_o2))
+ return false;
+ if (!this.o2.equals(that.o2))
+ return false;
+ }
+
+ boolean this_present_o3 = true && this.isSetO3();
+ boolean that_present_o3 = true && that.isSetO3();
+ if (this_present_o3 || that_present_o3) {
+ if (!(this_present_o3 && that_present_o3))
+ return false;
+ if (!this.o3.equals(that.o3))
+ return false;
+ }
+
+ boolean this_present_o4 = true && this.isSetO4();
+ boolean that_present_o4 = true && that.isSetO4();
+ if (this_present_o4 || that_present_o4) {
+ if (!(this_present_o4 && that_present_o4))
+ return false;
+ if (!this.o4.equals(that.o4))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case O1:
+ if (field.type == TType.STRUCT) {
+ this.o1 = new AlreadyExistsException();
+ this.o1.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case O2:
+ if (field.type == TType.STRUCT) {
+ this.o2 = new InvalidObjectException();
+ this.o2.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case O3:
+ if (field.type == TType.STRUCT) {
+ this.o3 = new MetaException();
+ this.o3.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case O4:
+ if (field.type == TType.STRUCT) {
+ this.o4 = new NoSuchObjectException();
+ this.o4.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetO1()) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ this.o1.write(oprot);
+ oprot.writeFieldEnd();
+ } else if (this.isSetO2()) {
+ oprot.writeFieldBegin(O2_FIELD_DESC);
+ this.o2.write(oprot);
+ oprot.writeFieldEnd();
+ } else if (this.isSetO3()) {
+ oprot.writeFieldBegin(O3_FIELD_DESC);
+ this.o3.write(oprot);
+ oprot.writeFieldEnd();
+ } else if (this.isSetO4()) {
+ oprot.writeFieldBegin(O4_FIELD_DESC);
+ this.o4.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("create_table_result(");
+ boolean first = true;
+
+ sb.append("o1:");
+ if (this.o1 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o1);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("o2:");
+ if (this.o2 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o2);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("o3:");
+ if (this.o3 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o3);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("o4:");
+ if (this.o4 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o4);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ // check that fields of type enum have valid values
+ }
+
+ }
+
+ public static class drop_table_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("drop_table_args");
+ private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1);
+ private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2);
+ private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)3);
+
+ private String dbname;
+ public static final int DBNAME = 1;
+ private String name;
+ public static final int NAME = 2;
+ private boolean deleteData;
+ public static final int DELETEDATA = 3;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ public boolean deleteData = false;
+ }
+
+ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
+ put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.BOOL)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap);
+ }
+
+ public drop_table_args() {
+ }
+
+ public drop_table_args(
+ String dbname,
+ String name,
+ boolean deleteData)
+ {
+ this();
+ this.dbname = dbname;
+ this.name = name;
+ this.deleteData = deleteData;
+ this.__isset.deleteData = true;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public drop_table_args(drop_table_args other) {
+ if (other.isSetDbname()) {
+ this.dbname = other.dbname;
+ }
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ __isset.deleteData = other.__isset.deleteData;
+ this.deleteData = other.deleteData;
+ }
+
+ @Override
+ public drop_table_args clone() {
+ return new drop_table_args(this);
+ }
+
+ 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 asigned a value) and false otherwise
+ public boolean isSetDbname() {
+ return this.dbname != null;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ // Returns true if field name is set (has been asigned a value) and false otherwise
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public boolean isDeleteData() {
+ return this.deleteData;
+ }
+
+ public void setDeleteData(boolean deleteData) {
+ this.deleteData = deleteData;
+ this.__isset.deleteData = true;
+ }
+
+ public void unsetDeleteData() {
+ this.__isset.deleteData = false;
+ }
+
+ // Returns true if field deleteData is set (has been asigned a value) and false otherwise
+ public boolean isSetDeleteData() {
+ return this.__isset.deleteData;
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case DBNAME:
+ if (value == null) {
+ unsetDbname();
+ } else {
+ setDbname((String)value);
+ }
+ break;
+
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DELETEDATA:
+ if (value == null) {
+ unsetDeleteData();
+ } else {
+ setDeleteData((Boolean)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case DBNAME:
+ return getDbname();
+
+ case NAME:
+ return getName();
+
+ case DELETEDATA:
+ return new Boolean(isDeleteData());
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case DBNAME:
+ return isSetDbname();
+ case NAME:
+ return isSetName();
+ case DELETEDATA:
+ return isSetDeleteData();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof drop_table_args)
+ return this.equals((drop_table_args)that);
+ return false;
+ }
+
+ public boolean equals(drop_table_args 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_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_deleteData = true;
+ boolean that_present_deleteData = true;
+ if (this_present_deleteData || that_present_deleteData) {
+ if (!(this_present_deleteData && that_present_deleteData))
+ return false;
+ if (this.deleteData != that.deleteData)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case DBNAME:
+ if (field.type == TType.STRING) {
+ this.dbname = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case NAME:
+ if (field.type == TType.STRING) {
+ this.name = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case DELETEDATA:
+ if (field.type == TType.BOOL) {
+ this.deleteData = iprot.readBool();
+ this.__isset.deleteData = true;
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.dbname != null) {
+ oprot.writeFieldBegin(DBNAME_FIELD_DESC);
+ oprot.writeString(this.dbname);
+ oprot.writeFieldEnd();
+ }
+ if (this.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(this.name);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC);
+ oprot.writeBool(this.deleteData);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("drop_table_args(");
+ 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("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("deleteData:");
+ sb.append(this.deleteData);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ // check that fields of type enum have valid values
+ }
+
+ }
+
+ public static class drop_table_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("drop_table_result");
+ private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
+ private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)2);
+
+ private NoSuchObjectException o1;
+ public static final int O1 = 1;
+ private MetaException o3;
+ public static final int O3 = 2;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
+
+ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
+ put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap);
+ }
+
+ public drop_table_result() {
+ }
+
+ public drop_table_result(
+ NoSuchObjectException o1,
+ MetaException o3)
+ {
+ this();
+ this.o1 = o1;
+ this.o3 = o3;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public drop_table_result(drop_table_result other) {
+ if (other.isSetO1()) {
+ this.o1 = new NoSuchObjectException(other.o1);
+ }
+ if (other.isSetO3()) {
+ this.o3 = new MetaException(other.o3);
+ }
+ }
+
+ @Override
+ public drop_table_result clone() {
+ return new drop_table_result(this);
+ }
+
+ public NoSuchObjectException getO1() {
+ return this.o1;
+ }
+
+ public void setO1(NoSuchObjectException o1) {
+ this.o1 = o1;
+ }
+
+ public void unsetO1() {
+ this.o1 = null;
+ }
+
+ // Returns true if field o1 is set (has been asigned a value) and false otherwise
+ public boolean isSetO1() {
+ return this.o1 != null;
+ }
+
+ public MetaException getO3() {
+ return this.o3;
+ }
+
+ public void setO3(MetaException o3) {
+ this.o3 = o3;
+ }
+
+ public void unsetO3() {
+ this.o3 = null;
+ }
+
+ // Returns true if field o3 is set (has been asigned a value) and false otherwise
+ public boolean isSetO3() {
+ return this.o3 != null;
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case O1:
+ if (value == null) {
+ unsetO1();
+ } else {
+ setO1((NoSuchObjectException)value);
+ }
+ break;
+
+ case O3:
+ if (value == null) {
+ unsetO3();
+ } else {
+ setO3((MetaException)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case O1:
+ return getO1();
+
+ case O3:
+ return getO3();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case O1:
+ return isSetO1();
+ case O3:
+ return isSetO3();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof drop_table_result)
+ return this.equals((drop_table_result)that);
+ return false;
+ }
+
+ public boolean equals(drop_table_result that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_o1 = true && this.isSetO1();
+ boolean that_present_o1 = true && that.isSetO1();
+ if (this_present_o1 || that_present_o1) {
+ if (!(this_present_o1 && that_present_o1))
+ return false;
+ if (!this.o1.equals(that.o1))
+ return false;
+ }
+
+ boolean this_present_o3 = true && this.isSetO3();
+ boolean that_present_o3 = true && that.isSetO3();
+ if (this_present_o3 || that_present_o3) {
+ if (!(this_present_o3 && that_present_o3))
+ return false;
+ if (!this.o3.equals(that.o3))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case O1:
+ if (field.type == TType.STRUCT) {
+ this.o1 = new NoSuchObjectException();
+ this.o1.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case O3:
+ if (field.type == TType.STRUCT) {
+ this.o3 = new MetaException();
+ this.o3.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetO1()) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ this.o1.write(oprot);
+ oprot.writeFieldEnd();
+ } else if (this.isSetO3()) {
+ oprot.writeFieldBegin(O3_FIELD_DESC);
+ this.o3.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("drop_table_result(");
+ boolean first = true;
+
+ sb.append("o1:");
+ if (this.o1 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o1);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("o3:");
+ if (this.o3 == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.o3);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ // check that fields of type enum have valid values
+ }
+
+ }
+
+ public static class get_tables_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_tables_args");
+ private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1);
+ private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)2);
+
+ private String db_name;
+ public static final int DB_NAME = 1;
+ private String pattern;
+ public static final int PATTERN = 2;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
+
+ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
+ put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap);
+ }
+
+ public get_tables_args() {
+ }
+
+ public get_tables_args(
+ String db_name,
+ String pattern)
+ {
+ this();
+ this.db_name = db_name;
+ this.pattern = pattern;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public get_tables_args(get_tables_args other) {
+ if (other.isSetDb_name()) {
+ this.db_name = other.db_name;
+ }
+ if (other.isSetPattern()) {
+ this.pattern = other.pattern;
+ }
+ }
+
+ @Override
+ public get_tables_args clone() {
+ return new get_tables_args(this);
+ }
+
+ public String getDb_name() {
+ return this.db_name;
+ }
+
+ public void setDb_name(String db_name) {
+ this.db_name = db_name;
+ }
+
+ public void unsetDb_name() {
+ this.db_name = null;
+ }
+
+ // Returns true if field db_name is set (has been asigned a value) and false otherwise
+ public boolean isSetDb_name() {
+ return this.db_name != null;
+ }
+
+ public String getPattern() {
+ return this.pattern;
+ }
+
+ public void setPattern(String pattern) {
+ this.pattern = pattern;
+ }
+
+ public void unsetPattern() {
+ this.pattern = null;
}
- // Returns true if field deleteData is set (has been asigned a value) and false otherwise
- public boolean isSetDeleteData() {
- return this.__isset.deleteData;
+ // Returns true if field pattern is set (has been asigned a value) and false otherwise
+ public boolean isSetPattern() {
+ return this.pattern != null;
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
- case DBNAME:
- if (value == null) {
- unsetDbname();
- } else {
- setDbname((String)value);
- }
- break;
-
- case NAME:
+ case DB_NAME:
if (value == null) {
- unsetName();
+ unsetDb_name();
} else {
- setName((String)value);
+ setDb_name((String)value);
}
break;
- case DELETEDATA:
+ case PATTERN:
if (value == null) {
- unsetDeleteData();
+ unsetPattern();
} else {
- setDeleteData((Boolean)value);
+ setPattern((String)value);
}
break;
@@ -8313,14 +9708,11 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
- case DBNAME:
- return getDbname();
-
- case NAME:
- return getName();
+ case DB_NAME:
+ return getDb_name();
- case DELETEDATA:
- return new Boolean(isDeleteData());
+ case PATTERN:
+ return getPattern();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
@@ -8330,12 +9722,10 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
- case DBNAME:
- return isSetDbname();
- case NAME:
- return isSetName();
- case DELETEDATA:
- return isSetDeleteData();
+ case DB_NAME:
+ return isSetDb_name();
+ case PATTERN:
+ return isSetPattern();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -8345,39 +9735,30 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof drop_table_args)
- return this.equals((drop_table_args)that);
+ if (that instanceof get_tables_args)
+ return this.equals((get_tables_args)that);
return false;
}
- public boolean equals(drop_table_args that) {
+ public boolean equals(get_tables_args 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_name = true && this.isSetName();
- boolean that_present_name = true && that.isSetName();
- if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name))
+ boolean this_present_db_name = true && this.isSetDb_name();
+ boolean that_present_db_name = true && that.isSetDb_name();
+ if (this_present_db_name || that_present_db_name) {
+ if (!(this_present_db_name && that_present_db_name))
return false;
- if (!this.name.equals(that.name))
+ if (!this.db_name.equals(that.db_name))
return false;
}
- boolean this_present_deleteData = true;
- boolean that_present_deleteData = true;
- if (this_present_deleteData || that_present_deleteData) {
- if (!(this_present_deleteData && that_present_deleteData))
+ boolean this_present_pattern = true && this.isSetPattern();
+ boolean that_present_pattern = true && that.isSetPattern();
+ if (this_present_pattern || that_present_pattern) {
+ if (!(this_present_pattern && that_present_pattern))
return false;
- if (this.deleteData != that.deleteData)
+ if (!this.pattern.equals(that.pattern))
return false;
}
@@ -8400,24 +9781,16 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
- case DBNAME:
+ case DB_NAME:
if (field.type == TType.STRING) {
- this.dbname = iprot.readString();
+ this.db_name = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
- case NAME:
+ case PATTERN:
if (field.type == TType.STRING) {
- this.name = iprot.readString();
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case DELETEDATA:
- if (field.type == TType.BOOL) {
- this.deleteData = iprot.readBool();
- this.__isset.deleteData = true;
+ this.pattern = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -8437,47 +9810,40 @@ public class ThriftHiveMetastore {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.dbname != null) {
- oprot.writeFieldBegin(DBNAME_FIELD_DESC);
- oprot.writeString(this.dbname);
+ if (this.db_name != null) {
+ oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+ oprot.writeString(this.db_name);
oprot.writeFieldEnd();
}
- if (this.name != null) {
- oprot.writeFieldBegin(NAME_FIELD_DESC);
- oprot.writeString(this.name);
+ if (this.pattern != null) {
+ oprot.writeFieldBegin(PATTERN_FIELD_DESC);
+ oprot.writeString(this.pattern);
oprot.writeFieldEnd();
}
- oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC);
- oprot.writeBool(this.deleteData);
- oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("drop_table_args(");
+ StringBuilder sb = new StringBuilder("get_tables_args(");
boolean first = true;
- sb.append("dbname:");
- if (this.dbname == null) {
+ sb.append("db_name:");
+ if (this.db_name == null) {
sb.append("null");
} else {
- sb.append(this.dbname);
+ sb.append(this.db_name);
}
first = false;
if (!first) sb.append(", ");
- sb.append("name:");
- if (this.name == null) {
+ sb.append("pattern:");
+ if (this.pattern == null) {
sb.append("null");
} else {
- sb.append(this.name);
+ sb.append(this.pattern);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("deleteData:");
- sb.append(this.deleteData);
- first = false;
sb.append(")");
return sb.toString();
}
@@ -8489,109 +9855,129 @@ public class ThriftHiveMetastore {
}
- public static class drop_table_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("drop_table_result");
+ public static class get_tables_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_tables_result");
+ private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
- private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)2);
- private NoSuchObjectException o1;
+ private List success;
+ public static final int SUCCESS = 0;
+ private MetaException o1;
public static final int O1 = 1;
- private MetaException o3;
- public static final int O3 = 2;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
}
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
+ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new FieldValueMetaData(TType.STRING))));
put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
- put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRUCT)));
}});
static {
- FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap);
}
- public drop_table_result() {
+ public get_tables_result() {
}
- public drop_table_result(
- NoSuchObjectException o1,
- MetaException o3)
+ public get_tables_result(
+ List success,
+ MetaException o1)
{
this();
+ this.success = success;
this.o1 = o1;
- this.o3 = o3;
}
/**
* Performs a deep copy on other.
*/
- public drop_table_result(drop_table_result other) {
- if (other.isSetO1()) {
- this.o1 = new NoSuchObjectException(other.o1);
+ public get_tables_result(get_tables_result other) {
+ if (other.isSetSuccess()) {
+ List __this__success = new ArrayList();
+ for (String other_element : other.success) {
+ __this__success.add(other_element);
+ }
+ this.success = __this__success;
}
- if (other.isSetO3()) {
- this.o3 = new MetaException(other.o3);
+ if (other.isSetO1()) {
+ this.o1 = new MetaException(other.o1);
}
}
@Override
- public drop_table_result clone() {
- return new drop_table_result(this);
+ public get_tables_result clone() {
+ return new get_tables_result(this);
}
- public NoSuchObjectException getO1() {
- return this.o1;
+ public int getSuccessSize() {
+ return (this.success == null) ? 0 : this.success.size();
}
- public void setO1(NoSuchObjectException o1) {
- this.o1 = o1;
+ public java.util.Iterator getSuccessIterator() {
+ return (this.success == null) ? null : this.success.iterator();
}
- public void unsetO1() {
- this.o1 = null;
+ public void addToSuccess(String elem) {
+ if (this.success == null) {
+ this.success = new ArrayList();
+ }
+ this.success.add(elem);
}
- // Returns true if field o1 is set (has been asigned a value) and false otherwise
- public boolean isSetO1() {
- return this.o1 != null;
+ public List getSuccess() {
+ return this.success;
}
- public MetaException getO3() {
- return this.o3;
+ public void setSuccess(List success) {
+ this.success = success;
}
- public void setO3(MetaException o3) {
- this.o3 = o3;
+ public void unsetSuccess() {
+ this.success = null;
}
- public void unsetO3() {
- this.o3 = null;
+ // Returns true if field success is set (has been asigned a value) and false otherwise
+ public boolean isSetSuccess() {
+ return this.success != null;
}
- // Returns true if field o3 is set (has been asigned a value) and false otherwise
- public boolean isSetO3() {
- return this.o3 != null;
+ public MetaException getO1() {
+ return this.o1;
+ }
+
+ public void setO1(MetaException o1) {
+ this.o1 = o1;
+ }
+
+ public void unsetO1() {
+ this.o1 = null;
+ }
+
+ // Returns true if field o1 is set (has been asigned a value) and false otherwise
+ public boolean isSetO1() {
+ return this.o1 != null;
}
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
- case O1:
+ case SUCCESS:
if (value == null) {
- unsetO1();
+ unsetSuccess();
} else {
- setO1((NoSuchObjectException)value);
+ setSuccess((List)value);
}
break;
- case O3:
+ case O1:
if (value == null) {
- unsetO3();
+ unsetO1();
} else {
- setO3((MetaException)value);
+ setO1((MetaException)value);
}
break;
@@ -8602,12 +9988,12 @@ public class ThriftHiveMetastore {
public Object getFieldValue(int fieldID) {
switch (fieldID) {
+ case SUCCESS:
+ return getSuccess();
+
case O1:
return getO1();
- case O3:
- return getO3();
-
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -8616,10 +10002,10 @@ public class ThriftHiveMetastore {
// Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(int fieldID) {
switch (fieldID) {
+ case SUCCESS:
+ return isSetSuccess();
case O1:
return isSetO1();
- case O3:
- return isSetO3();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -8629,15 +10015,24 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof drop_table_result)
- return this.equals((drop_table_result)that);
+ if (that instanceof get_tables_result)
+ return this.equals((get_tables_result)that);
return false;
}
- public boolean equals(drop_table_result that) {
+ public boolean equals(get_tables_result that) {
if (that == null)
return false;
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
boolean this_present_o1 = true && this.isSetO1();
boolean that_present_o1 = true && that.isSetO1();
if (this_present_o1 || that_present_o1) {
@@ -8647,15 +10042,6 @@ public class ThriftHiveMetastore {
return false;
}
- boolean this_present_o3 = true && this.isSetO3();
- boolean that_present_o3 = true && that.isSetO3();
- if (this_present_o3 || that_present_o3) {
- if (!(this_present_o3 && that_present_o3))
- return false;
- if (!this.o3.equals(that.o3))
- return false;
- }
-
return true;
}
@@ -8675,18 +10061,27 @@ public class ThriftHiveMetastore {
}
switch (field.id)
{
- case O1:
- if (field.type == TType.STRUCT) {
- this.o1 = new NoSuchObjectException();
- this.o1.read(iprot);
+ case SUCCESS:
+ if (field.type == TType.LIST) {
+ {
+ TList _list78 = iprot.readListBegin();
+ this.success = new ArrayList(_list78.size);
+ for (int _i79 = 0; _i79 < _list78.size; ++_i79)
+ {
+ String _elem80;
+ _elem80 = iprot.readString();
+ this.success.add(_elem80);
+ }
+ iprot.readListEnd();
+ }
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
- case O3:
+ case O1:
if (field.type == TType.STRUCT) {
- this.o3 = new MetaException();
- this.o3.read(iprot);
+ this.o1 = new MetaException();
+ this.o1.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -8705,14 +10100,20 @@ public class ThriftHiveMetastore {
public void write(TProtocol oprot) throws TException {
oprot.writeStructBegin(STRUCT_DESC);
- if (this.isSetO1()) {
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.STRING, this.success.size()));
+ for (String _iter81 : this.success) {
+ oprot.writeString(_iter81);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ } else if (this.isSetO1()) {
oprot.writeFieldBegin(O1_FIELD_DESC);
this.o1.write(oprot);
oprot.writeFieldEnd();
- } else if (this.isSetO3()) {
- oprot.writeFieldBegin(O3_FIELD_DESC);
- this.o3.write(oprot);
- oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
@@ -8720,22 +10121,22 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("drop_table_result(");
+ StringBuilder sb = new StringBuilder("get_tables_result(");
boolean first = true;
- sb.append("o1:");
- if (this.o1 == null) {
+ sb.append("success:");
+ if (this.success == null) {
sb.append("null");
} else {
- sb.append(this.o1);
+ sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
- sb.append("o3:");
- if (this.o3 == null) {
+ sb.append("o1:");
+ if (this.o1 == null) {
sb.append("null");
} else {
- sb.append(this.o3);
+ sb.append(this.o1);
}
first = false;
sb.append(")");
@@ -8749,15 +10150,12 @@ public class ThriftHiveMetastore {
}
- public static class get_tables_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_tables_args");
+ public static class get_all_tables_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_args");
private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1);
- private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)2);
private String db_name;
public static final int DB_NAME = 1;
- private String pattern;
- public static final int PATTERN = 2;
private final Isset __isset = new Isset();
private static final class Isset implements java.io.Serializable {
@@ -8766,41 +10164,34 @@ public class ThriftHiveMetastore {
public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{
put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
- put(PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
}});
static {
- FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap);
}
- public get_tables_args() {
+ public get_all_tables_args() {
}
- public get_tables_args(
- String db_name,
- String pattern)
+ public get_all_tables_args(
+ String db_name)
{
this();
this.db_name = db_name;
- this.pattern = pattern;
}
/**
* Performs a deep copy on other.
*/
- public get_tables_args(get_tables_args other) {
+ public get_all_tables_args(get_all_tables_args other) {
if (other.isSetDb_name()) {
this.db_name = other.db_name;
}
- if (other.isSetPattern()) {
- this.pattern = other.pattern;
- }
}
@Override
- public get_tables_args clone() {
- return new get_tables_args(this);
+ public get_all_tables_args clone() {
+ return new get_all_tables_args(this);
}
public String getDb_name() {
@@ -8820,23 +10211,6 @@ public class ThriftHiveMetastore {
return this.db_name != null;
}
- public String getPattern() {
- return this.pattern;
- }
-
- public void setPattern(String pattern) {
- this.pattern = pattern;
- }
-
- public void unsetPattern() {
- this.pattern = null;
- }
-
- // Returns true if field pattern is set (has been asigned a value) and false otherwise
- public boolean isSetPattern() {
- return this.pattern != null;
- }
-
public void setFieldValue(int fieldID, Object value) {
switch (fieldID) {
case DB_NAME:
@@ -8847,14 +10221,6 @@ public class ThriftHiveMetastore {
}
break;
- case PATTERN:
- if (value == null) {
- unsetPattern();
- } else {
- setPattern((String)value);
- }
- break;
-
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -8865,9 +10231,6 @@ public class ThriftHiveMetastore {
case DB_NAME:
return getDb_name();
- case PATTERN:
- return getPattern();
-
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -8878,8 +10241,6 @@ public class ThriftHiveMetastore {
switch (fieldID) {
case DB_NAME:
return isSetDb_name();
- case PATTERN:
- return isSetPattern();
default:
throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
}
@@ -8889,12 +10250,12 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_tables_args)
- return this.equals((get_tables_args)that);
+ if (that instanceof get_all_tables_args)
+ return this.equals((get_all_tables_args)that);
return false;
}
- public boolean equals(get_tables_args that) {
+ public boolean equals(get_all_tables_args that) {
if (that == null)
return false;
@@ -8907,15 +10268,6 @@ public class ThriftHiveMetastore {
return false;
}
- boolean this_present_pattern = true && this.isSetPattern();
- boolean that_present_pattern = true && that.isSetPattern();
- if (this_present_pattern || that_present_pattern) {
- if (!(this_present_pattern && that_present_pattern))
- return false;
- if (!this.pattern.equals(that.pattern))
- return false;
- }
-
return true;
}
@@ -8942,13 +10294,6 @@ public class ThriftHiveMetastore {
TProtocolUtil.skip(iprot, field.type);
}
break;
- case PATTERN:
- if (field.type == TType.STRING) {
- this.pattern = iprot.readString();
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
@@ -8969,18 +10314,13 @@ public class ThriftHiveMetastore {
oprot.writeString(this.db_name);
oprot.writeFieldEnd();
}
- if (this.pattern != null) {
- oprot.writeFieldBegin(PATTERN_FIELD_DESC);
- oprot.writeString(this.pattern);
- oprot.writeFieldEnd();
- }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_tables_args(");
+ StringBuilder sb = new StringBuilder("get_all_tables_args(");
boolean first = true;
sb.append("db_name:");
@@ -8990,14 +10330,6 @@ public class ThriftHiveMetastore {
sb.append(this.db_name);
}
first = false;
- if (!first) sb.append(", ");
- sb.append("pattern:");
- if (this.pattern == null) {
- sb.append("null");
- } else {
- sb.append(this.pattern);
- }
- first = false;
sb.append(")");
return sb.toString();
}
@@ -9009,8 +10341,8 @@ public class ThriftHiveMetastore {
}
- public static class get_tables_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_tables_result");
+ public static class get_all_tables_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_result");
private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1);
@@ -9032,13 +10364,13 @@ public class ThriftHiveMetastore {
}});
static {
- FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap);
}
- public get_tables_result() {
+ public get_all_tables_result() {
}
- public get_tables_result(
+ public get_all_tables_result(
List success,
MetaException o1)
{
@@ -9050,7 +10382,7 @@ public class ThriftHiveMetastore {
/**
* Performs a deep copy on other.
*/
- public get_tables_result(get_tables_result other) {
+ public get_all_tables_result(get_all_tables_result other) {
if (other.isSetSuccess()) {
List __this__success = new ArrayList();
for (String other_element : other.success) {
@@ -9064,8 +10396,8 @@ public class ThriftHiveMetastore {
}
@Override
- public get_tables_result clone() {
- return new get_tables_result(this);
+ public get_all_tables_result clone() {
+ return new get_all_tables_result(this);
}
public int getSuccessSize() {
@@ -9169,12 +10501,12 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof get_tables_result)
- return this.equals((get_tables_result)that);
+ if (that instanceof get_all_tables_result)
+ return this.equals((get_all_tables_result)that);
return false;
}
- public boolean equals(get_tables_result that) {
+ public boolean equals(get_all_tables_result that) {
if (that == null)
return false;
@@ -9218,13 +10550,13 @@ public class ThriftHiveMetastore {
case SUCCESS:
if (field.type == TType.LIST) {
{
- TList _list74 = iprot.readListBegin();
- this.success = new ArrayList(_list74.size);
- for (int _i75 = 0; _i75 < _list74.size; ++_i75)
+ TList _list82 = iprot.readListBegin();
+ this.success = new ArrayList(_list82.size);
+ for (int _i83 = 0; _i83 < _list82.size; ++_i83)
{
- String _elem76;
- _elem76 = iprot.readString();
- this.success.add(_elem76);
+ String _elem84;
+ _elem84 = iprot.readString();
+ this.success.add(_elem84);
}
iprot.readListEnd();
}
@@ -9258,8 +10590,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.success.size()));
- for (String _iter77 : this.success) {
- oprot.writeString(_iter77);
+ for (String _iter85 : this.success) {
+ oprot.writeString(_iter85);
}
oprot.writeListEnd();
}
@@ -9275,7 +10607,7 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("get_tables_result(");
+ StringBuilder sb = new StringBuilder("get_all_tables_result(");
boolean first = true;
sb.append("success:");
@@ -11345,13 +12677,13 @@ public class ThriftHiveMetastore {
case PART_VALS:
if (field.type == TType.LIST) {
{
- TList _list78 = iprot.readListBegin();
- this.part_vals = new ArrayList(_list78.size);
- for (int _i79 = 0; _i79 < _list78.size; ++_i79)
+ TList _list86 = iprot.readListBegin();
+ this.part_vals = new ArrayList(_list86.size);
+ for (int _i87 = 0; _i87 < _list86.size; ++_i87)
{
- String _elem80;
- _elem80 = iprot.readString();
- this.part_vals.add(_elem80);
+ String _elem88;
+ _elem88 = iprot.readString();
+ this.part_vals.add(_elem88);
}
iprot.readListEnd();
}
@@ -11388,8 +12720,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(PART_VALS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size()));
- for (String _iter81 : this.part_vals) {
- oprot.writeString(_iter81);
+ for (String _iter89 : this.part_vals) {
+ oprot.writeString(_iter89);
}
oprot.writeListEnd();
}
@@ -12886,13 +14218,13 @@ public class ThriftHiveMetastore {
case PART_VALS:
if (field.type == TType.LIST) {
{
- TList _list82 = iprot.readListBegin();
- this.part_vals = new ArrayList(_list82.size);
- for (int _i83 = 0; _i83 < _list82.size; ++_i83)
+ TList _list90 = iprot.readListBegin();
+ this.part_vals = new ArrayList(_list90.size);
+ for (int _i91 = 0; _i91 < _list90.size; ++_i91)
{
- String _elem84;
- _elem84 = iprot.readString();
- this.part_vals.add(_elem84);
+ String _elem92;
+ _elem92 = iprot.readString();
+ this.part_vals.add(_elem92);
}
iprot.readListEnd();
}
@@ -12937,8 +14269,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(PART_VALS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size()));
- for (String _iter85 : this.part_vals) {
- oprot.writeString(_iter85);
+ for (String _iter93 : this.part_vals) {
+ oprot.writeString(_iter93);
}
oprot.writeListEnd();
}
@@ -14315,13 +15647,13 @@ public class ThriftHiveMetastore {
case PART_VALS:
if (field.type == TType.LIST) {
{
- TList _list86 = iprot.readListBegin();
- this.part_vals = new ArrayList(_list86.size);
- for (int _i87 = 0; _i87 < _list86.size; ++_i87)
+ TList _list94 = iprot.readListBegin();
+ this.part_vals = new ArrayList(_list94.size);
+ for (int _i95 = 0; _i95 < _list94.size; ++_i95)
{
- String _elem88;
- _elem88 = iprot.readString();
- this.part_vals.add(_elem88);
+ String _elem96;
+ _elem96 = iprot.readString();
+ this.part_vals.add(_elem96);
}
iprot.readListEnd();
}
@@ -14358,8 +15690,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(PART_VALS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size()));
- for (String _iter89 : this.part_vals) {
- oprot.writeString(_iter89);
+ for (String _iter97 : this.part_vals) {
+ oprot.writeString(_iter97);
}
oprot.writeListEnd();
}
@@ -15981,14 +17313,14 @@ public class ThriftHiveMetastore {
case SUCCESS:
if (field.type == TType.LIST) {
{
- TList _list90 = iprot.readListBegin();
- this.success = new ArrayList(_list90.size);
- for (int _i91 = 0; _i91 < _list90.size; ++_i91)
+ TList _list98 = iprot.readListBegin();
+ this.success = new ArrayList(_list98.size);
+ for (int _i99 = 0; _i99 < _list98.size; ++_i99)
{
- Partition _elem92;
- _elem92 = new Partition();
- _elem92.read(iprot);
- this.success.add(_elem92);
+ Partition _elem100;
+ _elem100 = new Partition();
+ _elem100.read(iprot);
+ this.success.add(_elem100);
}
iprot.readListEnd();
}
@@ -16030,8 +17362,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
- for (Partition _iter93 : this.success) {
- _iter93.write(oprot);
+ for (Partition _iter101 : this.success) {
+ _iter101.write(oprot);
}
oprot.writeListEnd();
}
@@ -16625,13 +17957,13 @@ public class ThriftHiveMetastore {
case SUCCESS:
if (field.type == TType.LIST) {
{
- TList _list94 = iprot.readListBegin();
- this.success = new ArrayList(_list94.size);
- for (int _i95 = 0; _i95 < _list94.size; ++_i95)
+ TList _list102 = iprot.readListBegin();
+ this.success = new ArrayList(_list102.size);
+ for (int _i103 = 0; _i103 < _list102.size; ++_i103)
{
- String _elem96;
- _elem96 = iprot.readString();
- this.success.add(_elem96);
+ String _elem104;
+ _elem104 = iprot.readString();
+ this.success.add(_elem104);
}
iprot.readListEnd();
}
@@ -16665,8 +17997,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.success.size()));
- for (String _iter97 : this.success) {
- oprot.writeString(_iter97);
+ for (String _iter105 : this.success) {
+ oprot.writeString(_iter105);
}
oprot.writeListEnd();
}
@@ -17036,13 +18368,13 @@ public class ThriftHiveMetastore {
case PART_VALS:
if (field.type == TType.LIST) {
{
- TList _list98 = iprot.readListBegin();
- this.part_vals = new ArrayList(_list98.size);
- for (int _i99 = 0; _i99 < _list98.size; ++_i99)
+ TList _list106 = iprot.readListBegin();
+ this.part_vals = new ArrayList(_list106.size);
+ for (int _i107 = 0; _i107 < _list106.size; ++_i107)
{
- String _elem100;
- _elem100 = iprot.readString();
- this.part_vals.add(_elem100);
+ String _elem108;
+ _elem108 = iprot.readString();
+ this.part_vals.add(_elem108);
}
iprot.readListEnd();
}
@@ -17087,8 +18419,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(PART_VALS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size()));
- for (String _iter101 : this.part_vals) {
- oprot.writeString(_iter101);
+ for (String _iter109 : this.part_vals) {
+ oprot.writeString(_iter109);
}
oprot.writeListEnd();
}
@@ -17353,14 +18685,14 @@ public class ThriftHiveMetastore {
case SUCCESS:
if (field.type == TType.LIST) {
{
- TList _list102 = iprot.readListBegin();
- this.success = new ArrayList(_list102.size);
- for (int _i103 = 0; _i103 < _list102.size; ++_i103)
+ TList _list110 = iprot.readListBegin();
+ this.success = new ArrayList(_list110.size);
+ for (int _i111 = 0; _i111 < _list110.size; ++_i111)
{
- Partition _elem104;
- _elem104 = new Partition();
- _elem104.read(iprot);
- this.success.add(_elem104);
+ Partition _elem112;
+ _elem112 = new Partition();
+ _elem112.read(iprot);
+ this.success.add(_elem112);
}
iprot.readListEnd();
}
@@ -17394,8 +18726,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
- for (Partition _iter105 : this.success) {
- _iter105.write(oprot);
+ for (Partition _iter113 : this.success) {
+ _iter113.write(oprot);
}
oprot.writeListEnd();
}
@@ -17765,13 +19097,13 @@ public class ThriftHiveMetastore {
case PART_VALS:
if (field.type == TType.LIST) {
{
- TList _list106 = iprot.readListBegin();
- this.part_vals = new ArrayList(_list106.size);
- for (int _i107 = 0; _i107 < _list106.size; ++_i107)
+ TList _list114 = iprot.readListBegin();
+ this.part_vals = new ArrayList(_list114.size);
+ for (int _i115 = 0; _i115 < _list114.size; ++_i115)
{
- String _elem108;
- _elem108 = iprot.readString();
- this.part_vals.add(_elem108);
+ String _elem116;
+ _elem116 = iprot.readString();
+ this.part_vals.add(_elem116);
}
iprot.readListEnd();
}
@@ -17816,8 +19148,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(PART_VALS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size()));
- for (String _iter109 : this.part_vals) {
- oprot.writeString(_iter109);
+ for (String _iter117 : this.part_vals) {
+ oprot.writeString(_iter117);
}
oprot.writeListEnd();
}
@@ -18082,13 +19414,13 @@ public class ThriftHiveMetastore {
case SUCCESS:
if (field.type == TType.LIST) {
{
- TList _list110 = iprot.readListBegin();
- this.success = new ArrayList(_list110.size);
- for (int _i111 = 0; _i111 < _list110.size; ++_i111)
+ TList _list118 = iprot.readListBegin();
+ this.success = new ArrayList(_list118.size);
+ for (int _i119 = 0; _i119 < _list118.size; ++_i119)
{
- String _elem112;
- _elem112 = iprot.readString();
- this.success.add(_elem112);
+ String _elem120;
+ _elem120 = iprot.readString();
+ this.success.add(_elem120);
}
iprot.readListEnd();
}
@@ -18122,8 +19454,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.success.size()));
- for (String _iter113 : this.success) {
- oprot.writeString(_iter113);
+ for (String _iter121 : this.success) {
+ oprot.writeString(_iter121);
}
oprot.writeListEnd();
}
@@ -19677,13 +21009,13 @@ public class ThriftHiveMetastore {
case SUCCESS:
if (field.type == TType.LIST) {
{
- TList _list114 = iprot.readListBegin();
- this.success = new ArrayList(_list114.size);
- for (int _i115 = 0; _i115 < _list114.size; ++_i115)
+ TList _list122 = iprot.readListBegin();
+ this.success = new ArrayList(_list122.size);
+ for (int _i123 = 0; _i123 < _list122.size; ++_i123)
{
- String _elem116;
- _elem116 = iprot.readString();
- this.success.add(_elem116);
+ String _elem124;
+ _elem124 = iprot.readString();
+ this.success.add(_elem124);
}
iprot.readListEnd();
}
@@ -19717,8 +21049,8 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.success.size()));
- for (String _iter117 : this.success) {
- oprot.writeString(_iter117);
+ for (String _iter125 : this.success) {
+ oprot.writeString(_iter125);
}
oprot.writeListEnd();
}
@@ -20168,15 +21500,15 @@ public class ThriftHiveMetastore {
case SUCCESS:
if (field.type == TType.MAP) {
{
- TMap _map118 = iprot.readMapBegin();
- this.success = new HashMap(2*_map118.size);
- for (int _i119 = 0; _i119 < _map118.size; ++_i119)
+ TMap _map126 = iprot.readMapBegin();
+ this.success = new HashMap(2*_map126.size);
+ for (int _i127 = 0; _i127 < _map126.size; ++_i127)
{
- String _key120;
- String _val121;
- _key120 = iprot.readString();
- _val121 = iprot.readString();
- this.success.put(_key120, _val121);
+ String _key128;
+ String _val129;
+ _key128 = iprot.readString();
+ _val129 = iprot.readString();
+ this.success.put(_key128, _val129);
}
iprot.readMapEnd();
}
@@ -20210,9 +21542,9 @@ public class ThriftHiveMetastore {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size()));
- for (Map.Entry _iter122 : this.success.entrySet()) {
- oprot.writeString(_iter122.getKey());
- oprot.writeString(_iter122.getValue());
+ for (Map.Entry _iter130 : this.success.entrySet()) {
+ oprot.writeString(_iter130.getKey());
+ oprot.writeString(_iter130.getValue());
}
oprot.writeMapEnd();
}
diff --git metastore/src/gen-php/ThriftHiveMetastore.php metastore/src/gen-php/ThriftHiveMetastore.php
index 623aa8a..6b3f6e9 100644
--- metastore/src/gen-php/ThriftHiveMetastore.php
+++ metastore/src/gen-php/ThriftHiveMetastore.php
@@ -10,10 +10,11 @@ include_once $GLOBALS['THRIFT_ROOT'].'/packages/hive_metastore/hive_metastore_ty
include_once $GLOBALS['THRIFT_ROOT'].'/packages/fb303/FacebookService.php';
interface ThriftHiveMetastoreIf extends FacebookServiceIf {
- public function create_database($name, $description);
+ public function create_database($database);
public function get_database($name);
- public function drop_database($name);
- public function get_databases();
+ public function drop_database($name, $deleteData);
+ public function get_databases($pattern);
+ public function get_all_databases();
public function get_type($name);
public function create_type($type);
public function drop_type($type);
@@ -23,6 +24,7 @@ interface ThriftHiveMetastoreIf extends FacebookServiceIf {
public function create_table($tbl);
public function drop_table($dbname, $name, $deleteData);
public function get_tables($db_name, $pattern);
+ public function get_all_tables($db_name);
public function get_table($dbname, $tbl_name);
public function alter_table($dbname, $tbl_name, $new_tbl);
public function add_partition($new_part);
@@ -47,17 +49,16 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH
parent::__construct($input, $output);
}
- public function create_database($name, $description)
+ public function create_database($database)
{
- $this->send_create_database($name, $description);
- return $this->recv_create_database();
+ $this->send_create_database($database);
+ $this->recv_create_database();
}
- public function send_create_database($name, $description)
+ public function send_create_database($database)
{
$args = new metastore_ThriftHiveMetastore_create_database_args();
- $args->name = $name;
- $args->description = $description;
+ $args->database = $database;
$bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
@@ -93,16 +94,16 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH
$result->read($this->input_);
$this->input_->readMessageEnd();
}
- if ($result->success !== null) {
- return $result->success;
- }
if ($result->o1 !== null) {
throw $result->o1;
}
if ($result->o2 !== null) {
throw $result->o2;
}
- throw new Exception("create_database failed: unknown result");
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ return;
}
public function get_database($name)
@@ -162,16 +163,17 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH
throw new Exception("get_database failed: unknown result");
}
- public function drop_database($name)
+ public function drop_database($name, $deleteData)
{
- $this->send_drop_database($name);
- return $this->recv_drop_database();
+ $this->send_drop_database($name, $deleteData);
+ $this->recv_drop_database();
}
- public function send_drop_database($name)
+ public function send_drop_database($name, $deleteData)
{
$args = new metastore_ThriftHiveMetastore_drop_database_args();
$args->name = $name;
+ $args->deleteData = $deleteData;
$bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
@@ -207,24 +209,28 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH
$result->read($this->input_);
$this->input_->readMessageEnd();
}
- if ($result->success !== null) {
- return $result->success;
+ if ($result->o1 !== null) {
+ throw $result->o1;
}
if ($result->o2 !== null) {
throw $result->o2;
}
- throw new Exception("drop_database failed: unknown result");
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ return;
}
- public function get_databases()
+ public function get_databases($pattern)
{
- $this->send_get_databases();
+ $this->send_get_databases($pattern);
return $this->recv_get_databases();
}
- public function send_get_databases()
+ public function send_get_databases($pattern)
{
$args = new metastore_ThriftHiveMetastore_get_databases_args();
+ $args->pattern = $pattern;
$bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
if ($bin_accel)
{
@@ -269,6 +275,59 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH
throw new Exception("get_databases failed: unknown result");
}
+ public function get_all_databases()
+ {
+ $this->send_get_all_databases();
+ return $this->recv_get_all_databases();
+ }
+
+ public function send_get_all_databases()
+ {
+ $args = new metastore_ThriftHiveMetastore_get_all_databases_args();
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_all_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_all_databases', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_all_databases()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_all_databases_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_all_databases_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("get_all_databases failed: unknown result");
+ }
+
public function get_type($name)
{
$this->send_get_type($name);
@@ -317,6 +376,9 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH
if ($result->success !== null) {
return $result->success;
}
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
if ($result->o2 !== null) {
throw $result->o2;
}
@@ -431,6 +493,9 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH
if ($result->success !== null) {
return $result->success;
}
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
if ($result->o2 !== null) {
throw $result->o2;
}
@@ -784,6 +849,60 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH
throw new Exception("get_tables failed: unknown result");
}
+ public function get_all_tables($db_name)
+ {
+ $this->send_get_all_tables($db_name);
+ return $this->recv_get_all_tables();
+ }
+
+ public function send_get_all_tables($db_name)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_all_tables_args();
+ $args->db_name = $db_name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_all_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_all_tables', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_all_tables()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_all_tables_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_all_tables_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("get_all_tables failed: unknown result");
+ }
+
public function get_table($dbname, $tbl_name)
{
$this->send_get_table($dbname, $tbl_name);
@@ -1775,28 +1894,21 @@ class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftH
class metastore_ThriftHiveMetastore_create_database_args {
static $_TSPEC;
- public $name = null;
- public $description = null;
+ public $database = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
1 => array(
- 'var' => 'name',
- 'type' => TType::STRING,
- ),
- 2 => array(
- 'var' => 'description',
- 'type' => TType::STRING,
+ 'var' => 'database',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Database',
),
);
}
if (is_array($vals)) {
- if (isset($vals['name'])) {
- $this->name = $vals['name'];
- }
- if (isset($vals['description'])) {
- $this->description = $vals['description'];
+ if (isset($vals['database'])) {
+ $this->database = $vals['database'];
}
}
}
@@ -1821,15 +1933,9 @@ class metastore_ThriftHiveMetastore_create_database_args {
switch ($fid)
{
case 1:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->name);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->description);
+ if ($ftype == TType::STRUCT) {
+ $this->database = new metastore_Database();
+ $xfer += $this->database->read($input);
} else {
$xfer += $input->skip($ftype);
}
@@ -1847,14 +1953,12 @@ class metastore_ThriftHiveMetastore_create_database_args {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_args');
- if ($this->name !== null) {
- $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
- $xfer += $output->writeString($this->name);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->description !== null) {
- $xfer += $output->writeFieldBegin('description', TType::STRING, 2);
- $xfer += $output->writeString($this->description);
+ if ($this->database !== null) {
+ if (!is_object($this->database)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1);
+ $xfer += $this->database->write($output);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
@@ -1867,17 +1971,13 @@ class metastore_ThriftHiveMetastore_create_database_args {
class metastore_ThriftHiveMetastore_create_database_result {
static $_TSPEC;
- public $success = null;
public $o1 = null;
public $o2 = null;
+ public $o3 = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::BOOL,
- ),
1 => array(
'var' => 'o1',
'type' => TType::STRUCT,
@@ -1886,20 +1986,25 @@ class metastore_ThriftHiveMetastore_create_database_result {
2 => array(
'var' => 'o2',
'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidObjectException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
'class' => 'metastore_MetaException',
),
);
}
if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
if (isset($vals['o1'])) {
$this->o1 = $vals['o1'];
}
if (isset($vals['o2'])) {
$this->o2 = $vals['o2'];
}
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
}
}
@@ -1922,13 +2027,6 @@ class metastore_ThriftHiveMetastore_create_database_result {
}
switch ($fid)
{
- case 0:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->success);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
case 1:
if ($ftype == TType::STRUCT) {
$this->o1 = new metastore_AlreadyExistsException();
@@ -1939,12 +2037,20 @@ class metastore_ThriftHiveMetastore_create_database_result {
break;
case 2:
if ($ftype == TType::STRUCT) {
- $this->o2 = new metastore_MetaException();
+ $this->o2 = new metastore_InvalidObjectException();
$xfer += $this->o2->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -1958,11 +2064,6 @@ class metastore_ThriftHiveMetastore_create_database_result {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
- $xfer += $output->writeBool($this->success);
- $xfer += $output->writeFieldEnd();
- }
if ($this->o1 !== null) {
$xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
$xfer += $this->o1->write($output);
@@ -1973,6 +2074,11 @@ class metastore_ThriftHiveMetastore_create_database_result {
$xfer += $this->o2->write($output);
$xfer += $output->writeFieldEnd();
}
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
@@ -2177,6 +2283,7 @@ class metastore_ThriftHiveMetastore_drop_database_args {
static $_TSPEC;
public $name = null;
+ public $deleteData = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -2185,12 +2292,19 @@ class metastore_ThriftHiveMetastore_drop_database_args {
'var' => 'name',
'type' => TType::STRING,
),
+ 2 => array(
+ 'var' => 'deleteData',
+ 'type' => TType::BOOL,
+ ),
);
}
if (is_array($vals)) {
if (isset($vals['name'])) {
$this->name = $vals['name'];
}
+ if (isset($vals['deleteData'])) {
+ $this->deleteData = $vals['deleteData'];
+ }
}
}
@@ -2220,6 +2334,13 @@ class metastore_ThriftHiveMetastore_drop_database_args {
$xfer += $input->skip($ftype);
}
break;
+ case 2:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->deleteData);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -2238,6 +2359,11 @@ class metastore_ThriftHiveMetastore_drop_database_args {
$xfer += $output->writeString($this->name);
$xfer += $output->writeFieldEnd();
}
+ if ($this->deleteData !== null) {
+ $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2);
+ $xfer += $output->writeBool($this->deleteData);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
@@ -2248,30 +2374,40 @@ class metastore_ThriftHiveMetastore_drop_database_args {
class metastore_ThriftHiveMetastore_drop_database_result {
static $_TSPEC;
- public $success = null;
+ public $o1 = null;
public $o2 = null;
+ public $o3 = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::BOOL,
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
),
2 => array(
'var' => 'o2',
'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidOperationException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
'class' => 'metastore_MetaException',
),
);
}
if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
}
if (isset($vals['o2'])) {
$this->o2 = $vals['o2'];
}
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
}
}
@@ -2294,21 +2430,30 @@ class metastore_ThriftHiveMetastore_drop_database_result {
}
switch ($fid)
{
- case 0:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->success);
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_NoSuchObjectException();
+ $xfer += $this->o1->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
case 2:
if ($ftype == TType::STRUCT) {
- $this->o2 = new metastore_MetaException();
+ $this->o2 = new metastore_InvalidOperationException();
$xfer += $this->o2->read($input);
} else {
$xfer += $input->skip($ftype);
}
break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -2322,9 +2467,9 @@ class metastore_ThriftHiveMetastore_drop_database_result {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
- $xfer += $output->writeBool($this->success);
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
$xfer += $output->writeFieldEnd();
}
if ($this->o2 !== null) {
@@ -2332,6 +2477,11 @@ class metastore_ThriftHiveMetastore_drop_database_result {
$xfer += $this->o2->write($output);
$xfer += $output->writeFieldEnd();
}
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
@@ -2342,13 +2492,23 @@ class metastore_ThriftHiveMetastore_drop_database_result {
class metastore_ThriftHiveMetastore_get_databases_args {
static $_TSPEC;
+ public $pattern = null;
- public function __construct() {
+ public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'pattern',
+ 'type' => TType::STRING,
+ ),
);
}
- }
+ if (is_array($vals)) {
+ if (isset($vals['pattern'])) {
+ $this->pattern = $vals['pattern'];
+ }
+ }
+ }
public function getName() {
return 'ThriftHiveMetastore_get_databases_args';
@@ -2369,6 +2529,13 @@ class metastore_ThriftHiveMetastore_get_databases_args {
}
switch ($fid)
{
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->pattern);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -2382,6 +2549,11 @@ class metastore_ThriftHiveMetastore_get_databases_args {
public function write($output) {
$xfer = 0;
$xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_args');
+ if ($this->pattern !== null) {
+ $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1);
+ $xfer += $output->writeString($this->pattern);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
@@ -2509,6 +2681,176 @@ class metastore_ThriftHiveMetastore_get_databases_result {
}
+class metastore_ThriftHiveMetastore_get_all_databases_args {
+ static $_TSPEC;
+
+
+ public function __construct() {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ );
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_all_databases_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args');
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_all_databases_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_all_databases_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size108 = 0;
+ $_etype111 = 0;
+ $xfer += $input->readListBegin($_etype111, $_size108);
+ for ($_i112 = 0; $_i112 < $_size108; ++$_i112)
+ {
+ $elem113 = null;
+ $xfer += $input->readString($elem113);
+ $this->success []= $elem113;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter114)
+ {
+ $xfer += $output->writeString($iter114);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
class metastore_ThriftHiveMetastore_get_type_args {
static $_TSPEC;
@@ -2585,6 +2927,7 @@ class metastore_ThriftHiveMetastore_get_type_result {
static $_TSPEC;
public $success = null;
+ public $o1 = null;
public $o2 = null;
public function __construct($vals=null) {
@@ -2596,16 +2939,24 @@ class metastore_ThriftHiveMetastore_get_type_result {
'class' => 'metastore_Type',
),
1 => array(
- 'var' => 'o2',
+ 'var' => 'o1',
'type' => TType::STRUCT,
'class' => 'metastore_MetaException',
),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
if (isset($vals['o2'])) {
$this->o2 = $vals['o2'];
}
@@ -2641,7 +2992,15 @@ class metastore_ThriftHiveMetastore_get_type_result {
break;
case 1:
if ($ftype == TType::STRUCT) {
- $this->o2 = new metastore_MetaException();
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_NoSuchObjectException();
$xfer += $this->o2->read($input);
} else {
$xfer += $input->skip($ftype);
@@ -2668,8 +3027,13 @@ class metastore_ThriftHiveMetastore_get_type_result {
$xfer += $this->success->write($output);
$xfer += $output->writeFieldEnd();
}
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->o2 !== null) {
- $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1);
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
$xfer += $this->o2->write($output);
$xfer += $output->writeFieldEnd();
}
@@ -2971,6 +3335,7 @@ class metastore_ThriftHiveMetastore_drop_type_result {
static $_TSPEC;
public $success = null;
+ public $o1 = null;
public $o2 = null;
public function __construct($vals=null) {
@@ -2981,16 +3346,24 @@ class metastore_ThriftHiveMetastore_drop_type_result {
'type' => TType::BOOL,
),
1 => array(
- 'var' => 'o2',
+ 'var' => 'o1',
'type' => TType::STRUCT,
'class' => 'metastore_MetaException',
),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
);
}
if (is_array($vals)) {
if (isset($vals['success'])) {
$this->success = $vals['success'];
}
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
if (isset($vals['o2'])) {
$this->o2 = $vals['o2'];
}
@@ -3025,7 +3398,15 @@ class metastore_ThriftHiveMetastore_drop_type_result {
break;
case 1:
if ($ftype == TType::STRUCT) {
- $this->o2 = new metastore_MetaException();
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_NoSuchObjectException();
$xfer += $this->o2->read($input);
} else {
$xfer += $input->skip($ftype);
@@ -3049,8 +3430,13 @@ class metastore_ThriftHiveMetastore_drop_type_result {
$xfer += $output->writeBool($this->success);
$xfer += $output->writeFieldEnd();
}
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->o2 !== null) {
- $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1);
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
$xfer += $this->o2->write($output);
$xfer += $output->writeFieldEnd();
}
@@ -3194,18 +3580,18 @@ class metastore_ThriftHiveMetastore_get_type_all_result {
case 0:
if ($ftype == TType::MAP) {
$this->success = array();
- $_size108 = 0;
- $_ktype109 = 0;
- $_vtype110 = 0;
- $xfer += $input->readMapBegin($_ktype109, $_vtype110, $_size108);
- for ($_i112 = 0; $_i112 < $_size108; ++$_i112)
+ $_size115 = 0;
+ $_ktype116 = 0;
+ $_vtype117 = 0;
+ $xfer += $input->readMapBegin($_ktype116, $_vtype117, $_size115);
+ for ($_i119 = 0; $_i119 < $_size115; ++$_i119)
{
- $key113 = '';
- $val114 = new metastore_Type();
- $xfer += $input->readString($key113);
- $val114 = new metastore_Type();
- $xfer += $val114->read($input);
- $this->success[$key113] = $val114;
+ $key120 = '';
+ $val121 = new metastore_Type();
+ $xfer += $input->readString($key120);
+ $val121 = new metastore_Type();
+ $xfer += $val121->read($input);
+ $this->success[$key120] = $val121;
}
$xfer += $input->readMapEnd();
} else {
@@ -3241,10 +3627,10 @@ class metastore_ThriftHiveMetastore_get_type_all_result {
{
$output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
{
- foreach ($this->success as $kiter115 => $viter116)
+ foreach ($this->success as $kiter122 => $viter123)
{
- $xfer += $output->writeString($kiter115);
- $xfer += $viter116->write($output);
+ $xfer += $output->writeString($kiter122);
+ $xfer += $viter123->write($output);
}
}
$output->writeMapEnd();
@@ -3430,15 +3816,15 @@ class metastore_ThriftHiveMetastore_get_fields_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size117 = 0;
- $_etype120 = 0;
- $xfer += $input->readListBegin($_etype120, $_size117);
- for ($_i121 = 0; $_i121 < $_size117; ++$_i121)
+ $_size124 = 0;
+ $_etype127 = 0;
+ $xfer += $input->readListBegin($_etype127, $_size124);
+ for ($_i128 = 0; $_i128 < $_size124; ++$_i128)
{
- $elem122 = null;
- $elem122 = new metastore_FieldSchema();
- $xfer += $elem122->read($input);
- $this->success []= $elem122;
+ $elem129 = null;
+ $elem129 = new metastore_FieldSchema();
+ $xfer += $elem129->read($input);
+ $this->success []= $elem129;
}
$xfer += $input->readListEnd();
} else {
@@ -3490,9 +3876,9 @@ class metastore_ThriftHiveMetastore_get_fields_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter123)
+ foreach ($this->success as $iter130)
{
- $xfer += $iter123->write($output);
+ $xfer += $iter130->write($output);
}
}
$output->writeListEnd();
@@ -3688,15 +4074,15 @@ class metastore_ThriftHiveMetastore_get_schema_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size124 = 0;
- $_etype127 = 0;
- $xfer += $input->readListBegin($_etype127, $_size124);
- for ($_i128 = 0; $_i128 < $_size124; ++$_i128)
+ $_size131 = 0;
+ $_etype134 = 0;
+ $xfer += $input->readListBegin($_etype134, $_size131);
+ for ($_i135 = 0; $_i135 < $_size131; ++$_i135)
{
- $elem129 = null;
- $elem129 = new metastore_FieldSchema();
- $xfer += $elem129->read($input);
- $this->success []= $elem129;
+ $elem136 = null;
+ $elem136 = new metastore_FieldSchema();
+ $xfer += $elem136->read($input);
+ $this->success []= $elem136;
}
$xfer += $input->readListEnd();
} else {
@@ -3748,9 +4134,9 @@ class metastore_ThriftHiveMetastore_get_schema_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter130)
+ foreach ($this->success as $iter137)
{
- $xfer += $iter130->write($output);
+ $xfer += $iter137->write($output);
}
}
$output->writeListEnd();
@@ -4096,9 +4482,197 @@ class metastore_ThriftHiveMetastore_drop_table_args {
$xfer += $output->writeString($this->name);
$xfer += $output->writeFieldEnd();
}
- if ($this->deleteData !== null) {
- $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3);
- $xfer += $output->writeBool($this->deleteData);
+ if ($this->deleteData !== null) {
+ $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3);
+ $xfer += $output->writeBool($this->deleteData);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_table_result {
+ static $_TSPEC;
+
+ public $o1 = null;
+ public $o3 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ 2 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_table_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_NoSuchObjectException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result');
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_tables_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $pattern = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'pattern',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['pattern'])) {
+ $this->pattern = $vals['pattern'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_tables_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->pattern);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->pattern !== null) {
+ $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2);
+ $xfer += $output->writeString($this->pattern);
$xfer += $output->writeFieldEnd();
}
$xfer += $output->writeFieldStop();
@@ -4108,39 +4682,42 @@ class metastore_ThriftHiveMetastore_drop_table_args {
}
-class metastore_ThriftHiveMetastore_drop_table_result {
+class metastore_ThriftHiveMetastore_get_tables_result {
static $_TSPEC;
+ public $success = null;
public $o1 = null;
- public $o3 = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
1 => array(
'var' => 'o1',
'type' => TType::STRUCT,
- 'class' => 'metastore_NoSuchObjectException',
- ),
- 2 => array(
- 'var' => 'o3',
- 'type' => TType::STRUCT,
'class' => 'metastore_MetaException',
),
);
}
if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
if (isset($vals['o1'])) {
$this->o1 = $vals['o1'];
}
- if (isset($vals['o3'])) {
- $this->o3 = $vals['o3'];
- }
}
}
public function getName() {
- return 'ThriftHiveMetastore_drop_table_result';
+ return 'ThriftHiveMetastore_get_tables_result';
}
public function read($input)
@@ -4158,18 +4735,27 @@ class metastore_ThriftHiveMetastore_drop_table_result {
}
switch ($fid)
{
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->o1 = new metastore_NoSuchObjectException();
- $xfer += $this->o1->read($input);
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size138 = 0;
+ $_etype141 = 0;
+ $xfer += $input->readListBegin($_etype141, $_size138);
+ for ($_i142 = 0; $_i142 < $_size138; ++$_i142)
+ {
+ $elem143 = null;
+ $xfer += $input->readString($elem143);
+ $this->success []= $elem143;
+ }
+ $xfer += $input->readListEnd();
} else {
$xfer += $input->skip($ftype);
}
break;
- case 2:
+ case 1:
if ($ftype == TType::STRUCT) {
- $this->o3 = new metastore_MetaException();
- $xfer += $this->o3->read($input);
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
} else {
$xfer += $input->skip($ftype);
}
@@ -4186,17 +4772,29 @@ class metastore_ThriftHiveMetastore_drop_table_result {
public function write($output) {
$xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result');
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter144)
+ {
+ $xfer += $output->writeString($iter144);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
if ($this->o1 !== null) {
$xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
$xfer += $this->o1->write($output);
$xfer += $output->writeFieldEnd();
}
- if ($this->o3 !== null) {
- $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2);
- $xfer += $this->o3->write($output);
- $xfer += $output->writeFieldEnd();
- }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
@@ -4204,11 +4802,10 @@ class metastore_ThriftHiveMetastore_drop_table_result {
}
-class metastore_ThriftHiveMetastore_get_tables_args {
+class metastore_ThriftHiveMetastore_get_all_tables_args {
static $_TSPEC;
public $db_name = null;
- public $pattern = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -4217,24 +4814,17 @@ class metastore_ThriftHiveMetastore_get_tables_args {
'var' => 'db_name',
'type' => TType::STRING,
),
- 2 => array(
- 'var' => 'pattern',
- 'type' => TType::STRING,
- ),
);
}
if (is_array($vals)) {
if (isset($vals['db_name'])) {
$this->db_name = $vals['db_name'];
}
- if (isset($vals['pattern'])) {
- $this->pattern = $vals['pattern'];
- }
}
}
public function getName() {
- return 'ThriftHiveMetastore_get_tables_args';
+ return 'ThriftHiveMetastore_get_all_tables_args';
}
public function read($input)
@@ -4259,13 +4849,6 @@ class metastore_ThriftHiveMetastore_get_tables_args {
$xfer += $input->skip($ftype);
}
break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->pattern);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
default:
$xfer += $input->skip($ftype);
break;
@@ -4278,17 +4861,12 @@ class metastore_ThriftHiveMetastore_get_tables_args {
public function write($output) {
$xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_args');
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_args');
if ($this->db_name !== null) {
$xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
$xfer += $output->writeString($this->db_name);
$xfer += $output->writeFieldEnd();
}
- if ($this->pattern !== null) {
- $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2);
- $xfer += $output->writeString($this->pattern);
- $xfer += $output->writeFieldEnd();
- }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
@@ -4296,7 +4874,7 @@ class metastore_ThriftHiveMetastore_get_tables_args {
}
-class metastore_ThriftHiveMetastore_get_tables_result {
+class metastore_ThriftHiveMetastore_get_all_tables_result {
static $_TSPEC;
public $success = null;
@@ -4331,7 +4909,7 @@ class metastore_ThriftHiveMetastore_get_tables_result {
}
public function getName() {
- return 'ThriftHiveMetastore_get_tables_result';
+ return 'ThriftHiveMetastore_get_all_tables_result';
}
public function read($input)
@@ -4352,14 +4930,14 @@ class metastore_ThriftHiveMetastore_get_tables_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size131 = 0;
- $_etype134 = 0;
- $xfer += $input->readListBegin($_etype134, $_size131);
- for ($_i135 = 0; $_i135 < $_size131; ++$_i135)
+ $_size145 = 0;
+ $_etype148 = 0;
+ $xfer += $input->readListBegin($_etype148, $_size145);
+ for ($_i149 = 0; $_i149 < $_size145; ++$_i149)
{
- $elem136 = null;
- $xfer += $input->readString($elem136);
- $this->success []= $elem136;
+ $elem150 = null;
+ $xfer += $input->readString($elem150);
+ $this->success []= $elem150;
}
$xfer += $input->readListEnd();
} else {
@@ -4386,7 +4964,7 @@ class metastore_ThriftHiveMetastore_get_tables_result {
public function write($output) {
$xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_result');
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_result');
if ($this->success !== null) {
if (!is_array($this->success)) {
throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
@@ -4395,9 +4973,9 @@ class metastore_ThriftHiveMetastore_get_tables_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter137)
+ foreach ($this->success as $iter151)
{
- $xfer += $output->writeString($iter137);
+ $xfer += $output->writeString($iter151);
}
}
$output->writeListEnd();
@@ -5139,14 +5717,14 @@ class metastore_ThriftHiveMetastore_append_partition_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size138 = 0;
- $_etype141 = 0;
- $xfer += $input->readListBegin($_etype141, $_size138);
- for ($_i142 = 0; $_i142 < $_size138; ++$_i142)
+ $_size152 = 0;
+ $_etype155 = 0;
+ $xfer += $input->readListBegin($_etype155, $_size152);
+ for ($_i156 = 0; $_i156 < $_size152; ++$_i156)
{
- $elem143 = null;
- $xfer += $input->readString($elem143);
- $this->part_vals []= $elem143;
+ $elem157 = null;
+ $xfer += $input->readString($elem157);
+ $this->part_vals []= $elem157;
}
$xfer += $input->readListEnd();
} else {
@@ -5184,9 +5762,9 @@ class metastore_ThriftHiveMetastore_append_partition_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter144)
+ foreach ($this->part_vals as $iter158)
{
- $xfer += $output->writeString($iter144);
+ $xfer += $output->writeString($iter158);
}
}
$output->writeListEnd();
@@ -5683,14 +6261,14 @@ class metastore_ThriftHiveMetastore_drop_partition_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size145 = 0;
- $_etype148 = 0;
- $xfer += $input->readListBegin($_etype148, $_size145);
- for ($_i149 = 0; $_i149 < $_size145; ++$_i149)
+ $_size159 = 0;
+ $_etype162 = 0;
+ $xfer += $input->readListBegin($_etype162, $_size159);
+ for ($_i163 = 0; $_i163 < $_size159; ++$_i163)
{
- $elem150 = null;
- $xfer += $input->readString($elem150);
- $this->part_vals []= $elem150;
+ $elem164 = null;
+ $xfer += $input->readString($elem164);
+ $this->part_vals []= $elem164;
}
$xfer += $input->readListEnd();
} else {
@@ -5735,9 +6313,9 @@ class metastore_ThriftHiveMetastore_drop_partition_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter151)
+ foreach ($this->part_vals as $iter165)
{
- $xfer += $output->writeString($iter151);
+ $xfer += $output->writeString($iter165);
}
}
$output->writeListEnd();
@@ -6197,14 +6775,14 @@ class metastore_ThriftHiveMetastore_get_partition_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size152 = 0;
- $_etype155 = 0;
- $xfer += $input->readListBegin($_etype155, $_size152);
- for ($_i156 = 0; $_i156 < $_size152; ++$_i156)
+ $_size166 = 0;
+ $_etype169 = 0;
+ $xfer += $input->readListBegin($_etype169, $_size166);
+ for ($_i170 = 0; $_i170 < $_size166; ++$_i170)
{
- $elem157 = null;
- $xfer += $input->readString($elem157);
- $this->part_vals []= $elem157;
+ $elem171 = null;
+ $xfer += $input->readString($elem171);
+ $this->part_vals []= $elem171;
}
$xfer += $input->readListEnd();
} else {
@@ -6242,9 +6820,9 @@ class metastore_ThriftHiveMetastore_get_partition_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter158)
+ foreach ($this->part_vals as $iter172)
{
- $xfer += $output->writeString($iter158);
+ $xfer += $output->writeString($iter172);
}
}
$output->writeListEnd();
@@ -6790,15 +7368,15 @@ class metastore_ThriftHiveMetastore_get_partitions_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size159 = 0;
- $_etype162 = 0;
- $xfer += $input->readListBegin($_etype162, $_size159);
- for ($_i163 = 0; $_i163 < $_size159; ++$_i163)
+ $_size173 = 0;
+ $_etype176 = 0;
+ $xfer += $input->readListBegin($_etype176, $_size173);
+ for ($_i177 = 0; $_i177 < $_size173; ++$_i177)
{
- $elem164 = null;
- $elem164 = new metastore_Partition();
- $xfer += $elem164->read($input);
- $this->success []= $elem164;
+ $elem178 = null;
+ $elem178 = new metastore_Partition();
+ $xfer += $elem178->read($input);
+ $this->success []= $elem178;
}
$xfer += $input->readListEnd();
} else {
@@ -6842,9 +7420,9 @@ class metastore_ThriftHiveMetastore_get_partitions_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter165)
+ foreach ($this->success as $iter179)
{
- $xfer += $iter165->write($output);
+ $xfer += $iter179->write($output);
}
}
$output->writeListEnd();
@@ -7036,14 +7614,14 @@ class metastore_ThriftHiveMetastore_get_partition_names_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size166 = 0;
- $_etype169 = 0;
- $xfer += $input->readListBegin($_etype169, $_size166);
- for ($_i170 = 0; $_i170 < $_size166; ++$_i170)
+ $_size180 = 0;
+ $_etype183 = 0;
+ $xfer += $input->readListBegin($_etype183, $_size180);
+ for ($_i184 = 0; $_i184 < $_size180; ++$_i184)
{
- $elem171 = null;
- $xfer += $input->readString($elem171);
- $this->success []= $elem171;
+ $elem185 = null;
+ $xfer += $input->readString($elem185);
+ $this->success []= $elem185;
}
$xfer += $input->readListEnd();
} else {
@@ -7079,9 +7657,9 @@ class metastore_ThriftHiveMetastore_get_partition_names_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter172)
+ foreach ($this->success as $iter186)
{
- $xfer += $output->writeString($iter172);
+ $xfer += $output->writeString($iter186);
}
}
$output->writeListEnd();
@@ -7185,14 +7763,14 @@ class metastore_ThriftHiveMetastore_get_partitions_ps_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size173 = 0;
- $_etype176 = 0;
- $xfer += $input->readListBegin($_etype176, $_size173);
- for ($_i177 = 0; $_i177 < $_size173; ++$_i177)
+ $_size187 = 0;
+ $_etype190 = 0;
+ $xfer += $input->readListBegin($_etype190, $_size187);
+ for ($_i191 = 0; $_i191 < $_size187; ++$_i191)
{
- $elem178 = null;
- $xfer += $input->readString($elem178);
- $this->part_vals []= $elem178;
+ $elem192 = null;
+ $xfer += $input->readString($elem192);
+ $this->part_vals []= $elem192;
}
$xfer += $input->readListEnd();
} else {
@@ -7237,9 +7815,9 @@ class metastore_ThriftHiveMetastore_get_partitions_ps_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter179)
+ foreach ($this->part_vals as $iter193)
{
- $xfer += $output->writeString($iter179);
+ $xfer += $output->writeString($iter193);
}
}
$output->writeListEnd();
@@ -7315,15 +7893,15 @@ class metastore_ThriftHiveMetastore_get_partitions_ps_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size180 = 0;
- $_etype183 = 0;
- $xfer += $input->readListBegin($_etype183, $_size180);
- for ($_i184 = 0; $_i184 < $_size180; ++$_i184)
+ $_size194 = 0;
+ $_etype197 = 0;
+ $xfer += $input->readListBegin($_etype197, $_size194);
+ for ($_i198 = 0; $_i198 < $_size194; ++$_i198)
{
- $elem185 = null;
- $elem185 = new metastore_Partition();
- $xfer += $elem185->read($input);
- $this->success []= $elem185;
+ $elem199 = null;
+ $elem199 = new metastore_Partition();
+ $xfer += $elem199->read($input);
+ $this->success []= $elem199;
}
$xfer += $input->readListEnd();
} else {
@@ -7359,9 +7937,9 @@ class metastore_ThriftHiveMetastore_get_partitions_ps_result {
{
$output->writeListBegin(TType::STRUCT, count($this->success));
{
- foreach ($this->success as $iter186)
+ foreach ($this->success as $iter200)
{
- $xfer += $iter186->write($output);
+ $xfer += $iter200->write($output);
}
}
$output->writeListEnd();
@@ -7465,14 +8043,14 @@ class metastore_ThriftHiveMetastore_get_partition_names_ps_args {
case 3:
if ($ftype == TType::LST) {
$this->part_vals = array();
- $_size187 = 0;
- $_etype190 = 0;
- $xfer += $input->readListBegin($_etype190, $_size187);
- for ($_i191 = 0; $_i191 < $_size187; ++$_i191)
+ $_size201 = 0;
+ $_etype204 = 0;
+ $xfer += $input->readListBegin($_etype204, $_size201);
+ for ($_i205 = 0; $_i205 < $_size201; ++$_i205)
{
- $elem192 = null;
- $xfer += $input->readString($elem192);
- $this->part_vals []= $elem192;
+ $elem206 = null;
+ $xfer += $input->readString($elem206);
+ $this->part_vals []= $elem206;
}
$xfer += $input->readListEnd();
} else {
@@ -7517,9 +8095,9 @@ class metastore_ThriftHiveMetastore_get_partition_names_ps_args {
{
$output->writeListBegin(TType::STRING, count($this->part_vals));
{
- foreach ($this->part_vals as $iter193)
+ foreach ($this->part_vals as $iter207)
{
- $xfer += $output->writeString($iter193);
+ $xfer += $output->writeString($iter207);
}
}
$output->writeListEnd();
@@ -7594,14 +8172,14 @@ class metastore_ThriftHiveMetastore_get_partition_names_ps_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size194 = 0;
- $_etype197 = 0;
- $xfer += $input->readListBegin($_etype197, $_size194);
- for ($_i198 = 0; $_i198 < $_size194; ++$_i198)
+ $_size208 = 0;
+ $_etype211 = 0;
+ $xfer += $input->readListBegin($_etype211, $_size208);
+ for ($_i212 = 0; $_i212 < $_size208; ++$_i212)
{
- $elem199 = null;
- $xfer += $input->readString($elem199);
- $this->success []= $elem199;
+ $elem213 = null;
+ $xfer += $input->readString($elem213);
+ $this->success []= $elem213;
}
$xfer += $input->readListEnd();
} else {
@@ -7637,9 +8215,9 @@ class metastore_ThriftHiveMetastore_get_partition_names_ps_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter200)
+ foreach ($this->success as $iter214)
{
- $xfer += $output->writeString($iter200);
+ $xfer += $output->writeString($iter214);
}
}
$output->writeListEnd();
@@ -8185,14 +8763,14 @@ class metastore_ThriftHiveMetastore_partition_name_to_vals_result {
case 0:
if ($ftype == TType::LST) {
$this->success = array();
- $_size201 = 0;
- $_etype204 = 0;
- $xfer += $input->readListBegin($_etype204, $_size201);
- for ($_i205 = 0; $_i205 < $_size201; ++$_i205)
+ $_size215 = 0;
+ $_etype218 = 0;
+ $xfer += $input->readListBegin($_etype218, $_size215);
+ for ($_i219 = 0; $_i219 < $_size215; ++$_i219)
{
- $elem206 = null;
- $xfer += $input->readString($elem206);
- $this->success []= $elem206;
+ $elem220 = null;
+ $xfer += $input->readString($elem220);
+ $this->success []= $elem220;
}
$xfer += $input->readListEnd();
} else {
@@ -8228,9 +8806,9 @@ class metastore_ThriftHiveMetastore_partition_name_to_vals_result {
{
$output->writeListBegin(TType::STRING, count($this->success));
{
- foreach ($this->success as $iter207)
+ foreach ($this->success as $iter221)
{
- $xfer += $output->writeString($iter207);
+ $xfer += $output->writeString($iter221);
}
}
$output->writeListEnd();
@@ -8381,17 +8959,17 @@ class metastore_ThriftHiveMetastore_partition_name_to_spec_result {
case 0:
if ($ftype == TType::MAP) {
$this->success = array();
- $_size208 = 0;
- $_ktype209 = 0;
- $_vtype210 = 0;
- $xfer += $input->readMapBegin($_ktype209, $_vtype210, $_size208);
- for ($_i212 = 0; $_i212 < $_size208; ++$_i212)
+ $_size222 = 0;
+ $_ktype223 = 0;
+ $_vtype224 = 0;
+ $xfer += $input->readMapBegin($_ktype223, $_vtype224, $_size222);
+ for ($_i226 = 0; $_i226 < $_size222; ++$_i226)
{
- $key213 = '';
- $val214 = '';
- $xfer += $input->readString($key213);
- $xfer += $input->readString($val214);
- $this->success[$key213] = $val214;
+ $key227 = '';
+ $val228 = '';
+ $xfer += $input->readString($key227);
+ $xfer += $input->readString($val228);
+ $this->success[$key227] = $val228;
}
$xfer += $input->readMapEnd();
} else {
@@ -8427,10 +9005,10 @@ class metastore_ThriftHiveMetastore_partition_name_to_spec_result {
{
$output->writeMapBegin(TType::STRING, TType::STRING, count($this->success));
{
- foreach ($this->success as $kiter215 => $viter216)
+ foreach ($this->success as $kiter229 => $viter230)
{
- $xfer += $output->writeString($kiter215);
- $xfer += $output->writeString($viter216);
+ $xfer += $output->writeString($kiter229);
+ $xfer += $output->writeString($viter230);
}
}
$output->writeMapEnd();
diff --git metastore/src/gen-php/hive_metastore/ThriftHiveMetastore.php metastore/src/gen-php/hive_metastore/ThriftHiveMetastore.php
new file mode 100644
index 0000000..6b3f6e9
--- /dev/null
+++ metastore/src/gen-php/hive_metastore/ThriftHiveMetastore.php
@@ -0,0 +1,9030 @@
+send_create_database($database);
+ $this->recv_create_database();
+ }
+
+ public function send_create_database($database)
+ {
+ $args = new metastore_ThriftHiveMetastore_create_database_args();
+ $args->database = $database;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'create_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('create_database', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_create_database()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_create_database_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_create_database_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ return;
+ }
+
+ public function get_database($name)
+ {
+ $this->send_get_database($name);
+ return $this->recv_get_database();
+ }
+
+ public function send_get_database($name)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_database_args();
+ $args->name = $name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_database', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_database()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_database_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_database_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("get_database failed: unknown result");
+ }
+
+ public function drop_database($name, $deleteData)
+ {
+ $this->send_drop_database($name, $deleteData);
+ $this->recv_drop_database();
+ }
+
+ public function send_drop_database($name, $deleteData)
+ {
+ $args = new metastore_ThriftHiveMetastore_drop_database_args();
+ $args->name = $name;
+ $args->deleteData = $deleteData;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'drop_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('drop_database', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_drop_database()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_database_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_drop_database_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ return;
+ }
+
+ public function get_databases($pattern)
+ {
+ $this->send_get_databases($pattern);
+ return $this->recv_get_databases();
+ }
+
+ public function send_get_databases($pattern)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_databases_args();
+ $args->pattern = $pattern;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_databases', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_databases()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_databases_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_databases_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("get_databases failed: unknown result");
+ }
+
+ public function get_all_databases()
+ {
+ $this->send_get_all_databases();
+ return $this->recv_get_all_databases();
+ }
+
+ public function send_get_all_databases()
+ {
+ $args = new metastore_ThriftHiveMetastore_get_all_databases_args();
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_all_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_all_databases', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_all_databases()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_all_databases_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_all_databases_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("get_all_databases failed: unknown result");
+ }
+
+ public function get_type($name)
+ {
+ $this->send_get_type($name);
+ return $this->recv_get_type();
+ }
+
+ public function send_get_type($name)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_type_args();
+ $args->name = $name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_type', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_type()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_type_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_type_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("get_type failed: unknown result");
+ }
+
+ public function create_type($type)
+ {
+ $this->send_create_type($type);
+ return $this->recv_create_type();
+ }
+
+ public function send_create_type($type)
+ {
+ $args = new metastore_ThriftHiveMetastore_create_type_args();
+ $args->type = $type;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'create_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('create_type', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_create_type()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_create_type_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_create_type_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ throw new Exception("create_type failed: unknown result");
+ }
+
+ public function drop_type($type)
+ {
+ $this->send_drop_type($type);
+ return $this->recv_drop_type();
+ }
+
+ public function send_drop_type($type)
+ {
+ $args = new metastore_ThriftHiveMetastore_drop_type_args();
+ $args->type = $type;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'drop_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('drop_type', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_drop_type()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_type_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_drop_type_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("drop_type failed: unknown result");
+ }
+
+ public function get_type_all($name)
+ {
+ $this->send_get_type_all($name);
+ return $this->recv_get_type_all();
+ }
+
+ public function send_get_type_all($name)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_type_all_args();
+ $args->name = $name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_type_all', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_type_all', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_type_all()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_type_all_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_type_all_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("get_type_all failed: unknown result");
+ }
+
+ public function get_fields($db_name, $table_name)
+ {
+ $this->send_get_fields($db_name, $table_name);
+ return $this->recv_get_fields();
+ }
+
+ public function send_get_fields($db_name, $table_name)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_fields_args();
+ $args->db_name = $db_name;
+ $args->table_name = $table_name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_fields', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_fields', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_fields()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_fields_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_fields_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ throw new Exception("get_fields failed: unknown result");
+ }
+
+ public function get_schema($db_name, $table_name)
+ {
+ $this->send_get_schema($db_name, $table_name);
+ return $this->recv_get_schema();
+ }
+
+ public function send_get_schema($db_name, $table_name)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_schema_args();
+ $args->db_name = $db_name;
+ $args->table_name = $table_name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_schema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_schema', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_schema()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_schema_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_schema_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ throw new Exception("get_schema failed: unknown result");
+ }
+
+ public function create_table($tbl)
+ {
+ $this->send_create_table($tbl);
+ $this->recv_create_table();
+ }
+
+ public function send_create_table($tbl)
+ {
+ $args = new metastore_ThriftHiveMetastore_create_table_args();
+ $args->tbl = $tbl;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'create_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('create_table', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_create_table()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_create_table_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_create_table_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ if ($result->o4 !== null) {
+ throw $result->o4;
+ }
+ return;
+ }
+
+ public function drop_table($dbname, $name, $deleteData)
+ {
+ $this->send_drop_table($dbname, $name, $deleteData);
+ $this->recv_drop_table();
+ }
+
+ public function send_drop_table($dbname, $name, $deleteData)
+ {
+ $args = new metastore_ThriftHiveMetastore_drop_table_args();
+ $args->dbname = $dbname;
+ $args->name = $name;
+ $args->deleteData = $deleteData;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'drop_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('drop_table', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_drop_table()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_table_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_drop_table_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ return;
+ }
+
+ public function get_tables($db_name, $pattern)
+ {
+ $this->send_get_tables($db_name, $pattern);
+ return $this->recv_get_tables();
+ }
+
+ public function send_get_tables($db_name, $pattern)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_tables_args();
+ $args->db_name = $db_name;
+ $args->pattern = $pattern;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_tables', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_tables()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_tables_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_tables_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("get_tables failed: unknown result");
+ }
+
+ public function get_all_tables($db_name)
+ {
+ $this->send_get_all_tables($db_name);
+ return $this->recv_get_all_tables();
+ }
+
+ public function send_get_all_tables($db_name)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_all_tables_args();
+ $args->db_name = $db_name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_all_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_all_tables', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_all_tables()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_all_tables_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_all_tables_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("get_all_tables failed: unknown result");
+ }
+
+ public function get_table($dbname, $tbl_name)
+ {
+ $this->send_get_table($dbname, $tbl_name);
+ return $this->recv_get_table();
+ }
+
+ public function send_get_table($dbname, $tbl_name)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_table_args();
+ $args->dbname = $dbname;
+ $args->tbl_name = $tbl_name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_table', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_table()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_table_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_table_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("get_table failed: unknown result");
+ }
+
+ public function alter_table($dbname, $tbl_name, $new_tbl)
+ {
+ $this->send_alter_table($dbname, $tbl_name, $new_tbl);
+ $this->recv_alter_table();
+ }
+
+ public function send_alter_table($dbname, $tbl_name, $new_tbl)
+ {
+ $args = new metastore_ThriftHiveMetastore_alter_table_args();
+ $args->dbname = $dbname;
+ $args->tbl_name = $tbl_name;
+ $args->new_tbl = $new_tbl;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'alter_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('alter_table', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_alter_table()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_alter_table_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_alter_table_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ return;
+ }
+
+ public function add_partition($new_part)
+ {
+ $this->send_add_partition($new_part);
+ return $this->recv_add_partition();
+ }
+
+ public function send_add_partition($new_part)
+ {
+ $args = new metastore_ThriftHiveMetastore_add_partition_args();
+ $args->new_part = $new_part;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'add_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('add_partition', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_add_partition()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_add_partition_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_add_partition_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ throw new Exception("add_partition failed: unknown result");
+ }
+
+ public function append_partition($db_name, $tbl_name, $part_vals)
+ {
+ $this->send_append_partition($db_name, $tbl_name, $part_vals);
+ return $this->recv_append_partition();
+ }
+
+ public function send_append_partition($db_name, $tbl_name, $part_vals)
+ {
+ $args = new metastore_ThriftHiveMetastore_append_partition_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->part_vals = $part_vals;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'append_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('append_partition', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_append_partition()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_append_partition_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_append_partition_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ throw new Exception("append_partition failed: unknown result");
+ }
+
+ public function append_partition_by_name($db_name, $tbl_name, $part_name)
+ {
+ $this->send_append_partition_by_name($db_name, $tbl_name, $part_name);
+ return $this->recv_append_partition_by_name();
+ }
+
+ public function send_append_partition_by_name($db_name, $tbl_name, $part_name)
+ {
+ $args = new metastore_ThriftHiveMetastore_append_partition_by_name_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->part_name = $part_name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'append_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('append_partition_by_name', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_append_partition_by_name()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_append_partition_by_name_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_append_partition_by_name_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ if ($result->o3 !== null) {
+ throw $result->o3;
+ }
+ throw new Exception("append_partition_by_name failed: unknown result");
+ }
+
+ public function drop_partition($db_name, $tbl_name, $part_vals, $deleteData)
+ {
+ $this->send_drop_partition($db_name, $tbl_name, $part_vals, $deleteData);
+ return $this->recv_drop_partition();
+ }
+
+ public function send_drop_partition($db_name, $tbl_name, $part_vals, $deleteData)
+ {
+ $args = new metastore_ThriftHiveMetastore_drop_partition_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->part_vals = $part_vals;
+ $args->deleteData = $deleteData;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'drop_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('drop_partition', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_drop_partition()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_partition_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_drop_partition_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("drop_partition failed: unknown result");
+ }
+
+ public function drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData)
+ {
+ $this->send_drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData);
+ return $this->recv_drop_partition_by_name();
+ }
+
+ public function send_drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData)
+ {
+ $args = new metastore_ThriftHiveMetastore_drop_partition_by_name_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->part_name = $part_name;
+ $args->deleteData = $deleteData;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'drop_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('drop_partition_by_name', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_drop_partition_by_name()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_partition_by_name_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_drop_partition_by_name_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("drop_partition_by_name failed: unknown result");
+ }
+
+ public function get_partition($db_name, $tbl_name, $part_vals)
+ {
+ $this->send_get_partition($db_name, $tbl_name, $part_vals);
+ return $this->recv_get_partition();
+ }
+
+ public function send_get_partition($db_name, $tbl_name, $part_vals)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_partition_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->part_vals = $part_vals;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_partition', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_partition()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_partition_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("get_partition failed: unknown result");
+ }
+
+ public function get_partition_by_name($db_name, $tbl_name, $part_name)
+ {
+ $this->send_get_partition_by_name($db_name, $tbl_name, $part_name);
+ return $this->recv_get_partition_by_name();
+ }
+
+ public function send_get_partition_by_name($db_name, $tbl_name, $part_name)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_partition_by_name_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->part_name = $part_name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_partition_by_name', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_partition_by_name()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_by_name_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_partition_by_name_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("get_partition_by_name failed: unknown result");
+ }
+
+ public function get_partitions($db_name, $tbl_name, $max_parts)
+ {
+ $this->send_get_partitions($db_name, $tbl_name, $max_parts);
+ return $this->recv_get_partitions();
+ }
+
+ public function send_get_partitions($db_name, $tbl_name, $max_parts)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_partitions_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->max_parts = $max_parts;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_partitions', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_partitions()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partitions_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_partitions_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("get_partitions failed: unknown result");
+ }
+
+ public function get_partition_names($db_name, $tbl_name, $max_parts)
+ {
+ $this->send_get_partition_names($db_name, $tbl_name, $max_parts);
+ return $this->recv_get_partition_names();
+ }
+
+ public function send_get_partition_names($db_name, $tbl_name, $max_parts)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_partition_names_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->max_parts = $max_parts;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_partition_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_partition_names', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_partition_names()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_names_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_partition_names_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ throw new Exception("get_partition_names failed: unknown result");
+ }
+
+ public function get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts)
+ {
+ $this->send_get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts);
+ return $this->recv_get_partitions_ps();
+ }
+
+ public function send_get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_partitions_ps_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->part_vals = $part_vals;
+ $args->max_parts = $max_parts;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_partitions_ps', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_partitions_ps', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_partitions_ps()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partitions_ps_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_partitions_ps_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("get_partitions_ps failed: unknown result");
+ }
+
+ public function get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts)
+ {
+ $this->send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts);
+ return $this->recv_get_partition_names_ps();
+ }
+
+ public function send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_partition_names_ps_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->part_vals = $part_vals;
+ $args->max_parts = $max_parts;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_partition_names_ps', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_partition_names_ps', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_partition_names_ps()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_names_ps_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_partition_names_ps_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("get_partition_names_ps failed: unknown result");
+ }
+
+ public function alter_partition($db_name, $tbl_name, $new_part)
+ {
+ $this->send_alter_partition($db_name, $tbl_name, $new_part);
+ $this->recv_alter_partition();
+ }
+
+ public function send_alter_partition($db_name, $tbl_name, $new_part)
+ {
+ $args = new metastore_ThriftHiveMetastore_alter_partition_args();
+ $args->db_name = $db_name;
+ $args->tbl_name = $tbl_name;
+ $args->new_part = $new_part;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'alter_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('alter_partition', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_alter_partition()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_alter_partition_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_alter_partition_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ if ($result->o2 !== null) {
+ throw $result->o2;
+ }
+ return;
+ }
+
+ public function get_config_value($name, $defaultValue)
+ {
+ $this->send_get_config_value($name, $defaultValue);
+ return $this->recv_get_config_value();
+ }
+
+ public function send_get_config_value($name, $defaultValue)
+ {
+ $args = new metastore_ThriftHiveMetastore_get_config_value_args();
+ $args->name = $name;
+ $args->defaultValue = $defaultValue;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'get_config_value', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('get_config_value', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_get_config_value()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_config_value_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_get_config_value_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("get_config_value failed: unknown result");
+ }
+
+ public function partition_name_to_vals($part_name)
+ {
+ $this->send_partition_name_to_vals($part_name);
+ return $this->recv_partition_name_to_vals();
+ }
+
+ public function send_partition_name_to_vals($part_name)
+ {
+ $args = new metastore_ThriftHiveMetastore_partition_name_to_vals_args();
+ $args->part_name = $part_name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'partition_name_to_vals', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('partition_name_to_vals', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_partition_name_to_vals()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_partition_name_to_vals_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_partition_name_to_vals_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("partition_name_to_vals failed: unknown result");
+ }
+
+ public function partition_name_to_spec($part_name)
+ {
+ $this->send_partition_name_to_spec($part_name);
+ return $this->recv_partition_name_to_spec();
+ }
+
+ public function send_partition_name_to_spec($part_name)
+ {
+ $args = new metastore_ThriftHiveMetastore_partition_name_to_spec_args();
+ $args->part_name = $part_name;
+ $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+ if ($bin_accel)
+ {
+ thrift_protocol_write_binary($this->output_, 'partition_name_to_spec', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+ }
+ else
+ {
+ $this->output_->writeMessageBegin('partition_name_to_spec', TMessageType::CALL, $this->seqid_);
+ $args->write($this->output_);
+ $this->output_->writeMessageEnd();
+ $this->output_->getTransport()->flush();
+ }
+ }
+
+ public function recv_partition_name_to_spec()
+ {
+ $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+ if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_partition_name_to_spec_result', $this->input_->isStrictRead());
+ else
+ {
+ $rseqid = 0;
+ $fname = null;
+ $mtype = 0;
+
+ $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+ if ($mtype == TMessageType::EXCEPTION) {
+ $x = new TApplicationException();
+ $x->read($this->input_);
+ $this->input_->readMessageEnd();
+ throw $x;
+ }
+ $result = new metastore_ThriftHiveMetastore_partition_name_to_spec_result();
+ $result->read($this->input_);
+ $this->input_->readMessageEnd();
+ }
+ if ($result->success !== null) {
+ return $result->success;
+ }
+ if ($result->o1 !== null) {
+ throw $result->o1;
+ }
+ throw new Exception("partition_name_to_spec failed: unknown result");
+ }
+
+}
+
+// HELPER FUNCTIONS AND STRUCTURES
+
+class metastore_ThriftHiveMetastore_create_database_args {
+ static $_TSPEC;
+
+ public $database = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'database',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Database',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['database'])) {
+ $this->database = $vals['database'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_create_database_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->database = new metastore_Database();
+ $xfer += $this->database->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_args');
+ if ($this->database !== null) {
+ if (!is_object($this->database)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1);
+ $xfer += $this->database->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_create_database_result {
+ static $_TSPEC;
+
+ public $o1 = null;
+ public $o2 = null;
+ public $o3 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_AlreadyExistsException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidObjectException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_create_database_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_AlreadyExistsException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_InvalidObjectException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result');
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_database_args {
+ static $_TSPEC;
+
+ public $name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_database_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_args');
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_database_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Database',
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_database_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new metastore_Database();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_NoSuchObjectException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_MetaException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_result');
+ if ($this->success !== null) {
+ if (!is_object($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+ $xfer += $this->success->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_database_args {
+ static $_TSPEC;
+
+ public $name = null;
+ public $deleteData = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'deleteData',
+ 'type' => TType::BOOL,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ if (isset($vals['deleteData'])) {
+ $this->deleteData = $vals['deleteData'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_database_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->deleteData);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_args');
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->deleteData !== null) {
+ $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2);
+ $xfer += $output->writeBool($this->deleteData);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_database_result {
+ static $_TSPEC;
+
+ public $o1 = null;
+ public $o2 = null;
+ public $o3 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidOperationException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_database_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_NoSuchObjectException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_InvalidOperationException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result');
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_databases_args {
+ static $_TSPEC;
+
+ public $pattern = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'pattern',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['pattern'])) {
+ $this->pattern = $vals['pattern'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_databases_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->pattern);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_args');
+ if ($this->pattern !== null) {
+ $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1);
+ $xfer += $output->writeString($this->pattern);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_databases_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_databases_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size101 = 0;
+ $_etype104 = 0;
+ $xfer += $input->readListBegin($_etype104, $_size101);
+ for ($_i105 = 0; $_i105 < $_size101; ++$_i105)
+ {
+ $elem106 = null;
+ $xfer += $input->readString($elem106);
+ $this->success []= $elem106;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter107)
+ {
+ $xfer += $output->writeString($iter107);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_all_databases_args {
+ static $_TSPEC;
+
+
+ public function __construct() {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ );
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_all_databases_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args');
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_all_databases_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_all_databases_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size108 = 0;
+ $_etype111 = 0;
+ $xfer += $input->readListBegin($_etype111, $_size108);
+ for ($_i112 = 0; $_i112 < $_size108; ++$_i112)
+ {
+ $elem113 = null;
+ $xfer += $input->readString($elem113);
+ $this->success []= $elem113;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter114)
+ {
+ $xfer += $output->writeString($iter114);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_type_args {
+ static $_TSPEC;
+
+ public $name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_type_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_args');
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_type_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Type',
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_type_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new metastore_Type();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_NoSuchObjectException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_result');
+ if ($this->success !== null) {
+ if (!is_object($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+ $xfer += $this->success->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_create_type_args {
+ static $_TSPEC;
+
+ public $type = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'type',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Type',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['type'])) {
+ $this->type = $vals['type'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_create_type_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->type = new metastore_Type();
+ $xfer += $this->type->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_args');
+ if ($this->type !== null) {
+ if (!is_object($this->type)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('type', TType::STRUCT, 1);
+ $xfer += $this->type->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_create_type_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+ public $o3 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::BOOL,
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_AlreadyExistsException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidObjectException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_create_type_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_AlreadyExistsException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_InvalidObjectException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_type_args {
+ static $_TSPEC;
+
+ public $type = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'type',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['type'])) {
+ $this->type = $vals['type'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_type_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->type);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_args');
+ if ($this->type !== null) {
+ $xfer += $output->writeFieldBegin('type', TType::STRING, 1);
+ $xfer += $output->writeString($this->type);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_type_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::BOOL,
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_type_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_NoSuchObjectException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_type_all_args {
+ static $_TSPEC;
+
+ public $name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_type_all_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_args');
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_type_all_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRUCT,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Type',
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_type_all_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::MAP) {
+ $this->success = array();
+ $_size115 = 0;
+ $_ktype116 = 0;
+ $_vtype117 = 0;
+ $xfer += $input->readMapBegin($_ktype116, $_vtype117, $_size115);
+ for ($_i119 = 0; $_i119 < $_size115; ++$_i119)
+ {
+ $key120 = '';
+ $val121 = new metastore_Type();
+ $xfer += $input->readString($key120);
+ $val121 = new metastore_Type();
+ $xfer += $val121->read($input);
+ $this->success[$key120] = $val121;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_MetaException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success));
+ {
+ foreach ($this->success as $kiter122 => $viter123)
+ {
+ $xfer += $output->writeString($kiter122);
+ $xfer += $viter123->write($output);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_fields_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $table_name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'table_name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['table_name'])) {
+ $this->table_name = $vals['table_name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_fields_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->table_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->table_name !== null) {
+ $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->table_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_fields_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+ public $o3 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_FieldSchema',
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_UnknownTableException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_UnknownDBException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_fields_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size124 = 0;
+ $_etype127 = 0;
+ $xfer += $input->readListBegin($_etype127, $_size124);
+ for ($_i128 = 0; $_i128 < $_size124; ++$_i128)
+ {
+ $elem129 = null;
+ $elem129 = new metastore_FieldSchema();
+ $xfer += $elem129->read($input);
+ $this->success []= $elem129;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_UnknownTableException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_UnknownDBException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->success));
+ {
+ foreach ($this->success as $iter130)
+ {
+ $xfer += $iter130->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_schema_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $table_name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'table_name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['table_name'])) {
+ $this->table_name = $vals['table_name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_schema_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->table_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->table_name !== null) {
+ $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->table_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_schema_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+ public $o3 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_FieldSchema',
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_UnknownTableException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_UnknownDBException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_schema_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size131 = 0;
+ $_etype134 = 0;
+ $xfer += $input->readListBegin($_etype134, $_size131);
+ for ($_i135 = 0; $_i135 < $_size131; ++$_i135)
+ {
+ $elem136 = null;
+ $elem136 = new metastore_FieldSchema();
+ $xfer += $elem136->read($input);
+ $this->success []= $elem136;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_UnknownTableException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_UnknownDBException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->success));
+ {
+ foreach ($this->success as $iter137)
+ {
+ $xfer += $iter137->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_create_table_args {
+ static $_TSPEC;
+
+ public $tbl = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'tbl',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Table',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['tbl'])) {
+ $this->tbl = $vals['tbl'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_create_table_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->tbl = new metastore_Table();
+ $xfer += $this->tbl->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_args');
+ if ($this->tbl !== null) {
+ if (!is_object($this->tbl)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1);
+ $xfer += $this->tbl->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_create_table_result {
+ static $_TSPEC;
+
+ public $o1 = null;
+ public $o2 = null;
+ public $o3 = null;
+ public $o4 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_AlreadyExistsException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidObjectException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ 4 => array(
+ 'var' => 'o4',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ if (isset($vals['o4'])) {
+ $this->o4 = $vals['o4'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_create_table_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_AlreadyExistsException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_InvalidObjectException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRUCT) {
+ $this->o4 = new metastore_NoSuchObjectException();
+ $xfer += $this->o4->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result');
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o4 !== null) {
+ $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4);
+ $xfer += $this->o4->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_table_args {
+ static $_TSPEC;
+
+ public $dbname = null;
+ public $name = null;
+ public $deleteData = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'dbname',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'deleteData',
+ 'type' => TType::BOOL,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['dbname'])) {
+ $this->dbname = $vals['dbname'];
+ }
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ if (isset($vals['deleteData'])) {
+ $this->deleteData = $vals['deleteData'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_table_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dbname);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->deleteData);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args');
+ if ($this->dbname !== null) {
+ $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1);
+ $xfer += $output->writeString($this->dbname);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->deleteData !== null) {
+ $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3);
+ $xfer += $output->writeBool($this->deleteData);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_table_result {
+ static $_TSPEC;
+
+ public $o1 = null;
+ public $o3 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ 2 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_table_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_NoSuchObjectException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result');
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_tables_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $pattern = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'pattern',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['pattern'])) {
+ $this->pattern = $vals['pattern'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_tables_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->pattern);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->pattern !== null) {
+ $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2);
+ $xfer += $output->writeString($this->pattern);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_tables_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_tables_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size138 = 0;
+ $_etype141 = 0;
+ $xfer += $input->readListBegin($_etype141, $_size138);
+ for ($_i142 = 0; $_i142 < $_size138; ++$_i142)
+ {
+ $elem143 = null;
+ $xfer += $input->readString($elem143);
+ $this->success []= $elem143;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter144)
+ {
+ $xfer += $output->writeString($iter144);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_all_tables_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_all_tables_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_all_tables_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_all_tables_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size145 = 0;
+ $_etype148 = 0;
+ $xfer += $input->readListBegin($_etype148, $_size145);
+ for ($_i149 = 0; $_i149 < $_size145; ++$_i149)
+ {
+ $elem150 = null;
+ $xfer += $input->readString($elem150);
+ $this->success []= $elem150;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter151)
+ {
+ $xfer += $output->writeString($iter151);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_table_args {
+ static $_TSPEC;
+
+ public $dbname = null;
+ public $tbl_name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'dbname',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['dbname'])) {
+ $this->dbname = $vals['dbname'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_table_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dbname);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_args');
+ if ($this->dbname !== null) {
+ $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1);
+ $xfer += $output->writeString($this->dbname);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_table_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Table',
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_table_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new metastore_Table();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_NoSuchObjectException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_result');
+ if ($this->success !== null) {
+ if (!is_object($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+ $xfer += $this->success->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_alter_table_args {
+ static $_TSPEC;
+
+ public $dbname = null;
+ public $tbl_name = null;
+ public $new_tbl = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'dbname',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'new_tbl',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Table',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['dbname'])) {
+ $this->dbname = $vals['dbname'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['new_tbl'])) {
+ $this->new_tbl = $vals['new_tbl'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_alter_table_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dbname);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->new_tbl = new metastore_Table();
+ $xfer += $this->new_tbl->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_args');
+ if ($this->dbname !== null) {
+ $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1);
+ $xfer += $output->writeString($this->dbname);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->new_tbl !== null) {
+ if (!is_object($this->new_tbl)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3);
+ $xfer += $this->new_tbl->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_alter_table_result {
+ static $_TSPEC;
+
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidOperationException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_alter_table_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_InvalidOperationException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_MetaException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_result');
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_add_partition_args {
+ static $_TSPEC;
+
+ public $new_part = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'new_part',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Partition',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['new_part'])) {
+ $this->new_part = $vals['new_part'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_add_partition_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->new_part = new metastore_Partition();
+ $xfer += $this->new_part->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_args');
+ if ($this->new_part !== null) {
+ if (!is_object($this->new_part)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1);
+ $xfer += $this->new_part->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_add_partition_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+ public $o3 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Partition',
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidObjectException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_AlreadyExistsException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_add_partition_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new metastore_Partition();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_InvalidObjectException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_AlreadyExistsException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result');
+ if ($this->success !== null) {
+ if (!is_object($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+ $xfer += $this->success->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_append_partition_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $part_vals = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'part_vals',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['part_vals'])) {
+ $this->part_vals = $vals['part_vals'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_append_partition_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::LST) {
+ $this->part_vals = array();
+ $_size152 = 0;
+ $_etype155 = 0;
+ $xfer += $input->readListBegin($_etype155, $_size152);
+ for ($_i156 = 0; $_i156 < $_size152; ++$_i156)
+ {
+ $elem157 = null;
+ $xfer += $input->readString($elem157);
+ $this->part_vals []= $elem157;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->part_vals !== null) {
+ if (!is_array($this->part_vals)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3);
+ {
+ $output->writeListBegin(TType::STRING, count($this->part_vals));
+ {
+ foreach ($this->part_vals as $iter158)
+ {
+ $xfer += $output->writeString($iter158);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_append_partition_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+ public $o3 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Partition',
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidObjectException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_AlreadyExistsException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_append_partition_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new metastore_Partition();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_InvalidObjectException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_AlreadyExistsException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_result');
+ if ($this->success !== null) {
+ if (!is_object($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+ $xfer += $this->success->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_append_partition_by_name_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $part_name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'part_name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['part_name'])) {
+ $this->part_name = $vals['part_name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_append_partition_by_name_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->part_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->part_name !== null) {
+ $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3);
+ $xfer += $output->writeString($this->part_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_append_partition_by_name_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+ public $o3 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Partition',
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidObjectException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_AlreadyExistsException',
+ ),
+ 3 => array(
+ 'var' => 'o3',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ if (isset($vals['o3'])) {
+ $this->o3 = $vals['o3'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_append_partition_by_name_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new metastore_Partition();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_InvalidObjectException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_AlreadyExistsException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->o3 = new metastore_MetaException();
+ $xfer += $this->o3->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_result');
+ if ($this->success !== null) {
+ if (!is_object($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+ $xfer += $this->success->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o3 !== null) {
+ $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+ $xfer += $this->o3->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_partition_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $part_vals = null;
+ public $deleteData = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'part_vals',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 4 => array(
+ 'var' => 'deleteData',
+ 'type' => TType::BOOL,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['part_vals'])) {
+ $this->part_vals = $vals['part_vals'];
+ }
+ if (isset($vals['deleteData'])) {
+ $this->deleteData = $vals['deleteData'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_partition_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::LST) {
+ $this->part_vals = array();
+ $_size159 = 0;
+ $_etype162 = 0;
+ $xfer += $input->readListBegin($_etype162, $_size159);
+ for ($_i163 = 0; $_i163 < $_size159; ++$_i163)
+ {
+ $elem164 = null;
+ $xfer += $input->readString($elem164);
+ $this->part_vals []= $elem164;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->deleteData);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->part_vals !== null) {
+ if (!is_array($this->part_vals)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3);
+ {
+ $output->writeListBegin(TType::STRING, count($this->part_vals));
+ {
+ foreach ($this->part_vals as $iter165)
+ {
+ $xfer += $output->writeString($iter165);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->deleteData !== null) {
+ $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4);
+ $xfer += $output->writeBool($this->deleteData);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_partition_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::BOOL,
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_partition_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_NoSuchObjectException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_MetaException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_partition_by_name_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $part_name = null;
+ public $deleteData = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'part_name',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'deleteData',
+ 'type' => TType::BOOL,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['part_name'])) {
+ $this->part_name = $vals['part_name'];
+ }
+ if (isset($vals['deleteData'])) {
+ $this->deleteData = $vals['deleteData'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_partition_by_name_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->part_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->deleteData);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->part_name !== null) {
+ $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3);
+ $xfer += $output->writeString($this->part_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->deleteData !== null) {
+ $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4);
+ $xfer += $output->writeBool($this->deleteData);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_drop_partition_by_name_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::BOOL,
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_drop_partition_by_name_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_NoSuchObjectException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_MetaException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
+ $xfer += $output->writeBool($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partition_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $part_vals = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'part_vals',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['part_vals'])) {
+ $this->part_vals = $vals['part_vals'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partition_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::LST) {
+ $this->part_vals = array();
+ $_size166 = 0;
+ $_etype169 = 0;
+ $xfer += $input->readListBegin($_etype169, $_size166);
+ for ($_i170 = 0; $_i170 < $_size166; ++$_i170)
+ {
+ $elem171 = null;
+ $xfer += $input->readString($elem171);
+ $this->part_vals []= $elem171;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->part_vals !== null) {
+ if (!is_array($this->part_vals)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3);
+ {
+ $output->writeListBegin(TType::STRING, count($this->part_vals));
+ {
+ foreach ($this->part_vals as $iter172)
+ {
+ $xfer += $output->writeString($iter172);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partition_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Partition',
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partition_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new metastore_Partition();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_NoSuchObjectException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result');
+ if ($this->success !== null) {
+ if (!is_object($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+ $xfer += $this->success->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partition_by_name_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $part_name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'part_name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['part_name'])) {
+ $this->part_name = $vals['part_name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partition_by_name_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->part_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->part_name !== null) {
+ $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3);
+ $xfer += $output->writeString($this->part_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partition_by_name_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Partition',
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partition_by_name_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRUCT) {
+ $this->success = new metastore_Partition();
+ $xfer += $this->success->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_NoSuchObjectException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result');
+ if ($this->success !== null) {
+ if (!is_object($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+ $xfer += $this->success->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partitions_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $max_parts = -1;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'max_parts',
+ 'type' => TType::I16,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['max_parts'])) {
+ $this->max_parts = $vals['max_parts'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partitions_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I16) {
+ $xfer += $input->readI16($this->max_parts);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->max_parts !== null) {
+ $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3);
+ $xfer += $output->writeI16($this->max_parts);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partitions_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Partition',
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_NoSuchObjectException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partitions_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size173 = 0;
+ $_etype176 = 0;
+ $xfer += $input->readListBegin($_etype176, $_size173);
+ for ($_i177 = 0; $_i177 < $_size173; ++$_i177)
+ {
+ $elem178 = null;
+ $elem178 = new metastore_Partition();
+ $xfer += $elem178->read($input);
+ $this->success []= $elem178;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_NoSuchObjectException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_MetaException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->success));
+ {
+ foreach ($this->success as $iter179)
+ {
+ $xfer += $iter179->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partition_names_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $max_parts = -1;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'max_parts',
+ 'type' => TType::I16,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['max_parts'])) {
+ $this->max_parts = $vals['max_parts'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partition_names_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::I16) {
+ $xfer += $input->readI16($this->max_parts);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->max_parts !== null) {
+ $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3);
+ $xfer += $output->writeI16($this->max_parts);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partition_names_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partition_names_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size180 = 0;
+ $_etype183 = 0;
+ $xfer += $input->readListBegin($_etype183, $_size180);
+ for ($_i184 = 0; $_i184 < $_size180; ++$_i184)
+ {
+ $elem185 = null;
+ $xfer += $input->readString($elem185);
+ $this->success []= $elem185;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_MetaException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter186)
+ {
+ $xfer += $output->writeString($iter186);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partitions_ps_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $part_vals = null;
+ public $max_parts = -1;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'part_vals',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 4 => array(
+ 'var' => 'max_parts',
+ 'type' => TType::I16,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['part_vals'])) {
+ $this->part_vals = $vals['part_vals'];
+ }
+ if (isset($vals['max_parts'])) {
+ $this->max_parts = $vals['max_parts'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partitions_ps_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::LST) {
+ $this->part_vals = array();
+ $_size187 = 0;
+ $_etype190 = 0;
+ $xfer += $input->readListBegin($_etype190, $_size187);
+ for ($_i191 = 0; $_i191 < $_size187; ++$_i191)
+ {
+ $elem192 = null;
+ $xfer += $input->readString($elem192);
+ $this->part_vals []= $elem192;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I16) {
+ $xfer += $input->readI16($this->max_parts);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->part_vals !== null) {
+ if (!is_array($this->part_vals)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3);
+ {
+ $output->writeListBegin(TType::STRING, count($this->part_vals));
+ {
+ foreach ($this->part_vals as $iter193)
+ {
+ $xfer += $output->writeString($iter193);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->max_parts !== null) {
+ $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4);
+ $xfer += $output->writeI16($this->max_parts);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partitions_ps_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Partition',
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partitions_ps_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size194 = 0;
+ $_etype197 = 0;
+ $xfer += $input->readListBegin($_etype197, $_size194);
+ for ($_i198 = 0; $_i198 < $_size194; ++$_i198)
+ {
+ $elem199 = null;
+ $elem199 = new metastore_Partition();
+ $xfer += $elem199->read($input);
+ $this->success []= $elem199;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->success));
+ {
+ foreach ($this->success as $iter200)
+ {
+ $xfer += $iter200->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partition_names_ps_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $part_vals = null;
+ public $max_parts = -1;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'part_vals',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 4 => array(
+ 'var' => 'max_parts',
+ 'type' => TType::I16,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['part_vals'])) {
+ $this->part_vals = $vals['part_vals'];
+ }
+ if (isset($vals['max_parts'])) {
+ $this->max_parts = $vals['max_parts'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partition_names_ps_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::LST) {
+ $this->part_vals = array();
+ $_size201 = 0;
+ $_etype204 = 0;
+ $xfer += $input->readListBegin($_etype204, $_size201);
+ for ($_i205 = 0; $_i205 < $_size201; ++$_i205)
+ {
+ $elem206 = null;
+ $xfer += $input->readString($elem206);
+ $this->part_vals []= $elem206;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I16) {
+ $xfer += $input->readI16($this->max_parts);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->part_vals !== null) {
+ if (!is_array($this->part_vals)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3);
+ {
+ $output->writeListBegin(TType::STRING, count($this->part_vals));
+ {
+ foreach ($this->part_vals as $iter207)
+ {
+ $xfer += $output->writeString($iter207);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->max_parts !== null) {
+ $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4);
+ $xfer += $output->writeI16($this->max_parts);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_partition_names_ps_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_partition_names_ps_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size208 = 0;
+ $_etype211 = 0;
+ $xfer += $input->readListBegin($_etype211, $_size208);
+ for ($_i212 = 0; $_i212 < $_size208; ++$_i212)
+ {
+ $elem213 = null;
+ $xfer += $input->readString($elem213);
+ $this->success []= $elem213;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter214)
+ {
+ $xfer += $output->writeString($iter214);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_alter_partition_args {
+ static $_TSPEC;
+
+ public $db_name = null;
+ public $tbl_name = null;
+ public $new_part = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'db_name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'tbl_name',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'new_part',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Partition',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['db_name'])) {
+ $this->db_name = $vals['db_name'];
+ }
+ if (isset($vals['tbl_name'])) {
+ $this->tbl_name = $vals['tbl_name'];
+ }
+ if (isset($vals['new_part'])) {
+ $this->new_part = $vals['new_part'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_alter_partition_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->db_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tbl_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRUCT) {
+ $this->new_part = new metastore_Partition();
+ $xfer += $this->new_part->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_args');
+ if ($this->db_name !== null) {
+ $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->db_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tbl_name !== null) {
+ $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2);
+ $xfer += $output->writeString($this->tbl_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->new_part !== null) {
+ if (!is_object($this->new_part)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3);
+ $xfer += $this->new_part->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_alter_partition_result {
+ static $_TSPEC;
+
+ public $o1 = null;
+ public $o2 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_InvalidOperationException',
+ ),
+ 2 => array(
+ 'var' => 'o2',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ if (isset($vals['o2'])) {
+ $this->o2 = $vals['o2'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_alter_partition_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_InvalidOperationException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRUCT) {
+ $this->o2 = new metastore_MetaException();
+ $xfer += $this->o2->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result');
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o2 !== null) {
+ $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+ $xfer += $this->o2->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_config_value_args {
+ static $_TSPEC;
+
+ public $name = null;
+ public $defaultValue = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'defaultValue',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ if (isset($vals['defaultValue'])) {
+ $this->defaultValue = $vals['defaultValue'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_config_value_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->defaultValue);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_args');
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->defaultValue !== null) {
+ $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2);
+ $xfer += $output->writeString($this->defaultValue);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_get_config_value_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::STRING,
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_ConfigValSecurityException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_get_config_value_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->success);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_ConfigValSecurityException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result');
+ if ($this->success !== null) {
+ $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
+ $xfer += $output->writeString($this->success);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_partition_name_to_vals_args {
+ static $_TSPEC;
+
+ public $part_name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'part_name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['part_name'])) {
+ $this->part_name = $vals['part_name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_partition_name_to_vals_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->part_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_args');
+ if ($this->part_name !== null) {
+ $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->part_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_partition_name_to_vals_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_partition_name_to_vals_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::LST) {
+ $this->success = array();
+ $_size215 = 0;
+ $_etype218 = 0;
+ $xfer += $input->readListBegin($_etype218, $_size215);
+ for ($_i219 = 0; $_i219 < $_size215; ++$_i219)
+ {
+ $elem220 = null;
+ $xfer += $input->readString($elem220);
+ $this->success []= $elem220;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+ {
+ $output->writeListBegin(TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $iter221)
+ {
+ $xfer += $output->writeString($iter221);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_partition_name_to_spec_args {
+ static $_TSPEC;
+
+ public $part_name = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'part_name',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['part_name'])) {
+ $this->part_name = $vals['part_name'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_partition_name_to_spec_args';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->part_name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_args');
+ if ($this->part_name !== null) {
+ $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1);
+ $xfer += $output->writeString($this->part_name);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ThriftHiveMetastore_partition_name_to_spec_result {
+ static $_TSPEC;
+
+ public $success = null;
+ public $o1 = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 0 => array(
+ 'var' => 'success',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 1 => array(
+ 'var' => 'o1',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_MetaException',
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['success'])) {
+ $this->success = $vals['success'];
+ }
+ if (isset($vals['o1'])) {
+ $this->o1 = $vals['o1'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ThriftHiveMetastore_partition_name_to_spec_result';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 0:
+ if ($ftype == TType::MAP) {
+ $this->success = array();
+ $_size222 = 0;
+ $_ktype223 = 0;
+ $_vtype224 = 0;
+ $xfer += $input->readMapBegin($_ktype223, $_vtype224, $_size222);
+ for ($_i226 = 0; $_i226 < $_size222; ++$_i226)
+ {
+ $key227 = '';
+ $val228 = '';
+ $xfer += $input->readString($key227);
+ $xfer += $input->readString($val228);
+ $this->success[$key227] = $val228;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 1:
+ if ($ftype == TType::STRUCT) {
+ $this->o1 = new metastore_MetaException();
+ $xfer += $this->o1->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result');
+ if ($this->success !== null) {
+ if (!is_array($this->success)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('success', TType::MAP, 0);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success));
+ {
+ foreach ($this->success as $kiter229 => $viter230)
+ {
+ $xfer += $output->writeString($kiter229);
+ $xfer += $output->writeString($viter230);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->o1 !== null) {
+ $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+ $xfer += $this->o1->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+?>
diff --git metastore/src/gen-php/hive_metastore/hive_metastore_constants.php metastore/src/gen-php/hive_metastore/hive_metastore_constants.php
new file mode 100644
index 0000000..5daa79a
--- /dev/null
+++ metastore/src/gen-php/hive_metastore/hive_metastore_constants.php
@@ -0,0 +1,43 @@
+
diff --git metastore/src/gen-php/hive_metastore/hive_metastore_types.php metastore/src/gen-php/hive_metastore/hive_metastore_types.php
new file mode 100644
index 0000000..eb1a6ef
--- /dev/null
+++ metastore/src/gen-php/hive_metastore/hive_metastore_types.php
@@ -0,0 +1,2714 @@
+ array(
+ 'var' => 'version',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'comments',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['version'])) {
+ $this->version = $vals['version'];
+ }
+ if (isset($vals['comments'])) {
+ $this->comments = $vals['comments'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Version';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->version);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->comments);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Version');
+ if ($this->version !== null) {
+ $xfer += $output->writeFieldBegin('version', TType::STRING, 1);
+ $xfer += $output->writeString($this->version);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->comments !== null) {
+ $xfer += $output->writeFieldBegin('comments', TType::STRING, 2);
+ $xfer += $output->writeString($this->comments);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_FieldSchema {
+ static $_TSPEC;
+
+ public $name = null;
+ public $type = null;
+ public $comment = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'type',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'comment',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ if (isset($vals['type'])) {
+ $this->type = $vals['type'];
+ }
+ if (isset($vals['comment'])) {
+ $this->comment = $vals['comment'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'FieldSchema';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->type);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->comment);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('FieldSchema');
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->type !== null) {
+ $xfer += $output->writeFieldBegin('type', TType::STRING, 2);
+ $xfer += $output->writeString($this->type);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->comment !== null) {
+ $xfer += $output->writeFieldBegin('comment', TType::STRING, 3);
+ $xfer += $output->writeString($this->comment);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_Type {
+ static $_TSPEC;
+
+ public $name = null;
+ public $type1 = null;
+ public $type2 = null;
+ public $fields = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'type1',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'type2',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'fields',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_FieldSchema',
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ if (isset($vals['type1'])) {
+ $this->type1 = $vals['type1'];
+ }
+ if (isset($vals['type2'])) {
+ $this->type2 = $vals['type2'];
+ }
+ if (isset($vals['fields'])) {
+ $this->fields = $vals['fields'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Type';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->type1);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->type2);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::LST) {
+ $this->fields = array();
+ $_size0 = 0;
+ $_etype3 = 0;
+ $xfer += $input->readListBegin($_etype3, $_size0);
+ for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+ {
+ $elem5 = null;
+ $elem5 = new metastore_FieldSchema();
+ $xfer += $elem5->read($input);
+ $this->fields []= $elem5;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Type');
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->type1 !== null) {
+ $xfer += $output->writeFieldBegin('type1', TType::STRING, 2);
+ $xfer += $output->writeString($this->type1);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->type2 !== null) {
+ $xfer += $output->writeFieldBegin('type2', TType::STRING, 3);
+ $xfer += $output->writeString($this->type2);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->fields !== null) {
+ if (!is_array($this->fields)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('fields', TType::LST, 4);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->fields));
+ {
+ foreach ($this->fields as $iter6)
+ {
+ $xfer += $iter6->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_Database {
+ static $_TSPEC;
+
+ public $name = null;
+ public $description = null;
+ public $locationUri = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'description',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'locationUri',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ if (isset($vals['description'])) {
+ $this->description = $vals['description'];
+ }
+ if (isset($vals['locationUri'])) {
+ $this->locationUri = $vals['locationUri'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Database';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->description);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->locationUri);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Database');
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->description !== null) {
+ $xfer += $output->writeFieldBegin('description', TType::STRING, 2);
+ $xfer += $output->writeString($this->description);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->locationUri !== null) {
+ $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3);
+ $xfer += $output->writeString($this->locationUri);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_SerDeInfo {
+ static $_TSPEC;
+
+ public $name = null;
+ public $serializationLib = null;
+ public $parameters = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'name',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'serializationLib',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'parameters',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['name'])) {
+ $this->name = $vals['name'];
+ }
+ if (isset($vals['serializationLib'])) {
+ $this->serializationLib = $vals['serializationLib'];
+ }
+ if (isset($vals['parameters'])) {
+ $this->parameters = $vals['parameters'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'SerDeInfo';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->name);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->serializationLib);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::MAP) {
+ $this->parameters = array();
+ $_size7 = 0;
+ $_ktype8 = 0;
+ $_vtype9 = 0;
+ $xfer += $input->readMapBegin($_ktype8, $_vtype9, $_size7);
+ for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+ {
+ $key12 = '';
+ $val13 = '';
+ $xfer += $input->readString($key12);
+ $xfer += $input->readString($val13);
+ $this->parameters[$key12] = $val13;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('SerDeInfo');
+ if ($this->name !== null) {
+ $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+ $xfer += $output->writeString($this->name);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->serializationLib !== null) {
+ $xfer += $output->writeFieldBegin('serializationLib', TType::STRING, 2);
+ $xfer += $output->writeString($this->serializationLib);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->parameters !== null) {
+ if (!is_array($this->parameters)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('parameters', TType::MAP, 3);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
+ {
+ foreach ($this->parameters as $kiter14 => $viter15)
+ {
+ $xfer += $output->writeString($kiter14);
+ $xfer += $output->writeString($viter15);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_Order {
+ static $_TSPEC;
+
+ public $col = null;
+ public $order = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'col',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'order',
+ 'type' => TType::I32,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['col'])) {
+ $this->col = $vals['col'];
+ }
+ if (isset($vals['order'])) {
+ $this->order = $vals['order'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Order';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->col);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->order);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Order');
+ if ($this->col !== null) {
+ $xfer += $output->writeFieldBegin('col', TType::STRING, 1);
+ $xfer += $output->writeString($this->col);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->order !== null) {
+ $xfer += $output->writeFieldBegin('order', TType::I32, 2);
+ $xfer += $output->writeI32($this->order);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_StorageDescriptor {
+ static $_TSPEC;
+
+ public $cols = null;
+ public $location = null;
+ public $inputFormat = null;
+ public $outputFormat = null;
+ public $compressed = null;
+ public $numBuckets = null;
+ public $serdeInfo = null;
+ public $bucketCols = null;
+ public $sortCols = null;
+ public $parameters = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'cols',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_FieldSchema',
+ ),
+ ),
+ 2 => array(
+ 'var' => 'location',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'inputFormat',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'outputFormat',
+ 'type' => TType::STRING,
+ ),
+ 5 => array(
+ 'var' => 'compressed',
+ 'type' => TType::BOOL,
+ ),
+ 6 => array(
+ 'var' => 'numBuckets',
+ 'type' => TType::I32,
+ ),
+ 7 => array(
+ 'var' => 'serdeInfo',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_SerDeInfo',
+ ),
+ 8 => array(
+ 'var' => 'bucketCols',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 9 => array(
+ 'var' => 'sortCols',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_Order',
+ ),
+ ),
+ 10 => array(
+ 'var' => 'parameters',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['cols'])) {
+ $this->cols = $vals['cols'];
+ }
+ if (isset($vals['location'])) {
+ $this->location = $vals['location'];
+ }
+ if (isset($vals['inputFormat'])) {
+ $this->inputFormat = $vals['inputFormat'];
+ }
+ if (isset($vals['outputFormat'])) {
+ $this->outputFormat = $vals['outputFormat'];
+ }
+ if (isset($vals['compressed'])) {
+ $this->compressed = $vals['compressed'];
+ }
+ if (isset($vals['numBuckets'])) {
+ $this->numBuckets = $vals['numBuckets'];
+ }
+ if (isset($vals['serdeInfo'])) {
+ $this->serdeInfo = $vals['serdeInfo'];
+ }
+ if (isset($vals['bucketCols'])) {
+ $this->bucketCols = $vals['bucketCols'];
+ }
+ if (isset($vals['sortCols'])) {
+ $this->sortCols = $vals['sortCols'];
+ }
+ if (isset($vals['parameters'])) {
+ $this->parameters = $vals['parameters'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'StorageDescriptor';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::LST) {
+ $this->cols = array();
+ $_size16 = 0;
+ $_etype19 = 0;
+ $xfer += $input->readListBegin($_etype19, $_size16);
+ for ($_i20 = 0; $_i20 < $_size16; ++$_i20)
+ {
+ $elem21 = null;
+ $elem21 = new metastore_FieldSchema();
+ $xfer += $elem21->read($input);
+ $this->cols []= $elem21;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->location);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->inputFormat);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->outputFormat);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::BOOL) {
+ $xfer += $input->readBool($this->compressed);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->numBuckets);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::STRUCT) {
+ $this->serdeInfo = new metastore_SerDeInfo();
+ $xfer += $this->serdeInfo->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::LST) {
+ $this->bucketCols = array();
+ $_size22 = 0;
+ $_etype25 = 0;
+ $xfer += $input->readListBegin($_etype25, $_size22);
+ for ($_i26 = 0; $_i26 < $_size22; ++$_i26)
+ {
+ $elem27 = null;
+ $xfer += $input->readString($elem27);
+ $this->bucketCols []= $elem27;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 9:
+ if ($ftype == TType::LST) {
+ $this->sortCols = array();
+ $_size28 = 0;
+ $_etype31 = 0;
+ $xfer += $input->readListBegin($_etype31, $_size28);
+ for ($_i32 = 0; $_i32 < $_size28; ++$_i32)
+ {
+ $elem33 = null;
+ $elem33 = new metastore_Order();
+ $xfer += $elem33->read($input);
+ $this->sortCols []= $elem33;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::MAP) {
+ $this->parameters = array();
+ $_size34 = 0;
+ $_ktype35 = 0;
+ $_vtype36 = 0;
+ $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34);
+ for ($_i38 = 0; $_i38 < $_size34; ++$_i38)
+ {
+ $key39 = '';
+ $val40 = '';
+ $xfer += $input->readString($key39);
+ $xfer += $input->readString($val40);
+ $this->parameters[$key39] = $val40;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('StorageDescriptor');
+ if ($this->cols !== null) {
+ if (!is_array($this->cols)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('cols', TType::LST, 1);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->cols));
+ {
+ foreach ($this->cols as $iter41)
+ {
+ $xfer += $iter41->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->location !== null) {
+ $xfer += $output->writeFieldBegin('location', TType::STRING, 2);
+ $xfer += $output->writeString($this->location);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->inputFormat !== null) {
+ $xfer += $output->writeFieldBegin('inputFormat', TType::STRING, 3);
+ $xfer += $output->writeString($this->inputFormat);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->outputFormat !== null) {
+ $xfer += $output->writeFieldBegin('outputFormat', TType::STRING, 4);
+ $xfer += $output->writeString($this->outputFormat);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->compressed !== null) {
+ $xfer += $output->writeFieldBegin('compressed', TType::BOOL, 5);
+ $xfer += $output->writeBool($this->compressed);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->numBuckets !== null) {
+ $xfer += $output->writeFieldBegin('numBuckets', TType::I32, 6);
+ $xfer += $output->writeI32($this->numBuckets);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->serdeInfo !== null) {
+ if (!is_object($this->serdeInfo)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('serdeInfo', TType::STRUCT, 7);
+ $xfer += $this->serdeInfo->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->bucketCols !== null) {
+ if (!is_array($this->bucketCols)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('bucketCols', TType::LST, 8);
+ {
+ $output->writeListBegin(TType::STRING, count($this->bucketCols));
+ {
+ foreach ($this->bucketCols as $iter42)
+ {
+ $xfer += $output->writeString($iter42);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->sortCols !== null) {
+ if (!is_array($this->sortCols)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('sortCols', TType::LST, 9);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->sortCols));
+ {
+ foreach ($this->sortCols as $iter43)
+ {
+ $xfer += $iter43->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->parameters !== null) {
+ if (!is_array($this->parameters)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('parameters', TType::MAP, 10);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
+ {
+ foreach ($this->parameters as $kiter44 => $viter45)
+ {
+ $xfer += $output->writeString($kiter44);
+ $xfer += $output->writeString($viter45);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_Table {
+ static $_TSPEC;
+
+ public $tableName = null;
+ public $dbName = null;
+ public $owner = null;
+ public $createTime = null;
+ public $lastAccessTime = null;
+ public $retention = null;
+ public $sd = null;
+ public $partitionKeys = null;
+ public $parameters = null;
+ public $viewOriginalText = null;
+ public $viewExpandedText = null;
+ public $tableType = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'tableName',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'dbName',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'owner',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'createTime',
+ 'type' => TType::I32,
+ ),
+ 5 => array(
+ 'var' => 'lastAccessTime',
+ 'type' => TType::I32,
+ ),
+ 6 => array(
+ 'var' => 'retention',
+ 'type' => TType::I32,
+ ),
+ 7 => array(
+ 'var' => 'sd',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_StorageDescriptor',
+ ),
+ 8 => array(
+ 'var' => 'partitionKeys',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_FieldSchema',
+ ),
+ ),
+ 9 => array(
+ 'var' => 'parameters',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 10 => array(
+ 'var' => 'viewOriginalText',
+ 'type' => TType::STRING,
+ ),
+ 11 => array(
+ 'var' => 'viewExpandedText',
+ 'type' => TType::STRING,
+ ),
+ 12 => array(
+ 'var' => 'tableType',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['tableName'])) {
+ $this->tableName = $vals['tableName'];
+ }
+ if (isset($vals['dbName'])) {
+ $this->dbName = $vals['dbName'];
+ }
+ if (isset($vals['owner'])) {
+ $this->owner = $vals['owner'];
+ }
+ if (isset($vals['createTime'])) {
+ $this->createTime = $vals['createTime'];
+ }
+ if (isset($vals['lastAccessTime'])) {
+ $this->lastAccessTime = $vals['lastAccessTime'];
+ }
+ if (isset($vals['retention'])) {
+ $this->retention = $vals['retention'];
+ }
+ if (isset($vals['sd'])) {
+ $this->sd = $vals['sd'];
+ }
+ if (isset($vals['partitionKeys'])) {
+ $this->partitionKeys = $vals['partitionKeys'];
+ }
+ if (isset($vals['parameters'])) {
+ $this->parameters = $vals['parameters'];
+ }
+ if (isset($vals['viewOriginalText'])) {
+ $this->viewOriginalText = $vals['viewOriginalText'];
+ }
+ if (isset($vals['viewExpandedText'])) {
+ $this->viewExpandedText = $vals['viewExpandedText'];
+ }
+ if (isset($vals['tableType'])) {
+ $this->tableType = $vals['tableType'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Table';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tableName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dbName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->owner);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->createTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->lastAccessTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->retention);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::STRUCT) {
+ $this->sd = new metastore_StorageDescriptor();
+ $xfer += $this->sd->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 8:
+ if ($ftype == TType::LST) {
+ $this->partitionKeys = array();
+ $_size46 = 0;
+ $_etype49 = 0;
+ $xfer += $input->readListBegin($_etype49, $_size46);
+ for ($_i50 = 0; $_i50 < $_size46; ++$_i50)
+ {
+ $elem51 = null;
+ $elem51 = new metastore_FieldSchema();
+ $xfer += $elem51->read($input);
+ $this->partitionKeys []= $elem51;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 9:
+ if ($ftype == TType::MAP) {
+ $this->parameters = array();
+ $_size52 = 0;
+ $_ktype53 = 0;
+ $_vtype54 = 0;
+ $xfer += $input->readMapBegin($_ktype53, $_vtype54, $_size52);
+ for ($_i56 = 0; $_i56 < $_size52; ++$_i56)
+ {
+ $key57 = '';
+ $val58 = '';
+ $xfer += $input->readString($key57);
+ $xfer += $input->readString($val58);
+ $this->parameters[$key57] = $val58;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 10:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->viewOriginalText);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 11:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->viewExpandedText);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 12:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tableType);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Table');
+ if ($this->tableName !== null) {
+ $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1);
+ $xfer += $output->writeString($this->tableName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->dbName !== null) {
+ $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2);
+ $xfer += $output->writeString($this->dbName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->owner !== null) {
+ $xfer += $output->writeFieldBegin('owner', TType::STRING, 3);
+ $xfer += $output->writeString($this->owner);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->createTime !== null) {
+ $xfer += $output->writeFieldBegin('createTime', TType::I32, 4);
+ $xfer += $output->writeI32($this->createTime);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->lastAccessTime !== null) {
+ $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5);
+ $xfer += $output->writeI32($this->lastAccessTime);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->retention !== null) {
+ $xfer += $output->writeFieldBegin('retention', TType::I32, 6);
+ $xfer += $output->writeI32($this->retention);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->sd !== null) {
+ if (!is_object($this->sd)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 7);
+ $xfer += $this->sd->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->partitionKeys !== null) {
+ if (!is_array($this->partitionKeys)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('partitionKeys', TType::LST, 8);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->partitionKeys));
+ {
+ foreach ($this->partitionKeys as $iter59)
+ {
+ $xfer += $iter59->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->parameters !== null) {
+ if (!is_array($this->parameters)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
+ {
+ foreach ($this->parameters as $kiter60 => $viter61)
+ {
+ $xfer += $output->writeString($kiter60);
+ $xfer += $output->writeString($viter61);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->viewOriginalText !== null) {
+ $xfer += $output->writeFieldBegin('viewOriginalText', TType::STRING, 10);
+ $xfer += $output->writeString($this->viewOriginalText);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->viewExpandedText !== null) {
+ $xfer += $output->writeFieldBegin('viewExpandedText', TType::STRING, 11);
+ $xfer += $output->writeString($this->viewExpandedText);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tableType !== null) {
+ $xfer += $output->writeFieldBegin('tableType', TType::STRING, 12);
+ $xfer += $output->writeString($this->tableType);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_Partition {
+ static $_TSPEC;
+
+ public $values = null;
+ public $dbName = null;
+ public $tableName = null;
+ public $createTime = null;
+ public $lastAccessTime = null;
+ public $sd = null;
+ public $parameters = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'values',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 2 => array(
+ 'var' => 'dbName',
+ 'type' => TType::STRING,
+ ),
+ 3 => array(
+ 'var' => 'tableName',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'createTime',
+ 'type' => TType::I32,
+ ),
+ 5 => array(
+ 'var' => 'lastAccessTime',
+ 'type' => TType::I32,
+ ),
+ 6 => array(
+ 'var' => 'sd',
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_StorageDescriptor',
+ ),
+ 7 => array(
+ 'var' => 'parameters',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['values'])) {
+ $this->values = $vals['values'];
+ }
+ if (isset($vals['dbName'])) {
+ $this->dbName = $vals['dbName'];
+ }
+ if (isset($vals['tableName'])) {
+ $this->tableName = $vals['tableName'];
+ }
+ if (isset($vals['createTime'])) {
+ $this->createTime = $vals['createTime'];
+ }
+ if (isset($vals['lastAccessTime'])) {
+ $this->lastAccessTime = $vals['lastAccessTime'];
+ }
+ if (isset($vals['sd'])) {
+ $this->sd = $vals['sd'];
+ }
+ if (isset($vals['parameters'])) {
+ $this->parameters = $vals['parameters'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Partition';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::LST) {
+ $this->values = array();
+ $_size62 = 0;
+ $_etype65 = 0;
+ $xfer += $input->readListBegin($_etype65, $_size62);
+ for ($_i66 = 0; $_i66 < $_size62; ++$_i66)
+ {
+ $elem67 = null;
+ $xfer += $input->readString($elem67);
+ $this->values []= $elem67;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dbName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tableName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->createTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->lastAccessTime);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::STRUCT) {
+ $this->sd = new metastore_StorageDescriptor();
+ $xfer += $this->sd->read($input);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 7:
+ if ($ftype == TType::MAP) {
+ $this->parameters = array();
+ $_size68 = 0;
+ $_ktype69 = 0;
+ $_vtype70 = 0;
+ $xfer += $input->readMapBegin($_ktype69, $_vtype70, $_size68);
+ for ($_i72 = 0; $_i72 < $_size68; ++$_i72)
+ {
+ $key73 = '';
+ $val74 = '';
+ $xfer += $input->readString($key73);
+ $xfer += $input->readString($val74);
+ $this->parameters[$key73] = $val74;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Partition');
+ if ($this->values !== null) {
+ if (!is_array($this->values)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('values', TType::LST, 1);
+ {
+ $output->writeListBegin(TType::STRING, count($this->values));
+ {
+ foreach ($this->values as $iter75)
+ {
+ $xfer += $output->writeString($iter75);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->dbName !== null) {
+ $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2);
+ $xfer += $output->writeString($this->dbName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tableName !== null) {
+ $xfer += $output->writeFieldBegin('tableName', TType::STRING, 3);
+ $xfer += $output->writeString($this->tableName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->createTime !== null) {
+ $xfer += $output->writeFieldBegin('createTime', TType::I32, 4);
+ $xfer += $output->writeI32($this->createTime);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->lastAccessTime !== null) {
+ $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5);
+ $xfer += $output->writeI32($this->lastAccessTime);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->sd !== null) {
+ if (!is_object($this->sd)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 6);
+ $xfer += $this->sd->write($output);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->parameters !== null) {
+ if (!is_array($this->parameters)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('parameters', TType::MAP, 7);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
+ {
+ foreach ($this->parameters as $kiter76 => $viter77)
+ {
+ $xfer += $output->writeString($kiter76);
+ $xfer += $output->writeString($viter77);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_Index {
+ static $_TSPEC;
+
+ public $indexName = null;
+ public $indexType = null;
+ public $tableName = null;
+ public $dbName = null;
+ public $colNames = null;
+ public $partName = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'indexName',
+ 'type' => TType::STRING,
+ ),
+ 2 => array(
+ 'var' => 'indexType',
+ 'type' => TType::I32,
+ ),
+ 3 => array(
+ 'var' => 'tableName',
+ 'type' => TType::STRING,
+ ),
+ 4 => array(
+ 'var' => 'dbName',
+ 'type' => TType::STRING,
+ ),
+ 5 => array(
+ 'var' => 'colNames',
+ 'type' => TType::LST,
+ 'etype' => TType::STRING,
+ 'elem' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ 6 => array(
+ 'var' => 'partName',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['indexName'])) {
+ $this->indexName = $vals['indexName'];
+ }
+ if (isset($vals['indexType'])) {
+ $this->indexType = $vals['indexType'];
+ }
+ if (isset($vals['tableName'])) {
+ $this->tableName = $vals['tableName'];
+ }
+ if (isset($vals['dbName'])) {
+ $this->dbName = $vals['dbName'];
+ }
+ if (isset($vals['colNames'])) {
+ $this->colNames = $vals['colNames'];
+ }
+ if (isset($vals['partName'])) {
+ $this->partName = $vals['partName'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Index';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->indexName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::I32) {
+ $xfer += $input->readI32($this->indexType);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->tableName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 4:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->dbName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 5:
+ if ($ftype == TType::LST) {
+ $this->colNames = array();
+ $_size78 = 0;
+ $_etype81 = 0;
+ $xfer += $input->readListBegin($_etype81, $_size78);
+ for ($_i82 = 0; $_i82 < $_size78; ++$_i82)
+ {
+ $elem83 = null;
+ $xfer += $input->readString($elem83);
+ $this->colNames []= $elem83;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 6:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->partName);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Index');
+ if ($this->indexName !== null) {
+ $xfer += $output->writeFieldBegin('indexName', TType::STRING, 1);
+ $xfer += $output->writeString($this->indexName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->indexType !== null) {
+ $xfer += $output->writeFieldBegin('indexType', TType::I32, 2);
+ $xfer += $output->writeI32($this->indexType);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->tableName !== null) {
+ $xfer += $output->writeFieldBegin('tableName', TType::STRING, 3);
+ $xfer += $output->writeString($this->tableName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->dbName !== null) {
+ $xfer += $output->writeFieldBegin('dbName', TType::STRING, 4);
+ $xfer += $output->writeString($this->dbName);
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->colNames !== null) {
+ if (!is_array($this->colNames)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('colNames', TType::LST, 5);
+ {
+ $output->writeListBegin(TType::STRING, count($this->colNames));
+ {
+ foreach ($this->colNames as $iter84)
+ {
+ $xfer += $output->writeString($iter84);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->partName !== null) {
+ $xfer += $output->writeFieldBegin('partName', TType::STRING, 6);
+ $xfer += $output->writeString($this->partName);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_Schema {
+ static $_TSPEC;
+
+ public $fieldSchemas = null;
+ public $properties = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'fieldSchemas',
+ 'type' => TType::LST,
+ 'etype' => TType::STRUCT,
+ 'elem' => array(
+ 'type' => TType::STRUCT,
+ 'class' => 'metastore_FieldSchema',
+ ),
+ ),
+ 2 => array(
+ 'var' => 'properties',
+ 'type' => TType::MAP,
+ 'ktype' => TType::STRING,
+ 'vtype' => TType::STRING,
+ 'key' => array(
+ 'type' => TType::STRING,
+ ),
+ 'val' => array(
+ 'type' => TType::STRING,
+ ),
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['fieldSchemas'])) {
+ $this->fieldSchemas = $vals['fieldSchemas'];
+ }
+ if (isset($vals['properties'])) {
+ $this->properties = $vals['properties'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'Schema';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::LST) {
+ $this->fieldSchemas = array();
+ $_size85 = 0;
+ $_etype88 = 0;
+ $xfer += $input->readListBegin($_etype88, $_size85);
+ for ($_i89 = 0; $_i89 < $_size85; ++$_i89)
+ {
+ $elem90 = null;
+ $elem90 = new metastore_FieldSchema();
+ $xfer += $elem90->read($input);
+ $this->fieldSchemas []= $elem90;
+ }
+ $xfer += $input->readListEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ case 2:
+ if ($ftype == TType::MAP) {
+ $this->properties = array();
+ $_size91 = 0;
+ $_ktype92 = 0;
+ $_vtype93 = 0;
+ $xfer += $input->readMapBegin($_ktype92, $_vtype93, $_size91);
+ for ($_i95 = 0; $_i95 < $_size91; ++$_i95)
+ {
+ $key96 = '';
+ $val97 = '';
+ $xfer += $input->readString($key96);
+ $xfer += $input->readString($val97);
+ $this->properties[$key96] = $val97;
+ }
+ $xfer += $input->readMapEnd();
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('Schema');
+ if ($this->fieldSchemas !== null) {
+ if (!is_array($this->fieldSchemas)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('fieldSchemas', TType::LST, 1);
+ {
+ $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas));
+ {
+ foreach ($this->fieldSchemas as $iter98)
+ {
+ $xfer += $iter98->write($output);
+ }
+ }
+ $output->writeListEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ if ($this->properties !== null) {
+ if (!is_array($this->properties)) {
+ throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+ }
+ $xfer += $output->writeFieldBegin('properties', TType::MAP, 2);
+ {
+ $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties));
+ {
+ foreach ($this->properties as $kiter99 => $viter100)
+ {
+ $xfer += $output->writeString($kiter99);
+ $xfer += $output->writeString($viter100);
+ }
+ }
+ $output->writeMapEnd();
+ }
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_MetaException extends TException {
+ static $_TSPEC;
+
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'MetaException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('MetaException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_UnknownTableException extends TException {
+ static $_TSPEC;
+
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UnknownTableException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('UnknownTableException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_UnknownDBException extends TException {
+ static $_TSPEC;
+
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'UnknownDBException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('UnknownDBException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_AlreadyExistsException extends TException {
+ static $_TSPEC;
+
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'AlreadyExistsException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('AlreadyExistsException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_InvalidObjectException extends TException {
+ static $_TSPEC;
+
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'InvalidObjectException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('InvalidObjectException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_NoSuchObjectException extends TException {
+ static $_TSPEC;
+
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'NoSuchObjectException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('NoSuchObjectException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_IndexAlreadyExistsException extends TException {
+ static $_TSPEC;
+
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'IndexAlreadyExistsException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('IndexAlreadyExistsException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_InvalidOperationException extends TException {
+ static $_TSPEC;
+
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'InvalidOperationException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('InvalidOperationException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+class metastore_ConfigValSecurityException extends TException {
+ static $_TSPEC;
+
+ public $message = null;
+
+ public function __construct($vals=null) {
+ if (!isset(self::$_TSPEC)) {
+ self::$_TSPEC = array(
+ 1 => array(
+ 'var' => 'message',
+ 'type' => TType::STRING,
+ ),
+ );
+ }
+ if (is_array($vals)) {
+ if (isset($vals['message'])) {
+ $this->message = $vals['message'];
+ }
+ }
+ }
+
+ public function getName() {
+ return 'ConfigValSecurityException';
+ }
+
+ public function read($input)
+ {
+ $xfer = 0;
+ $fname = null;
+ $ftype = 0;
+ $fid = 0;
+ $xfer += $input->readStructBegin($fname);
+ while (true)
+ {
+ $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+ if ($ftype == TType::STOP) {
+ break;
+ }
+ switch ($fid)
+ {
+ case 1:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->message);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
+ default:
+ $xfer += $input->skip($ftype);
+ break;
+ }
+ $xfer += $input->readFieldEnd();
+ }
+ $xfer += $input->readStructEnd();
+ return $xfer;
+ }
+
+ public function write($output) {
+ $xfer = 0;
+ $xfer += $output->writeStructBegin('ConfigValSecurityException');
+ if ($this->message !== null) {
+ $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
+ $xfer += $output->writeString($this->message);
+ $xfer += $output->writeFieldEnd();
+ }
+ $xfer += $output->writeFieldStop();
+ $xfer += $output->writeStructEnd();
+ return $xfer;
+ }
+
+}
+
+?>
diff --git metastore/src/gen-php/hive_metastore_types.php metastore/src/gen-php/hive_metastore_types.php
index 181b92f..eb1a6ef 100644
--- metastore/src/gen-php/hive_metastore_types.php
+++ metastore/src/gen-php/hive_metastore_types.php
@@ -377,6 +377,7 @@ class metastore_Database {
public $name = null;
public $description = null;
+ public $locationUri = null;
public function __construct($vals=null) {
if (!isset(self::$_TSPEC)) {
@@ -389,6 +390,10 @@ class metastore_Database {
'var' => 'description',
'type' => TType::STRING,
),
+ 3 => array(
+ 'var' => 'locationUri',
+ 'type' => TType::STRING,
+ ),
);
}
if (is_array($vals)) {
@@ -398,6 +403,9 @@ class metastore_Database {
if (isset($vals['description'])) {
$this->description = $vals['description'];
}
+ if (isset($vals['locationUri'])) {
+ $this->locationUri = $vals['locationUri'];
+ }
}
}
@@ -434,6 +442,13 @@ class metastore_Database {
$xfer += $input->skip($ftype);
}
break;
+ case 3:
+ if ($ftype == TType::STRING) {
+ $xfer += $input->readString($this->locationUri);
+ } else {
+ $xfer += $input->skip($ftype);
+ }
+ break;
default:
$xfer += $input->skip($ftype);
break;
@@ -457,6 +472,11 @@ class metastore_Database {
$xfer += $output->writeString($this->description);
$xfer += $output->writeFieldEnd();
}
+ if ($this->locationUri !== null) {
+ $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3);
+ $xfer += $output->writeString($this->locationUri);
+ $xfer += $output->writeFieldEnd();
+ }
$xfer += $output->writeFieldStop();
$xfer += $output->writeStructEnd();
return $xfer;
diff --git metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote
old mode 100644
new mode 100755
index 6a9e81c..a1c42a4
--- metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote
+++ metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote
@@ -21,10 +21,11 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
print ''
print 'Functions:'
- print ' bool create_database(string name, string description)'
+ print ' void create_database(Database database)'
print ' Database get_database(string name)'
- print ' bool drop_database(string name)'
- print ' get_databases()'
+ print ' void drop_database(string name, bool deleteData)'
+ print ' get_databases(string pattern)'
+ print ' get_all_databases()'
print ' Type get_type(string name)'
print ' bool create_type(Type type)'
print ' bool drop_type(string type)'
@@ -34,6 +35,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print ' void create_table(Table tbl)'
print ' void drop_table(string dbname, string name, bool deleteData)'
print ' get_tables(string db_name, string pattern)'
+ print ' get_all_tables(string db_name)'
print ' Table get_table(string dbname, string tbl_name)'
print ' void alter_table(string dbname, string tbl_name, Table new_tbl)'
print ' Partition add_partition(Partition new_part)'
@@ -100,10 +102,10 @@ client = ThriftHiveMetastore.Client(protocol)
transport.open()
if cmd == 'create_database':
- if len(args) != 2:
- print 'create_database requires 2 args'
+ if len(args) != 1:
+ print 'create_database requires 1 args'
sys.exit(1)
- pp.pprint(client.create_database(args[0],args[1],))
+ pp.pprint(client.create_database(eval(args[0]),))
elif cmd == 'get_database':
if len(args) != 1:
@@ -112,16 +114,22 @@ elif cmd == 'get_database':
pp.pprint(client.get_database(args[0],))
elif cmd == 'drop_database':
- if len(args) != 1:
- print 'drop_database requires 1 args'
+ if len(args) != 2:
+ print 'drop_database requires 2 args'
sys.exit(1)
- pp.pprint(client.drop_database(args[0],))
+ pp.pprint(client.drop_database(args[0],eval(args[1]),))
elif cmd == 'get_databases':
+ if len(args) != 1:
+ print 'get_databases requires 1 args'
+ sys.exit(1)
+ pp.pprint(client.get_databases(args[0],))
+
+elif cmd == 'get_all_databases':
if len(args) != 0:
- print 'get_databases requires 0 args'
+ print 'get_all_databases requires 0 args'
sys.exit(1)
- pp.pprint(client.get_databases())
+ pp.pprint(client.get_all_databases())
elif cmd == 'get_type':
if len(args) != 1:
@@ -177,6 +185,12 @@ elif cmd == 'get_tables':
sys.exit(1)
pp.pprint(client.get_tables(args[0],args[1],))
+elif cmd == 'get_all_tables':
+ if len(args) != 1:
+ print 'get_all_tables requires 1 args'
+ sys.exit(1)
+ pp.pprint(client.get_all_tables(args[0],))
+
elif cmd == 'get_table':
if len(args) != 2:
print 'get_table requires 2 args'
diff --git metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py
index 12461a4..5e5ed14 100644
--- metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py
+++ metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py
@@ -20,11 +20,10 @@ class Iface(fb303.FacebookService.Iface):
"""
This interface is live.
"""
- def create_database(self, name, description):
+ def create_database(self, database):
"""
Parameters:
- - name
- - description
+ - database
"""
pass
@@ -35,14 +34,22 @@ class Iface(fb303.FacebookService.Iface):
"""
pass
- def drop_database(self, name):
+ def drop_database(self, name, deleteData):
"""
Parameters:
- name
+ - deleteData
"""
pass
- def get_databases(self, ):
+ def get_databases(self, pattern):
+ """
+ Parameters:
+ - pattern
+ """
+ pass
+
+ def get_all_databases(self, ):
pass
def get_type(self, name):
@@ -113,6 +120,13 @@ class Iface(fb303.FacebookService.Iface):
"""
pass
+ def get_all_tables(self, db_name):
+ """
+ Parameters:
+ - db_name
+ """
+ pass
+
def get_table(self, dbname, tbl_name):
"""
Parameters:
@@ -270,20 +284,18 @@ class Client(fb303.FacebookService.Client, Iface):
def __init__(self, iprot, oprot=None):
fb303.FacebookService.Client.__init__(self, iprot, oprot)
- def create_database(self, name, description):
+ def create_database(self, database):
"""
Parameters:
- - name
- - description
+ - database
"""
- self.send_create_database(name, description)
- return self.recv_create_database()
+ self.send_create_database(database)
+ self.recv_create_database()
- def send_create_database(self, name, description):
+ def send_create_database(self, database):
self._oprot.writeMessageBegin('create_database', TMessageType.CALL, self._seqid)
args = create_database_args()
- args.name = name
- args.description = description
+ args.database = database
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -298,13 +310,13 @@ class Client(fb303.FacebookService.Client, Iface):
result = create_database_result()
result.read(self._iprot)
self._iprot.readMessageEnd()
- if result.success != None:
- return result.success
if result.o1 != None:
raise result.o1
if result.o2 != None:
raise result.o2
- raise TApplicationException(TApplicationException.MISSING_RESULT, "create_database failed: unknown result");
+ if result.o3 != None:
+ raise result.o3
+ return
def get_database(self, name):
"""
@@ -340,18 +352,20 @@ class Client(fb303.FacebookService.Client, Iface):
raise result.o2
raise TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result");
- def drop_database(self, name):
+ def drop_database(self, name, deleteData):
"""
Parameters:
- name
+ - deleteData
"""
- self.send_drop_database(name)
- return self.recv_drop_database()
+ self.send_drop_database(name, deleteData)
+ self.recv_drop_database()
- def send_drop_database(self, name):
+ def send_drop_database(self, name, deleteData):
self._oprot.writeMessageBegin('drop_database', TMessageType.CALL, self._seqid)
args = drop_database_args()
args.name = name
+ args.deleteData = deleteData
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -366,19 +380,26 @@ class Client(fb303.FacebookService.Client, Iface):
result = drop_database_result()
result.read(self._iprot)
self._iprot.readMessageEnd()
- if result.success != None:
- return result.success
+ if result.o1 != None:
+ raise result.o1
if result.o2 != None:
raise result.o2
- raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_database failed: unknown result");
+ if result.o3 != None:
+ raise result.o3
+ return
- def get_databases(self, ):
- self.send_get_databases()
+ def get_databases(self, pattern):
+ """
+ Parameters:
+ - pattern
+ """
+ self.send_get_databases(pattern)
return self.recv_get_databases()
- def send_get_databases(self, ):
+ def send_get_databases(self, pattern):
self._oprot.writeMessageBegin('get_databases', TMessageType.CALL, self._seqid)
args = get_databases_args()
+ args.pattern = pattern
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
@@ -399,6 +420,33 @@ class Client(fb303.FacebookService.Client, Iface):
raise result.o1
raise TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result");
+ def get_all_databases(self, ):
+ self.send_get_all_databases()
+ return self.recv_get_all_databases()
+
+ def send_get_all_databases(self, ):
+ self._oprot.writeMessageBegin('get_all_databases', TMessageType.CALL, self._seqid)
+ args = get_all_databases_args()
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_get_all_databases(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = get_all_databases_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success != None:
+ return result.success
+ if result.o1 != None:
+ raise result.o1
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result");
+
def get_type(self, name):
"""
Parameters:
@@ -427,6 +475,8 @@ class Client(fb303.FacebookService.Client, Iface):
self._iprot.readMessageEnd()
if result.success != None:
return result.success
+ if result.o1 != None:
+ raise result.o1
if result.o2 != None:
raise result.o2
raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type failed: unknown result");
@@ -495,6 +545,8 @@ class Client(fb303.FacebookService.Client, Iface):
self._iprot.readMessageEnd()
if result.success != None:
return result.success
+ if result.o1 != None:
+ raise result.o1
if result.o2 != None:
raise result.o2
raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_type failed: unknown result");
@@ -713,6 +765,38 @@ class Client(fb303.FacebookService.Client, Iface):
raise result.o1
raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result");
+ def get_all_tables(self, db_name):
+ """
+ Parameters:
+ - db_name
+ """
+ self.send_get_all_tables(db_name)
+ return self.recv_get_all_tables()
+
+ def send_get_all_tables(self, db_name):
+ self._oprot.writeMessageBegin('get_all_tables', TMessageType.CALL, self._seqid)
+ args = get_all_tables_args()
+ args.db_name = db_name
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_get_all_tables(self, ):
+ (fname, mtype, rseqid) = self._iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(self._iprot)
+ self._iprot.readMessageEnd()
+ raise x
+ result = get_all_tables_result()
+ result.read(self._iprot)
+ self._iprot.readMessageEnd()
+ if result.success != None:
+ return result.success
+ if result.o1 != None:
+ raise result.o1
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result");
+
def get_table(self, dbname, tbl_name):
"""
Parameters:
@@ -1349,6 +1433,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
self._processMap["get_database"] = Processor.process_get_database
self._processMap["drop_database"] = Processor.process_drop_database
self._processMap["get_databases"] = Processor.process_get_databases
+ self._processMap["get_all_databases"] = Processor.process_get_all_databases
self._processMap["get_type"] = Processor.process_get_type
self._processMap["create_type"] = Processor.process_create_type
self._processMap["drop_type"] = Processor.process_drop_type
@@ -1358,6 +1443,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
self._processMap["create_table"] = Processor.process_create_table
self._processMap["drop_table"] = Processor.process_drop_table
self._processMap["get_tables"] = Processor.process_get_tables
+ self._processMap["get_all_tables"] = Processor.process_get_all_tables
self._processMap["get_table"] = Processor.process_get_table
self._processMap["alter_table"] = Processor.process_alter_table
self._processMap["add_partition"] = Processor.process_add_partition
@@ -1397,11 +1483,13 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
iprot.readMessageEnd()
result = create_database_result()
try:
- result.success = self._handler.create_database(args.name, args.description)
+ self._handler.create_database(args.database)
except AlreadyExistsException, o1:
result.o1 = o1
- except MetaException, o2:
+ except InvalidObjectException, o2:
result.o2 = o2
+ except MetaException, o3:
+ result.o3 = o3
oprot.writeMessageBegin("create_database", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -1429,9 +1517,13 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
iprot.readMessageEnd()
result = drop_database_result()
try:
- result.success = self._handler.drop_database(args.name)
- except MetaException, o2:
+ self._handler.drop_database(args.name, args.deleteData)
+ except NoSuchObjectException, o1:
+ result.o1 = o1
+ except InvalidOperationException, o2:
result.o2 = o2
+ except MetaException, o3:
+ result.o3 = o3
oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid)
result.write(oprot)
oprot.writeMessageEnd()
@@ -1443,7 +1535,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
iprot.readMessageEnd()
result = get_databases_result()
try:
- result.success = self._handler.get_databases()
+ result.success = self._handler.get_databases(args.pattern)
except MetaException, o1:
result.o1 = o1
oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid)
@@ -1451,6 +1543,20 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_get_all_databases(self, seqid, iprot, oprot):
+ args = get_all_databases_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = get_all_databases_result()
+ try:
+ result.success = self._handler.get_all_databases()
+ except MetaException, o1:
+ result.o1 = o1
+ oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_get_type(self, seqid, iprot, oprot):
args = get_type_args()
args.read(iprot)
@@ -1458,7 +1564,9 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
result = get_type_result()
try:
result.success = self._handler.get_type(args.name)
- except MetaException, o2:
+ except MetaException, o1:
+ result.o1 = o1
+ except NoSuchObjectException, o2:
result.o2 = o2
oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -1490,7 +1598,9 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
result = drop_type_result()
try:
result.success = self._handler.drop_type(args.type)
- except MetaException, o2:
+ except MetaException, o1:
+ result.o1 = o1
+ except NoSuchObjectException, o2:
result.o2 = o2
oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid)
result.write(oprot)
@@ -1597,6 +1707,20 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
oprot.writeMessageEnd()
oprot.trans.flush()
+ def process_get_all_tables(self, seqid, iprot, oprot):
+ args = get_all_tables_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = get_all_tables_result()
+ try:
+ result.success = self._handler.get_all_tables(args.db_name)
+ except MetaException, o1:
+ result.o1 = o1
+ oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
def process_get_table(self, seqid, iprot, oprot):
args = get_table_args()
args.read(iprot)
@@ -1869,19 +1993,16 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
class create_database_args:
"""
Attributes:
- - name
- - description
+ - database
"""
thrift_spec = (
None, # 0
- (1, TType.STRING, 'name', None, None, ), # 1
- (2, TType.STRING, 'description', None, None, ), # 2
+ (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1
)
- def __init__(self, name=None, description=None,):
- self.name = name
- self.description = description
+ def __init__(self, database=None,):
+ self.database = database
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -1893,13 +2014,9 @@ class create_database_args:
if ftype == TType.STOP:
break
if fid == 1:
- if ftype == TType.STRING:
- self.name = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.description = iprot.readString();
+ if ftype == TType.STRUCT:
+ self.database = Database()
+ self.database.read(iprot)
else:
iprot.skip(ftype)
else:
@@ -1912,13 +2029,9 @@ class create_database_args:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('create_database_args')
- if self.name != None:
- oprot.writeFieldBegin('name', TType.STRING, 1)
- oprot.writeString(self.name)
- oprot.writeFieldEnd()
- if self.description != None:
- oprot.writeFieldBegin('description', TType.STRING, 2)
- oprot.writeString(self.description)
+ if self.database != None:
+ oprot.writeFieldBegin('database', TType.STRUCT, 1)
+ self.database.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -1937,21 +2050,22 @@ class create_database_args:
class create_database_result:
"""
Attributes:
- - success
- o1
- o2
+ - o3
"""
thrift_spec = (
- (0, TType.BOOL, 'success', None, None, ), # 0
+ None, # 0
(1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
+ (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
)
- def __init__(self, success=None, o1=None, o2=None,):
- self.success = success
+ def __init__(self, o1=None, o2=None, o3=None,):
self.o1 = o1
self.o2 = o2
+ self.o3 = o3
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -1962,12 +2076,7 @@ class create_database_result:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
- if fid == 0:
- if ftype == TType.BOOL:
- self.success = iprot.readBool();
- else:
- iprot.skip(ftype)
- elif fid == 1:
+ if fid == 1:
if ftype == TType.STRUCT:
self.o1 = AlreadyExistsException()
self.o1.read(iprot)
@@ -1975,10 +2084,16 @@ class create_database_result:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
- self.o2 = MetaException()
+ self.o2 = InvalidObjectException()
self.o2.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.o3 = MetaException()
+ self.o3.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -1989,10 +2104,6 @@ class create_database_result:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('create_database_result')
- if self.success != None:
- oprot.writeFieldBegin('success', TType.BOOL, 0)
- oprot.writeBool(self.success)
- oprot.writeFieldEnd()
if self.o1 != None:
oprot.writeFieldBegin('o1', TType.STRUCT, 1)
self.o1.write(oprot)
@@ -2001,6 +2112,10 @@ class create_database_result:
oprot.writeFieldBegin('o2', TType.STRUCT, 2)
self.o2.write(oprot)
oprot.writeFieldEnd()
+ if self.o3 != None:
+ oprot.writeFieldBegin('o3', TType.STRUCT, 3)
+ self.o3.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2157,15 +2272,18 @@ class drop_database_args:
"""
Attributes:
- name
+ - deleteData
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'name', None, None, ), # 1
+ (2, TType.BOOL, 'deleteData', None, None, ), # 2
)
- def __init__(self, name=None,):
+ def __init__(self, name=None, deleteData=None,):
self.name = name
+ self.deleteData = deleteData
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -2181,6 +2299,11 @@ class drop_database_args:
self.name = iprot.readString();
else:
iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.BOOL:
+ self.deleteData = iprot.readBool();
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2195,6 +2318,10 @@ class drop_database_args:
oprot.writeFieldBegin('name', TType.STRING, 1)
oprot.writeString(self.name)
oprot.writeFieldEnd()
+ if self.deleteData != None:
+ oprot.writeFieldBegin('deleteData', TType.BOOL, 2)
+ oprot.writeBool(self.deleteData)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2212,19 +2339,22 @@ class drop_database_args:
class drop_database_result:
"""
Attributes:
- - success
+ - o1
- o2
+ - o3
"""
thrift_spec = (
- (0, TType.BOOL, 'success', None, None, ), # 0
- None, # 1
- (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
+ None, # 0
+ (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2
+ (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
)
- def __init__(self, success=None, o2=None,):
- self.success = success
+ def __init__(self, o1=None, o2=None, o3=None,):
+ self.o1 = o1
self.o2 = o2
+ self.o3 = o3
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -2235,17 +2365,24 @@ class drop_database_result:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
- if fid == 0:
- if ftype == TType.BOOL:
- self.success = iprot.readBool();
+ if fid == 1:
+ if ftype == TType.STRUCT:
+ self.o1 = NoSuchObjectException()
+ self.o1.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
- self.o2 = MetaException()
+ self.o2 = InvalidOperationException()
self.o2.read(iprot)
else:
iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRUCT:
+ self.o3 = MetaException()
+ self.o3.read(iprot)
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2256,14 +2393,18 @@ class drop_database_result:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('drop_database_result')
- if self.success != None:
- oprot.writeFieldBegin('success', TType.BOOL, 0)
- oprot.writeBool(self.success)
+ if self.o1 != None:
+ oprot.writeFieldBegin('o1', TType.STRUCT, 1)
+ self.o1.write(oprot)
oprot.writeFieldEnd()
if self.o2 != None:
oprot.writeFieldBegin('o2', TType.STRUCT, 2)
self.o2.write(oprot)
oprot.writeFieldEnd()
+ if self.o3 != None:
+ oprot.writeFieldBegin('o3', TType.STRUCT, 3)
+ self.o3.write(oprot)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2279,10 +2420,19 @@ class drop_database_result:
return not (self == other)
class get_databases_args:
+ """
+ Attributes:
+ - pattern
+ """
thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'pattern', None, None, ), # 1
)
+ def __init__(self, pattern=None,):
+ self.pattern = pattern
+
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
@@ -2292,6 +2442,11 @@ class get_databases_args:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
+ if fid == 1:
+ if ftype == TType.STRING:
+ self.pattern = iprot.readString();
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -2302,6 +2457,10 @@ class get_databases_args:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('get_databases_args')
+ if self.pattern != None:
+ oprot.writeFieldBegin('pattern', TType.STRING, 1)
+ oprot.writeString(self.pattern)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
@@ -2392,6 +2551,120 @@ class get_databases_result:
def __ne__(self, other):
return not (self == other)
+class get_all_databases_args:
+
+ thrift_spec = (
+ )
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('get_all_databases_args')
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class get_all_databases_result:
+ """
+ Attributes:
+ - success
+ - o1
+ """
+
+ thrift_spec = (
+ (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
+ (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, o1=None,):
+ self.success = success
+ self.o1 = o1
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.LIST:
+ self.success = []
+ (_etype111, _size108) = iprot.readListBegin()
+ for _i112 in xrange(_size108):
+ _elem113 = iprot.readString();
+ self.success.append(_elem113)
+ iprot.readListEnd()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.o1 = MetaException()
+ self.o1.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('get_all_databases_result')
+ if self.success != None:
+ oprot.writeFieldBegin('success', TType.LIST, 0)
+ oprot.writeListBegin(TType.STRING, len(self.success))
+ for iter114 in self.success:
+ oprot.writeString(iter114)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ if self.o1 != None:
+ oprot.writeFieldBegin('o1', TType.STRUCT, 1)
+ self.o1.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
class get_type_args:
"""
Attributes:
@@ -2452,16 +2725,19 @@ class get_type_result:
"""
Attributes:
- success
+ - o1
- o2
"""
thrift_spec = (
(0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0
- (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
+ (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
)
- def __init__(self, success=None, o2=None,):
+ def __init__(self, success=None, o1=None, o2=None,):
self.success = success
+ self.o1 = o1
self.o2 = o2
def read(self, iprot):
@@ -2481,7 +2757,13 @@ class get_type_result:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
- self.o2 = MetaException()
+ self.o1 = MetaException()
+ self.o1.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.o2 = NoSuchObjectException()
self.o2.read(iprot)
else:
iprot.skip(ftype)
@@ -2499,8 +2781,12 @@ class get_type_result:
oprot.writeFieldBegin('success', TType.STRUCT, 0)
self.success.write(oprot)
oprot.writeFieldEnd()
+ if self.o1 != None:
+ oprot.writeFieldBegin('o1', TType.STRUCT, 1)
+ self.o1.write(oprot)
+ oprot.writeFieldEnd()
if self.o2 != None:
- oprot.writeFieldBegin('o2', TType.STRUCT, 1)
+ oprot.writeFieldBegin('o2', TType.STRUCT, 2)
self.o2.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -2728,16 +3014,19 @@ class drop_type_result:
"""
Attributes:
- success
+ - o1
- o2
"""
thrift_spec = (
(0, TType.BOOL, 'success', None, None, ), # 0
- (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
+ (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
+ (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
)
- def __init__(self, success=None, o2=None,):
+ def __init__(self, success=None, o1=None, o2=None,):
self.success = success
+ self.o1 = o1
self.o2 = o2
def read(self, iprot):
@@ -2756,7 +3045,13 @@ class drop_type_result:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
- self.o2 = MetaException()
+ self.o1 = MetaException()
+ self.o1.read(iprot)
+ else:
+ iprot.skip(ftype)
+ elif fid == 2:
+ if ftype == TType.STRUCT:
+ self.o2 = NoSuchObjectException()
self.o2.read(iprot)
else:
iprot.skip(ftype)
@@ -2774,8 +3069,12 @@ class drop_type_result:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
oprot.writeFieldEnd()
+ if self.o1 != None:
+ oprot.writeFieldBegin('o1', TType.STRUCT, 1)
+ self.o1.write(oprot)
+ oprot.writeFieldEnd()
if self.o2 != None:
- oprot.writeFieldBegin('o2', TType.STRUCT, 1)
+ oprot.writeFieldBegin('o2', TType.STRUCT, 2)
self.o2.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -2876,12 +3175,12 @@ class get_type_all_result:
if fid == 0:
if ftype == TType.MAP:
self.success = {}
- (_ktype109, _vtype110, _size108 ) = iprot.readMapBegin()
- for _i112 in xrange(_size108):
- _key113 = iprot.readString();
- _val114 = Type()
- _val114.read(iprot)
- self.success[_key113] = _val114
+ (_ktype116, _vtype117, _size115 ) = iprot.readMapBegin()
+ for _i119 in xrange(_size115):
+ _key120 = iprot.readString();
+ _val121 = Type()
+ _val121.read(iprot)
+ self.success[_key120] = _val121
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -2904,9 +3203,9 @@ class get_type_all_result:
if self.success != None:
oprot.writeFieldBegin('success', TType.MAP, 0)
oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success))
- for kiter115,viter116 in self.success.items():
- oprot.writeString(kiter115)
- viter116.write(oprot)
+ for kiter122,viter123 in self.success.items():
+ oprot.writeString(kiter122)
+ viter123.write(oprot)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.o2 != None:
@@ -3029,11 +3328,11 @@ class get_fields_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype120, _size117) = iprot.readListBegin()
- for _i121 in xrange(_size117):
- _elem122 = FieldSchema()
- _elem122.read(iprot)
- self.success.append(_elem122)
+ (_etype127, _size124) = iprot.readListBegin()
+ for _i128 in xrange(_size124):
+ _elem129 = FieldSchema()
+ _elem129.read(iprot)
+ self.success.append(_elem129)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -3068,8 +3367,8 @@ class get_fields_result:
if self.success != None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter123 in self.success:
- iter123.write(oprot)
+ for iter130 in self.success:
+ iter130.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 != None:
@@ -3200,11 +3499,11 @@ class get_schema_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype127, _size124) = iprot.readListBegin()
- for _i128 in xrange(_size124):
- _elem129 = FieldSchema()
- _elem129.read(iprot)
- self.success.append(_elem129)
+ (_etype134, _size131) = iprot.readListBegin()
+ for _i135 in xrange(_size131):
+ _elem136 = FieldSchema()
+ _elem136.read(iprot)
+ self.success.append(_elem136)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -3239,8 +3538,8 @@ class get_schema_result:
if self.success != None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter130 in self.success:
- iter130.write(oprot)
+ for iter137 in self.success:
+ iter137.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 != None:
@@ -3668,10 +3967,10 @@ class get_tables_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype134, _size131) = iprot.readListBegin()
- for _i135 in xrange(_size131):
- _elem136 = iprot.readString();
- self.success.append(_elem136)
+ (_etype141, _size138) = iprot.readListBegin()
+ for _i142 in xrange(_size138):
+ _elem143 = iprot.readString();
+ self.success.append(_elem143)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -3694,8 +3993,140 @@ class get_tables_result:
if self.success != None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter137 in self.success:
- oprot.writeString(iter137)
+ for iter144 in self.success:
+ oprot.writeString(iter144)
+ oprot.writeListEnd()
+ oprot.writeFieldEnd()
+ if self.o1 != None:
+ oprot.writeFieldBegin('o1', TType.STRUCT, 1)
+ self.o1.write(oprot)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class get_all_tables_args:
+ """
+ Attributes:
+ - db_name
+ """
+
+ thrift_spec = (
+ None, # 0
+ (1, TType.STRING, 'db_name', None, None, ), # 1
+ )
+
+ def __init__(self, db_name=None,):
+ self.db_name = db_name
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 1:
+ if ftype == TType.STRING:
+ self.db_name = iprot.readString();
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('get_all_tables_args')
+ if self.db_name != None:
+ oprot.writeFieldBegin('db_name', TType.STRING, 1)
+ oprot.writeString(self.db_name)
+ oprot.writeFieldEnd()
+ oprot.writeFieldStop()
+ oprot.writeStructEnd()
+
+ def __repr__(self):
+ L = ['%s=%r' % (key, value)
+ for key, value in self.__dict__.iteritems()]
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
+
+ def __eq__(self, other):
+ return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not (self == other)
+
+class get_all_tables_result:
+ """
+ Attributes:
+ - success
+ - o1
+ """
+
+ thrift_spec = (
+ (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
+ (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
+ )
+
+ def __init__(self, success=None, o1=None,):
+ self.success = success
+ self.o1 = o1
+
+ def read(self, iprot):
+ if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
+ fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
+ return
+ iprot.readStructBegin()
+ while True:
+ (fname, ftype, fid) = iprot.readFieldBegin()
+ if ftype == TType.STOP:
+ break
+ if fid == 0:
+ if ftype == TType.LIST:
+ self.success = []
+ (_etype148, _size145) = iprot.readListBegin()
+ for _i149 in xrange(_size145):
+ _elem150 = iprot.readString();
+ self.success.append(_elem150)
+ iprot.readListEnd()
+ else:
+ iprot.skip(ftype)
+ elif fid == 1:
+ if ftype == TType.STRUCT:
+ self.o1 = MetaException()
+ self.o1.read(iprot)
+ else:
+ iprot.skip(ftype)
+ else:
+ iprot.skip(ftype)
+ iprot.readFieldEnd()
+ iprot.readStructEnd()
+
+ def write(self, oprot):
+ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
+ oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
+ return
+ oprot.writeStructBegin('get_all_tables_result')
+ if self.success != None:
+ oprot.writeFieldBegin('success', TType.LIST, 0)
+ oprot.writeListBegin(TType.STRING, len(self.success))
+ for iter151 in self.success:
+ oprot.writeString(iter151)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 != None:
@@ -4211,10 +4642,10 @@ class append_partition_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype141, _size138) = iprot.readListBegin()
- for _i142 in xrange(_size138):
- _elem143 = iprot.readString();
- self.part_vals.append(_elem143)
+ (_etype155, _size152) = iprot.readListBegin()
+ for _i156 in xrange(_size152):
+ _elem157 = iprot.readString();
+ self.part_vals.append(_elem157)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -4239,8 +4670,8 @@ class append_partition_args:
if self.part_vals != None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter144 in self.part_vals:
- oprot.writeString(iter144)
+ for iter158 in self.part_vals:
+ oprot.writeString(iter158)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -4572,10 +5003,10 @@ class drop_partition_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype148, _size145) = iprot.readListBegin()
- for _i149 in xrange(_size145):
- _elem150 = iprot.readString();
- self.part_vals.append(_elem150)
+ (_etype162, _size159) = iprot.readListBegin()
+ for _i163 in xrange(_size159):
+ _elem164 = iprot.readString();
+ self.part_vals.append(_elem164)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -4605,8 +5036,8 @@ class drop_partition_args:
if self.part_vals != None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter151 in self.part_vals:
- oprot.writeString(iter151)
+ for iter165 in self.part_vals:
+ oprot.writeString(iter165)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.deleteData != None:
@@ -4923,10 +5354,10 @@ class get_partition_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype155, _size152) = iprot.readListBegin()
- for _i156 in xrange(_size152):
- _elem157 = iprot.readString();
- self.part_vals.append(_elem157)
+ (_etype169, _size166) = iprot.readListBegin()
+ for _i170 in xrange(_size166):
+ _elem171 = iprot.readString();
+ self.part_vals.append(_elem171)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -4951,8 +5382,8 @@ class get_partition_args:
if self.part_vals != None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter158 in self.part_vals:
- oprot.writeString(iter158)
+ for iter172 in self.part_vals:
+ oprot.writeString(iter172)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
@@ -5324,11 +5755,11 @@ class get_partitions_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype162, _size159) = iprot.readListBegin()
- for _i163 in xrange(_size159):
- _elem164 = Partition()
- _elem164.read(iprot)
- self.success.append(_elem164)
+ (_etype176, _size173) = iprot.readListBegin()
+ for _i177 in xrange(_size173):
+ _elem178 = Partition()
+ _elem178.read(iprot)
+ self.success.append(_elem178)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -5357,8 +5788,8 @@ class get_partitions_result:
if self.success != None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter165 in self.success:
- iter165.write(oprot)
+ for iter179 in self.success:
+ iter179.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 != None:
@@ -5491,10 +5922,10 @@ class get_partition_names_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype169, _size166) = iprot.readListBegin()
- for _i170 in xrange(_size166):
- _elem171 = iprot.readString();
- self.success.append(_elem171)
+ (_etype183, _size180) = iprot.readListBegin()
+ for _i184 in xrange(_size180):
+ _elem185 = iprot.readString();
+ self.success.append(_elem185)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -5517,8 +5948,8 @@ class get_partition_names_result:
if self.success != None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter172 in self.success:
- oprot.writeString(iter172)
+ for iter186 in self.success:
+ oprot.writeString(iter186)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o2 != None:
@@ -5584,10 +6015,10 @@ class get_partitions_ps_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype176, _size173) = iprot.readListBegin()
- for _i177 in xrange(_size173):
- _elem178 = iprot.readString();
- self.part_vals.append(_elem178)
+ (_etype190, _size187) = iprot.readListBegin()
+ for _i191 in xrange(_size187):
+ _elem192 = iprot.readString();
+ self.part_vals.append(_elem192)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -5617,8 +6048,8 @@ class get_partitions_ps_args:
if self.part_vals != None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter179 in self.part_vals:
- oprot.writeString(iter179)
+ for iter193 in self.part_vals:
+ oprot.writeString(iter193)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.max_parts != None:
@@ -5667,11 +6098,11 @@ class get_partitions_ps_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype183, _size180) = iprot.readListBegin()
- for _i184 in xrange(_size180):
- _elem185 = Partition()
- _elem185.read(iprot)
- self.success.append(_elem185)
+ (_etype197, _size194) = iprot.readListBegin()
+ for _i198 in xrange(_size194):
+ _elem199 = Partition()
+ _elem199.read(iprot)
+ self.success.append(_elem199)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -5694,8 +6125,8 @@ class get_partitions_ps_result:
if self.success != None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter186 in self.success:
- iter186.write(oprot)
+ for iter200 in self.success:
+ iter200.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 != None:
@@ -5761,10 +6192,10 @@ class get_partition_names_ps_args:
elif fid == 3:
if ftype == TType.LIST:
self.part_vals = []
- (_etype190, _size187) = iprot.readListBegin()
- for _i191 in xrange(_size187):
- _elem192 = iprot.readString();
- self.part_vals.append(_elem192)
+ (_etype204, _size201) = iprot.readListBegin()
+ for _i205 in xrange(_size201):
+ _elem206 = iprot.readString();
+ self.part_vals.append(_elem206)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -5794,8 +6225,8 @@ class get_partition_names_ps_args:
if self.part_vals != None:
oprot.writeFieldBegin('part_vals', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.part_vals))
- for iter193 in self.part_vals:
- oprot.writeString(iter193)
+ for iter207 in self.part_vals:
+ oprot.writeString(iter207)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.max_parts != None:
@@ -5844,10 +6275,10 @@ class get_partition_names_ps_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype197, _size194) = iprot.readListBegin()
- for _i198 in xrange(_size194):
- _elem199 = iprot.readString();
- self.success.append(_elem199)
+ (_etype211, _size208) = iprot.readListBegin()
+ for _i212 in xrange(_size208):
+ _elem213 = iprot.readString();
+ self.success.append(_elem213)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -5870,8 +6301,8 @@ class get_partition_names_ps_result:
if self.success != None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter200 in self.success:
- oprot.writeString(iter200)
+ for iter214 in self.success:
+ oprot.writeString(iter214)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 != None:
@@ -6263,10 +6694,10 @@ class partition_name_to_vals_result:
if fid == 0:
if ftype == TType.LIST:
self.success = []
- (_etype204, _size201) = iprot.readListBegin()
- for _i205 in xrange(_size201):
- _elem206 = iprot.readString();
- self.success.append(_elem206)
+ (_etype218, _size215) = iprot.readListBegin()
+ for _i219 in xrange(_size215):
+ _elem220 = iprot.readString();
+ self.success.append(_elem220)
iprot.readListEnd()
else:
iprot.skip(ftype)
@@ -6289,8 +6720,8 @@ class partition_name_to_vals_result:
if self.success != None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRING, len(self.success))
- for iter207 in self.success:
- oprot.writeString(iter207)
+ for iter221 in self.success:
+ oprot.writeString(iter221)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.o1 != None:
@@ -6395,11 +6826,11 @@ class partition_name_to_spec_result:
if fid == 0:
if ftype == TType.MAP:
self.success = {}
- (_ktype209, _vtype210, _size208 ) = iprot.readMapBegin()
- for _i212 in xrange(_size208):
- _key213 = iprot.readString();
- _val214 = iprot.readString();
- self.success[_key213] = _val214
+ (_ktype223, _vtype224, _size222 ) = iprot.readMapBegin()
+ for _i226 in xrange(_size222):
+ _key227 = iprot.readString();
+ _val228 = iprot.readString();
+ self.success[_key227] = _val228
iprot.readMapEnd()
else:
iprot.skip(ftype)
@@ -6422,9 +6853,9 @@ class partition_name_to_spec_result:
if self.success != None:
oprot.writeFieldBegin('success', TType.MAP, 0)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
- for kiter215,viter216 in self.success.items():
- oprot.writeString(kiter215)
- oprot.writeString(viter216)
+ for kiter229,viter230 in self.success.items():
+ oprot.writeString(kiter229)
+ oprot.writeString(viter230)
oprot.writeMapEnd()
oprot.writeFieldEnd()
if self.o1 != None:
diff --git metastore/src/gen-py/hive_metastore/ttypes.py metastore/src/gen-py/hive_metastore/ttypes.py
index b225889..79a4dbe 100644
--- metastore/src/gen-py/hive_metastore/ttypes.py
+++ metastore/src/gen-py/hive_metastore/ttypes.py
@@ -270,17 +270,20 @@ class Database:
Attributes:
- name
- description
+ - locationUri
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'name', None, None, ), # 1
(2, TType.STRING, 'description', None, None, ), # 2
+ (3, TType.STRING, 'locationUri', None, None, ), # 3
)
- def __init__(self, name=None, description=None,):
+ def __init__(self, name=None, description=None, locationUri=None,):
self.name = name
self.description = description
+ self.locationUri = locationUri
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -301,6 +304,11 @@ class Database:
self.description = iprot.readString();
else:
iprot.skip(ftype)
+ elif fid == 3:
+ if ftype == TType.STRING:
+ self.locationUri = iprot.readString();
+ else:
+ iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
@@ -319,6 +327,10 @@ class Database:
oprot.writeFieldBegin('description', TType.STRING, 2)
oprot.writeString(self.description)
oprot.writeFieldEnd()
+ if self.locationUri != None:
+ oprot.writeFieldBegin('locationUri', TType.STRING, 3)
+ oprot.writeString(self.locationUri)
+ oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
index 1cba29a..a942f0c 100644
--- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -18,6 +18,11 @@
package org.apache.hadoop.hive.metastore;
+import static org.apache.commons.lang.StringUtils.join;
+import static org.apache.hadoop.hive.metastore.MetaStoreUtils.DEFAULT_DATABASE_COMMENT;
+import static org.apache.hadoop.hive.metastore.MetaStoreUtils.DEFAULT_DATABASE_NAME;
+import static org.apache.hadoop.hive.metastore.MetaStoreUtils.validateName;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
@@ -349,14 +354,13 @@ public class HiveMetaStore extends ThriftHiveMetastore {
return;
}
- private void createDefaultDB_core(RawStore ms) throws MetaException {
+ private void createDefaultDB_core(RawStore ms) throws MetaException, InvalidObjectException {
try {
ms.getDatabase(MetaStoreUtils.DEFAULT_DATABASE_NAME);
} catch (NoSuchObjectException e) {
ms.createDatabase(
- new Database(MetaStoreUtils.DEFAULT_DATABASE_NAME, wh
- .getDefaultDatabasePath(MetaStoreUtils.DEFAULT_DATABASE_NAME)
- .toString()));
+ new Database(DEFAULT_DATABASE_NAME, DEFAULT_DATABASE_COMMENT,
+ wh.getDefaultDatabasePath(DEFAULT_DATABASE_NAME).toString()));
}
HMSHandler.createDefaultDB = true;
}
@@ -378,6 +382,8 @@ public class HiveMetaStore extends ThriftHiveMetastore {
return Boolean.TRUE;
}
});
+ } catch (InvalidObjectException e) {
+ throw new MetaException(e.getMessage());
} catch (MetaException e) {
throw e;
} catch (Exception e) {
@@ -400,9 +406,13 @@ public class HiveMetaStore extends ThriftHiveMetastore {
LOG.info(threadLocalId.get().toString() + ": " + m);
}
- private void logStartFunction(String f, String db, String tbl) {
- LOG.info(threadLocalId.get().toString() + ": " + f + " : db=" + db
- + " tbl=" + tbl);
+ private void logStartTableFunction(String f, String db, String tbl) {
+ LOG.info(threadLocalId.get().toString() + ": " + f + " : db=" + db + " tbl=" + tbl);
+ }
+
+ private void logStartPartitionFunction(String f, String db, String tbl, List partVals) {
+ LOG.info(threadLocalId.get().toString() + ": " + f + " : db=" + db + " tbl=" + tbl
+ + "[" + join(partVals, ",") + "]");
}
@Override
@@ -420,48 +430,60 @@ public class HiveMetaStore extends ThriftHiveMetastore {
System.exit(0);
}
- private boolean create_database_core(RawStore ms, final String name,
- final String location_uri) throws AlreadyExistsException, MetaException {
+ private void create_database_core(RawStore ms, final Database db)
+ throws AlreadyExistsException, InvalidObjectException, MetaException {
+ if (!validateName(db.getName())) {
+ throw new InvalidObjectException(db.getName() + " is not a valid database name");
+ }
boolean success = false;
try {
ms.openTransaction();
- Database db = new Database(name, location_uri);
- if (ms.createDatabase(db)
- && wh.mkdirs(wh.getDefaultDatabasePath(name))) {
- success = ms.commitTransaction();
+ if (null == db.getLocationUri()) {
+ db.setLocationUri(wh.getDefaultDatabasePath(db.getName()).toString());
}
+ ms.createDatabase(db);
+ success = ms.commitTransaction();
} finally {
if (!success) {
ms.rollbackTransaction();
+ } else {
+ wh.mkdirs(new Path(db.getLocationUri()));
}
}
- return success;
}
- public boolean create_database(final String name, final String location_uri)
- throws AlreadyExistsException, MetaException {
+ public void create_database(final Database db)
+ throws AlreadyExistsException, InvalidObjectException, MetaException {
incrementCounter("create_database");
- logStartFunction("create_database: " + name);
-
- Boolean ret = null;
+ logStartFunction("create_database: "
+ + db.getName() + " "
+ + db.getLocationUri() + " "
+ + db.getDescription());
try {
- ret = executeWithRetry(new Command() {
+ try {
+ if(null != get_database(db.getName())) {
+ throw new AlreadyExistsException("Database " + db.getName() + " already exists");
+ }
+ } catch (NoSuchObjectException e) {
+ // expected
+ }
+ executeWithRetry(new Command() {
@Override
Boolean run(RawStore ms) throws Exception {
- boolean success = create_database_core(ms, name, location_uri);
- return Boolean.valueOf(success);
+ create_database_core(ms, db);
+ return Boolean.TRUE;
}
});
} catch (AlreadyExistsException e) {
throw e;
+ } catch (InvalidObjectException e) {
+ throw e;
} catch (MetaException e) {
throw e;
} catch (Exception e) {
assert(e instanceof RuntimeException);
throw (RuntimeException)e;
}
-
- return ret.booleanValue();
}
public Database get_database(final String name) throws NoSuchObjectException,
@@ -488,59 +510,90 @@ public class HiveMetaStore extends ThriftHiveMetastore {
return db;
}
- private boolean drop_database_core(RawStore ms, final String name) throws MetaException {
+ private void drop_database_core(RawStore ms,
+ final String name, final boolean deleteData)
+ throws NoSuchObjectException, InvalidOperationException, MetaException {
boolean success = false;
+ Database db = null;
try {
ms.openTransaction();
+ db = ms.getDatabase(name);
+ if (!get_all_tables(db.getName()).isEmpty()) {
+ throw new InvalidOperationException("Database " + db.getName() + " is not empty");
+ }
if (ms.dropDatabase(name)) {
success = ms.commitTransaction();
}
} finally {
if (!success) {
ms.rollbackTransaction();
- } else {
- wh.deleteDir(wh.getDefaultDatabasePath(name), true);
+ } else if (deleteData) {
+ wh.deleteDir(new Path(db.getLocationUri()), true);
// it is not a terrible thing even if the data is not deleted
}
}
- return success;
}
- public boolean drop_database(final String name) throws MetaException {
+
+ public void drop_database(final String dbName, final boolean deleteData)
+ throws NoSuchObjectException, InvalidOperationException, MetaException {
incrementCounter("drop_database");
- logStartFunction("drop_database: " + name);
- if (name.equalsIgnoreCase(MetaStoreUtils.DEFAULT_DATABASE_NAME)) {
- throw new MetaException("Can't drop default database");
+ logStartFunction("drop_database: " + dbName);
+ if (DEFAULT_DATABASE_NAME.equalsIgnoreCase(dbName)) {
+ throw new MetaException("Can not drop default database");
}
- Boolean ret = null;
try {
- ret = executeWithRetry(new Command() {
+ executeWithRetry(new Command() {
@Override
Boolean run(RawStore ms) throws Exception {
- boolean success = drop_database_core(ms, name);
- return Boolean.valueOf(success);
+ drop_database_core(ms, dbName, deleteData);
+ return Boolean.TRUE;
}
});
+ } catch (NoSuchObjectException e) {
+ throw e;
+ } catch (InvalidOperationException e) {
+ throw e;
} catch (MetaException e) {
throw e;
} catch (Exception e) {
assert(e instanceof RuntimeException);
throw (RuntimeException)e;
}
- return ret.booleanValue();
}
- public List get_databases() throws MetaException {
+ public List get_databases(final String pattern) throws MetaException {
incrementCounter("get_databases");
- logStartFunction("get_databases");
+ logStartFunction("get_databases: " + pattern);
+
+ List ret = null;
+ try {
+ ret = executeWithRetry(new Command>() {
+ @Override
+ List run(RawStore ms) throws Exception {
+ return ms.getDatabases(pattern);
+ }
+ });
+ } catch (MetaException e) {
+ throw e;
+ } catch (Exception e) {
+ assert(e instanceof RuntimeException);
+ throw (RuntimeException)e;
+ }
+ return ret;
+ }
+
+ public List