diff --git build-common.xml build-common.xml
index 24fac36..5c9d391 100644
--- build-common.xml
+++ build-common.xml
@@ -453,6 +453,13 @@
Tests failed!
+
+
+
+
+
+
+
diff --git build.xml build.xml
index 701487d..f41db23 100644
--- build.xml
+++ build.xml
@@ -126,6 +126,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -206,7 +217,8 @@
-
+
+
diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift
index 4f9f53c..ae9d185 100755
--- metastore/if/hive_metastore.thrift
+++ metastore/if/hive_metastore.thrift
@@ -356,6 +356,25 @@ service ThriftHiveMetastore extends fb303.FacebookService
bool grant_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1)
bool revoke_privileges(1:PrivilegeBag privileges) throws(1:MetaException o1)
+
+ //Authentication (delegation token) interfaces
+
+ // get metastore server delegation token for use from the map/reduce tasks to authenticate
+ // to metastore server
+ string get_delegation_token(1:string renewer_kerberos_principal_name) throws (1:MetaException o1)
+
+ // get metastore server delegation token for use from the map/reduce tasks to authenticate
+ // to metastore server - this method takes an extra token signature string which is just
+ // an identifier to associate with the token - this will be used by the token selector code
+ // to pick the right token given the associated identifier.
+ string get_delegation_token_with_signature(1:string renewer_kerberos_principal_name,
+ 2:string token_signature) throws (1:MetaException o1)
+
+ // method to renew delegation token obtained from metastore server
+ i64 renew_delegation_token(1:string token_str_form) throws (1:MetaException o1)
+
+ // method to cancel delegation token obtained from metastore server
+ void cancel_delegation_token(1:string token_str_form) throws (1:MetaException o1)
}
// * Note about the DDL_TIME: When creating or altering a table or a partition,
diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
index 18f70fc..2638130 100644
--- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
+++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
@@ -11993,19 +11993,982 @@ uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(::apache::thrift::p
return xfer;
}
+uint32_t ThriftHiveMetastore_get_delegation_token_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->renewer_kerberos_principal_name);
+ this->__isset.renewer_kerberos_principal_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_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_args");
+ xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->renewer_kerberos_principal_name);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_pargs");
+ xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString((*(this->renewer_kerberos_principal_name)));
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_delegation_token_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_STRING) {
+ xfer += iprot->readString(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);
+ 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_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_result");
+
+ if (this->__isset.success) {
+ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+ xfer += oprot->writeString(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();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_delegation_token_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_STRING) {
+ xfer += iprot->readString((*(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);
+ 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_delegation_token_with_signature_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->renewer_kerberos_principal_name);
+ this->__isset.renewer_kerberos_principal_name = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->token_signature);
+ this->__isset.token_signature = 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_delegation_token_with_signature_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_with_signature_args");
+ xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->renewer_kerberos_principal_name);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("token_signature", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->token_signature);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_delegation_token_with_signature_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_with_signature_pargs");
+ xfer += oprot->writeFieldBegin("renewer_kerberos_principal_name", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString((*(this->renewer_kerberos_principal_name)));
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("token_signature", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString((*(this->token_signature)));
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_delegation_token_with_signature_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_STRING) {
+ xfer += iprot->readString(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);
+ 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_delegation_token_with_signature_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_delegation_token_with_signature_result");
+
+ if (this->__isset.success) {
+ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);
+ xfer += oprot->writeString(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();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_get_delegation_token_with_signature_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_STRING) {
+ xfer += iprot->readString((*(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);
+ 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_renew_delegation_token_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->token_str_form);
+ this->__isset.token_str_form = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_renew_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_args");
+ xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->token_str_form);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_renew_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_pargs");
+ xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString((*(this->token_str_form)));
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_renew_delegation_token_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_I64) {
+ xfer += iprot->readI64(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);
+ 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_renew_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_renew_delegation_token_result");
+
+ if (this->__isset.success) {
+ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0);
+ xfer += oprot->writeI64(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();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_renew_delegation_token_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_I64) {
+ xfer += iprot->readI64((*(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);
+ 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_cancel_delegation_token_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->token_str_form);
+ this->__isset.token_str_form = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_cancel_delegation_token_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_args");
+ xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->token_str_form);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_cancel_delegation_token_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_pargs");
+ xfer += oprot->writeFieldBegin("token_str_form", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString((*(this->token_str_form)));
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t ThriftHiveMetastore_cancel_delegation_token_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 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_cancel_delegation_token_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("ThriftHiveMetastore_cancel_delegation_token_result");
+
+ 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_cancel_delegation_token_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 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;
+}
+
void ThriftHiveMetastoreClient::create_database(const Database& database)
{
- send_create_database(database);
- recv_create_database();
+ send_create_database(database);
+ recv_create_database();
+}
+
+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.database = &database;
+ args.write(oprot_);
+
+ oprot_->writeMessageEnd();
+ oprot_->getTransport()->flush();
+ oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHiveMetastoreClient::recv_create_database()
+{
+
+ 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("create_database") != 0) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
+ }
+ ThriftHiveMetastore_create_database_presult result;
+ result.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+
+ if (result.__isset.o1) {
+ throw result.o1;
+ }
+ if (result.__isset.o2) {
+ throw result.o2;
+ }
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ return;
+}
+
+void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name)
+{
+ send_get_database(name);
+ recv_get_database(_return);
+}
+
+void ThriftHiveMetastoreClient::send_get_database(const std::string& name)
+{
+ int32_t cseqid = 0;
+ oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid);
+
+ ThriftHiveMetastore_get_database_pargs args;
+ args.name = &name;
+ args.write(oprot_);
+
+ oprot_->writeMessageEnd();
+ oprot_->getTransport()->flush();
+ oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHiveMetastoreClient::recv_get_database(Database& _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_database") != 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_database_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;
+ }
+ if (result.__isset.o2) {
+ throw result.o2;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result");
+}
+
+void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData)
+{
+ send_drop_database(name, deleteData);
+ recv_drop_database();
+}
+
+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();
+ oprot_->getTransport()->flush();
+ oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHiveMetastoreClient::recv_drop_database()
+{
+
+ 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("drop_database") != 0) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
+ }
+ ThriftHiveMetastore_drop_database_presult result;
+ result.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+
+ if (result.__isset.o1) {
+ throw result.o1;
+ }
+ if (result.__isset.o2) {
+ throw result.o2;
+ }
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ return;
+}
+
+void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern)
+{
+ send_get_databases(pattern);
+ recv_get_databases(_return);
+}
+
+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();
+ oprot_->getTransport()->flush();
+ oprot_->getTransport()->writeEnd();
+}
+
+void ThriftHiveMetastoreClient::recv_get_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_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_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_databases failed: unknown result");
+}
+
+void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return)
+{
+ send_get_all_databases();
+ recv_get_all_databases(_return);
}
-void ThriftHiveMetastoreClient::send_create_database(const Database& database)
+void ThriftHiveMetastoreClient::send_get_all_databases()
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_create_database_pargs args;
- args.database = &database;
+ ThriftHiveMetastore_get_all_databases_pargs args;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12013,7 +12976,7 @@ void ThriftHiveMetastoreClient::send_create_database(const Database& database)
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_create_database()
+void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return)
{
int32_t rseqid = 0;
@@ -12034,42 +12997,42 @@ void ThriftHiveMetastoreClient::recv_create_database()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("create_database") != 0) {
+ 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_create_database_presult result;
+ 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;
}
- if (result.__isset.o2) {
- throw result.o2;
- }
- if (result.__isset.o3) {
- throw result.o3;
- }
- return;
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name)
+void ThriftHiveMetastoreClient::alter_database(const std::string& dbname, const Database& db)
{
- send_get_database(name);
- recv_get_database(_return);
+ send_alter_database(dbname, db);
+ recv_alter_database();
}
-void ThriftHiveMetastoreClient::send_get_database(const std::string& name)
+void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_database_pargs args;
- args.name = &name;
+ ThriftHiveMetastore_alter_database_pargs args;
+ args.dbname = &dbname;
+ args.db = &db;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12077,7 +13040,7 @@ void ThriftHiveMetastoreClient::send_get_database(const std::string& name)
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_database(Database& _return)
+void ThriftHiveMetastoreClient::recv_alter_database()
{
int32_t rseqid = 0;
@@ -12098,45 +13061,39 @@ void ThriftHiveMetastoreClient::recv_get_database(Database& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_database") != 0) {
+ if (fname.compare("alter_database") != 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_database_presult result;
- result.success = &_return;
+ ThriftHiveMetastore_alter_database_presult result;
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;
}
if (result.__isset.o2) {
throw result.o2;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result");
+ return;
}
-void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData)
+void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name)
{
- send_drop_database(name, deleteData);
- recv_drop_database();
+ send_get_type(name);
+ recv_get_type(_return);
}
-void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData)
+void ThriftHiveMetastoreClient::send_get_type(const std::string& name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_drop_database_pargs args;
+ ThriftHiveMetastore_get_type_pargs args;
args.name = &name;
- args.deleteData = &deleteData;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12144,7 +13101,7 @@ void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, cons
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_drop_database()
+void ThriftHiveMetastoreClient::recv_get_type(Type& _return)
{
int32_t rseqid = 0;
@@ -12165,42 +13122,44 @@ void ThriftHiveMetastoreClient::recv_drop_database()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("drop_database") != 0) {
+ if (fname.compare("get_type") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_drop_database_presult result;
+ ThriftHiveMetastore_get_type_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;
}
if (result.__isset.o2) {
throw result.o2;
}
- if (result.__isset.o3) {
- throw result.o3;
- }
- return;
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern)
+bool ThriftHiveMetastoreClient::create_type(const Type& type)
{
- send_get_databases(pattern);
- recv_get_databases(_return);
+ send_create_type(type);
+ return recv_create_type();
}
-void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern)
+void ThriftHiveMetastoreClient::send_create_type(const Type& type)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_databases_pargs args;
- args.pattern = &pattern;
+ ThriftHiveMetastore_create_type_pargs args;
+ args.type = &type;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12208,7 +13167,7 @@ void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern)
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return)
+bool ThriftHiveMetastoreClient::recv_create_type()
{
int32_t rseqid = 0;
@@ -12229,40 +13188,47 @@ void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _r
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_databases") != 0) {
+ if (fname.compare("create_type") != 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_databases_presult result;
+ bool _return;
+ ThriftHiveMetastore_create_type_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- // _return pointer has now been filled
- return;
+ return _return;
}
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result");
+ if (result.__isset.o2) {
+ throw result.o2;
+ }
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return)
+bool ThriftHiveMetastoreClient::drop_type(const std::string& type)
{
- send_get_all_databases();
- recv_get_all_databases(_return);
+ send_drop_type(type);
+ return recv_drop_type();
}
-void ThriftHiveMetastoreClient::send_get_all_databases()
+void ThriftHiveMetastoreClient::send_drop_type(const std::string& type)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_all_databases_pargs args;
+ ThriftHiveMetastore_drop_type_pargs args;
+ args.type = &type;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12270,7 +13236,7 @@ void ThriftHiveMetastoreClient::send_get_all_databases()
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return)
+bool ThriftHiveMetastoreClient::recv_drop_type()
{
int32_t rseqid = 0;
@@ -12291,42 +13257,44 @@ void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_all_databases") != 0) {
+ if (fname.compare("drop_type") != 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;
+ bool _return;
+ ThriftHiveMetastore_drop_type_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- // _return pointer has now been filled
- return;
+ return _return;
}
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result");
+ if (result.__isset.o2) {
+ throw result.o2;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result");
}
-void ThriftHiveMetastoreClient::alter_database(const std::string& dbname, const Database& db)
+void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name)
{
- send_alter_database(dbname, db);
- recv_alter_database();
+ send_get_type_all(name);
+ recv_get_type_all(_return);
}
-void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, const Database& db)
+void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("alter_database", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_alter_database_pargs args;
- args.dbname = &dbname;
- args.db = &db;
+ ThriftHiveMetastore_get_type_all_pargs args;
+ args.name = &name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12334,7 +13302,7 @@ void ThriftHiveMetastoreClient::send_alter_database(const std::string& dbname, c
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_alter_database()
+void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return)
{
int32_t rseqid = 0;
@@ -12355,39 +13323,42 @@ void ThriftHiveMetastoreClient::recv_alter_database()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("alter_database") != 0) {
+ if (fname.compare("get_type_all") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_alter_database_presult result;
+ ThriftHiveMetastore_get_type_all_presult result;
+ result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- if (result.__isset.o1) {
- throw result.o1;
+ if (result.__isset.success) {
+ // _return pointer has now been filled
+ return;
}
if (result.__isset.o2) {
throw result.o2;
}
- return;
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name)
+void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name)
{
- send_get_type(name);
- recv_get_type(_return);
+ send_get_fields(db_name, table_name);
+ recv_get_fields(_return);
}
-void ThriftHiveMetastoreClient::send_get_type(const std::string& name)
+void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_type_pargs args;
- args.name = &name;
+ ThriftHiveMetastore_get_fields_pargs args;
+ args.db_name = &db_name;
+ args.table_name = &table_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12395,7 +13366,7 @@ void ThriftHiveMetastoreClient::send_get_type(const std::string& name)
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_type(Type& _return)
+void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return)
{
int32_t rseqid = 0;
@@ -12416,13 +13387,13 @@ void ThriftHiveMetastoreClient::recv_get_type(Type& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_type") != 0) {
+ if (fname.compare("get_fields") != 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_type_presult result;
+ ThriftHiveMetastore_get_fields_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -12438,22 +13409,26 @@ void ThriftHiveMetastoreClient::recv_get_type(Type& _return)
if (result.__isset.o2) {
throw result.o2;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result");
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result");
}
-bool ThriftHiveMetastoreClient::create_type(const Type& type)
+void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name)
{
- send_create_type(type);
- return recv_create_type();
+ send_get_schema(db_name, table_name);
+ recv_get_schema(_return);
}
-void ThriftHiveMetastoreClient::send_create_type(const Type& type)
+void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_create_type_pargs args;
- args.type = &type;
+ ThriftHiveMetastore_get_schema_pargs args;
+ args.db_name = &db_name;
+ args.table_name = &table_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12461,7 +13436,7 @@ void ThriftHiveMetastoreClient::send_create_type(const Type& type)
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_create_type()
+void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return)
{
int32_t rseqid = 0;
@@ -12482,21 +13457,21 @@ bool ThriftHiveMetastoreClient::recv_create_type()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("create_type") != 0) {
+ if (fname.compare("get_schema") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- bool _return;
- ThriftHiveMetastore_create_type_presult result;
+ ThriftHiveMetastore_get_schema_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- return _return;
+ // _return pointer has now been filled
+ return;
}
if (result.__isset.o1) {
throw result.o1;
@@ -12507,22 +13482,22 @@ bool ThriftHiveMetastoreClient::recv_create_type()
if (result.__isset.o3) {
throw result.o3;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result");
}
-bool ThriftHiveMetastoreClient::drop_type(const std::string& type)
+void ThriftHiveMetastoreClient::create_table(const Table& tbl)
{
- send_drop_type(type);
- return recv_drop_type();
+ send_create_table(tbl);
+ recv_create_table();
}
-void ThriftHiveMetastoreClient::send_drop_type(const std::string& type)
+void ThriftHiveMetastoreClient::send_create_table(const Table& tbl)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_drop_type_pargs args;
- args.type = &type;
+ ThriftHiveMetastore_create_table_pargs args;
+ args.tbl = &tbl;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12530,7 +13505,7 @@ void ThriftHiveMetastoreClient::send_drop_type(const std::string& type)
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_drop_type()
+void ThriftHiveMetastoreClient::recv_create_table()
{
int32_t rseqid = 0;
@@ -12551,44 +13526,47 @@ bool ThriftHiveMetastoreClient::recv_drop_type()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("drop_type") != 0) {
+ if (fname.compare("create_table") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
- }
- bool _return;
- ThriftHiveMetastore_drop_type_presult result;
- result.success = &_return;
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
+ }
+ ThriftHiveMetastore_create_table_presult result;
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_type failed: unknown result");
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ if (result.__isset.o4) {
+ throw result.o4;
+ }
+ return;
}
-void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name)
+void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData)
{
- send_get_type_all(name);
- recv_get_type_all(_return);
+ send_drop_table(dbname, name, deleteData);
+ recv_drop_table();
}
-void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name)
+void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_type_all_pargs args;
+ ThriftHiveMetastore_drop_table_pargs args;
+ args.dbname = &dbname;
args.name = &name;
+ args.deleteData = &deleteData;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12596,7 +13574,7 @@ void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name)
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return)
+void ThriftHiveMetastoreClient::recv_drop_table()
{
int32_t rseqid = 0;
@@ -12617,42 +13595,40 @@ void ThriftHiveMetastoreClient::recv_get_type_all(std::map &
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_type_all") != 0) {
+ if (fname.compare("drop_table") != 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_type_all_presult result;
- result.success = &_return;
+ ThriftHiveMetastore_drop_table_presult result;
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;
}
- if (result.__isset.o2) {
- throw result.o2;
+ if (result.__isset.o3) {
+ throw result.o3;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result");
+ return;
}
-void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name)
+void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern)
{
- send_get_fields(db_name, table_name);
- recv_get_fields(_return);
+ send_get_tables(db_name, pattern);
+ recv_get_tables(_return);
}
-void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name)
+void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_fields_pargs args;
+ ThriftHiveMetastore_get_tables_pargs args;
args.db_name = &db_name;
- args.table_name = &table_name;
+ args.pattern = &pattern;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12660,7 +13636,7 @@ void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, cons
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return)
{
int32_t rseqid = 0;
@@ -12681,13 +13657,13 @@ void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _retu
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_fields") != 0) {
+ if (fname.compare("get_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_fields_presult result;
+ ThriftHiveMetastore_get_tables_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -12700,29 +13676,22 @@ void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _retu
if (result.__isset.o1) {
throw result.o1;
}
- if (result.__isset.o2) {
- throw result.o2;
- }
- if (result.__isset.o3) {
- throw result.o3;
- }
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name)
+void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name)
{
- send_get_schema(db_name, table_name);
- recv_get_schema(_return);
+ send_get_all_tables(db_name);
+ recv_get_all_tables(_return);
}
-void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name)
+void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_schema_pargs args;
+ ThriftHiveMetastore_get_all_tables_pargs args;
args.db_name = &db_name;
- args.table_name = &table_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12730,7 +13699,7 @@ void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, cons
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return)
{
int32_t rseqid = 0;
@@ -12751,13 +13720,13 @@ void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _retu
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_schema") != 0) {
+ 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_schema_presult result;
+ ThriftHiveMetastore_get_all_tables_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -12770,28 +13739,23 @@ void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _retu
if (result.__isset.o1) {
throw result.o1;
}
- if (result.__isset.o2) {
- throw result.o2;
- }
- if (result.__isset.o3) {
- throw result.o3;
- }
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result");
}
-void ThriftHiveMetastoreClient::create_table(const Table& tbl)
+void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name)
{
- send_create_table(tbl);
- recv_create_table();
+ send_get_table(dbname, tbl_name);
+ recv_get_table(_return);
}
-void ThriftHiveMetastoreClient::send_create_table(const Table& tbl)
+void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_create_table_pargs args;
- args.tbl = &tbl;
+ ThriftHiveMetastore_get_table_pargs args;
+ args.dbname = &dbname;
+ args.tbl_name = &tbl_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12799,7 +13763,7 @@ void ThriftHiveMetastoreClient::send_create_table(const Table& tbl)
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_create_table()
+void ThriftHiveMetastoreClient::recv_get_table(Table& _return)
{
int32_t rseqid = 0;
@@ -12820,47 +13784,46 @@ void ThriftHiveMetastoreClient::recv_create_table()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("create_table") != 0) {
+ if (fname.compare("get_table") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_create_table_presult result;
+ ThriftHiveMetastore_get_table_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;
}
if (result.__isset.o2) {
throw result.o2;
}
- if (result.__isset.o3) {
- throw result.o3;
- }
- if (result.__isset.o4) {
- throw result.o4;
- }
- return;
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result");
}
-void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData)
+void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl)
{
- send_drop_table(dbname, name, deleteData);
- recv_drop_table();
+ send_alter_table(dbname, tbl_name, new_tbl);
+ recv_alter_table();
}
-void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData)
+void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_drop_table_pargs args;
+ ThriftHiveMetastore_alter_table_pargs args;
args.dbname = &dbname;
- args.name = &name;
- args.deleteData = &deleteData;
+ args.tbl_name = &tbl_name;
+ args.new_tbl = &new_tbl;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12868,7 +13831,7 @@ void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_drop_table()
+void ThriftHiveMetastoreClient::recv_alter_table()
{
int32_t rseqid = 0;
@@ -12889,13 +13852,13 @@ void ThriftHiveMetastoreClient::recv_drop_table()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("drop_table") != 0) {
+ if (fname.compare("alter_table") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_drop_table_presult result;
+ ThriftHiveMetastore_alter_table_presult result;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
@@ -12903,26 +13866,25 @@ void ThriftHiveMetastoreClient::recv_drop_table()
if (result.__isset.o1) {
throw result.o1;
}
- if (result.__isset.o3) {
- throw result.o3;
+ if (result.__isset.o2) {
+ throw result.o2;
}
return;
}
-void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern)
+void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part)
{
- send_get_tables(db_name, pattern);
- recv_get_tables(_return);
+ send_add_partition(new_part);
+ recv_add_partition(_return);
}
-void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern)
+void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_tables_pargs args;
- args.db_name = &db_name;
- args.pattern = &pattern;
+ ThriftHiveMetastore_add_partition_pargs args;
+ args.new_part = &new_part;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12930,7 +13892,7 @@ void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, cons
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return)
{
int32_t rseqid = 0;
@@ -12951,13 +13913,13 @@ void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _retu
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_tables") != 0) {
+ if (fname.compare("add_partition") != 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_tables_presult result;
+ ThriftHiveMetastore_add_partition_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -12970,22 +13932,30 @@ void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _retu
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result");
+ if (result.__isset.o2) {
+ throw result.o2;
+ }
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name)
+void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals)
{
- send_get_all_tables(db_name);
- recv_get_all_tables(_return);
+ send_append_partition(db_name, tbl_name, part_vals);
+ recv_append_partition(_return);
}
-void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name)
+void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_all_tables_pargs args;
+ ThriftHiveMetastore_append_partition_pargs args;
args.db_name = &db_name;
+ args.tbl_name = &tbl_name;
+ args.part_vals = &part_vals;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -12993,7 +13963,7 @@ void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name)
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return)
{
int32_t rseqid = 0;
@@ -13014,13 +13984,13 @@ void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_all_tables") != 0) {
+ if (fname.compare("append_partition") != 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;
+ ThriftHiveMetastore_append_partition_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -13033,23 +14003,30 @@ void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result");
+ if (result.__isset.o2) {
+ throw result.o2;
+ }
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name)
+void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name)
{
- send_get_table(dbname, tbl_name);
- recv_get_table(_return);
+ send_append_partition_by_name(db_name, tbl_name, part_name);
+ recv_append_partition_by_name(_return);
}
-void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name)
+void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_table_pargs args;
- args.dbname = &dbname;
+ ThriftHiveMetastore_append_partition_by_name_pargs args;
+ args.db_name = &db_name;
args.tbl_name = &tbl_name;
+ args.part_name = &part_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13057,7 +14034,7 @@ void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_table(Table& _return)
+void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return)
{
int32_t rseqid = 0;
@@ -13078,13 +14055,13 @@ void ThriftHiveMetastoreClient::recv_get_table(Table& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_table") != 0) {
+ if (fname.compare("append_partition_by_name") != 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_table_presult result;
+ ThriftHiveMetastore_append_partition_by_name_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -13100,24 +14077,28 @@ void ThriftHiveMetastoreClient::recv_get_table(Table& _return)
if (result.__isset.o2) {
throw result.o2;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result");
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result");
}
-void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl)
+bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData)
{
- send_alter_table(dbname, tbl_name, new_tbl);
- recv_alter_table();
+ send_drop_partition(db_name, tbl_name, part_vals, deleteData);
+ return recv_drop_partition();
}
-void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl)
+void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_alter_table_pargs args;
- args.dbname = &dbname;
+ ThriftHiveMetastore_drop_partition_pargs args;
+ args.db_name = &db_name;
args.tbl_name = &tbl_name;
- args.new_tbl = &new_tbl;
+ args.part_vals = &part_vals;
+ args.deleteData = &deleteData;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13125,7 +14106,7 @@ void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, cons
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_alter_table()
+bool ThriftHiveMetastoreClient::recv_drop_partition()
{
int32_t rseqid = 0;
@@ -13146,39 +14127,47 @@ void ThriftHiveMetastoreClient::recv_alter_table()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("alter_table") != 0) {
+ if (fname.compare("drop_partition") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_alter_table_presult result;
+ bool _return;
+ ThriftHiveMetastore_drop_partition_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;
}
- return;
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result");
}
-void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part)
+bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData)
{
- send_add_partition(new_part);
- recv_add_partition(_return);
+ send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData);
+ return recv_drop_partition_by_name();
}
-void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part)
+void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_add_partition_pargs args;
- args.new_part = &new_part;
+ ThriftHiveMetastore_drop_partition_by_name_pargs args;
+ args.db_name = &db_name;
+ args.tbl_name = &tbl_name;
+ args.part_name = &part_name;
+ args.deleteData = &deleteData;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13186,7 +14175,7 @@ void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part)
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return)
+bool ThriftHiveMetastoreClient::recv_drop_partition_by_name()
{
int32_t rseqid = 0;
@@ -13207,21 +14196,21 @@ void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("add_partition") != 0) {
+ if (fname.compare("drop_partition_by_name") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_add_partition_presult result;
+ bool _return;
+ ThriftHiveMetastore_drop_partition_by_name_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- // _return pointer has now been filled
- return;
+ return _return;
}
if (result.__isset.o1) {
throw result.o1;
@@ -13229,24 +14218,21 @@ void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return)
if (result.__isset.o2) {
throw result.o2;
}
- if (result.__isset.o3) {
- throw result.o3;
- }
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result");
}
-void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals)
+void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals)
{
- send_append_partition(db_name, tbl_name, part_vals);
- recv_append_partition(_return);
+ send_get_partition(db_name, tbl_name, part_vals);
+ recv_get_partition(_return);
}
-void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals)
+void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_append_partition_pargs args;
+ ThriftHiveMetastore_get_partition_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
args.part_vals = &part_vals;
@@ -13257,7 +14243,7 @@ void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return)
+void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return)
{
int32_t rseqid = 0;
@@ -13278,13 +14264,13 @@ void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("append_partition") != 0) {
+ if (fname.compare("get_partition") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_append_partition_presult result;
+ ThriftHiveMetastore_get_partition_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -13300,27 +14286,26 @@ void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return)
if (result.__isset.o2) {
throw result.o2;
}
- if (result.__isset.o3) {
- throw result.o3;
- }
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result");
}
-void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name)
+void ThriftHiveMetastoreClient::get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names)
{
- send_append_partition_by_name(db_name, tbl_name, part_name);
- recv_append_partition_by_name(_return);
+ send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names);
+ recv_get_partition_with_auth(_return);
}
-void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name)
+void ThriftHiveMetastoreClient::send_get_partition_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_append_partition_by_name_pargs args;
+ ThriftHiveMetastore_get_partition_with_auth_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
- args.part_name = &part_name;
+ args.part_vals = &part_vals;
+ args.user_name = &user_name;
+ args.group_names = &group_names;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13328,7 +14313,7 @@ void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string&
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return)
+void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return)
{
int32_t rseqid = 0;
@@ -13349,13 +14334,13 @@ void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("append_partition_by_name") != 0) {
+ if (fname.compare("get_partition_with_auth") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_append_partition_by_name_presult result;
+ ThriftHiveMetastore_get_partition_with_auth_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -13371,28 +14356,24 @@ void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return
if (result.__isset.o2) {
throw result.o2;
}
- if (result.__isset.o3) {
- throw result.o3;
- }
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result");
}
-bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData)
+void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name)
{
- send_drop_partition(db_name, tbl_name, part_vals, deleteData);
- return recv_drop_partition();
+ send_get_partition_by_name(db_name, tbl_name, part_name);
+ recv_get_partition_by_name(_return);
}
-void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData)
+void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_drop_partition_pargs args;
+ ThriftHiveMetastore_get_partition_by_name_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
- args.part_vals = &part_vals;
- args.deleteData = &deleteData;
+ args.part_name = &part_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13400,7 +14381,7 @@ void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name,
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_drop_partition()
+void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return)
{
int32_t rseqid = 0;
@@ -13421,21 +14402,21 @@ bool ThriftHiveMetastoreClient::recv_drop_partition()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("drop_partition") != 0) {
+ if (fname.compare("get_partition_by_name") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- bool _return;
- ThriftHiveMetastore_drop_partition_presult result;
+ ThriftHiveMetastore_get_partition_by_name_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- return _return;
+ // _return pointer has now been filled
+ return;
}
if (result.__isset.o1) {
throw result.o1;
@@ -13443,25 +14424,24 @@ bool ThriftHiveMetastoreClient::recv_drop_partition()
if (result.__isset.o2) {
throw result.o2;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result");
}
-bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData)
+void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts)
{
- send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData);
- return recv_drop_partition_by_name();
+ send_get_partitions(db_name, tbl_name, max_parts);
+ recv_get_partitions(_return);
}
-void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData)
+void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_drop_partition_by_name_pargs args;
+ ThriftHiveMetastore_get_partitions_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
- args.part_name = &part_name;
- args.deleteData = &deleteData;
+ args.max_parts = &max_parts;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13469,7 +14449,7 @@ void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& d
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_drop_partition_by_name()
+void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return)
{
int32_t rseqid = 0;
@@ -13490,21 +14470,21 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_by_name()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("drop_partition_by_name") != 0) {
+ if (fname.compare("get_partitions") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- bool _return;
- ThriftHiveMetastore_drop_partition_by_name_presult result;
+ ThriftHiveMetastore_get_partitions_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- return _return;
+ // _return pointer has now been filled
+ return;
}
if (result.__isset.o1) {
throw result.o1;
@@ -13512,24 +14492,26 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_by_name()
if (result.__isset.o2) {
throw result.o2;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals)
+void ThriftHiveMetastoreClient::get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names)
{
- send_get_partition(db_name, tbl_name, part_vals);
- recv_get_partition(_return);
+ send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names);
+ recv_get_partitions_with_auth(_return);
}
-void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals)
+void ThriftHiveMetastoreClient::send_get_partitions_with_auth(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_partition_pargs args;
+ ThriftHiveMetastore_get_partitions_with_auth_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
- args.part_vals = &part_vals;
+ args.max_parts = &max_parts;
+ args.user_name = &user_name;
+ args.group_names = &group_names;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13537,7 +14519,7 @@ void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, c
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return)
+void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return)
{
int32_t rseqid = 0;
@@ -13558,13 +14540,13 @@ void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_partition") != 0) {
+ if (fname.compare("get_partitions_with_auth") != 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_partition_presult result;
+ ThriftHiveMetastore_get_partitions_with_auth_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -13580,26 +14562,24 @@ void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return)
if (result.__isset.o2) {
throw result.o2;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_with_auth failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names)
+void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts)
{
- send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names);
- recv_get_partition_with_auth(_return);
+ send_get_partition_names(db_name, tbl_name, max_parts);
+ recv_get_partition_names(_return);
}
-void ThriftHiveMetastoreClient::send_get_partition_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names)
+void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_partition_with_auth", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_partition_with_auth_pargs args;
+ ThriftHiveMetastore_get_partition_names_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
- args.part_vals = &part_vals;
- args.user_name = &user_name;
- args.group_names = &group_names;
+ args.max_parts = &max_parts;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13607,7 +14587,7 @@ void ThriftHiveMetastoreClient::send_get_partition_with_auth(const std::string&
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return)
+void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return)
{
int32_t rseqid = 0;
@@ -13628,13 +14608,13 @@ void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_partition_with_auth") != 0) {
+ if (fname.compare("get_partition_names") != 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_partition_with_auth_presult result;
+ ThriftHiveMetastore_get_partition_names_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -13644,30 +14624,28 @@ void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return)
// _return pointer has now been filled
return;
}
- if (result.__isset.o1) {
- throw result.o1;
- }
if (result.__isset.o2) {
throw result.o2;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name)
+void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts)
{
- send_get_partition_by_name(db_name, tbl_name, part_name);
- recv_get_partition_by_name(_return);
+ send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts);
+ recv_get_partitions_ps(_return);
}
-void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name)
+void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_partition_by_name_pargs args;
+ ThriftHiveMetastore_get_partitions_ps_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
- args.part_name = &part_name;
+ args.part_vals = &part_vals;
+ args.max_parts = &max_parts;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13675,7 +14653,7 @@ void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return)
+void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return)
{
int32_t rseqid = 0;
@@ -13696,13 +14674,13 @@ void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_partition_by_name") != 0) {
+ if (fname.compare("get_partitions_ps") != 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_partition_by_name_presult result;
+ ThriftHiveMetastore_get_partitions_ps_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -13715,27 +14693,27 @@ void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return)
if (result.__isset.o1) {
throw result.o1;
}
- if (result.__isset.o2) {
- throw result.o2;
- }
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts)
+void ThriftHiveMetastoreClient::get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names)
{
- send_get_partitions(db_name, tbl_name, max_parts);
- recv_get_partitions(_return);
+ send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names);
+ recv_get_partitions_ps_with_auth(_return);
}
-void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts)
+void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_partitions_pargs args;
+ ThriftHiveMetastore_get_partitions_ps_with_auth_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
+ args.part_vals = &part_vals;
args.max_parts = &max_parts;
+ args.user_name = &user_name;
+ args.group_names = &group_names;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13743,7 +14721,7 @@ void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name,
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return)
{
int32_t rseqid = 0;
@@ -13764,13 +14742,13 @@ void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _re
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_partitions") != 0) {
+ if (fname.compare("get_partitions_ps_with_auth") != 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_partitions_presult result;
+ ThriftHiveMetastore_get_partitions_ps_with_auth_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -13786,26 +14764,25 @@ void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _re
if (result.__isset.o2) {
throw result.o2;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names)
+void ThriftHiveMetastoreClient::get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts)
{
- send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names);
- recv_get_partitions_with_auth(_return);
+ send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts);
+ recv_get_partition_names_ps(_return);
}
-void ThriftHiveMetastoreClient::send_get_partitions_with_auth(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names)
+void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_partitions_with_auth", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_partitions_with_auth_pargs args;
+ ThriftHiveMetastore_get_partition_names_ps_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
+ args.part_vals = &part_vals;
args.max_parts = &max_parts;
- args.user_name = &user_name;
- args.group_names = &group_names;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13813,7 +14790,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_with_auth(const std::string&
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return)
{
int32_t rseqid = 0;
@@ -13834,13 +14811,13 @@ void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vectorgetTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_partitions_with_auth") != 0) {
+ if (fname.compare("get_partition_names_ps") != 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_partitions_with_auth_presult result;
+ ThriftHiveMetastore_get_partition_names_ps_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -13853,26 +14830,24 @@ void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts)
+void ThriftHiveMetastoreClient::get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts)
{
- send_get_partition_names(db_name, tbl_name, max_parts);
- recv_get_partition_names(_return);
+ send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts);
+ recv_get_partitions_by_filter(_return);
}
-void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts)
+void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_partition_names_pargs args;
+ ThriftHiveMetastore_get_partitions_by_filter_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
+ args.filter = &filter;
args.max_parts = &max_parts;
args.write(oprot_);
@@ -13881,7 +14856,7 @@ void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_n
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return)
{
int32_t rseqid = 0;
@@ -13902,13 +14877,13 @@ void ThriftHiveMetastoreClient::recv_get_partition_names(std::vectorgetTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_partition_names") != 0) {
+ if (fname.compare("get_partitions_by_filter") != 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_partition_names_presult result;
+ ThriftHiveMetastore_get_partitions_by_filter_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -13918,28 +14893,30 @@ void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts)
+void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part)
{
- send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts);
- recv_get_partitions_ps(_return);
+ send_alter_partition(db_name, tbl_name, new_part);
+ recv_alter_partition();
}
-void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts)
+void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_partitions_ps_pargs args;
+ ThriftHiveMetastore_alter_partition_pargs args;
args.db_name = &db_name;
args.tbl_name = &tbl_name;
- args.part_vals = &part_vals;
- args.max_parts = &max_parts;
+ args.new_part = &new_part;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -13947,7 +14924,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_nam
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_alter_partition()
{
int32_t rseqid = 0;
@@ -13968,46 +14945,40 @@ void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector &
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_partitions_ps") != 0) {
+ if (fname.compare("alter_partition") != 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_partitions_ps_presult result;
- result.success = &_return;
+ ThriftHiveMetastore_alter_partition_presult result;
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_partitions_ps failed: unknown result");
+ if (result.__isset.o2) {
+ throw result.o2;
+ }
+ return;
}
-void ThriftHiveMetastoreClient::get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names)
+void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue)
{
- send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names);
- recv_get_partitions_ps_with_auth(_return);
+ send_get_config_value(name, defaultValue);
+ recv_get_config_value(_return);
}
-void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names)
+void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_partitions_ps_with_auth", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_partitions_ps_with_auth_pargs args;
- args.db_name = &db_name;
- args.tbl_name = &tbl_name;
- args.part_vals = &part_vals;
- args.max_parts = &max_parts;
- args.user_name = &user_name;
- args.group_names = &group_names;
+ ThriftHiveMetastore_get_config_value_pargs args;
+ args.name = &name;
+ args.defaultValue = &defaultValue;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14015,7 +14986,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(const std::stri
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return)
{
int32_t rseqid = 0;
@@ -14036,13 +15007,13 @@ void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vectorgetTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_partitions_ps_with_auth") != 0) {
+ if (fname.compare("get_config_value") != 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_partitions_ps_with_auth_presult result;
+ ThriftHiveMetastore_get_config_value_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -14055,28 +15026,22 @@ void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts)
+void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name)
{
- send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts);
- recv_get_partition_names_ps(_return);
+ send_partition_name_to_vals(part_name);
+ recv_partition_name_to_vals(_return);
}
-void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts)
+void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_partition_names_ps_pargs args;
- args.db_name = &db_name;
- args.tbl_name = &tbl_name;
- args.part_vals = &part_vals;
- args.max_parts = &max_parts;
+ ThriftHiveMetastore_partition_name_to_vals_pargs args;
+ args.part_name = &part_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14084,7 +15049,7 @@ void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& d
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return)
{
int32_t rseqid = 0;
@@ -14105,13 +15070,13 @@ void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vectorgetTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_partition_names_ps") != 0) {
+ if (fname.compare("partition_name_to_vals") != 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_partition_names_ps_presult result;
+ ThriftHiveMetastore_partition_name_to_vals_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -14124,25 +15089,22 @@ void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts)
+void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name)
{
- send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts);
- recv_get_partitions_by_filter(_return);
+ send_partition_name_to_spec(part_name);
+ recv_partition_name_to_spec(_return);
}
-void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts)
+void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_partitions_by_filter_pargs args;
- args.db_name = &db_name;
- args.tbl_name = &tbl_name;
- args.filter = &filter;
- args.max_parts = &max_parts;
+ ThriftHiveMetastore_partition_name_to_spec_pargs args;
+ args.part_name = &part_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14150,7 +15112,7 @@ void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string&
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return)
{
int32_t rseqid = 0;
@@ -14171,13 +15133,13 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vectorgetTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_partitions_by_filter") != 0) {
+ if (fname.compare("partition_name_to_spec") != 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_partitions_by_filter_presult result;
+ ThriftHiveMetastore_partition_name_to_spec_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -14190,27 +15152,23 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vectorwriteMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_alter_partition_pargs args;
- args.db_name = &db_name;
- args.tbl_name = &tbl_name;
- args.new_part = &new_part;
+ ThriftHiveMetastore_add_index_pargs args;
+ args.new_index = &new_index;
+ args.index_table = &index_table;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14218,7 +15176,7 @@ void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name,
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_alter_partition()
+void ThriftHiveMetastoreClient::recv_add_index(Index& _return)
{
int32_t rseqid = 0;
@@ -14239,40 +15197,50 @@ void ThriftHiveMetastoreClient::recv_alter_partition()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("alter_partition") != 0) {
+ if (fname.compare("add_index") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_alter_partition_presult result;
+ ThriftHiveMetastore_add_index_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;
}
if (result.__isset.o2) {
throw result.o2;
}
- return;
+ if (result.__isset.o3) {
+ throw result.o3;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue)
+void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx)
{
- send_get_config_value(name, defaultValue);
- recv_get_config_value(_return);
+ send_alter_index(dbname, base_tbl_name, idx_name, new_idx);
+ recv_alter_index();
}
-void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue)
+void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_config_value_pargs args;
- args.name = &name;
- args.defaultValue = &defaultValue;
+ ThriftHiveMetastore_alter_index_pargs args;
+ args.dbname = &dbname;
+ args.base_tbl_name = &base_tbl_name;
+ args.idx_name = &idx_name;
+ args.new_idx = &new_idx;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14280,7 +15248,7 @@ void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, c
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return)
+void ThriftHiveMetastoreClient::recv_alter_index()
{
int32_t rseqid = 0;
@@ -14301,41 +15269,42 @@ void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_config_value") != 0) {
+ if (fname.compare("alter_index") != 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_config_value_presult result;
- result.success = &_return;
+ ThriftHiveMetastore_alter_index_presult result;
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_config_value failed: unknown result");
+ if (result.__isset.o2) {
+ throw result.o2;
+ }
+ return;
}
-void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name)
+bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData)
{
- send_partition_name_to_vals(part_name);
- recv_partition_name_to_vals(_return);
+ send_drop_index_by_name(db_name, tbl_name, index_name, deleteData);
+ return recv_drop_index_by_name();
}
-void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name)
+void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_partition_name_to_vals_pargs args;
- args.part_name = &part_name;
+ ThriftHiveMetastore_drop_index_by_name_pargs args;
+ args.db_name = &db_name;
+ args.tbl_name = &tbl_name;
+ args.index_name = &index_name;
+ args.deleteData = &deleteData;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14343,7 +15312,7 @@ void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& p
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return)
+bool ThriftHiveMetastoreClient::recv_drop_index_by_name()
{
int32_t rseqid = 0;
@@ -14364,41 +15333,46 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vectorgetTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("partition_name_to_vals") != 0) {
+ if (fname.compare("drop_index_by_name") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_partition_name_to_vals_presult result;
+ bool _return;
+ ThriftHiveMetastore_drop_index_by_name_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- // _return pointer has now been filled
- return;
+ return _return;
}
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result");
+ if (result.__isset.o2) {
+ throw result.o2;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result");
}
-void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name)
+void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name)
{
- send_partition_name_to_spec(part_name);
- recv_partition_name_to_spec(_return);
+ send_get_index_by_name(db_name, tbl_name, index_name);
+ recv_get_index_by_name(_return);
}
-void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name)
+void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_partition_name_to_spec_pargs args;
- args.part_name = &part_name;
+ ThriftHiveMetastore_get_index_by_name_pargs args;
+ args.db_name = &db_name;
+ args.tbl_name = &tbl_name;
+ args.index_name = &index_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14406,7 +15380,7 @@ void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& p
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return)
+void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return)
{
int32_t rseqid = 0;
@@ -14427,13 +15401,13 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::mapgetTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("partition_name_to_spec") != 0) {
+ if (fname.compare("get_index_by_name") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_partition_name_to_spec_presult result;
+ ThriftHiveMetastore_get_index_by_name_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -14446,23 +15420,27 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes)
{
- send_add_index(new_index, index_table);
- recv_add_index(_return);
+ send_get_indexes(db_name, tbl_name, max_indexes);
+ recv_get_indexes(_return);
}
-void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table)
+void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_add_index_pargs args;
- args.new_index = &new_index;
- args.index_table = &index_table;
+ ThriftHiveMetastore_get_indexes_pargs args;
+ args.db_name = &db_name;
+ args.tbl_name = &tbl_name;
+ args.max_indexes = &max_indexes;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14470,7 +15448,7 @@ void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Tab
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_add_index(Index& _return)
+void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return)
{
int32_t rseqid = 0;
@@ -14491,13 +15469,13 @@ void ThriftHiveMetastoreClient::recv_add_index(Index& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("add_index") != 0) {
+ if (fname.compare("get_indexes") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_add_index_presult result;
+ ThriftHiveMetastore_get_indexes_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -14513,28 +15491,24 @@ void ThriftHiveMetastoreClient::recv_add_index(Index& _return)
if (result.__isset.o2) {
throw result.o2;
}
- if (result.__isset.o3) {
- throw result.o3;
- }
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result");
}
-void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx)
+void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes)
{
- send_alter_index(dbname, base_tbl_name, idx_name, new_idx);
- recv_alter_index();
+ send_get_index_names(db_name, tbl_name, max_indexes);
+ recv_get_index_names(_return);
}
-void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx)
+void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("alter_index", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_alter_index_pargs args;
- args.dbname = &dbname;
- args.base_tbl_name = &base_tbl_name;
- args.idx_name = &idx_name;
- args.new_idx = &new_idx;
+ ThriftHiveMetastore_get_index_names_pargs args;
+ args.db_name = &db_name;
+ args.tbl_name = &tbl_name;
+ args.max_indexes = &max_indexes;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14542,7 +15516,7 @@ void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, cons
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_alter_index()
+void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return)
{
int32_t rseqid = 0;
@@ -14563,42 +15537,41 @@ void ThriftHiveMetastoreClient::recv_alter_index()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("alter_index") != 0) {
+ if (fname.compare("get_index_names") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_alter_index_presult result;
+ ThriftHiveMetastore_get_index_names_presult result;
+ result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- if (result.__isset.o1) {
- throw result.o1;
+ if (result.__isset.success) {
+ // _return pointer has now been filled
+ return;
}
if (result.__isset.o2) {
throw result.o2;
}
- return;
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result");
}
-bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData)
+bool ThriftHiveMetastoreClient::create_role(const Role& role)
{
- send_drop_index_by_name(db_name, tbl_name, index_name, deleteData);
- return recv_drop_index_by_name();
+ send_create_role(role);
+ return recv_create_role();
}
-void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData)
+void ThriftHiveMetastoreClient::send_create_role(const Role& role)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("create_role", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_drop_index_by_name_pargs args;
- args.db_name = &db_name;
- args.tbl_name = &tbl_name;
- args.index_name = &index_name;
- args.deleteData = &deleteData;
+ ThriftHiveMetastore_create_role_pargs args;
+ args.role = &role;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14606,7 +15579,7 @@ void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_na
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_drop_index_by_name()
+bool ThriftHiveMetastoreClient::recv_create_role()
{
int32_t rseqid = 0;
@@ -14627,14 +15600,14 @@ bool ThriftHiveMetastoreClient::recv_drop_index_by_name()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("drop_index_by_name") != 0) {
+ if (fname.compare("create_role") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
bool _return;
- ThriftHiveMetastore_drop_index_by_name_presult result;
+ ThriftHiveMetastore_create_role_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -14646,27 +15619,22 @@ bool ThriftHiveMetastoreClient::recv_drop_index_by_name()
if (result.__isset.o1) {
throw result.o1;
}
- if (result.__isset.o2) {
- throw result.o2;
- }
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_role failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name)
+bool ThriftHiveMetastoreClient::drop_role(const std::string& role_name)
{
- send_get_index_by_name(db_name, tbl_name, index_name);
- recv_get_index_by_name(_return);
+ send_drop_role(role_name);
+ return recv_drop_role();
}
-void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name)
+void ThriftHiveMetastoreClient::send_drop_role(const std::string& role_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_index_by_name_pargs args;
- args.db_name = &db_name;
- args.tbl_name = &tbl_name;
- args.index_name = &index_name;
+ ThriftHiveMetastore_drop_role_pargs args;
+ args.role_name = &role_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14674,7 +15642,7 @@ void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_nam
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return)
+bool ThriftHiveMetastoreClient::recv_drop_role()
{
int32_t rseqid = 0;
@@ -14695,46 +15663,46 @@ void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_index_by_name") != 0) {
+ if (fname.compare("drop_role") != 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_index_by_name_presult result;
+ bool _return;
+ ThriftHiveMetastore_drop_role_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- // _return pointer has now been filled
- return;
+ 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, "get_index_by_name failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_role failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes)
+bool ThriftHiveMetastoreClient::grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option)
{
- send_get_indexes(db_name, tbl_name, max_indexes);
- recv_get_indexes(_return);
+ send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option);
+ return recv_grant_role();
}
-void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes)
+void ThriftHiveMetastoreClient::send_grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_indexes_pargs args;
- args.db_name = &db_name;
- args.tbl_name = &tbl_name;
- args.max_indexes = &max_indexes;
+ ThriftHiveMetastore_grant_role_pargs args;
+ args.role_name = &role_name;
+ args.principal_name = &principal_name;
+ args.principal_type = &principal_type;
+ args.grantor = &grantor;
+ args.grantorType = &grantorType;
+ args.grant_option = &grant_option;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14742,7 +15710,7 @@ void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, con
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return)
+bool ThriftHiveMetastoreClient::recv_grant_role()
{
int32_t rseqid = 0;
@@ -14763,46 +15731,43 @@ void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_indexes") != 0) {
+ if (fname.compare("grant_role") != 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_indexes_presult result;
+ bool _return;
+ ThriftHiveMetastore_grant_role_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- // _return pointer has now been filled
- return;
+ 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, "get_indexes failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_role failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes)
+bool ThriftHiveMetastoreClient::revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type)
{
- send_get_index_names(db_name, tbl_name, max_indexes);
- recv_get_index_names(_return);
+ send_revoke_role(role_name, principal_name, principal_type);
+ return recv_revoke_role();
}
-void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes)
+void ThriftHiveMetastoreClient::send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_index_names_pargs args;
- args.db_name = &db_name;
- args.tbl_name = &tbl_name;
- args.max_indexes = &max_indexes;
+ ThriftHiveMetastore_revoke_role_pargs args;
+ args.role_name = &role_name;
+ args.principal_name = &principal_name;
+ args.principal_type = &principal_type;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14810,7 +15775,7 @@ void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name,
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return)
+bool ThriftHiveMetastoreClient::recv_revoke_role()
{
int32_t rseqid = 0;
@@ -14831,41 +15796,42 @@ void ThriftHiveMetastoreClient::recv_get_index_names(std::vector &
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_index_names") != 0) {
+ if (fname.compare("revoke_role") != 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_index_names_presult result;
+ bool _return;
+ ThriftHiveMetastore_revoke_role_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- // _return pointer has now been filled
- return;
+ return _return;
}
- if (result.__isset.o2) {
- throw result.o2;
+ if (result.__isset.o1) {
+ throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_role failed: unknown result");
}
-bool ThriftHiveMetastoreClient::create_role(const Role& role)
+void ThriftHiveMetastoreClient::list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type)
{
- send_create_role(role);
- return recv_create_role();
+ send_list_roles(principal_name, principal_type);
+ recv_list_roles(_return);
}
-void ThriftHiveMetastoreClient::send_create_role(const Role& role)
+void ThriftHiveMetastoreClient::send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("create_role", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_create_role_pargs args;
- args.role = &role;
+ ThriftHiveMetastore_list_roles_pargs args;
+ args.principal_name = &principal_name;
+ args.principal_type = &principal_type;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14873,7 +15839,7 @@ void ThriftHiveMetastoreClient::send_create_role(const Role& role)
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_create_role()
+void ThriftHiveMetastoreClient::recv_list_roles(std::vector & _return)
{
int32_t rseqid = 0;
@@ -14894,41 +15860,43 @@ bool ThriftHiveMetastoreClient::recv_create_role()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("create_role") != 0) {
+ if (fname.compare("list_roles") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- bool _return;
- ThriftHiveMetastore_create_role_presult result;
+ ThriftHiveMetastore_list_roles_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- return _return;
+ // _return pointer has now been filled
+ return;
}
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_role failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_roles failed: unknown result");
}
-bool ThriftHiveMetastoreClient::drop_role(const std::string& role_name)
+void ThriftHiveMetastoreClient::get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names)
{
- send_drop_role(role_name);
- return recv_drop_role();
+ send_get_privilege_set(hiveObject, user_name, group_names);
+ recv_get_privilege_set(_return);
}
-void ThriftHiveMetastoreClient::send_drop_role(const std::string& role_name)
+void ThriftHiveMetastoreClient::send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("drop_role", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_drop_role_pargs args;
- args.role_name = &role_name;
+ ThriftHiveMetastore_get_privilege_set_pargs args;
+ args.hiveObject = &hiveObject;
+ args.user_name = &user_name;
+ args.group_names = &group_names;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -14936,7 +15904,7 @@ void ThriftHiveMetastoreClient::send_drop_role(const std::string& role_name)
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_drop_role()
+void ThriftHiveMetastoreClient::recv_get_privilege_set(PrincipalPrivilegeSet& _return)
{
int32_t rseqid = 0;
@@ -14957,46 +15925,43 @@ bool ThriftHiveMetastoreClient::recv_drop_role()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("drop_role") != 0) {
+ if (fname.compare("get_privilege_set") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- bool _return;
- ThriftHiveMetastore_drop_role_presult result;
+ ThriftHiveMetastore_get_privilege_set_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- return _return;
+ // _return pointer has now been filled
+ return;
}
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_role failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_privilege_set failed: unknown result");
}
-bool ThriftHiveMetastoreClient::grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option)
+void ThriftHiveMetastoreClient::list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject)
{
- send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option);
- return recv_grant_role();
+ send_list_privileges(principal_name, principal_type, hiveObject);
+ recv_list_privileges(_return);
}
-void ThriftHiveMetastoreClient::send_grant_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type, const std::string& grantor, const PrincipalType::type grantorType, const bool grant_option)
+void ThriftHiveMetastoreClient::send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("grant_role", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_grant_role_pargs args;
- args.role_name = &role_name;
+ ThriftHiveMetastore_list_privileges_pargs args;
args.principal_name = &principal_name;
args.principal_type = &principal_type;
- args.grantor = &grantor;
- args.grantorType = &grantorType;
- args.grant_option = &grant_option;
+ args.hiveObject = &hiveObject;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -15004,7 +15969,7 @@ void ThriftHiveMetastoreClient::send_grant_role(const std::string& role_name, co
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_grant_role()
+void ThriftHiveMetastoreClient::recv_list_privileges(std::vector & _return)
{
int32_t rseqid = 0;
@@ -15025,43 +15990,41 @@ bool ThriftHiveMetastoreClient::recv_grant_role()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("grant_role") != 0) {
+ if (fname.compare("list_privileges") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- bool _return;
- ThriftHiveMetastore_grant_role_presult result;
+ ThriftHiveMetastore_list_privileges_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- return _return;
+ // _return pointer has now been filled
+ return;
}
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_role failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_privileges failed: unknown result");
}
-bool ThriftHiveMetastoreClient::revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type)
+bool ThriftHiveMetastoreClient::grant_privileges(const PrivilegeBag& privileges)
{
- send_revoke_role(role_name, principal_name, principal_type);
- return recv_revoke_role();
+ send_grant_privileges(privileges);
+ return recv_grant_privileges();
}
-void ThriftHiveMetastoreClient::send_revoke_role(const std::string& role_name, const std::string& principal_name, const PrincipalType::type principal_type)
+void ThriftHiveMetastoreClient::send_grant_privileges(const PrivilegeBag& privileges)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("revoke_role", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("grant_privileges", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_revoke_role_pargs args;
- args.role_name = &role_name;
- args.principal_name = &principal_name;
- args.principal_type = &principal_type;
+ ThriftHiveMetastore_grant_privileges_pargs args;
+ args.privileges = &privileges;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -15069,7 +16032,7 @@ void ThriftHiveMetastoreClient::send_revoke_role(const std::string& role_name, c
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_revoke_role()
+bool ThriftHiveMetastoreClient::recv_grant_privileges()
{
int32_t rseqid = 0;
@@ -15090,14 +16053,14 @@ bool ThriftHiveMetastoreClient::recv_revoke_role()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("revoke_role") != 0) {
+ if (fname.compare("grant_privileges") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
bool _return;
- ThriftHiveMetastore_revoke_role_presult result;
+ ThriftHiveMetastore_grant_privileges_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -15109,23 +16072,22 @@ bool ThriftHiveMetastoreClient::recv_revoke_role()
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_role failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result");
}
-void ThriftHiveMetastoreClient::list_roles(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type)
+bool ThriftHiveMetastoreClient::revoke_privileges(const PrivilegeBag& privileges)
{
- send_list_roles(principal_name, principal_type);
- recv_list_roles(_return);
+ send_revoke_privileges(privileges);
+ return recv_revoke_privileges();
}
-void ThriftHiveMetastoreClient::send_list_roles(const std::string& principal_name, const PrincipalType::type principal_type)
+void ThriftHiveMetastoreClient::send_revoke_privileges(const PrivilegeBag& privileges)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("list_roles", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_list_roles_pargs args;
- args.principal_name = &principal_name;
- args.principal_type = &principal_type;
+ ThriftHiveMetastore_revoke_privileges_pargs args;
+ args.privileges = &privileges;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -15133,7 +16095,7 @@ void ThriftHiveMetastoreClient::send_list_roles(const std::string& principal_nam
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_list_roles(std::vector & _return)
+bool ThriftHiveMetastoreClient::recv_revoke_privileges()
{
int32_t rseqid = 0;
@@ -15154,43 +16116,41 @@ void ThriftHiveMetastoreClient::recv_list_roles(std::vector & _return)
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("list_roles") != 0) {
+ if (fname.compare("revoke_privileges") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_list_roles_presult result;
+ bool _return;
+ ThriftHiveMetastore_revoke_privileges_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
if (result.__isset.success) {
- // _return pointer has now been filled
- return;
+ return _return;
}
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "list_roles failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result");
}
-void ThriftHiveMetastoreClient::get_privilege_set(PrincipalPrivilegeSet& _return, const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names)
+void ThriftHiveMetastoreClient::get_delegation_token(std::string& _return, const std::string& renewer_kerberos_principal_name)
{
- send_get_privilege_set(hiveObject, user_name, group_names);
- recv_get_privilege_set(_return);
+ send_get_delegation_token(renewer_kerberos_principal_name);
+ recv_get_delegation_token(_return);
}
-void ThriftHiveMetastoreClient::send_get_privilege_set(const HiveObjectRef& hiveObject, const std::string& user_name, const std::vector & group_names)
+void ThriftHiveMetastoreClient::send_get_delegation_token(const std::string& renewer_kerberos_principal_name)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("get_privilege_set", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_get_privilege_set_pargs args;
- args.hiveObject = &hiveObject;
- args.user_name = &user_name;
- args.group_names = &group_names;
+ ThriftHiveMetastore_get_delegation_token_pargs args;
+ args.renewer_kerberos_principal_name = &renewer_kerberos_principal_name;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -15198,7 +16158,7 @@ void ThriftHiveMetastoreClient::send_get_privilege_set(const HiveObjectRef& hive
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_get_privilege_set(PrincipalPrivilegeSet& _return)
+void ThriftHiveMetastoreClient::recv_get_delegation_token(std::string& _return)
{
int32_t rseqid = 0;
@@ -15219,13 +16179,13 @@ void ThriftHiveMetastoreClient::recv_get_privilege_set(PrincipalPrivilegeSet& _r
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("get_privilege_set") != 0) {
+ if (fname.compare("get_delegation_token") != 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_privilege_set_presult result;
+ ThriftHiveMetastore_get_delegation_token_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -15238,24 +16198,23 @@ void ThriftHiveMetastoreClient::recv_get_privilege_set(PrincipalPrivilegeSet& _r
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_privilege_set failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_delegation_token failed: unknown result");
}
-void ThriftHiveMetastoreClient::list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject)
+void ThriftHiveMetastoreClient::get_delegation_token_with_signature(std::string& _return, const std::string& renewer_kerberos_principal_name, const std::string& token_signature)
{
- send_list_privileges(principal_name, principal_type, hiveObject);
- recv_list_privileges(_return);
+ send_get_delegation_token_with_signature(renewer_kerberos_principal_name, token_signature);
+ recv_get_delegation_token_with_signature(_return);
}
-void ThriftHiveMetastoreClient::send_list_privileges(const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject)
+void ThriftHiveMetastoreClient::send_get_delegation_token_with_signature(const std::string& renewer_kerberos_principal_name, const std::string& token_signature)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("list_privileges", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("get_delegation_token_with_signature", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_list_privileges_pargs args;
- args.principal_name = &principal_name;
- args.principal_type = &principal_type;
- args.hiveObject = &hiveObject;
+ ThriftHiveMetastore_get_delegation_token_with_signature_pargs args;
+ args.renewer_kerberos_principal_name = &renewer_kerberos_principal_name;
+ args.token_signature = &token_signature;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -15263,7 +16222,7 @@ void ThriftHiveMetastoreClient::send_list_privileges(const std::string& principa
oprot_->getTransport()->writeEnd();
}
-void ThriftHiveMetastoreClient::recv_list_privileges(std::vector & _return)
+void ThriftHiveMetastoreClient::recv_get_delegation_token_with_signature(std::string& _return)
{
int32_t rseqid = 0;
@@ -15284,13 +16243,13 @@ void ThriftHiveMetastoreClient::recv_list_privileges(std::vectorgetTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("list_privileges") != 0) {
+ if (fname.compare("get_delegation_token_with_signature") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- ThriftHiveMetastore_list_privileges_presult result;
+ ThriftHiveMetastore_get_delegation_token_with_signature_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -15303,22 +16262,22 @@ void ThriftHiveMetastoreClient::recv_list_privileges(std::vectorwriteMessageBegin("grant_privileges", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_grant_privileges_pargs args;
- args.privileges = &privileges;
+ ThriftHiveMetastore_renew_delegation_token_pargs args;
+ args.token_str_form = &token_str_form;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -15326,7 +16285,7 @@ void ThriftHiveMetastoreClient::send_grant_privileges(const PrivilegeBag& privil
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_grant_privileges()
+int64_t ThriftHiveMetastoreClient::recv_renew_delegation_token()
{
int32_t rseqid = 0;
@@ -15347,14 +16306,14 @@ bool ThriftHiveMetastoreClient::recv_grant_privileges()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("grant_privileges") != 0) {
+ if (fname.compare("renew_delegation_token") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- bool _return;
- ThriftHiveMetastore_grant_privileges_presult result;
+ int64_t _return;
+ ThriftHiveMetastore_renew_delegation_token_presult result;
result.success = &_return;
result.read(iprot_);
iprot_->readMessageEnd();
@@ -15366,22 +16325,22 @@ bool ThriftHiveMetastoreClient::recv_grant_privileges()
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result");
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "renew_delegation_token failed: unknown result");
}
-bool ThriftHiveMetastoreClient::revoke_privileges(const PrivilegeBag& privileges)
+void ThriftHiveMetastoreClient::cancel_delegation_token(const std::string& token_str_form)
{
- send_revoke_privileges(privileges);
- return recv_revoke_privileges();
+ send_cancel_delegation_token(token_str_form);
+ recv_cancel_delegation_token();
}
-void ThriftHiveMetastoreClient::send_revoke_privileges(const PrivilegeBag& privileges)
+void ThriftHiveMetastoreClient::send_cancel_delegation_token(const std::string& token_str_form)
{
int32_t cseqid = 0;
- oprot_->writeMessageBegin("revoke_privileges", ::apache::thrift::protocol::T_CALL, cseqid);
+ oprot_->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_CALL, cseqid);
- ThriftHiveMetastore_revoke_privileges_pargs args;
- args.privileges = &privileges;
+ ThriftHiveMetastore_cancel_delegation_token_pargs args;
+ args.token_str_form = &token_str_form;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -15389,7 +16348,7 @@ void ThriftHiveMetastoreClient::send_revoke_privileges(const PrivilegeBag& privi
oprot_->getTransport()->writeEnd();
}
-bool ThriftHiveMetastoreClient::recv_revoke_privileges()
+void ThriftHiveMetastoreClient::recv_cancel_delegation_token()
{
int32_t rseqid = 0;
@@ -15410,26 +16369,21 @@ bool ThriftHiveMetastoreClient::recv_revoke_privileges()
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);
}
- if (fname.compare("revoke_privileges") != 0) {
+ if (fname.compare("cancel_delegation_token") != 0) {
iprot_->skip(::apache::thrift::protocol::T_STRUCT);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME);
}
- bool _return;
- ThriftHiveMetastore_revoke_privileges_presult result;
- result.success = &_return;
+ ThriftHiveMetastore_cancel_delegation_token_presult result;
result.read(iprot_);
iprot_->readMessageEnd();
iprot_->getTransport()->readEnd();
- if (result.__isset.success) {
- return _return;
- }
if (result.__isset.o1) {
throw result.o1;
}
- throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result");
+ return;
}
bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot) {
@@ -17198,5 +18152,128 @@ void ThriftHiveMetastoreProcessor::process_revoke_privileges(int32_t seqid, ::ap
oprot->getTransport()->writeEnd();
}
+void ThriftHiveMetastoreProcessor::process_get_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+{
+ ThriftHiveMetastore_get_delegation_token_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ iprot->getTransport()->readEnd();
+
+ ThriftHiveMetastore_get_delegation_token_result result;
+ try {
+ iface_->get_delegation_token(result.success, args.renewer_kerberos_principal_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_delegation_token", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+ x.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+ return;
+ }
+
+ oprot->writeMessageBegin("get_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid);
+ result.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+}
+
+void ThriftHiveMetastoreProcessor::process_get_delegation_token_with_signature(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+{
+ ThriftHiveMetastore_get_delegation_token_with_signature_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ iprot->getTransport()->readEnd();
+
+ ThriftHiveMetastore_get_delegation_token_with_signature_result result;
+ try {
+ iface_->get_delegation_token_with_signature(result.success, args.renewer_kerberos_principal_name, args.token_signature);
+ 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_delegation_token_with_signature", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+ x.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+ return;
+ }
+
+ oprot->writeMessageBegin("get_delegation_token_with_signature", ::apache::thrift::protocol::T_REPLY, seqid);
+ result.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+}
+
+void ThriftHiveMetastoreProcessor::process_renew_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+{
+ ThriftHiveMetastore_renew_delegation_token_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ iprot->getTransport()->readEnd();
+
+ ThriftHiveMetastore_renew_delegation_token_result result;
+ try {
+ result.success = iface_->renew_delegation_token(args.token_str_form);
+ 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("renew_delegation_token", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+ x.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+ return;
+ }
+
+ oprot->writeMessageBegin("renew_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid);
+ result.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+}
+
+void ThriftHiveMetastoreProcessor::process_cancel_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot)
+{
+ ThriftHiveMetastore_cancel_delegation_token_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ iprot->getTransport()->readEnd();
+
+ ThriftHiveMetastore_cancel_delegation_token_result result;
+ try {
+ iface_->cancel_delegation_token(args.token_str_form);
+ } catch (MetaException &o1) {
+ result.o1 = o1;
+ result.__isset.o1 = true;
+ } catch (const std::exception& e) {
+ ::apache::thrift::TApplicationException x(e.what());
+ oprot->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+ x.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+ return;
+ }
+
+ oprot->writeMessageBegin("cancel_delegation_token", ::apache::thrift::protocol::T_REPLY, seqid);
+ result.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->flush();
+ oprot->getTransport()->writeEnd();
+}
+
}}} // namespace
diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
index 9029731..9b47ba8 100644
--- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
+++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
@@ -67,6 +67,10 @@ class ThriftHiveMetastoreIf : virtual public facebook::fb303::FacebookServiceIf
virtual void list_privileges(std::vector & _return, const std::string& principal_name, const PrincipalType::type principal_type, const HiveObjectRef& hiveObject) = 0;
virtual bool grant_privileges(const PrivilegeBag& privileges) = 0;
virtual bool revoke_privileges(const PrivilegeBag& privileges) = 0;
+ virtual void get_delegation_token(std::string& _return, const std::string& renewer_kerberos_principal_name) = 0;
+ virtual void get_delegation_token_with_signature(std::string& _return, const std::string& renewer_kerberos_principal_name, const std::string& token_signature) = 0;
+ virtual int64_t renew_delegation_token(const std::string& token_str_form) = 0;
+ virtual void cancel_delegation_token(const std::string& token_str_form) = 0;
};
class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public facebook::fb303::FacebookServiceNull {
@@ -239,6 +243,19 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p
bool _return = false;
return _return;
}
+ void get_delegation_token(std::string& /* _return */, const std::string& /* renewer_kerberos_principal_name */) {
+ return;
+ }
+ void get_delegation_token_with_signature(std::string& /* _return */, const std::string& /* renewer_kerberos_principal_name */, const std::string& /* token_signature */) {
+ return;
+ }
+ int64_t renew_delegation_token(const std::string& /* token_str_form */) {
+ int64_t _return = 0;
+ return _return;
+ }
+ void cancel_delegation_token(const std::string& /* token_str_form */) {
+ return;
+ }
};
typedef struct _ThriftHiveMetastore_create_database_args__isset {
@@ -6337,6 +6354,429 @@ class ThriftHiveMetastore_revoke_privileges_presult {
};
+typedef struct _ThriftHiveMetastore_get_delegation_token_args__isset {
+ _ThriftHiveMetastore_get_delegation_token_args__isset() : renewer_kerberos_principal_name(false) {}
+ bool renewer_kerberos_principal_name;
+} _ThriftHiveMetastore_get_delegation_token_args__isset;
+
+class ThriftHiveMetastore_get_delegation_token_args {
+ public:
+
+ ThriftHiveMetastore_get_delegation_token_args() : renewer_kerberos_principal_name("") {
+ }
+
+ virtual ~ThriftHiveMetastore_get_delegation_token_args() throw() {}
+
+ std::string renewer_kerberos_principal_name;
+
+ _ThriftHiveMetastore_get_delegation_token_args__isset __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_delegation_token_args & rhs) const
+ {
+ if (!(renewer_kerberos_principal_name == rhs.renewer_kerberos_principal_name))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_delegation_token_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_delegation_token_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_get_delegation_token_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_delegation_token_pargs() throw() {}
+
+ const std::string* renewer_kerberos_principal_name;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_delegation_token_result__isset {
+ _ThriftHiveMetastore_get_delegation_token_result__isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+} _ThriftHiveMetastore_get_delegation_token_result__isset;
+
+class ThriftHiveMetastore_get_delegation_token_result {
+ public:
+
+ ThriftHiveMetastore_get_delegation_token_result() : success("") {
+ }
+
+ virtual ~ThriftHiveMetastore_get_delegation_token_result() throw() {}
+
+ std::string success;
+ MetaException o1;
+
+ _ThriftHiveMetastore_get_delegation_token_result__isset __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_delegation_token_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_delegation_token_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_delegation_token_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_delegation_token_presult__isset {
+ _ThriftHiveMetastore_get_delegation_token_presult__isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+} _ThriftHiveMetastore_get_delegation_token_presult__isset;
+
+class ThriftHiveMetastore_get_delegation_token_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_delegation_token_presult() throw() {}
+
+ std::string* success;
+ MetaException o1;
+
+ _ThriftHiveMetastore_get_delegation_token_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _ThriftHiveMetastore_get_delegation_token_with_signature_args__isset {
+ _ThriftHiveMetastore_get_delegation_token_with_signature_args__isset() : renewer_kerberos_principal_name(false), token_signature(false) {}
+ bool renewer_kerberos_principal_name;
+ bool token_signature;
+} _ThriftHiveMetastore_get_delegation_token_with_signature_args__isset;
+
+class ThriftHiveMetastore_get_delegation_token_with_signature_args {
+ public:
+
+ ThriftHiveMetastore_get_delegation_token_with_signature_args() : renewer_kerberos_principal_name(""), token_signature("") {
+ }
+
+ virtual ~ThriftHiveMetastore_get_delegation_token_with_signature_args() throw() {}
+
+ std::string renewer_kerberos_principal_name;
+ std::string token_signature;
+
+ _ThriftHiveMetastore_get_delegation_token_with_signature_args__isset __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_delegation_token_with_signature_args & rhs) const
+ {
+ if (!(renewer_kerberos_principal_name == rhs.renewer_kerberos_principal_name))
+ return false;
+ if (!(token_signature == rhs.token_signature))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_delegation_token_with_signature_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_delegation_token_with_signature_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_get_delegation_token_with_signature_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_delegation_token_with_signature_pargs() throw() {}
+
+ const std::string* renewer_kerberos_principal_name;
+ const std::string* token_signature;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_delegation_token_with_signature_result__isset {
+ _ThriftHiveMetastore_get_delegation_token_with_signature_result__isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+} _ThriftHiveMetastore_get_delegation_token_with_signature_result__isset;
+
+class ThriftHiveMetastore_get_delegation_token_with_signature_result {
+ public:
+
+ ThriftHiveMetastore_get_delegation_token_with_signature_result() : success("") {
+ }
+
+ virtual ~ThriftHiveMetastore_get_delegation_token_with_signature_result() throw() {}
+
+ std::string success;
+ MetaException o1;
+
+ _ThriftHiveMetastore_get_delegation_token_with_signature_result__isset __isset;
+
+ bool operator == (const ThriftHiveMetastore_get_delegation_token_with_signature_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_get_delegation_token_with_signature_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_get_delegation_token_with_signature_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_get_delegation_token_with_signature_presult__isset {
+ _ThriftHiveMetastore_get_delegation_token_with_signature_presult__isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+} _ThriftHiveMetastore_get_delegation_token_with_signature_presult__isset;
+
+class ThriftHiveMetastore_get_delegation_token_with_signature_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_get_delegation_token_with_signature_presult() throw() {}
+
+ std::string* success;
+ MetaException o1;
+
+ _ThriftHiveMetastore_get_delegation_token_with_signature_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _ThriftHiveMetastore_renew_delegation_token_args__isset {
+ _ThriftHiveMetastore_renew_delegation_token_args__isset() : token_str_form(false) {}
+ bool token_str_form;
+} _ThriftHiveMetastore_renew_delegation_token_args__isset;
+
+class ThriftHiveMetastore_renew_delegation_token_args {
+ public:
+
+ ThriftHiveMetastore_renew_delegation_token_args() : token_str_form("") {
+ }
+
+ virtual ~ThriftHiveMetastore_renew_delegation_token_args() throw() {}
+
+ std::string token_str_form;
+
+ _ThriftHiveMetastore_renew_delegation_token_args__isset __isset;
+
+ bool operator == (const ThriftHiveMetastore_renew_delegation_token_args & rhs) const
+ {
+ if (!(token_str_form == rhs.token_str_form))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_renew_delegation_token_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_renew_delegation_token_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_renew_delegation_token_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_renew_delegation_token_pargs() throw() {}
+
+ const std::string* token_str_form;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_renew_delegation_token_result__isset {
+ _ThriftHiveMetastore_renew_delegation_token_result__isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+} _ThriftHiveMetastore_renew_delegation_token_result__isset;
+
+class ThriftHiveMetastore_renew_delegation_token_result {
+ public:
+
+ ThriftHiveMetastore_renew_delegation_token_result() : success(0) {
+ }
+
+ virtual ~ThriftHiveMetastore_renew_delegation_token_result() throw() {}
+
+ int64_t success;
+ MetaException o1;
+
+ _ThriftHiveMetastore_renew_delegation_token_result__isset __isset;
+
+ bool operator == (const ThriftHiveMetastore_renew_delegation_token_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ if (!(o1 == rhs.o1))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_renew_delegation_token_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_renew_delegation_token_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_renew_delegation_token_presult__isset {
+ _ThriftHiveMetastore_renew_delegation_token_presult__isset() : success(false), o1(false) {}
+ bool success;
+ bool o1;
+} _ThriftHiveMetastore_renew_delegation_token_presult__isset;
+
+class ThriftHiveMetastore_renew_delegation_token_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_renew_delegation_token_presult() throw() {}
+
+ int64_t* success;
+ MetaException o1;
+
+ _ThriftHiveMetastore_renew_delegation_token_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
+typedef struct _ThriftHiveMetastore_cancel_delegation_token_args__isset {
+ _ThriftHiveMetastore_cancel_delegation_token_args__isset() : token_str_form(false) {}
+ bool token_str_form;
+} _ThriftHiveMetastore_cancel_delegation_token_args__isset;
+
+class ThriftHiveMetastore_cancel_delegation_token_args {
+ public:
+
+ ThriftHiveMetastore_cancel_delegation_token_args() : token_str_form("") {
+ }
+
+ virtual ~ThriftHiveMetastore_cancel_delegation_token_args() throw() {}
+
+ std::string token_str_form;
+
+ _ThriftHiveMetastore_cancel_delegation_token_args__isset __isset;
+
+ bool operator == (const ThriftHiveMetastore_cancel_delegation_token_args & rhs) const
+ {
+ if (!(token_str_form == rhs.token_str_form))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_cancel_delegation_token_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_cancel_delegation_token_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class ThriftHiveMetastore_cancel_delegation_token_pargs {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_cancel_delegation_token_pargs() throw() {}
+
+ const std::string* token_str_form;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_cancel_delegation_token_result__isset {
+ _ThriftHiveMetastore_cancel_delegation_token_result__isset() : o1(false) {}
+ bool o1;
+} _ThriftHiveMetastore_cancel_delegation_token_result__isset;
+
+class ThriftHiveMetastore_cancel_delegation_token_result {
+ public:
+
+ ThriftHiveMetastore_cancel_delegation_token_result() {
+ }
+
+ virtual ~ThriftHiveMetastore_cancel_delegation_token_result() throw() {}
+
+ MetaException o1;
+
+ _ThriftHiveMetastore_cancel_delegation_token_result__isset __isset;
+
+ bool operator == (const ThriftHiveMetastore_cancel_delegation_token_result & rhs) const
+ {
+ if (!(o1 == rhs.o1))
+ return false;
+ return true;
+ }
+ bool operator != (const ThriftHiveMetastore_cancel_delegation_token_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const ThriftHiveMetastore_cancel_delegation_token_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _ThriftHiveMetastore_cancel_delegation_token_presult__isset {
+ _ThriftHiveMetastore_cancel_delegation_token_presult__isset() : o1(false) {}
+ bool o1;
+} _ThriftHiveMetastore_cancel_delegation_token_presult__isset;
+
+class ThriftHiveMetastore_cancel_delegation_token_presult {
+ public:
+
+
+ virtual ~ThriftHiveMetastore_cancel_delegation_token_presult() throw() {}
+
+ MetaException o1;
+
+ _ThriftHiveMetastore_cancel_delegation_token_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient {
public:
ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) :
@@ -6505,6 +6945,18 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public f
bool revoke_privileges(const PrivilegeBag& privileges);
void send_revoke_privileges(const PrivilegeBag& privileges);
bool recv_revoke_privileges();
+ void get_delegation_token(std::string& _return, const std::string& renewer_kerberos_principal_name);
+ void send_get_delegation_token(const std::string& renewer_kerberos_principal_name);
+ void recv_get_delegation_token(std::string& _return);
+ void get_delegation_token_with_signature(std::string& _return, const std::string& renewer_kerberos_principal_name, const std::string& token_signature);
+ void send_get_delegation_token_with_signature(const std::string& renewer_kerberos_principal_name, const std::string& token_signature);
+ void recv_get_delegation_token_with_signature(std::string& _return);
+ int64_t renew_delegation_token(const std::string& token_str_form);
+ void send_renew_delegation_token(const std::string& token_str_form);
+ int64_t recv_renew_delegation_token();
+ void cancel_delegation_token(const std::string& token_str_form);
+ void send_cancel_delegation_token(const std::string& token_str_form);
+ void recv_cancel_delegation_token();
};
class ThriftHiveMetastoreProcessor : virtual public ::apache::thrift::TProcessor, public facebook::fb303::FacebookServiceProcessor {
@@ -6565,6 +7017,10 @@ class ThriftHiveMetastoreProcessor : virtual public ::apache::thrift::TProcessor
void process_list_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
void process_grant_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
void process_revoke_privileges(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_get_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_get_delegation_token_with_signature(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_renew_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
+ void process_cancel_delegation_token(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot);
public:
ThriftHiveMetastoreProcessor(boost::shared_ptr iface) :
facebook::fb303::FacebookServiceProcessor(iface),
@@ -6621,6 +7077,10 @@ class ThriftHiveMetastoreProcessor : virtual public ::apache::thrift::TProcessor
processMap_["list_privileges"] = &ThriftHiveMetastoreProcessor::process_list_privileges;
processMap_["grant_privileges"] = &ThriftHiveMetastoreProcessor::process_grant_privileges;
processMap_["revoke_privileges"] = &ThriftHiveMetastoreProcessor::process_revoke_privileges;
+ processMap_["get_delegation_token"] = &ThriftHiveMetastoreProcessor::process_get_delegation_token;
+ processMap_["get_delegation_token_with_signature"] = &ThriftHiveMetastoreProcessor::process_get_delegation_token_with_signature;
+ processMap_["renew_delegation_token"] = &ThriftHiveMetastoreProcessor::process_renew_delegation_token;
+ processMap_["cancel_delegation_token"] = &ThriftHiveMetastoreProcessor::process_cancel_delegation_token;
}
virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot);
@@ -7217,6 +7677,48 @@ class ThriftHiveMetastoreMultiface : virtual public ThriftHiveMetastoreIf, publi
}
}
+ void get_delegation_token(std::string& _return, const std::string& renewer_kerberos_principal_name) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->get_delegation_token(_return, renewer_kerberos_principal_name);
+ return;
+ } else {
+ ifaces_[i]->get_delegation_token(_return, renewer_kerberos_principal_name);
+ }
+ }
+ }
+
+ void get_delegation_token_with_signature(std::string& _return, const std::string& renewer_kerberos_principal_name, const std::string& token_signature) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ ifaces_[i]->get_delegation_token_with_signature(_return, renewer_kerberos_principal_name, token_signature);
+ return;
+ } else {
+ ifaces_[i]->get_delegation_token_with_signature(_return, renewer_kerberos_principal_name, token_signature);
+ }
+ }
+ }
+
+ int64_t renew_delegation_token(const std::string& token_str_form) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ return ifaces_[i]->renew_delegation_token(token_str_form);
+ } else {
+ ifaces_[i]->renew_delegation_token(token_str_form);
+ }
+ }
+ }
+
+ void cancel_delegation_token(const std::string& token_str_form) {
+ uint32_t sz = ifaces_.size();
+ for (uint32_t i = 0; i < sz; ++i) {
+ ifaces_[i]->cancel_delegation_token(token_str_form);
+ }
+ }
+
};
}}} // namespace
diff --git metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
index 3ebe300..37e5660 100644
--- metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
+++ metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
@@ -282,6 +282,26 @@ class ThriftHiveMetastoreHandler : virtual public ThriftHiveMetastoreIf {
printf("revoke_privileges\n");
}
+ void get_delegation_token(std::string& _return, const std::string& renewer_kerberos_principal_name) {
+ // Your implementation goes here
+ printf("get_delegation_token\n");
+ }
+
+ void get_delegation_token_with_signature(std::string& _return, const std::string& renewer_kerberos_principal_name, const std::string& token_signature) {
+ // Your implementation goes here
+ printf("get_delegation_token_with_signature\n");
+ }
+
+ int64_t renew_delegation_token(const std::string& token_str_form) {
+ // Your implementation goes here
+ printf("renew_delegation_token\n");
+ }
+
+ void cancel_delegation_token(const std::string& token_str_form) {
+ // Your implementation goes here
+ printf("cancel_delegation_token\n");
+ }
+
};
int main(int argc, char **argv) {
diff --git metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
index 72c0feb..39ffd7d 100644
--- metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
+++ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
@@ -137,6 +137,14 @@ public class ThriftHiveMetastore {
public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, TException;
+ public String get_delegation_token(String renewer_kerberos_principal_name) throws MetaException, TException;
+
+ public String get_delegation_token_with_signature(String renewer_kerberos_principal_name, String token_signature) throws MetaException, TException;
+
+ public long renew_delegation_token(String token_str_form) throws MetaException, TException;
+
+ public void cancel_delegation_token(String token_str_form) throws MetaException, TException;
+
}
public interface AsyncIface extends com.facebook.fb303.FacebookService .AsyncIface {
@@ -245,6 +253,14 @@ public class ThriftHiveMetastore {
public void revoke_privileges(PrivilegeBag privileges, AsyncMethodCallback resultHandler) throws TException;
+ public void get_delegation_token(String renewer_kerberos_principal_name, AsyncMethodCallback resultHandler) throws TException;
+
+ public void get_delegation_token_with_signature(String renewer_kerberos_principal_name, String token_signature, AsyncMethodCallback resultHandler) throws TException;
+
+ public void renew_delegation_token(String token_str_form, AsyncMethodCallback resultHandler) throws TException;
+
+ public void cancel_delegation_token(String token_str_form, AsyncMethodCallback resultHandler) throws TException;
+
}
public static class Client extends com.facebook.fb303.FacebookService.Client implements TServiceClient, Iface {
@@ -2475,6 +2491,160 @@ public class ThriftHiveMetastore {
throw new TApplicationException(TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result");
}
+ public String get_delegation_token(String renewer_kerberos_principal_name) throws MetaException, TException
+ {
+ send_get_delegation_token(renewer_kerberos_principal_name);
+ return recv_get_delegation_token();
+ }
+
+ public void send_get_delegation_token(String renewer_kerberos_principal_name) throws TException
+ {
+ oprot_.writeMessageBegin(new TMessage("get_delegation_token", TMessageType.CALL, ++seqid_));
+ get_delegation_token_args args = new get_delegation_token_args();
+ args.setRenewer_kerberos_principal_name(renewer_kerberos_principal_name);
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ }
+
+ public String recv_get_delegation_token() throws MetaException, TException
+ {
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_delegation_token failed: out of sequence response");
+ }
+ get_delegation_token_result result = new get_delegation_token_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_delegation_token failed: unknown result");
+ }
+
+ public String get_delegation_token_with_signature(String renewer_kerberos_principal_name, String token_signature) throws MetaException, TException
+ {
+ send_get_delegation_token_with_signature(renewer_kerberos_principal_name, token_signature);
+ return recv_get_delegation_token_with_signature();
+ }
+
+ public void send_get_delegation_token_with_signature(String renewer_kerberos_principal_name, String token_signature) throws TException
+ {
+ oprot_.writeMessageBegin(new TMessage("get_delegation_token_with_signature", TMessageType.CALL, ++seqid_));
+ get_delegation_token_with_signature_args args = new get_delegation_token_with_signature_args();
+ args.setRenewer_kerberos_principal_name(renewer_kerberos_principal_name);
+ args.setToken_signature(token_signature);
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ }
+
+ public String recv_get_delegation_token_with_signature() throws MetaException, TException
+ {
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_delegation_token_with_signature failed: out of sequence response");
+ }
+ get_delegation_token_with_signature_result result = new get_delegation_token_with_signature_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_delegation_token_with_signature failed: unknown result");
+ }
+
+ public long renew_delegation_token(String token_str_form) throws MetaException, TException
+ {
+ send_renew_delegation_token(token_str_form);
+ return recv_renew_delegation_token();
+ }
+
+ public void send_renew_delegation_token(String token_str_form) throws TException
+ {
+ oprot_.writeMessageBegin(new TMessage("renew_delegation_token", TMessageType.CALL, ++seqid_));
+ renew_delegation_token_args args = new renew_delegation_token_args();
+ args.setToken_str_form(token_str_form);
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ }
+
+ public long recv_renew_delegation_token() throws MetaException, TException
+ {
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "renew_delegation_token failed: out of sequence response");
+ }
+ renew_delegation_token_result result = new renew_delegation_token_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, "renew_delegation_token failed: unknown result");
+ }
+
+ public void cancel_delegation_token(String token_str_form) throws MetaException, TException
+ {
+ send_cancel_delegation_token(token_str_form);
+ recv_cancel_delegation_token();
+ }
+
+ public void send_cancel_delegation_token(String token_str_form) throws TException
+ {
+ oprot_.writeMessageBegin(new TMessage("cancel_delegation_token", TMessageType.CALL, ++seqid_));
+ cancel_delegation_token_args args = new cancel_delegation_token_args();
+ args.setToken_str_form(token_str_form);
+ args.write(oprot_);
+ oprot_.writeMessageEnd();
+ oprot_.getTransport().flush();
+ }
+
+ public void recv_cancel_delegation_token() throws MetaException, TException
+ {
+ TMessage msg = iprot_.readMessageBegin();
+ if (msg.type == TMessageType.EXCEPTION) {
+ TApplicationException x = TApplicationException.read(iprot_);
+ iprot_.readMessageEnd();
+ throw x;
+ }
+ if (msg.seqid != seqid_) {
+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "cancel_delegation_token failed: out of sequence response");
+ }
+ cancel_delegation_token_result result = new cancel_delegation_token_result();
+ result.read(iprot_);
+ iprot_.readMessageEnd();
+ if (result.o1 != null) {
+ throw result.o1;
+ }
+ return;
+ }
+
}
public static class AsyncClient extends com.facebook.fb303.FacebookService.AsyncClient implements AsyncIface {
public static class Factory implements TAsyncClientFactory {
@@ -4336,6 +4506,133 @@ public class ThriftHiveMetastore {
}
}
+ public void get_delegation_token(String renewer_kerberos_principal_name, AsyncMethodCallback resultHandler) throws TException {
+ checkReady();
+ get_delegation_token_call method_call = new get_delegation_token_call(renewer_kerberos_principal_name, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class get_delegation_token_call extends TAsyncMethodCall {
+ private String renewer_kerberos_principal_name;
+ public get_delegation_token_call(String renewer_kerberos_principal_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.renewer_kerberos_principal_name = renewer_kerberos_principal_name;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("get_delegation_token", TMessageType.CALL, 0));
+ get_delegation_token_args args = new get_delegation_token_args();
+ args.setRenewer_kerberos_principal_name(renewer_kerberos_principal_name);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws MetaException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_get_delegation_token();
+ }
+ }
+
+ public void get_delegation_token_with_signature(String renewer_kerberos_principal_name, String token_signature, AsyncMethodCallback resultHandler) throws TException {
+ checkReady();
+ get_delegation_token_with_signature_call method_call = new get_delegation_token_with_signature_call(renewer_kerberos_principal_name, token_signature, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class get_delegation_token_with_signature_call extends TAsyncMethodCall {
+ private String renewer_kerberos_principal_name;
+ private String token_signature;
+ public get_delegation_token_with_signature_call(String renewer_kerberos_principal_name, String token_signature, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.renewer_kerberos_principal_name = renewer_kerberos_principal_name;
+ this.token_signature = token_signature;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("get_delegation_token_with_signature", TMessageType.CALL, 0));
+ get_delegation_token_with_signature_args args = new get_delegation_token_with_signature_args();
+ args.setRenewer_kerberos_principal_name(renewer_kerberos_principal_name);
+ args.setToken_signature(token_signature);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public String getResult() throws MetaException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_get_delegation_token_with_signature();
+ }
+ }
+
+ public void renew_delegation_token(String token_str_form, AsyncMethodCallback resultHandler) throws TException {
+ checkReady();
+ renew_delegation_token_call method_call = new renew_delegation_token_call(token_str_form, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class renew_delegation_token_call extends TAsyncMethodCall {
+ private String token_str_form;
+ public renew_delegation_token_call(String token_str_form, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.token_str_form = token_str_form;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("renew_delegation_token", TMessageType.CALL, 0));
+ renew_delegation_token_args args = new renew_delegation_token_args();
+ args.setToken_str_form(token_str_form);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public long getResult() throws MetaException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_renew_delegation_token();
+ }
+ }
+
+ public void cancel_delegation_token(String token_str_form, AsyncMethodCallback resultHandler) throws TException {
+ checkReady();
+ cancel_delegation_token_call method_call = new cancel_delegation_token_call(token_str_form, resultHandler, this, protocolFactory, transport);
+ manager.call(method_call);
+ }
+
+ public static class cancel_delegation_token_call extends TAsyncMethodCall {
+ private String token_str_form;
+ public cancel_delegation_token_call(String token_str_form, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.token_str_form = token_str_form;
+ }
+
+ public void write_args(TProtocol prot) throws TException {
+ prot.writeMessageBegin(new TMessage("cancel_delegation_token", TMessageType.CALL, 0));
+ cancel_delegation_token_args args = new cancel_delegation_token_args();
+ args.setToken_str_form(token_str_form);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public void getResult() throws MetaException, TException {
+ if (getState() != State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
+ TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ (new Client(prot)).recv_cancel_delegation_token();
+ }
+ }
+
}
public static class Processor extends com.facebook.fb303.FacebookService.Processor implements TProcessor {
@@ -4396,6 +4693,10 @@ public class ThriftHiveMetastore {
processMap_.put("list_privileges", new list_privileges());
processMap_.put("grant_privileges", new grant_privileges());
processMap_.put("revoke_privileges", new revoke_privileges());
+ processMap_.put("get_delegation_token", new get_delegation_token());
+ processMap_.put("get_delegation_token_with_signature", new get_delegation_token_with_signature());
+ processMap_.put("renew_delegation_token", new renew_delegation_token());
+ processMap_.put("cancel_delegation_token", new cancel_delegation_token());
}
private Iface iface_;
@@ -6489,6 +6790,159 @@ public class ThriftHiveMetastore {
}
+ private class get_delegation_token implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+ {
+ get_delegation_token_args args = new get_delegation_token_args();
+ try {
+ args.read(iprot);
+ } catch (TProtocolException e) {
+ iprot.readMessageEnd();
+ TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+ oprot.writeMessageBegin(new TMessage("get_delegation_token", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ iprot.readMessageEnd();
+ get_delegation_token_result result = new get_delegation_token_result();
+ try {
+ result.success = iface_.get_delegation_token(args.renewer_kerberos_principal_name);
+ } catch (MetaException o1) {
+ result.o1 = o1;
+ } catch (Throwable th) {
+ LOGGER.error("Internal error processing get_delegation_token", th);
+ TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_delegation_token");
+ oprot.writeMessageBegin(new TMessage("get_delegation_token", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ oprot.writeMessageBegin(new TMessage("get_delegation_token", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ }
+
+ }
+
+ private class get_delegation_token_with_signature implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+ {
+ get_delegation_token_with_signature_args args = new get_delegation_token_with_signature_args();
+ try {
+ args.read(iprot);
+ } catch (TProtocolException e) {
+ iprot.readMessageEnd();
+ TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+ oprot.writeMessageBegin(new TMessage("get_delegation_token_with_signature", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ iprot.readMessageEnd();
+ get_delegation_token_with_signature_result result = new get_delegation_token_with_signature_result();
+ try {
+ result.success = iface_.get_delegation_token_with_signature(args.renewer_kerberos_principal_name, args.token_signature);
+ } catch (MetaException o1) {
+ result.o1 = o1;
+ } catch (Throwable th) {
+ LOGGER.error("Internal error processing get_delegation_token_with_signature", th);
+ TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_delegation_token_with_signature");
+ oprot.writeMessageBegin(new TMessage("get_delegation_token_with_signature", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ oprot.writeMessageBegin(new TMessage("get_delegation_token_with_signature", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ }
+
+ }
+
+ private class renew_delegation_token implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+ {
+ renew_delegation_token_args args = new renew_delegation_token_args();
+ try {
+ args.read(iprot);
+ } catch (TProtocolException e) {
+ iprot.readMessageEnd();
+ TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+ oprot.writeMessageBegin(new TMessage("renew_delegation_token", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ iprot.readMessageEnd();
+ renew_delegation_token_result result = new renew_delegation_token_result();
+ try {
+ result.success = iface_.renew_delegation_token(args.token_str_form);
+ result.setSuccessIsSet(true);
+ } catch (MetaException o1) {
+ result.o1 = o1;
+ } catch (Throwable th) {
+ LOGGER.error("Internal error processing renew_delegation_token", th);
+ TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing renew_delegation_token");
+ oprot.writeMessageBegin(new TMessage("renew_delegation_token", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ oprot.writeMessageBegin(new TMessage("renew_delegation_token", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ }
+
+ }
+
+ private class cancel_delegation_token implements ProcessFunction {
+ public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+ {
+ cancel_delegation_token_args args = new cancel_delegation_token_args();
+ try {
+ args.read(iprot);
+ } catch (TProtocolException e) {
+ iprot.readMessageEnd();
+ TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+ oprot.writeMessageBegin(new TMessage("cancel_delegation_token", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ iprot.readMessageEnd();
+ cancel_delegation_token_result result = new cancel_delegation_token_result();
+ try {
+ iface_.cancel_delegation_token(args.token_str_form);
+ } catch (MetaException o1) {
+ result.o1 = o1;
+ } catch (Throwable th) {
+ LOGGER.error("Internal error processing cancel_delegation_token", th);
+ TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing cancel_delegation_token");
+ oprot.writeMessageBegin(new TMessage("cancel_delegation_token", TMessageType.EXCEPTION, seqid));
+ x.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ return;
+ }
+ oprot.writeMessageBegin(new TMessage("cancel_delegation_token", TMessageType.REPLY, seqid));
+ result.write(oprot);
+ oprot.writeMessageEnd();
+ oprot.getTransport().flush();
+ }
+
+ }
+
}
public static class create_database_args implements TBase, java.io.Serializable, Cloneable {
@@ -46024,76 +46478,3395 @@ public class ThriftHiveMetastore {
}
// isset id assignments
- private static final int __SUCCESS_ISSET_ID = 0;
- private BitSet __isset_bit_vector = new BitSet(1);
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.BOOL)));
+ tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ FieldMetaData.addStructMetaDataMap(grant_role_result.class, metaDataMap);
+ }
+
+ public grant_role_result() {
+ }
+
+ public grant_role_result(
+ boolean success,
+ MetaException o1)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.o1 = o1;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public grant_role_result(grant_role_result other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.success = other.success;
+ if (other.isSetO1()) {
+ this.o1 = new MetaException(other.o1);
+ }
+ }
+
+ public grant_role_result deepCopy() {
+ return new grant_role_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.o1 = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public void setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ public void unsetSuccess() {
+ __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been asigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
+ }
+
+ 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 setO1IsSet(boolean value) {
+ if (!value) {
+ this.o1 = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case O1:
+ if (value == null) {
+ unsetO1();
+ } else {
+ setO1((MetaException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return new Boolean(isSuccess());
+
+ case O1:
+ return getO1();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case O1:
+ return isSetO1();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof grant_role_result)
+ return this.equals((grant_role_result)that);
+ return false;
+ }
+
+ public boolean equals(grant_role_result that) {
+ 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) {
+ if (!(this_present_o1 && that_present_o1))
+ return false;
+ if (!this.o1.equals(that.o1))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(grant_role_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ grant_role_result typedOther = (grant_role_result)other;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetO1()) {
+ lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ 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 0: // SUCCESS
+ if (field.type == TType.BOOL) {
+ this.success = iprot.readBool();
+ setSuccessIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 1: // O1
+ if (field.type == TType.STRUCT) {
+ this.o1 = new MetaException();
+ this.o1.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ 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()) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ this.o1.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("grant_role_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;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class revoke_role_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("revoke_role_args");
+
+ private static final TField ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1);
+ private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)2);
+ private static final TField PRINCIPAL_TYPE_FIELD_DESC = new TField("principal_type", TType.I32, (short)3);
+
+ private String role_name;
+ private String principal_name;
+ private PrincipalType principal_type;
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements TFieldIdEnum {
+ ROLE_NAME((short)1, "role_name"),
+ PRINCIPAL_NAME((short)2, "principal_name"),
+ /**
+ *
+ * @see PrincipalType
+ */
+ PRINCIPAL_TYPE((short)3, "principal_type");
+
+ private static final Map byName = new HashMap();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // ROLE_NAME
+ return ROLE_NAME;
+ case 2: // PRINCIPAL_NAME
+ return PRINCIPAL_NAME;
+ case 3: // PRINCIPAL_TYPE
+ return PRINCIPAL_TYPE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMap.put(_Fields.PRINCIPAL_TYPE, new FieldMetaData("principal_type", TFieldRequirementType.DEFAULT,
+ new EnumMetaData(TType.ENUM, PrincipalType.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ FieldMetaData.addStructMetaDataMap(revoke_role_args.class, metaDataMap);
+ }
+
+ public revoke_role_args() {
+ }
+
+ public revoke_role_args(
+ String role_name,
+ String principal_name,
+ PrincipalType principal_type)
+ {
+ this();
+ this.role_name = role_name;
+ this.principal_name = principal_name;
+ this.principal_type = principal_type;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public revoke_role_args(revoke_role_args other) {
+ if (other.isSetRole_name()) {
+ this.role_name = other.role_name;
+ }
+ if (other.isSetPrincipal_name()) {
+ this.principal_name = other.principal_name;
+ }
+ if (other.isSetPrincipal_type()) {
+ this.principal_type = other.principal_type;
+ }
+ }
+
+ public revoke_role_args deepCopy() {
+ return new revoke_role_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.role_name = null;
+ this.principal_name = null;
+ this.principal_type = null;
+ }
+
+ public String getRole_name() {
+ return this.role_name;
+ }
+
+ public void setRole_name(String role_name) {
+ this.role_name = role_name;
+ }
+
+ public void unsetRole_name() {
+ this.role_name = null;
+ }
+
+ /** Returns true if field role_name is set (has been asigned a value) and false otherwise */
+ public boolean isSetRole_name() {
+ return this.role_name != null;
+ }
+
+ public void setRole_nameIsSet(boolean value) {
+ if (!value) {
+ this.role_name = null;
+ }
+ }
+
+ public String getPrincipal_name() {
+ return this.principal_name;
+ }
+
+ public void setPrincipal_name(String principal_name) {
+ this.principal_name = principal_name;
+ }
+
+ public void unsetPrincipal_name() {
+ this.principal_name = null;
+ }
+
+ /** Returns true if field principal_name is set (has been asigned a value) and false otherwise */
+ public boolean isSetPrincipal_name() {
+ return this.principal_name != null;
+ }
+
+ public void setPrincipal_nameIsSet(boolean value) {
+ if (!value) {
+ this.principal_name = null;
+ }
+ }
+
+ /**
+ *
+ * @see PrincipalType
+ */
+ public PrincipalType getPrincipal_type() {
+ return this.principal_type;
+ }
+
+ /**
+ *
+ * @see PrincipalType
+ */
+ public void setPrincipal_type(PrincipalType principal_type) {
+ this.principal_type = principal_type;
+ }
+
+ public void unsetPrincipal_type() {
+ this.principal_type = null;
+ }
+
+ /** Returns true if field principal_type is set (has been asigned a value) and false otherwise */
+ public boolean isSetPrincipal_type() {
+ return this.principal_type != null;
+ }
+
+ public void setPrincipal_typeIsSet(boolean value) {
+ if (!value) {
+ this.principal_type = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case ROLE_NAME:
+ if (value == null) {
+ unsetRole_name();
+ } else {
+ setRole_name((String)value);
+ }
+ break;
+
+ case PRINCIPAL_NAME:
+ if (value == null) {
+ unsetPrincipal_name();
+ } else {
+ setPrincipal_name((String)value);
+ }
+ break;
+
+ case PRINCIPAL_TYPE:
+ if (value == null) {
+ unsetPrincipal_type();
+ } else {
+ setPrincipal_type((PrincipalType)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ROLE_NAME:
+ return getRole_name();
+
+ case PRINCIPAL_NAME:
+ return getPrincipal_name();
+
+ case PRINCIPAL_TYPE:
+ return getPrincipal_type();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case ROLE_NAME:
+ return isSetRole_name();
+ case PRINCIPAL_NAME:
+ return isSetPrincipal_name();
+ case PRINCIPAL_TYPE:
+ return isSetPrincipal_type();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof revoke_role_args)
+ return this.equals((revoke_role_args)that);
+ return false;
+ }
+
+ public boolean equals(revoke_role_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_role_name = true && this.isSetRole_name();
+ boolean that_present_role_name = true && that.isSetRole_name();
+ if (this_present_role_name || that_present_role_name) {
+ if (!(this_present_role_name && that_present_role_name))
+ return false;
+ if (!this.role_name.equals(that.role_name))
+ return false;
+ }
+
+ boolean this_present_principal_name = true && this.isSetPrincipal_name();
+ boolean that_present_principal_name = true && that.isSetPrincipal_name();
+ if (this_present_principal_name || that_present_principal_name) {
+ if (!(this_present_principal_name && that_present_principal_name))
+ return false;
+ if (!this.principal_name.equals(that.principal_name))
+ return false;
+ }
+
+ boolean this_present_principal_type = true && this.isSetPrincipal_type();
+ boolean that_present_principal_type = true && that.isSetPrincipal_type();
+ if (this_present_principal_type || that_present_principal_type) {
+ if (!(this_present_principal_type && that_present_principal_type))
+ return false;
+ if (!this.principal_type.equals(that.principal_type))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(revoke_role_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ revoke_role_args typedOther = (revoke_role_args)other;
+
+ lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRole_name()) {
+ lastComparison = TBaseHelper.compareTo(this.role_name, typedOther.role_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrincipal_name()) {
+ lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrincipal_type()) {
+ lastComparison = TBaseHelper.compareTo(this.principal_type, typedOther.principal_type);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ 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 1: // ROLE_NAME
+ if (field.type == TType.STRING) {
+ this.role_name = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // PRINCIPAL_NAME
+ if (field.type == TType.STRING) {
+ this.principal_name = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 3: // PRINCIPAL_TYPE
+ if (field.type == TType.I32) {
+ this.principal_type = PrincipalType.findByValue(iprot.readI32());
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.role_name != null) {
+ oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
+ oprot.writeString(this.role_name);
+ oprot.writeFieldEnd();
+ }
+ if (this.principal_name != null) {
+ oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC);
+ oprot.writeString(this.principal_name);
+ oprot.writeFieldEnd();
+ }
+ if (this.principal_type != null) {
+ oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC);
+ oprot.writeI32(this.principal_type.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("revoke_role_args(");
+ boolean first = true;
+
+ sb.append("role_name:");
+ if (this.role_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.role_name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("principal_name:");
+ if (this.principal_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.principal_name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("principal_type:");
+ if (this.principal_type == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.principal_type);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class revoke_role_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("revoke_role_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 boolean success;
+ private MetaException o1;
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ O1((short)1, "o1");
+
+ private static final Map byName = new HashMap();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // O1
+ return O1;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.BOOL)));
+ tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ FieldMetaData.addStructMetaDataMap(revoke_role_result.class, metaDataMap);
+ }
+
+ public revoke_role_result() {
+ }
+
+ public revoke_role_result(
+ boolean success,
+ MetaException o1)
+ {
+ this();
+ this.success = success;
+ setSuccessIsSet(true);
+ this.o1 = o1;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public revoke_role_result(revoke_role_result other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.success = other.success;
+ if (other.isSetO1()) {
+ this.o1 = new MetaException(other.o1);
+ }
+ }
+
+ public revoke_role_result deepCopy() {
+ return new revoke_role_result(this);
+ }
+
+ @Override
+ public void clear() {
+ setSuccessIsSet(false);
+ this.success = false;
+ this.o1 = null;
+ }
+
+ public boolean isSuccess() {
+ return this.success;
+ }
+
+ public void setSuccess(boolean success) {
+ this.success = success;
+ setSuccessIsSet(true);
+ }
+
+ public void unsetSuccess() {
+ __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
+ }
+
+ /** Returns true if field success is set (has been asigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
+ }
+
+ 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 setO1IsSet(boolean value) {
+ if (!value) {
+ this.o1 = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((Boolean)value);
+ }
+ break;
+
+ case O1:
+ if (value == null) {
+ unsetO1();
+ } else {
+ setO1((MetaException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return new Boolean(isSuccess());
+
+ case O1:
+ return getO1();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case O1:
+ return isSetO1();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof revoke_role_result)
+ return this.equals((revoke_role_result)that);
+ return false;
+ }
+
+ public boolean equals(revoke_role_result that) {
+ 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) {
+ if (!(this_present_o1 && that_present_o1))
+ return false;
+ if (!this.o1.equals(that.o1))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(revoke_role_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ revoke_role_result typedOther = (revoke_role_result)other;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetO1()) {
+ lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ 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 0: // SUCCESS
+ if (field.type == TType.BOOL) {
+ this.success = iprot.readBool();
+ setSuccessIsSet(true);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 1: // O1
+ if (field.type == TType.STRUCT) {
+ this.o1 = new MetaException();
+ this.o1.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ 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()) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ this.o1.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("revoke_role_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;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class list_roles_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("list_roles_args");
+
+ private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1);
+ private static final TField PRINCIPAL_TYPE_FIELD_DESC = new TField("principal_type", TType.I32, (short)2);
+
+ private String principal_name;
+ private PrincipalType principal_type;
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements TFieldIdEnum {
+ PRINCIPAL_NAME((short)1, "principal_name"),
+ /**
+ *
+ * @see PrincipalType
+ */
+ PRINCIPAL_TYPE((short)2, "principal_type");
+
+ private static final Map byName = new HashMap();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // PRINCIPAL_NAME
+ return PRINCIPAL_NAME;
+ case 2: // PRINCIPAL_TYPE
+ return PRINCIPAL_TYPE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMap.put(_Fields.PRINCIPAL_TYPE, new FieldMetaData("principal_type", TFieldRequirementType.DEFAULT,
+ new EnumMetaData(TType.ENUM, PrincipalType.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ FieldMetaData.addStructMetaDataMap(list_roles_args.class, metaDataMap);
+ }
+
+ public list_roles_args() {
+ }
+
+ public list_roles_args(
+ String principal_name,
+ PrincipalType principal_type)
+ {
+ this();
+ this.principal_name = principal_name;
+ this.principal_type = principal_type;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public list_roles_args(list_roles_args other) {
+ if (other.isSetPrincipal_name()) {
+ this.principal_name = other.principal_name;
+ }
+ if (other.isSetPrincipal_type()) {
+ this.principal_type = other.principal_type;
+ }
+ }
+
+ public list_roles_args deepCopy() {
+ return new list_roles_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.principal_name = null;
+ this.principal_type = null;
+ }
+
+ public String getPrincipal_name() {
+ return this.principal_name;
+ }
+
+ public void setPrincipal_name(String principal_name) {
+ this.principal_name = principal_name;
+ }
+
+ public void unsetPrincipal_name() {
+ this.principal_name = null;
+ }
+
+ /** Returns true if field principal_name is set (has been asigned a value) and false otherwise */
+ public boolean isSetPrincipal_name() {
+ return this.principal_name != null;
+ }
+
+ public void setPrincipal_nameIsSet(boolean value) {
+ if (!value) {
+ this.principal_name = null;
+ }
+ }
+
+ /**
+ *
+ * @see PrincipalType
+ */
+ public PrincipalType getPrincipal_type() {
+ return this.principal_type;
+ }
+
+ /**
+ *
+ * @see PrincipalType
+ */
+ public void setPrincipal_type(PrincipalType principal_type) {
+ this.principal_type = principal_type;
+ }
+
+ public void unsetPrincipal_type() {
+ this.principal_type = null;
+ }
+
+ /** Returns true if field principal_type is set (has been asigned a value) and false otherwise */
+ public boolean isSetPrincipal_type() {
+ return this.principal_type != null;
+ }
+
+ public void setPrincipal_typeIsSet(boolean value) {
+ if (!value) {
+ this.principal_type = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PRINCIPAL_NAME:
+ if (value == null) {
+ unsetPrincipal_name();
+ } else {
+ setPrincipal_name((String)value);
+ }
+ break;
+
+ case PRINCIPAL_TYPE:
+ if (value == null) {
+ unsetPrincipal_type();
+ } else {
+ setPrincipal_type((PrincipalType)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PRINCIPAL_NAME:
+ return getPrincipal_name();
+
+ case PRINCIPAL_TYPE:
+ return getPrincipal_type();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case PRINCIPAL_NAME:
+ return isSetPrincipal_name();
+ case PRINCIPAL_TYPE:
+ return isSetPrincipal_type();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof list_roles_args)
+ return this.equals((list_roles_args)that);
+ return false;
+ }
+
+ public boolean equals(list_roles_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_principal_name = true && this.isSetPrincipal_name();
+ boolean that_present_principal_name = true && that.isSetPrincipal_name();
+ if (this_present_principal_name || that_present_principal_name) {
+ if (!(this_present_principal_name && that_present_principal_name))
+ return false;
+ if (!this.principal_name.equals(that.principal_name))
+ return false;
+ }
+
+ boolean this_present_principal_type = true && this.isSetPrincipal_type();
+ boolean that_present_principal_type = true && that.isSetPrincipal_type();
+ if (this_present_principal_type || that_present_principal_type) {
+ if (!(this_present_principal_type && that_present_principal_type))
+ return false;
+ if (!this.principal_type.equals(that.principal_type))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(list_roles_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ list_roles_args typedOther = (list_roles_args)other;
+
+ lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrincipal_name()) {
+ lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrincipal_type()) {
+ lastComparison = TBaseHelper.compareTo(this.principal_type, typedOther.principal_type);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ 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 1: // PRINCIPAL_NAME
+ if (field.type == TType.STRING) {
+ this.principal_name = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // PRINCIPAL_TYPE
+ if (field.type == TType.I32) {
+ this.principal_type = PrincipalType.findByValue(iprot.readI32());
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.principal_name != null) {
+ oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC);
+ oprot.writeString(this.principal_name);
+ oprot.writeFieldEnd();
+ }
+ if (this.principal_type != null) {
+ oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC);
+ oprot.writeI32(this.principal_type.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("list_roles_args(");
+ boolean first = true;
+
+ sb.append("principal_name:");
+ if (this.principal_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.principal_name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("principal_type:");
+ if (this.principal_type == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.principal_type);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class list_roles_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("list_roles_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;
+ private MetaException o1;
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ O1((short)1, "o1");
+
+ private static final Map byName = new HashMap();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // O1
+ return O1;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new StructMetaData(TType.STRUCT, Role.class))));
+ tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ FieldMetaData.addStructMetaDataMap(list_roles_result.class, metaDataMap);
+ }
+
+ public list_roles_result() {
+ }
+
+ public list_roles_result(
+ List success,
+ MetaException o1)
+ {
+ this();
+ this.success = success;
+ this.o1 = o1;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public list_roles_result(list_roles_result other) {
+ if (other.isSetSuccess()) {
+ List __this__success = new ArrayList();
+ for (Role other_element : other.success) {
+ __this__success.add(new Role(other_element));
+ }
+ this.success = __this__success;
+ }
+ if (other.isSetO1()) {
+ this.o1 = new MetaException(other.o1);
+ }
+ }
+
+ public list_roles_result deepCopy() {
+ return new list_roles_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.o1 = null;
+ }
+
+ 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(Role 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 void setSuccessIsSet(boolean value) {
+ if (!value) {
+ 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 void setO1IsSet(boolean value) {
+ if (!value) {
+ this.o1 = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((List)value);
+ }
+ break;
+
+ case O1:
+ if (value == null) {
+ unsetO1();
+ } else {
+ setO1((MetaException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case O1:
+ return getO1();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case O1:
+ return isSetO1();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof list_roles_result)
+ return this.equals((list_roles_result)that);
+ return false;
+ }
+
+ public boolean equals(list_roles_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) {
+ if (!(this_present_o1 && that_present_o1))
+ return false;
+ if (!this.o1.equals(that.o1))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(list_roles_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ list_roles_result typedOther = (list_roles_result)other;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetO1()) {
+ lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ 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 0: // SUCCESS
+ if (field.type == TType.LIST) {
+ {
+ TList _list212 = iprot.readListBegin();
+ this.success = new ArrayList(_list212.size);
+ for (int _i213 = 0; _i213 < _list212.size; ++_i213)
+ {
+ Role _elem214;
+ _elem214 = new Role();
+ _elem214.read(iprot);
+ this.success.add(_elem214);
+ }
+ iprot.readListEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 1: // O1
+ if (field.type == TType.STRUCT) {
+ this.o1 = new MetaException();
+ this.o1.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
+ for (Role _iter215 : this.success)
+ {
+ _iter215.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ } else if (this.isSetO1()) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ this.o1.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("list_roles_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");
+ } else {
+ sb.append(this.o1);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class get_privilege_set_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_privilege_set_args");
+
+ private static final TField HIVE_OBJECT_FIELD_DESC = new TField("hiveObject", TType.STRUCT, (short)1);
+ private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)2);
+ private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)3);
+
+ private HiveObjectRef hiveObject;
+ private String user_name;
+ private List group_names;
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements TFieldIdEnum {
+ HIVE_OBJECT((short)1, "hiveObject"),
+ USER_NAME((short)2, "user_name"),
+ GROUP_NAMES((short)3, "group_names");
+
+ private static final Map byName = new HashMap();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // HIVE_OBJECT
+ return HIVE_OBJECT;
+ case 2: // USER_NAME
+ return USER_NAME;
+ case 3: // GROUP_NAMES
+ return GROUP_NAMES;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.HIVE_OBJECT, new FieldMetaData("hiveObject", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, HiveObjectRef.class)));
+ tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMap.put(_Fields.GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new FieldValueMetaData(TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ FieldMetaData.addStructMetaDataMap(get_privilege_set_args.class, metaDataMap);
+ }
+
+ public get_privilege_set_args() {
+ }
+
+ public get_privilege_set_args(
+ HiveObjectRef hiveObject,
+ String user_name,
+ List group_names)
+ {
+ this();
+ this.hiveObject = hiveObject;
+ this.user_name = user_name;
+ this.group_names = group_names;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public get_privilege_set_args(get_privilege_set_args other) {
+ if (other.isSetHiveObject()) {
+ this.hiveObject = new HiveObjectRef(other.hiveObject);
+ }
+ if (other.isSetUser_name()) {
+ this.user_name = other.user_name;
+ }
+ if (other.isSetGroup_names()) {
+ List __this__group_names = new ArrayList();
+ for (String other_element : other.group_names) {
+ __this__group_names.add(other_element);
+ }
+ this.group_names = __this__group_names;
+ }
+ }
+
+ public get_privilege_set_args deepCopy() {
+ return new get_privilege_set_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.hiveObject = null;
+ this.user_name = null;
+ this.group_names = null;
+ }
+
+ public HiveObjectRef getHiveObject() {
+ return this.hiveObject;
+ }
+
+ public void setHiveObject(HiveObjectRef hiveObject) {
+ this.hiveObject = hiveObject;
+ }
+
+ public void unsetHiveObject() {
+ this.hiveObject = null;
+ }
+
+ /** Returns true if field hiveObject is set (has been asigned a value) and false otherwise */
+ public boolean isSetHiveObject() {
+ return this.hiveObject != null;
+ }
+
+ public void setHiveObjectIsSet(boolean value) {
+ if (!value) {
+ this.hiveObject = null;
+ }
+ }
+
+ public String getUser_name() {
+ return this.user_name;
+ }
+
+ public void setUser_name(String user_name) {
+ this.user_name = user_name;
+ }
+
+ public void unsetUser_name() {
+ this.user_name = null;
+ }
+
+ /** Returns true if field user_name is set (has been asigned a value) and false otherwise */
+ public boolean isSetUser_name() {
+ return this.user_name != null;
+ }
+
+ public void setUser_nameIsSet(boolean value) {
+ if (!value) {
+ this.user_name = null;
+ }
+ }
+
+ public int getGroup_namesSize() {
+ return (this.group_names == null) ? 0 : this.group_names.size();
+ }
+
+ public java.util.Iterator getGroup_namesIterator() {
+ return (this.group_names == null) ? null : this.group_names.iterator();
+ }
+
+ public void addToGroup_names(String elem) {
+ if (this.group_names == null) {
+ this.group_names = new ArrayList();
+ }
+ this.group_names.add(elem);
+ }
+
+ public List getGroup_names() {
+ return this.group_names;
+ }
+
+ public void setGroup_names(List group_names) {
+ this.group_names = group_names;
+ }
+
+ public void unsetGroup_names() {
+ this.group_names = null;
+ }
+
+ /** Returns true if field group_names is set (has been asigned a value) and false otherwise */
+ public boolean isSetGroup_names() {
+ return this.group_names != null;
+ }
+
+ public void setGroup_namesIsSet(boolean value) {
+ if (!value) {
+ this.group_names = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case HIVE_OBJECT:
+ if (value == null) {
+ unsetHiveObject();
+ } else {
+ setHiveObject((HiveObjectRef)value);
+ }
+ break;
+
+ case USER_NAME:
+ if (value == null) {
+ unsetUser_name();
+ } else {
+ setUser_name((String)value);
+ }
+ break;
+
+ case GROUP_NAMES:
+ if (value == null) {
+ unsetGroup_names();
+ } else {
+ setGroup_names((List)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case HIVE_OBJECT:
+ return getHiveObject();
+
+ case USER_NAME:
+ return getUser_name();
+
+ case GROUP_NAMES:
+ return getGroup_names();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case HIVE_OBJECT:
+ return isSetHiveObject();
+ case USER_NAME:
+ return isSetUser_name();
+ case GROUP_NAMES:
+ return isSetGroup_names();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof get_privilege_set_args)
+ return this.equals((get_privilege_set_args)that);
+ return false;
+ }
+
+ public boolean equals(get_privilege_set_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_hiveObject = true && this.isSetHiveObject();
+ boolean that_present_hiveObject = true && that.isSetHiveObject();
+ if (this_present_hiveObject || that_present_hiveObject) {
+ if (!(this_present_hiveObject && that_present_hiveObject))
+ return false;
+ if (!this.hiveObject.equals(that.hiveObject))
+ return false;
+ }
+
+ boolean this_present_user_name = true && this.isSetUser_name();
+ boolean that_present_user_name = true && that.isSetUser_name();
+ if (this_present_user_name || that_present_user_name) {
+ if (!(this_present_user_name && that_present_user_name))
+ return false;
+ if (!this.user_name.equals(that.user_name))
+ return false;
+ }
+
+ boolean this_present_group_names = true && this.isSetGroup_names();
+ boolean that_present_group_names = true && that.isSetGroup_names();
+ if (this_present_group_names || that_present_group_names) {
+ if (!(this_present_group_names && that_present_group_names))
+ return false;
+ if (!this.group_names.equals(that.group_names))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(get_privilege_set_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ get_privilege_set_args typedOther = (get_privilege_set_args)other;
+
+ lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(typedOther.isSetHiveObject());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHiveObject()) {
+ lastComparison = TBaseHelper.compareTo(this.hiveObject, typedOther.hiveObject);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUser_name()).compareTo(typedOther.isSetUser_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUser_name()) {
+ lastComparison = TBaseHelper.compareTo(this.user_name, typedOther.user_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetGroup_names()).compareTo(typedOther.isSetGroup_names());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGroup_names()) {
+ lastComparison = TBaseHelper.compareTo(this.group_names, typedOther.group_names);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ 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 1: // HIVE_OBJECT
+ if (field.type == TType.STRUCT) {
+ this.hiveObject = new HiveObjectRef();
+ this.hiveObject.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // USER_NAME
+ if (field.type == TType.STRING) {
+ this.user_name = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 3: // GROUP_NAMES
+ if (field.type == TType.LIST) {
+ {
+ TList _list216 = iprot.readListBegin();
+ this.group_names = new ArrayList(_list216.size);
+ for (int _i217 = 0; _i217 < _list216.size; ++_i217)
+ {
+ String _elem218;
+ _elem218 = iprot.readString();
+ this.group_names.add(_elem218);
+ }
+ iprot.readListEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.hiveObject != null) {
+ oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC);
+ this.hiveObject.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (this.user_name != null) {
+ oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+ oprot.writeString(this.user_name);
+ oprot.writeFieldEnd();
+ }
+ if (this.group_names != null) {
+ oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.STRING, this.group_names.size()));
+ for (String _iter219 : this.group_names)
+ {
+ oprot.writeString(_iter219);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("get_privilege_set_args(");
+ boolean first = true;
+
+ sb.append("hiveObject:");
+ if (this.hiveObject == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.hiveObject);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("user_name:");
+ if (this.user_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.user_name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("group_names:");
+ if (this.group_names == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.group_names);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class get_privilege_set_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_privilege_set_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 PrincipalPrivilegeSet success;
+ private MetaException o1;
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ O1((short)1, "o1");
+
+ private static final Map byName = new HashMap();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // O1
+ return O1;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class)));
+ tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRUCT)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ FieldMetaData.addStructMetaDataMap(get_privilege_set_result.class, metaDataMap);
+ }
+
+ public get_privilege_set_result() {
+ }
+
+ public get_privilege_set_result(
+ PrincipalPrivilegeSet success,
+ MetaException o1)
+ {
+ this();
+ this.success = success;
+ this.o1 = o1;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public get_privilege_set_result(get_privilege_set_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new PrincipalPrivilegeSet(other.success);
+ }
+ if (other.isSetO1()) {
+ this.o1 = new MetaException(other.o1);
+ }
+ }
+
+ public get_privilege_set_result deepCopy() {
+ return new get_privilege_set_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.o1 = null;
+ }
+
+ public PrincipalPrivilegeSet getSuccess() {
+ return this.success;
+ }
+
+ public void setSuccess(PrincipalPrivilegeSet 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 void setSuccessIsSet(boolean value) {
+ if (!value) {
+ 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 void setO1IsSet(boolean value) {
+ if (!value) {
+ this.o1 = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((PrincipalPrivilegeSet)value);
+ }
+ break;
+
+ case O1:
+ if (value == null) {
+ unsetO1();
+ } else {
+ setO1((MetaException)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case O1:
+ return getO1();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case O1:
+ return isSetO1();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof get_privilege_set_result)
+ return this.equals((get_privilege_set_result)that);
+ return false;
+ }
+
+ public boolean equals(get_privilege_set_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) {
+ if (!(this_present_o1 && that_present_o1))
+ return false;
+ if (!this.o1.equals(that.o1))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(get_privilege_set_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ get_privilege_set_result typedOther = (get_privilege_set_result)other;
+
+ lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetO1()) {
+ lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ 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 0: // SUCCESS
+ if (field.type == TType.STRUCT) {
+ this.success = new PrincipalPrivilegeSet();
+ this.success.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 1: // O1
+ if (field.type == TType.STRUCT) {
+ this.o1 = new MetaException();
+ this.o1.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ oprot.writeStructBegin(STRUCT_DESC);
+
+ if (this.isSetSuccess()) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ this.success.write(oprot);
+ oprot.writeFieldEnd();
+ } else if (this.isSetO1()) {
+ oprot.writeFieldBegin(O1_FIELD_DESC);
+ this.o1.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("get_privilege_set_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");
+ } else {
+ sb.append(this.o1);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class list_privileges_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("list_privileges_args");
+
+ private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1);
+ private static final TField PRINCIPAL_TYPE_FIELD_DESC = new TField("principal_type", TType.I32, (short)2);
+ private static final TField HIVE_OBJECT_FIELD_DESC = new TField("hiveObject", TType.STRUCT, (short)3);
+
+ private String principal_name;
+ private PrincipalType principal_type;
+ private HiveObjectRef hiveObject;
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements TFieldIdEnum {
+ PRINCIPAL_NAME((short)1, "principal_name"),
+ /**
+ *
+ * @see PrincipalType
+ */
+ PRINCIPAL_TYPE((short)2, "principal_type"),
+ HIVE_OBJECT((short)3, "hiveObject");
+
+ private static final Map byName = new HashMap();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // PRINCIPAL_NAME
+ return PRINCIPAL_NAME;
+ case 2: // PRINCIPAL_TYPE
+ return PRINCIPAL_TYPE;
+ case 3: // HIVE_OBJECT
+ return HIVE_OBJECT;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+
+ public static final Map<_Fields, FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ tmpMap.put(_Fields.PRINCIPAL_TYPE, new FieldMetaData("principal_type", TFieldRequirementType.DEFAULT,
+ new EnumMetaData(TType.ENUM, PrincipalType.class)));
+ tmpMap.put(_Fields.HIVE_OBJECT, new FieldMetaData("hiveObject", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, HiveObjectRef.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ FieldMetaData.addStructMetaDataMap(list_privileges_args.class, metaDataMap);
+ }
+
+ public list_privileges_args() {
+ }
+
+ public list_privileges_args(
+ String principal_name,
+ PrincipalType principal_type,
+ HiveObjectRef hiveObject)
+ {
+ this();
+ this.principal_name = principal_name;
+ this.principal_type = principal_type;
+ this.hiveObject = hiveObject;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public list_privileges_args(list_privileges_args other) {
+ if (other.isSetPrincipal_name()) {
+ this.principal_name = other.principal_name;
+ }
+ if (other.isSetPrincipal_type()) {
+ this.principal_type = other.principal_type;
+ }
+ if (other.isSetHiveObject()) {
+ this.hiveObject = new HiveObjectRef(other.hiveObject);
+ }
+ }
+
+ public list_privileges_args deepCopy() {
+ return new list_privileges_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.principal_name = null;
+ this.principal_type = null;
+ this.hiveObject = null;
+ }
+
+ public String getPrincipal_name() {
+ return this.principal_name;
+ }
+
+ public void setPrincipal_name(String principal_name) {
+ this.principal_name = principal_name;
+ }
+
+ public void unsetPrincipal_name() {
+ this.principal_name = null;
+ }
+
+ /** Returns true if field principal_name is set (has been asigned a value) and false otherwise */
+ public boolean isSetPrincipal_name() {
+ return this.principal_name != null;
+ }
+
+ public void setPrincipal_nameIsSet(boolean value) {
+ if (!value) {
+ this.principal_name = null;
+ }
+ }
+
+ /**
+ *
+ * @see PrincipalType
+ */
+ public PrincipalType getPrincipal_type() {
+ return this.principal_type;
+ }
+
+ /**
+ *
+ * @see PrincipalType
+ */
+ public void setPrincipal_type(PrincipalType principal_type) {
+ this.principal_type = principal_type;
+ }
+
+ public void unsetPrincipal_type() {
+ this.principal_type = null;
+ }
+
+ /** Returns true if field principal_type is set (has been asigned a value) and false otherwise */
+ public boolean isSetPrincipal_type() {
+ return this.principal_type != null;
+ }
+
+ public void setPrincipal_typeIsSet(boolean value) {
+ if (!value) {
+ this.principal_type = null;
+ }
+ }
+
+ public HiveObjectRef getHiveObject() {
+ return this.hiveObject;
+ }
+
+ public void setHiveObject(HiveObjectRef hiveObject) {
+ this.hiveObject = hiveObject;
+ }
+
+ public void unsetHiveObject() {
+ this.hiveObject = null;
+ }
+
+ /** Returns true if field hiveObject is set (has been asigned a value) and false otherwise */
+ public boolean isSetHiveObject() {
+ return this.hiveObject != null;
+ }
+
+ public void setHiveObjectIsSet(boolean value) {
+ if (!value) {
+ this.hiveObject = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PRINCIPAL_NAME:
+ if (value == null) {
+ unsetPrincipal_name();
+ } else {
+ setPrincipal_name((String)value);
+ }
+ break;
+
+ case PRINCIPAL_TYPE:
+ if (value == null) {
+ unsetPrincipal_type();
+ } else {
+ setPrincipal_type((PrincipalType)value);
+ }
+ break;
+
+ case HIVE_OBJECT:
+ if (value == null) {
+ unsetHiveObject();
+ } else {
+ setHiveObject((HiveObjectRef)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PRINCIPAL_NAME:
+ return getPrincipal_name();
+
+ case PRINCIPAL_TYPE:
+ return getPrincipal_type();
+
+ case HIVE_OBJECT:
+ return getHiveObject();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case PRINCIPAL_NAME:
+ return isSetPrincipal_name();
+ case PRINCIPAL_TYPE:
+ return isSetPrincipal_type();
+ case HIVE_OBJECT:
+ return isSetHiveObject();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof list_privileges_args)
+ return this.equals((list_privileges_args)that);
+ return false;
+ }
+
+ public boolean equals(list_privileges_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_principal_name = true && this.isSetPrincipal_name();
+ boolean that_present_principal_name = true && that.isSetPrincipal_name();
+ if (this_present_principal_name || that_present_principal_name) {
+ if (!(this_present_principal_name && that_present_principal_name))
+ return false;
+ if (!this.principal_name.equals(that.principal_name))
+ return false;
+ }
+
+ boolean this_present_principal_type = true && this.isSetPrincipal_type();
+ boolean that_present_principal_type = true && that.isSetPrincipal_type();
+ if (this_present_principal_type || that_present_principal_type) {
+ if (!(this_present_principal_type && that_present_principal_type))
+ return false;
+ if (!this.principal_type.equals(that.principal_type))
+ return false;
+ }
+
+ boolean this_present_hiveObject = true && this.isSetHiveObject();
+ boolean that_present_hiveObject = true && that.isSetHiveObject();
+ if (this_present_hiveObject || that_present_hiveObject) {
+ if (!(this_present_hiveObject && that_present_hiveObject))
+ return false;
+ if (!this.hiveObject.equals(that.hiveObject))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(list_privileges_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ list_privileges_args typedOther = (list_privileges_args)other;
+
+ lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrincipal_name()) {
+ lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrincipal_type()) {
+ lastComparison = TBaseHelper.compareTo(this.principal_type, typedOther.principal_type);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHiveObject()).compareTo(typedOther.isSetHiveObject());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHiveObject()) {
+ lastComparison = TBaseHelper.compareTo(this.hiveObject, typedOther.hiveObject);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ 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 1: // PRINCIPAL_NAME
+ if (field.type == TType.STRING) {
+ this.principal_name = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 2: // PRINCIPAL_TYPE
+ if (field.type == TType.I32) {
+ this.principal_type = PrincipalType.findByValue(iprot.readI32());
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case 3: // HIVE_OBJECT
+ if (field.type == TType.STRUCT) {
+ this.hiveObject = new HiveObjectRef();
+ this.hiveObject.read(iprot);
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.principal_name != null) {
+ oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC);
+ oprot.writeString(this.principal_name);
+ oprot.writeFieldEnd();
+ }
+ if (this.principal_type != null) {
+ oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC);
+ oprot.writeI32(this.principal_type.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (this.hiveObject != null) {
+ oprot.writeFieldBegin(HIVE_OBJECT_FIELD_DESC);
+ this.hiveObject.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("list_privileges_args(");
+ boolean first = true;
+
+ sb.append("principal_name:");
+ if (this.principal_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.principal_name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("principal_type:");
+ if (this.principal_type == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.principal_type);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("hiveObject:");
+ if (this.hiveObject == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.hiveObject);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ }
+
+ }
+
+ public static class list_privileges_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("list_privileges_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;
+ private MetaException o1;
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements TFieldIdEnum {
+ SUCCESS((short)0, "success"),
+ O1((short)1, "o1");
+
+ private static final Map byName = new HashMap();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 0: // SUCCESS
+ return SUCCESS;
+ case 1: // O1
+ return O1;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.BOOL)));
+ new ListMetaData(TType.LIST,
+ new StructMetaData(TType.STRUCT, HiveObjectPrivilege.class))));
tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- FieldMetaData.addStructMetaDataMap(grant_role_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(list_privileges_result.class, metaDataMap);
}
- public grant_role_result() {
+ public list_privileges_result() {
}
- public grant_role_result(
- boolean success,
+ public list_privileges_result(
+ List success,
MetaException o1)
{
this();
this.success = success;
- setSuccessIsSet(true);
this.o1 = o1;
}
/**
* Performs a deep copy on other.
*/
- public grant_role_result(grant_role_result other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
- this.success = other.success;
+ public list_privileges_result(list_privileges_result other) {
+ if (other.isSetSuccess()) {
+ List __this__success = new ArrayList();
+ for (HiveObjectPrivilege other_element : other.success) {
+ __this__success.add(new HiveObjectPrivilege(other_element));
+ }
+ this.success = __this__success;
+ }
if (other.isSetO1()) {
this.o1 = new MetaException(other.o1);
}
}
- public grant_role_result deepCopy() {
- return new grant_role_result(this);
+ public list_privileges_result deepCopy() {
+ return new list_privileges_result(this);
}
@Override
public void clear() {
- setSuccessIsSet(false);
- this.success = false;
+ this.success = null;
this.o1 = null;
}
- public boolean isSuccess() {
+ 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(HiveObjectPrivilege elem) {
+ if (this.success == null) {
+ this.success = new ArrayList();
+ }
+ this.success.add(elem);
+ }
+
+ public List getSuccess() {
return this.success;
}
- public void setSuccess(boolean success) {
+ public void setSuccess(List success) {
this.success = success;
- setSuccessIsSet(true);
}
public void unsetSuccess() {
- __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
+ this.success = null;
}
/** Returns true if field success is set (has been asigned a value) and false otherwise */
public boolean isSetSuccess() {
- return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
+ return this.success != null;
}
public void setSuccessIsSet(boolean value) {
- __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
+ if (!value) {
+ this.success = null;
+ }
}
public MetaException getO1() {
@@ -46125,7 +49898,7 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Boolean)value);
+ setSuccess((List)value);
}
break;
@@ -46143,7 +49916,7 @@ public class ThriftHiveMetastore {
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
- return new Boolean(isSuccess());
+ return getSuccess();
case O1:
return getO1();
@@ -46171,21 +49944,21 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof grant_role_result)
- return this.equals((grant_role_result)that);
+ if (that instanceof list_privileges_result)
+ return this.equals((list_privileges_result)that);
return false;
}
- public boolean equals(grant_role_result that) {
+ public boolean equals(list_privileges_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;
}
@@ -46206,13 +49979,13 @@ public class ThriftHiveMetastore {
return 0;
}
- public int compareTo(grant_role_result other) {
+ public int compareTo(list_privileges_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- grant_role_result typedOther = (grant_role_result)other;
+ list_privileges_result typedOther = (list_privileges_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
@@ -46252,9 +50025,19 @@ public class ThriftHiveMetastore {
}
switch (field.id) {
case 0: // SUCCESS
- if (field.type == TType.BOOL) {
- this.success = iprot.readBool();
- setSuccessIsSet(true);
+ if (field.type == TType.LIST) {
+ {
+ TList _list220 = iprot.readListBegin();
+ this.success = new ArrayList(_list220.size);
+ for (int _i221 = 0; _i221 < _list220.size; ++_i221)
+ {
+ HiveObjectPrivilege _elem222;
+ _elem222 = new HiveObjectPrivilege();
+ _elem222.read(iprot);
+ this.success.add(_elem222);
+ }
+ iprot.readListEnd();
+ }
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -46281,7 +50064,14 @@ public class ThriftHiveMetastore {
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- oprot.writeBool(this.success);
+ {
+ oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
+ for (HiveObjectPrivilege _iter223 : this.success)
+ {
+ _iter223.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
oprot.writeFieldEnd();
} else if (this.isSetO1()) {
oprot.writeFieldBegin(O1_FIELD_DESC);
@@ -46294,11 +50084,15 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("grant_role_result(");
+ StringBuilder sb = new StringBuilder("list_privileges_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:");
@@ -46318,26 +50112,16 @@ public class ThriftHiveMetastore {
}
- public static class revoke_role_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("revoke_role_args");
+ public static class grant_privileges_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("grant_privileges_args");
- private static final TField ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1);
- private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)2);
- private static final TField PRINCIPAL_TYPE_FIELD_DESC = new TField("principal_type", TType.I32, (short)3);
+ private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)1);
- private String role_name;
- private String principal_name;
- private PrincipalType principal_type;
+ private PrivilegeBag privileges;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
- ROLE_NAME((short)1, "role_name"),
- PRINCIPAL_NAME((short)2, "principal_name"),
- /**
- *
- * @see PrincipalType
- */
- PRINCIPAL_TYPE((short)3, "principal_type");
+ PRIVILEGES((short)1, "privileges");
private static final Map byName = new HashMap();
@@ -46352,12 +50136,8 @@ public class ThriftHiveMetastore {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // ROLE_NAME
- return ROLE_NAME;
- case 2: // PRINCIPAL_NAME
- return PRINCIPAL_NAME;
- case 3: // PRINCIPAL_TYPE
- return PRINCIPAL_TYPE;
+ case 1: // PRIVILEGES
+ return PRIVILEGES;
default:
return null;
}
@@ -46402,156 +50182,70 @@ public class ThriftHiveMetastore {
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
- tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
- tmpMap.put(_Fields.PRINCIPAL_TYPE, new FieldMetaData("principal_type", TFieldRequirementType.DEFAULT,
- new EnumMetaData(TType.ENUM, PrincipalType.class)));
+ tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, PrivilegeBag.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- FieldMetaData.addStructMetaDataMap(revoke_role_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(grant_privileges_args.class, metaDataMap);
}
- public revoke_role_args() {
+ public grant_privileges_args() {
}
- public revoke_role_args(
- String role_name,
- String principal_name,
- PrincipalType principal_type)
+ public grant_privileges_args(
+ PrivilegeBag privileges)
{
this();
- this.role_name = role_name;
- this.principal_name = principal_name;
- this.principal_type = principal_type;
+ this.privileges = privileges;
}
/**
* Performs a deep copy on other.
*/
- public revoke_role_args(revoke_role_args other) {
- if (other.isSetRole_name()) {
- this.role_name = other.role_name;
- }
- if (other.isSetPrincipal_name()) {
- this.principal_name = other.principal_name;
- }
- if (other.isSetPrincipal_type()) {
- this.principal_type = other.principal_type;
+ public grant_privileges_args(grant_privileges_args other) {
+ if (other.isSetPrivileges()) {
+ this.privileges = new PrivilegeBag(other.privileges);
}
}
- public revoke_role_args deepCopy() {
- return new revoke_role_args(this);
+ public grant_privileges_args deepCopy() {
+ return new grant_privileges_args(this);
}
@Override
public void clear() {
- this.role_name = null;
- this.principal_name = null;
- this.principal_type = null;
- }
-
- public String getRole_name() {
- return this.role_name;
- }
-
- public void setRole_name(String role_name) {
- this.role_name = role_name;
- }
-
- public void unsetRole_name() {
- this.role_name = null;
- }
-
- /** Returns true if field role_name is set (has been asigned a value) and false otherwise */
- public boolean isSetRole_name() {
- return this.role_name != null;
- }
-
- public void setRole_nameIsSet(boolean value) {
- if (!value) {
- this.role_name = null;
- }
- }
-
- public String getPrincipal_name() {
- return this.principal_name;
- }
-
- public void setPrincipal_name(String principal_name) {
- this.principal_name = principal_name;
- }
-
- public void unsetPrincipal_name() {
- this.principal_name = null;
- }
-
- /** Returns true if field principal_name is set (has been asigned a value) and false otherwise */
- public boolean isSetPrincipal_name() {
- return this.principal_name != null;
- }
-
- public void setPrincipal_nameIsSet(boolean value) {
- if (!value) {
- this.principal_name = null;
- }
+ this.privileges = null;
}
- /**
- *
- * @see PrincipalType
- */
- public PrincipalType getPrincipal_type() {
- return this.principal_type;
+ public PrivilegeBag getPrivileges() {
+ return this.privileges;
}
- /**
- *
- * @see PrincipalType
- */
- public void setPrincipal_type(PrincipalType principal_type) {
- this.principal_type = principal_type;
+ public void setPrivileges(PrivilegeBag privileges) {
+ this.privileges = privileges;
}
- public void unsetPrincipal_type() {
- this.principal_type = null;
+ public void unsetPrivileges() {
+ this.privileges = null;
}
- /** Returns true if field principal_type is set (has been asigned a value) and false otherwise */
- public boolean isSetPrincipal_type() {
- return this.principal_type != null;
+ /** Returns true if field privileges is set (has been asigned a value) and false otherwise */
+ public boolean isSetPrivileges() {
+ return this.privileges != null;
}
- public void setPrincipal_typeIsSet(boolean value) {
+ public void setPrivilegesIsSet(boolean value) {
if (!value) {
- this.principal_type = null;
+ this.privileges = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case ROLE_NAME:
- if (value == null) {
- unsetRole_name();
- } else {
- setRole_name((String)value);
- }
- break;
-
- case PRINCIPAL_NAME:
- if (value == null) {
- unsetPrincipal_name();
- } else {
- setPrincipal_name((String)value);
- }
- break;
-
- case PRINCIPAL_TYPE:
+ case PRIVILEGES:
if (value == null) {
- unsetPrincipal_type();
+ unsetPrivileges();
} else {
- setPrincipal_type((PrincipalType)value);
+ setPrivileges((PrivilegeBag)value);
}
break;
@@ -46560,14 +50254,8 @@ public class ThriftHiveMetastore {
public Object getFieldValue(_Fields field) {
switch (field) {
- case ROLE_NAME:
- return getRole_name();
-
- case PRINCIPAL_NAME:
- return getPrincipal_name();
-
- case PRINCIPAL_TYPE:
- return getPrincipal_type();
+ case PRIVILEGES:
+ return getPrivileges();
}
throw new IllegalStateException();
@@ -46580,12 +50268,8 @@ public class ThriftHiveMetastore {
}
switch (field) {
- case ROLE_NAME:
- return isSetRole_name();
- case PRINCIPAL_NAME:
- return isSetPrincipal_name();
- case PRINCIPAL_TYPE:
- return isSetPrincipal_type();
+ case PRIVILEGES:
+ return isSetPrivileges();
}
throw new IllegalStateException();
}
@@ -46594,39 +50278,21 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof revoke_role_args)
- return this.equals((revoke_role_args)that);
+ if (that instanceof grant_privileges_args)
+ return this.equals((grant_privileges_args)that);
return false;
}
- public boolean equals(revoke_role_args that) {
+ public boolean equals(grant_privileges_args that) {
if (that == null)
return false;
- boolean this_present_role_name = true && this.isSetRole_name();
- boolean that_present_role_name = true && that.isSetRole_name();
- if (this_present_role_name || that_present_role_name) {
- if (!(this_present_role_name && that_present_role_name))
- return false;
- if (!this.role_name.equals(that.role_name))
- return false;
- }
-
- boolean this_present_principal_name = true && this.isSetPrincipal_name();
- boolean that_present_principal_name = true && that.isSetPrincipal_name();
- if (this_present_principal_name || that_present_principal_name) {
- if (!(this_present_principal_name && that_present_principal_name))
- return false;
- if (!this.principal_name.equals(that.principal_name))
- return false;
- }
-
- boolean this_present_principal_type = true && this.isSetPrincipal_type();
- boolean that_present_principal_type = true && that.isSetPrincipal_type();
- if (this_present_principal_type || that_present_principal_type) {
- if (!(this_present_principal_type && that_present_principal_type))
+ boolean this_present_privileges = true && this.isSetPrivileges();
+ boolean that_present_privileges = true && that.isSetPrivileges();
+ if (this_present_privileges || that_present_privileges) {
+ if (!(this_present_privileges && that_present_privileges))
return false;
- if (!this.principal_type.equals(that.principal_type))
+ if (!this.privileges.equals(that.privileges))
return false;
}
@@ -46638,40 +50304,20 @@ public class ThriftHiveMetastore {
return 0;
}
- public int compareTo(revoke_role_args other) {
+ public int compareTo(grant_privileges_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- revoke_role_args typedOther = (revoke_role_args)other;
+ grant_privileges_args typedOther = (grant_privileges_args)other;
- lastComparison = Boolean.valueOf(isSetRole_name()).compareTo(typedOther.isSetRole_name());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRole_name()) {
- lastComparison = TBaseHelper.compareTo(this.role_name, typedOther.role_name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPrincipal_name()) {
- lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type());
+ lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetPrincipal_type()) {
- lastComparison = TBaseHelper.compareTo(this.principal_type, typedOther.principal_type);
+ if (isSetPrivileges()) {
+ lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges);
if (lastComparison != 0) {
return lastComparison;
}
@@ -46693,23 +50339,10 @@ public class ThriftHiveMetastore {
break;
}
switch (field.id) {
- case 1: // ROLE_NAME
- if (field.type == TType.STRING) {
- this.role_name = iprot.readString();
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // PRINCIPAL_NAME
- if (field.type == TType.STRING) {
- this.principal_name = iprot.readString();
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // PRINCIPAL_TYPE
- if (field.type == TType.I32) {
- this.principal_type = PrincipalType.findByValue(iprot.readI32());
+ case 1: // PRIVILEGES
+ if (field.type == TType.STRUCT) {
+ this.privileges = new PrivilegeBag();
+ this.privileges.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -46727,19 +50360,9 @@ public class ThriftHiveMetastore {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.role_name != null) {
- oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
- oprot.writeString(this.role_name);
- oprot.writeFieldEnd();
- }
- if (this.principal_name != null) {
- oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC);
- oprot.writeString(this.principal_name);
- oprot.writeFieldEnd();
- }
- if (this.principal_type != null) {
- oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC);
- oprot.writeI32(this.principal_type.getValue());
+ if (this.privileges != null) {
+ oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC);
+ this.privileges.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -46748,30 +50371,14 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("revoke_role_args(");
+ StringBuilder sb = new StringBuilder("grant_privileges_args(");
boolean first = true;
- sb.append("role_name:");
- if (this.role_name == null) {
- sb.append("null");
- } else {
- sb.append(this.role_name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("principal_name:");
- if (this.principal_name == null) {
- sb.append("null");
- } else {
- sb.append(this.principal_name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("principal_type:");
- if (this.principal_type == null) {
+ sb.append("privileges:");
+ if (this.privileges == null) {
sb.append("null");
} else {
- sb.append(this.principal_type);
+ sb.append(this.privileges);
}
first = false;
sb.append(")");
@@ -46784,8 +50391,8 @@ public class ThriftHiveMetastore {
}
- public static class revoke_role_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("revoke_role_result");
+ public static class grant_privileges_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("grant_privileges_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);
@@ -46866,13 +50473,13 @@ public class ThriftHiveMetastore {
tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- FieldMetaData.addStructMetaDataMap(revoke_role_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(grant_privileges_result.class, metaDataMap);
}
- public revoke_role_result() {
+ public grant_privileges_result() {
}
- public revoke_role_result(
+ public grant_privileges_result(
boolean success,
MetaException o1)
{
@@ -46885,7 +50492,7 @@ public class ThriftHiveMetastore {
/**
* Performs a deep copy on other.
*/
- public revoke_role_result(revoke_role_result other) {
+ public grant_privileges_result(grant_privileges_result other) {
__isset_bit_vector.clear();
__isset_bit_vector.or(other.__isset_bit_vector);
this.success = other.success;
@@ -46894,8 +50501,8 @@ public class ThriftHiveMetastore {
}
}
- public revoke_role_result deepCopy() {
- return new revoke_role_result(this);
+ public grant_privileges_result deepCopy() {
+ return new grant_privileges_result(this);
}
@Override
@@ -47002,12 +50609,12 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof revoke_role_result)
- return this.equals((revoke_role_result)that);
+ if (that instanceof grant_privileges_result)
+ return this.equals((grant_privileges_result)that);
return false;
}
- public boolean equals(revoke_role_result that) {
+ public boolean equals(grant_privileges_result that) {
if (that == null)
return false;
@@ -47037,13 +50644,13 @@ public class ThriftHiveMetastore {
return 0;
}
- public int compareTo(revoke_role_result other) {
+ public int compareTo(grant_privileges_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- revoke_role_result typedOther = (revoke_role_result)other;
+ grant_privileges_result typedOther = (grant_privileges_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
@@ -47125,7 +50732,7 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("revoke_role_result(");
+ StringBuilder sb = new StringBuilder("grant_privileges_result(");
boolean first = true;
sb.append("success:");
@@ -47149,23 +50756,16 @@ public class ThriftHiveMetastore {
}
- public static class list_roles_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("list_roles_args");
+ public static class revoke_privileges_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("revoke_privileges_args");
- private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1);
- private static final TField PRINCIPAL_TYPE_FIELD_DESC = new TField("principal_type", TType.I32, (short)2);
+ private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)1);
- private String principal_name;
- private PrincipalType principal_type;
+ private PrivilegeBag privileges;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
- PRINCIPAL_NAME((short)1, "principal_name"),
- /**
- *
- * @see PrincipalType
- */
- PRINCIPAL_TYPE((short)2, "principal_type");
+ PRIVILEGES((short)1, "privileges");
private static final Map byName = new HashMap();
@@ -47180,10 +50780,8 @@ public class ThriftHiveMetastore {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // PRINCIPAL_NAME
- return PRINCIPAL_NAME;
- case 2: // PRINCIPAL_TYPE
- return PRINCIPAL_TYPE;
+ case 1: // PRIVILEGES
+ return PRIVILEGES;
default:
return null;
}
@@ -47228,117 +50826,70 @@ public class ThriftHiveMetastore {
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT,
- new FieldValueMetaData(TType.STRING)));
- tmpMap.put(_Fields.PRINCIPAL_TYPE, new FieldMetaData("principal_type", TFieldRequirementType.DEFAULT,
- new EnumMetaData(TType.ENUM, PrincipalType.class)));
+ tmpMap.put(_Fields.PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT,
+ new StructMetaData(TType.STRUCT, PrivilegeBag.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- FieldMetaData.addStructMetaDataMap(list_roles_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(revoke_privileges_args.class, metaDataMap);
}
- public list_roles_args() {
+ public revoke_privileges_args() {
}
- public list_roles_args(
- String principal_name,
- PrincipalType principal_type)
+ public revoke_privileges_args(
+ PrivilegeBag privileges)
{
this();
- this.principal_name = principal_name;
- this.principal_type = principal_type;
+ this.privileges = privileges;
}
/**
* Performs a deep copy on other.
*/
- public list_roles_args(list_roles_args other) {
- if (other.isSetPrincipal_name()) {
- this.principal_name = other.principal_name;
- }
- if (other.isSetPrincipal_type()) {
- this.principal_type = other.principal_type;
+ public revoke_privileges_args(revoke_privileges_args other) {
+ if (other.isSetPrivileges()) {
+ this.privileges = new PrivilegeBag(other.privileges);
}
}
- public list_roles_args deepCopy() {
- return new list_roles_args(this);
+ public revoke_privileges_args deepCopy() {
+ return new revoke_privileges_args(this);
}
@Override
public void clear() {
- this.principal_name = null;
- this.principal_type = null;
- }
-
- public String getPrincipal_name() {
- return this.principal_name;
- }
-
- public void setPrincipal_name(String principal_name) {
- this.principal_name = principal_name;
- }
-
- public void unsetPrincipal_name() {
- this.principal_name = null;
- }
-
- /** Returns true if field principal_name is set (has been asigned a value) and false otherwise */
- public boolean isSetPrincipal_name() {
- return this.principal_name != null;
- }
-
- public void setPrincipal_nameIsSet(boolean value) {
- if (!value) {
- this.principal_name = null;
- }
+ this.privileges = null;
}
- /**
- *
- * @see PrincipalType
- */
- public PrincipalType getPrincipal_type() {
- return this.principal_type;
+ public PrivilegeBag getPrivileges() {
+ return this.privileges;
}
- /**
- *
- * @see PrincipalType
- */
- public void setPrincipal_type(PrincipalType principal_type) {
- this.principal_type = principal_type;
+ public void setPrivileges(PrivilegeBag privileges) {
+ this.privileges = privileges;
}
- public void unsetPrincipal_type() {
- this.principal_type = null;
+ public void unsetPrivileges() {
+ this.privileges = null;
}
- /** Returns true if field principal_type is set (has been asigned a value) and false otherwise */
- public boolean isSetPrincipal_type() {
- return this.principal_type != null;
+ /** Returns true if field privileges is set (has been asigned a value) and false otherwise */
+ public boolean isSetPrivileges() {
+ return this.privileges != null;
}
- public void setPrincipal_typeIsSet(boolean value) {
+ public void setPrivilegesIsSet(boolean value) {
if (!value) {
- this.principal_type = null;
+ this.privileges = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case PRINCIPAL_NAME:
- if (value == null) {
- unsetPrincipal_name();
- } else {
- setPrincipal_name((String)value);
- }
- break;
-
- case PRINCIPAL_TYPE:
+ case PRIVILEGES:
if (value == null) {
- unsetPrincipal_type();
+ unsetPrivileges();
} else {
- setPrincipal_type((PrincipalType)value);
+ setPrivileges((PrivilegeBag)value);
}
break;
@@ -47347,11 +50898,8 @@ public class ThriftHiveMetastore {
public Object getFieldValue(_Fields field) {
switch (field) {
- case PRINCIPAL_NAME:
- return getPrincipal_name();
-
- case PRINCIPAL_TYPE:
- return getPrincipal_type();
+ case PRIVILEGES:
+ return getPrivileges();
}
throw new IllegalStateException();
@@ -47364,10 +50912,8 @@ public class ThriftHiveMetastore {
}
switch (field) {
- case PRINCIPAL_NAME:
- return isSetPrincipal_name();
- case PRINCIPAL_TYPE:
- return isSetPrincipal_type();
+ case PRIVILEGES:
+ return isSetPrivileges();
}
throw new IllegalStateException();
}
@@ -47376,30 +50922,21 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof list_roles_args)
- return this.equals((list_roles_args)that);
+ if (that instanceof revoke_privileges_args)
+ return this.equals((revoke_privileges_args)that);
return false;
}
- public boolean equals(list_roles_args that) {
+ public boolean equals(revoke_privileges_args that) {
if (that == null)
return false;
- boolean this_present_principal_name = true && this.isSetPrincipal_name();
- boolean that_present_principal_name = true && that.isSetPrincipal_name();
- if (this_present_principal_name || that_present_principal_name) {
- if (!(this_present_principal_name && that_present_principal_name))
- return false;
- if (!this.principal_name.equals(that.principal_name))
- return false;
- }
-
- boolean this_present_principal_type = true && this.isSetPrincipal_type();
- boolean that_present_principal_type = true && that.isSetPrincipal_type();
- if (this_present_principal_type || that_present_principal_type) {
- if (!(this_present_principal_type && that_present_principal_type))
+ boolean this_present_privileges = true && this.isSetPrivileges();
+ boolean that_present_privileges = true && that.isSetPrivileges();
+ if (this_present_privileges || that_present_privileges) {
+ if (!(this_present_privileges && that_present_privileges))
return false;
- if (!this.principal_type.equals(that.principal_type))
+ if (!this.privileges.equals(that.privileges))
return false;
}
@@ -47411,30 +50948,20 @@ public class ThriftHiveMetastore {
return 0;
}
- public int compareTo(list_roles_args other) {
+ public int compareTo(revoke_privileges_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- list_roles_args typedOther = (list_roles_args)other;
+ revoke_privileges_args typedOther = (revoke_privileges_args)other;
- lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPrincipal_name()) {
- lastComparison = TBaseHelper.compareTo(this.principal_name, typedOther.principal_name);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type());
+ lastComparison = Boolean.valueOf(isSetPrivileges()).compareTo(typedOther.isSetPrivileges());
if (lastComparison != 0) {
return lastComparison;
}
- if (isSetPrincipal_type()) {
- lastComparison = TBaseHelper.compareTo(this.principal_type, typedOther.principal_type);
+ if (isSetPrivileges()) {
+ lastComparison = TBaseHelper.compareTo(this.privileges, typedOther.privileges);
if (lastComparison != 0) {
return lastComparison;
}
@@ -47456,16 +50983,10 @@ public class ThriftHiveMetastore {
break;
}
switch (field.id) {
- case 1: // PRINCIPAL_NAME
- if (field.type == TType.STRING) {
- this.principal_name = iprot.readString();
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // PRINCIPAL_TYPE
- if (field.type == TType.I32) {
- this.principal_type = PrincipalType.findByValue(iprot.readI32());
+ case 1: // PRIVILEGES
+ if (field.type == TType.STRUCT) {
+ this.privileges = new PrivilegeBag();
+ this.privileges.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -47483,14 +51004,9 @@ public class ThriftHiveMetastore {
validate();
oprot.writeStructBegin(STRUCT_DESC);
- if (this.principal_name != null) {
- oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC);
- oprot.writeString(this.principal_name);
- oprot.writeFieldEnd();
- }
- if (this.principal_type != null) {
- oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC);
- oprot.writeI32(this.principal_type.getValue());
+ if (this.privileges != null) {
+ oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC);
+ this.privileges.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
@@ -47499,22 +51015,14 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("list_roles_args(");
+ StringBuilder sb = new StringBuilder("revoke_privileges_args(");
boolean first = true;
- sb.append("principal_name:");
- if (this.principal_name == null) {
- sb.append("null");
- } else {
- sb.append(this.principal_name);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("principal_type:");
- if (this.principal_type == null) {
+ sb.append("privileges:");
+ if (this.privileges == null) {
sb.append("null");
} else {
- sb.append(this.principal_type);
+ sb.append(this.privileges);
}
first = false;
sb.append(")");
@@ -47527,13 +51035,13 @@ public class ThriftHiveMetastore {
}
- public static class list_roles_result implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("list_roles_result");
+ public static class revoke_privileges_result implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("revoke_privileges_result");
- private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
+ 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 List success;
+ private boolean success;
private MetaException o1;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -47598,93 +51106,76 @@ public class ThriftHiveMetastore {
}
// isset id assignments
+ private static final int __SUCCESS_ISSET_ID = 0;
+ private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT,
- new ListMetaData(TType.LIST,
- new StructMetaData(TType.STRUCT, Role.class))));
+ new FieldValueMetaData(TType.BOOL)));
tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- FieldMetaData.addStructMetaDataMap(list_roles_result.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(revoke_privileges_result.class, metaDataMap);
}
- public list_roles_result() {
+ public revoke_privileges_result() {
}
- public list_roles_result(
- List success,
+ public revoke_privileges_result(
+ boolean success,
MetaException o1)
{
this();
this.success = success;
+ setSuccessIsSet(true);
this.o1 = o1;
}
/**
* Performs a deep copy on other.
*/
- public list_roles_result(list_roles_result other) {
- if (other.isSetSuccess()) {
- List __this__success = new ArrayList();
- for (Role other_element : other.success) {
- __this__success.add(new Role(other_element));
- }
- this.success = __this__success;
- }
+ public revoke_privileges_result(revoke_privileges_result other) {
+ __isset_bit_vector.clear();
+ __isset_bit_vector.or(other.__isset_bit_vector);
+ this.success = other.success;
if (other.isSetO1()) {
this.o1 = new MetaException(other.o1);
}
}
- public list_roles_result deepCopy() {
- return new list_roles_result(this);
+ public revoke_privileges_result deepCopy() {
+ return new revoke_privileges_result(this);
}
@Override
public void clear() {
- this.success = null;
+ setSuccessIsSet(false);
+ this.success = false;
this.o1 = null;
}
- 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(Role elem) {
- if (this.success == null) {
- this.success = new ArrayList();
- }
- this.success.add(elem);
- }
-
- public List getSuccess() {
+ public boolean isSuccess() {
return this.success;
}
- public void setSuccess(List success) {
+ public void setSuccess(boolean success) {
this.success = success;
+ setSuccessIsSet(true);
}
public void unsetSuccess() {
- this.success = null;
+ __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been asigned a value) and false otherwise */
public boolean isSetSuccess() {
- return this.success != null;
+ return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- if (!value) {
- this.success = null;
- }
+ __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
}
public MetaException getO1() {
@@ -47716,7 +51207,7 @@ public class ThriftHiveMetastore {
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List)value);
+ setSuccess((Boolean)value);
}
break;
@@ -47734,7 +51225,7 @@ public class ThriftHiveMetastore {
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
- return getSuccess();
+ return new Boolean(isSuccess());
case O1:
return getO1();
@@ -47762,21 +51253,21 @@ public class ThriftHiveMetastore {
public boolean equals(Object that) {
if (that == null)
return false;
- if (that instanceof list_roles_result)
- return this.equals((list_roles_result)that);
+ if (that instanceof revoke_privileges_result)
+ return this.equals((revoke_privileges_result)that);
return false;
}
- public boolean equals(list_roles_result that) {
+ public boolean equals(revoke_privileges_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;
}
@@ -47797,13 +51288,13 @@ public class ThriftHiveMetastore {
return 0;
}
- public int compareTo(list_roles_result other) {
+ public int compareTo(revoke_privileges_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
- list_roles_result typedOther = (list_roles_result)other;
+ revoke_privileges_result typedOther = (revoke_privileges_result)other;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
if (lastComparison != 0) {
@@ -47843,19 +51334,9 @@ public class ThriftHiveMetastore {
}
switch (field.id) {
case 0: // SUCCESS
- if (field.type == TType.LIST) {
- {
- TList _list212 = iprot.readListBegin();
- this.success = new ArrayList(_list212.size);
- for (int _i213 = 0; _i213 < _list212.size; ++_i213)
- {
- Role _elem214;
- _elem214 = new Role();
- _elem214.read(iprot);
- this.success.add(_elem214);
- }
- iprot.readListEnd();
- }
+ if (field.type == TType.BOOL) {
+ this.success = iprot.readBool();
+ setSuccessIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -47882,14 +51363,7 @@ public class ThriftHiveMetastore {
if (this.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
- {
- oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
- for (Role _iter215 : this.success)
- {
- _iter215.write(oprot);
- }
- oprot.writeListEnd();
- }
+ oprot.writeBool(this.success);
oprot.writeFieldEnd();
} else if (this.isSetO1()) {
oprot.writeFieldBegin(O1_FIELD_DESC);
@@ -47902,15 +51376,11 @@ public class ThriftHiveMetastore {
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("list_roles_result(");
+ StringBuilder sb = new StringBuilder("revoke_privileges_result(");
boolean first = true;
sb.append("success:");
- if (this.success == null) {
- sb.append("null");
- } else {
- sb.append(this.success);
- }
+ sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("o1:");
@@ -47930,22 +51400,16 @@ public class ThriftHiveMetastore {
}
- public static class get_privilege_set_args implements TBase, java.io.Serializable, Cloneable {
- private static final TStruct STRUCT_DESC = new TStruct("get_privilege_set_args");
+ public static class get_delegation_token_args implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("get_delegation_token_args");
- private static final TField HIVE_OBJECT_FIELD_DESC = new TField("hiveObject", TType.STRUCT, (short)1);
- private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)2);
- private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)3);
+ private static final TField RENEWER_KERBEROS_PRINCIPAL_NAME_FIELD_DESC = new TField("renewer_kerberos_principal_name", TType.STRING, (short)1);
- private HiveObjectRef hiveObject;
- private String user_name;
- private List group_names;
+ private String renewer_kerberos_principal_name;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
- HIVE_OBJECT((short)1, "hiveObject"),
- USER_NAME((short)2, "user_name"),
- GROUP_NAMES((short)3, "group_names");
+ RENEWER_KERBEROS_PRINCIPAL_NAME((short)1, "renewer_kerberos_principal_name");
private static final Map byName = new HashMap();
@@ -47960,12 +51424,8 @@ public class ThriftHiveMetastore {
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // HIVE_OBJECT
- return HIVE_OBJECT;
- case 2: // USER_NAME
- return USER_NAME;
- case 3: // GROUP_NAMES
- return GROUP_NAMES;
+ case 1: // RENEWER_KERBEROS_PRINCIPAL_NAME
+ return RENEWER_KERBEROS_PRINCIPAL_NAME;
default:
return null;
}
@@ -48010,168 +51470,70 @@ public class ThriftHiveMetastore {
public static final Map<_Fields, FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.HIVE_OBJECT, new FieldMetaData("hiveObject", TFieldRequirementType.DEFAULT,
- new StructMetaData(TType.STRUCT, HiveObjectRef.class)));
- tmpMap.put(_Fields.USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.RENEWER_KERBEROS_PRINCIPAL_NAME, new FieldMetaData("renewer_kerberos_principal_name", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
- tmpMap.put(_Fields.GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT,
- new ListMetaData(TType.LIST,
- new FieldValueMetaData(TType.STRING))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
- FieldMetaData.addStructMetaDataMap(get_privilege_set_args.class, metaDataMap);
+ FieldMetaData.addStructMetaDataMap(get_delegation_token_args.class, metaDataMap);
}
- public get_privilege_set_args() {
+ public get_delegation_token_args() {
}
- public get_privilege_set_args(
- HiveObjectRef hiveObject,
- String user_name,
- List group_names)
+ public get_delegation_token_args(
+ String renewer_kerberos_principal_name)
{
this();
- this.hiveObject = hiveObject;
- this.user_name = user_name;
- this.group_names = group_names;
+ this.renewer_kerberos_principal_name = renewer_kerberos_principal_name;
}
/**
* Performs a deep copy on other.
*/
- public get_privilege_set_args(get_privilege_set_args other) {
- if (other.isSetHiveObject()) {
- this.hiveObject = new HiveObjectRef(other.hiveObject);
- }
- if (other.isSetUser_name()) {
- this.user_name = other.user_name;
- }
- if (other.isSetGroup_names()) {
- List __this__group_names = new ArrayList