You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2011/01/12 07:58:10 UTC

svn commit: r1057999 [7/22] - in /hive/trunk: ./ common/src/java/org/apache/hadoop/hive/conf/ conf/ metastore/if/ metastore/src/gen/thrift/gen-cpp/ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ metastore/src/gen/thrift/gen...

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java?rev=1057999&r1=1057998&r2=1057999&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java Wed Jan 12 06:58:04 2011
@@ -81,14 +81,20 @@ public class ThriftHiveMetastore {
 
     public Partition get_partition(String db_name, String tbl_name, List<String> part_vals) throws MetaException, NoSuchObjectException, TException;
 
+    public Partition get_partition_with_auth(String db_name, String tbl_name, List<String> part_vals, String user_name, List<String> group_names) throws MetaException, NoSuchObjectException, TException;
+
     public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, TException;
 
     public List<Partition> get_partitions(String db_name, String tbl_name, short max_parts) throws NoSuchObjectException, MetaException, TException;
 
+    public List<Partition> get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List<String> group_names) throws NoSuchObjectException, MetaException, TException;
+
     public List<String> get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, TException;
 
     public List<Partition> get_partitions_ps(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws MetaException, TException;
 
+    public List<Partition> get_partitions_ps_with_auth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> group_names) throws NoSuchObjectException, MetaException, TException;
+
     public List<String> get_partition_names_ps(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws MetaException, TException;
 
     public List<Partition> get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException, NoSuchObjectException, TException;
@@ -113,6 +119,24 @@ public class ThriftHiveMetastore {
 
     public List<String> get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, TException;
 
+    public boolean create_role(Role role) throws MetaException, TException;
+
+    public boolean drop_role(String role_name) throws MetaException, TException;
+
+    public boolean grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws MetaException, TException;
+
+    public boolean revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws MetaException, TException;
+
+    public List<Role> list_roles(String principal_name, PrincipalType principal_type) throws MetaException, TException;
+
+    public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List<String> group_names) throws MetaException, TException;
+
+    public List<HiveObjectPrivilege> list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, TException;
+
+    public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, TException;
+
+    public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, TException;
+
   }
 
   public interface AsyncIface extends com.facebook.fb303.FacebookService .AsyncIface {
@@ -165,14 +189,20 @@ public class ThriftHiveMetastore {
 
     public void get_partition(String db_name, String tbl_name, List<String> part_vals, AsyncMethodCallback<AsyncClient.get_partition_call> resultHandler) throws TException;
 
+    public void get_partition_with_auth(String db_name, String tbl_name, List<String> part_vals, String user_name, List<String> group_names, AsyncMethodCallback<AsyncClient.get_partition_with_auth_call> resultHandler) throws TException;
+
     public void get_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback<AsyncClient.get_partition_by_name_call> resultHandler) throws TException;
 
     public void get_partitions(String db_name, String tbl_name, short max_parts, AsyncMethodCallback<AsyncClient.get_partitions_call> resultHandler) throws TException;
 
+    public void get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List<String> group_names, AsyncMethodCallback<AsyncClient.get_partitions_with_auth_call> resultHandler) throws TException;
+
     public void get_partition_names(String db_name, String tbl_name, short max_parts, AsyncMethodCallback<AsyncClient.get_partition_names_call> resultHandler) throws TException;
 
     public void get_partitions_ps(String db_name, String tbl_name, List<String> part_vals, short max_parts, AsyncMethodCallback<AsyncClient.get_partitions_ps_call> resultHandler) throws TException;
 
+    public void get_partitions_ps_with_auth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> group_names, AsyncMethodCallback<AsyncClient.get_partitions_ps_with_auth_call> resultHandler) throws TException;
+
     public void get_partition_names_ps(String db_name, String tbl_name, List<String> part_vals, short max_parts, AsyncMethodCallback<AsyncClient.get_partition_names_ps_call> resultHandler) throws TException;
 
     public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, AsyncMethodCallback<AsyncClient.get_partitions_by_filter_call> resultHandler) throws TException;
@@ -197,6 +227,24 @@ public class ThriftHiveMetastore {
 
     public void get_index_names(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback<AsyncClient.get_index_names_call> resultHandler) throws TException;
 
+    public void create_role(Role role, AsyncMethodCallback<AsyncClient.create_role_call> resultHandler) throws TException;
+
+    public void drop_role(String role_name, AsyncMethodCallback<AsyncClient.drop_role_call> resultHandler) throws TException;
+
+    public void grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, AsyncMethodCallback<AsyncClient.grant_role_call> resultHandler) throws TException;
+
+    public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, AsyncMethodCallback<AsyncClient.revoke_role_call> resultHandler) throws TException;
+
+    public void list_roles(String principal_name, PrincipalType principal_type, AsyncMethodCallback<AsyncClient.list_roles_call> resultHandler) throws TException;
+
+    public void get_privilege_set(HiveObjectRef hiveObject, String user_name, List<String> group_names, AsyncMethodCallback<AsyncClient.get_privilege_set_call> resultHandler) throws TException;
+
+    public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, AsyncMethodCallback<AsyncClient.list_privileges_call> resultHandler) throws TException;
+
+    public void grant_privileges(PrivilegeBag privileges, AsyncMethodCallback<AsyncClient.grant_privileges_call> resultHandler) throws TException;
+
+    public void revoke_privileges(PrivilegeBag privileges, AsyncMethodCallback<AsyncClient.revoke_privileges_call> resultHandler) throws TException;
+
   }
 
   public static class Client extends com.facebook.fb303.FacebookService.Client implements TServiceClient, Iface {
@@ -1246,6 +1294,52 @@ public class ThriftHiveMetastore {
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result");
     }
 
+    public Partition get_partition_with_auth(String db_name, String tbl_name, List<String> part_vals, String user_name, List<String> group_names) throws MetaException, NoSuchObjectException, TException
+    {
+      send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names);
+      return recv_get_partition_with_auth();
+    }
+
+    public void send_get_partition_with_auth(String db_name, String tbl_name, List<String> part_vals, String user_name, List<String> group_names) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.CALL, ++seqid_));
+      get_partition_with_auth_args args = new get_partition_with_auth_args();
+      args.setDb_name(db_name);
+      args.setTbl_name(tbl_name);
+      args.setPart_vals(part_vals);
+      args.setUser_name(user_name);
+      args.setGroup_names(group_names);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public Partition recv_get_partition_with_auth() throws MetaException, NoSuchObjectException, 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_partition_with_auth failed: out of sequence response");
+      }
+      get_partition_with_auth_result result = new get_partition_with_auth_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.o1 != null) {
+        throw result.o1;
+      }
+      if (result.o2 != null) {
+        throw result.o2;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result");
+    }
+
     public Partition get_partition_by_name(String db_name, String tbl_name, String part_name) throws MetaException, NoSuchObjectException, TException
     {
       send_get_partition_by_name(db_name, tbl_name, part_name);
@@ -1334,6 +1428,52 @@ public class ThriftHiveMetastore {
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result");
     }
 
+    public List<Partition> get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List<String> group_names) throws NoSuchObjectException, MetaException, TException
+    {
+      send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names);
+      return recv_get_partitions_with_auth();
+    }
+
+    public void send_get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List<String> group_names) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.CALL, ++seqid_));
+      get_partitions_with_auth_args args = new get_partitions_with_auth_args();
+      args.setDb_name(db_name);
+      args.setTbl_name(tbl_name);
+      args.setMax_parts(max_parts);
+      args.setUser_name(user_name);
+      args.setGroup_names(group_names);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public List<Partition> recv_get_partitions_with_auth() throws NoSuchObjectException, 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_partitions_with_auth failed: out of sequence response");
+      }
+      get_partitions_with_auth_result result = new get_partitions_with_auth_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.o1 != null) {
+        throw result.o1;
+      }
+      if (result.o2 != null) {
+        throw result.o2;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result");
+    }
+
     public List<String> get_partition_names(String db_name, String tbl_name, short max_parts) throws MetaException, TException
     {
       send_get_partition_names(db_name, tbl_name, max_parts);
@@ -1417,6 +1557,53 @@ public class ThriftHiveMetastore {
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result");
     }
 
+    public List<Partition> get_partitions_ps_with_auth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> group_names) throws NoSuchObjectException, MetaException, TException
+    {
+      send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names);
+      return recv_get_partitions_ps_with_auth();
+    }
+
+    public void send_get_partitions_ps_with_auth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> group_names) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.CALL, ++seqid_));
+      get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args();
+      args.setDb_name(db_name);
+      args.setTbl_name(tbl_name);
+      args.setPart_vals(part_vals);
+      args.setMax_parts(max_parts);
+      args.setUser_name(user_name);
+      args.setGroup_names(group_names);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public List<Partition> recv_get_partitions_ps_with_auth() throws NoSuchObjectException, 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_partitions_ps_with_auth failed: out of sequence response");
+      }
+      get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result();
+      result.read(iprot_);
+      iprot_.readMessageEnd();
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.o1 != null) {
+        throw result.o1;
+      }
+      if (result.o2 != null) {
+        throw result.o2;
+      }
+      throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result");
+    }
+
     public List<String> get_partition_names_ps(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws MetaException, TException
     {
       send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts);
@@ -1925,6 +2112,369 @@ public class ThriftHiveMetastore {
       throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result");
     }
 
+    public boolean create_role(Role role) throws MetaException, TException
+    {
+      send_create_role(role);
+      return recv_create_role();
+    }
+
+    public void send_create_role(Role role) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("create_role", TMessageType.CALL, ++seqid_));
+      create_role_args args = new create_role_args();
+      args.setRole(role);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_create_role() 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, "create_role failed: out of sequence response");
+      }
+      create_role_result result = new create_role_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, "create_role failed: unknown result");
+    }
+
+    public boolean drop_role(String role_name) throws MetaException, TException
+    {
+      send_drop_role(role_name);
+      return recv_drop_role();
+    }
+
+    public void send_drop_role(String role_name) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("drop_role", TMessageType.CALL, ++seqid_));
+      drop_role_args args = new drop_role_args();
+      args.setRole_name(role_name);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_drop_role() 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, "drop_role failed: out of sequence response");
+      }
+      drop_role_result result = new drop_role_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, "drop_role failed: unknown result");
+    }
+
+    public boolean grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws MetaException, TException
+    {
+      send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option);
+      return recv_grant_role();
+    }
+
+    public void send_grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("grant_role", TMessageType.CALL, ++seqid_));
+      grant_role_args args = new grant_role_args();
+      args.setRole_name(role_name);
+      args.setPrincipal_name(principal_name);
+      args.setPrincipal_type(principal_type);
+      args.setGrantor(grantor);
+      args.setGrantorType(grantorType);
+      args.setGrant_option(grant_option);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_grant_role() 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, "grant_role failed: out of sequence response");
+      }
+      grant_role_result result = new grant_role_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, "grant_role failed: unknown result");
+    }
+
+    public boolean revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws MetaException, TException
+    {
+      send_revoke_role(role_name, principal_name, principal_type);
+      return recv_revoke_role();
+    }
+
+    public void send_revoke_role(String role_name, String principal_name, PrincipalType principal_type) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("revoke_role", TMessageType.CALL, ++seqid_));
+      revoke_role_args args = new revoke_role_args();
+      args.setRole_name(role_name);
+      args.setPrincipal_name(principal_name);
+      args.setPrincipal_type(principal_type);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_revoke_role() 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, "revoke_role failed: out of sequence response");
+      }
+      revoke_role_result result = new revoke_role_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, "revoke_role failed: unknown result");
+    }
+
+    public List<Role> list_roles(String principal_name, PrincipalType principal_type) throws MetaException, TException
+    {
+      send_list_roles(principal_name, principal_type);
+      return recv_list_roles();
+    }
+
+    public void send_list_roles(String principal_name, PrincipalType principal_type) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("list_roles", TMessageType.CALL, ++seqid_));
+      list_roles_args args = new list_roles_args();
+      args.setPrincipal_name(principal_name);
+      args.setPrincipal_type(principal_type);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public List<Role> recv_list_roles() 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, "list_roles failed: out of sequence response");
+      }
+      list_roles_result result = new list_roles_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, "list_roles failed: unknown result");
+    }
+
+    public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, String user_name, List<String> group_names) throws MetaException, TException
+    {
+      send_get_privilege_set(hiveObject, user_name, group_names);
+      return recv_get_privilege_set();
+    }
+
+    public void send_get_privilege_set(HiveObjectRef hiveObject, String user_name, List<String> group_names) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("get_privilege_set", TMessageType.CALL, ++seqid_));
+      get_privilege_set_args args = new get_privilege_set_args();
+      args.setHiveObject(hiveObject);
+      args.setUser_name(user_name);
+      args.setGroup_names(group_names);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public PrincipalPrivilegeSet recv_get_privilege_set() 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_privilege_set failed: out of sequence response");
+      }
+      get_privilege_set_result result = new get_privilege_set_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_privilege_set failed: unknown result");
+    }
+
+    public List<HiveObjectPrivilege> list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws MetaException, TException
+    {
+      send_list_privileges(principal_name, principal_type, hiveObject);
+      return recv_list_privileges();
+    }
+
+    public void send_list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("list_privileges", TMessageType.CALL, ++seqid_));
+      list_privileges_args args = new list_privileges_args();
+      args.setPrincipal_name(principal_name);
+      args.setPrincipal_type(principal_type);
+      args.setHiveObject(hiveObject);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public List<HiveObjectPrivilege> recv_list_privileges() 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, "list_privileges failed: out of sequence response");
+      }
+      list_privileges_result result = new list_privileges_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, "list_privileges failed: unknown result");
+    }
+
+    public boolean grant_privileges(PrivilegeBag privileges) throws MetaException, TException
+    {
+      send_grant_privileges(privileges);
+      return recv_grant_privileges();
+    }
+
+    public void send_grant_privileges(PrivilegeBag privileges) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("grant_privileges", TMessageType.CALL, ++seqid_));
+      grant_privileges_args args = new grant_privileges_args();
+      args.setPrivileges(privileges);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_grant_privileges() 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, "grant_privileges failed: out of sequence response");
+      }
+      grant_privileges_result result = new grant_privileges_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, "grant_privileges failed: unknown result");
+    }
+
+    public boolean revoke_privileges(PrivilegeBag privileges) throws MetaException, TException
+    {
+      send_revoke_privileges(privileges);
+      return recv_revoke_privileges();
+    }
+
+    public void send_revoke_privileges(PrivilegeBag privileges) throws TException
+    {
+      oprot_.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.CALL, ++seqid_));
+      revoke_privileges_args args = new revoke_privileges_args();
+      args.setPrivileges(privileges);
+      args.write(oprot_);
+      oprot_.writeMessageEnd();
+      oprot_.getTransport().flush();
+    }
+
+    public boolean recv_revoke_privileges() 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, "revoke_privileges failed: out of sequence response");
+      }
+      revoke_privileges_result result = new revoke_privileges_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, "revoke_privileges failed: unknown result");
+    }
+
   }
   public static class AsyncClient extends com.facebook.fb303.FacebookService.AsyncClient implements AsyncIface {
     public static class Factory implements TAsyncClientFactory<AsyncClient> {
@@ -2750,6 +3300,49 @@ public class ThriftHiveMetastore {
       }
     }
 
+    public void get_partition_with_auth(String db_name, String tbl_name, List<String> part_vals, String user_name, List<String> group_names, AsyncMethodCallback<get_partition_with_auth_call> resultHandler) throws TException {
+      checkReady();
+      get_partition_with_auth_call method_call = new get_partition_with_auth_call(db_name, tbl_name, part_vals, user_name, group_names, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class get_partition_with_auth_call extends TAsyncMethodCall {
+      private String db_name;
+      private String tbl_name;
+      private List<String> part_vals;
+      private String user_name;
+      private List<String> group_names;
+      public get_partition_with_auth_call(String db_name, String tbl_name, List<String> part_vals, String user_name, List<String> group_names, AsyncMethodCallback<get_partition_with_auth_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.db_name = db_name;
+        this.tbl_name = tbl_name;
+        this.part_vals = part_vals;
+        this.user_name = user_name;
+        this.group_names = group_names;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.CALL, 0));
+        get_partition_with_auth_args args = new get_partition_with_auth_args();
+        args.setDb_name(db_name);
+        args.setTbl_name(tbl_name);
+        args.setPart_vals(part_vals);
+        args.setUser_name(user_name);
+        args.setGroup_names(group_names);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public Partition getResult() throws MetaException, NoSuchObjectException, 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_partition_with_auth();
+      }
+    }
+
     public void get_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback<get_partition_by_name_call> resultHandler) throws TException {
       checkReady();
       get_partition_by_name_call method_call = new get_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, protocolFactory, transport);
@@ -2824,6 +3417,49 @@ public class ThriftHiveMetastore {
       }
     }
 
+    public void get_partitions_with_auth(String db_name, String tbl_name, short max_parts, String user_name, List<String> group_names, AsyncMethodCallback<get_partitions_with_auth_call> resultHandler) throws TException {
+      checkReady();
+      get_partitions_with_auth_call method_call = new get_partitions_with_auth_call(db_name, tbl_name, max_parts, user_name, group_names, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class get_partitions_with_auth_call extends TAsyncMethodCall {
+      private String db_name;
+      private String tbl_name;
+      private short max_parts;
+      private String user_name;
+      private List<String> group_names;
+      public get_partitions_with_auth_call(String db_name, String tbl_name, short max_parts, String user_name, List<String> group_names, AsyncMethodCallback<get_partitions_with_auth_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.db_name = db_name;
+        this.tbl_name = tbl_name;
+        this.max_parts = max_parts;
+        this.user_name = user_name;
+        this.group_names = group_names;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.CALL, 0));
+        get_partitions_with_auth_args args = new get_partitions_with_auth_args();
+        args.setDb_name(db_name);
+        args.setTbl_name(tbl_name);
+        args.setMax_parts(max_parts);
+        args.setUser_name(user_name);
+        args.setGroup_names(group_names);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<Partition> getResult() throws NoSuchObjectException, 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_partitions_with_auth();
+      }
+    }
+
     public void get_partition_names(String db_name, String tbl_name, short max_parts, AsyncMethodCallback<get_partition_names_call> resultHandler) throws TException {
       checkReady();
       get_partition_names_call method_call = new get_partition_names_call(db_name, tbl_name, max_parts, resultHandler, this, protocolFactory, transport);
@@ -2901,6 +3537,52 @@ public class ThriftHiveMetastore {
       }
     }
 
+    public void get_partitions_ps_with_auth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> group_names, AsyncMethodCallback<get_partitions_ps_with_auth_call> resultHandler) throws TException {
+      checkReady();
+      get_partitions_ps_with_auth_call method_call = new get_partitions_ps_with_auth_call(db_name, tbl_name, part_vals, max_parts, user_name, group_names, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class get_partitions_ps_with_auth_call extends TAsyncMethodCall {
+      private String db_name;
+      private String tbl_name;
+      private List<String> part_vals;
+      private short max_parts;
+      private String user_name;
+      private List<String> group_names;
+      public get_partitions_ps_with_auth_call(String db_name, String tbl_name, List<String> part_vals, short max_parts, String user_name, List<String> group_names, AsyncMethodCallback<get_partitions_ps_with_auth_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.db_name = db_name;
+        this.tbl_name = tbl_name;
+        this.part_vals = part_vals;
+        this.max_parts = max_parts;
+        this.user_name = user_name;
+        this.group_names = group_names;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.CALL, 0));
+        get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args();
+        args.setDb_name(db_name);
+        args.setTbl_name(tbl_name);
+        args.setPart_vals(part_vals);
+        args.setMax_parts(max_parts);
+        args.setUser_name(user_name);
+        args.setGroup_names(group_names);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<Partition> getResult() throws NoSuchObjectException, 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_partitions_ps_with_auth();
+      }
+    }
+
     public void get_partition_names_ps(String db_name, String tbl_name, List<String> part_vals, short max_parts, AsyncMethodCallback<get_partition_names_ps_call> resultHandler) throws TException {
       checkReady();
       get_partition_names_ps_call method_call = new get_partition_names_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, protocolFactory, transport);
@@ -3339,44 +4021,362 @@ public class ThriftHiveMetastore {
       }
     }
 
-  }
+    public void create_role(Role role, AsyncMethodCallback<create_role_call> resultHandler) throws TException {
+      checkReady();
+      create_role_call method_call = new create_role_call(role, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
 
-  public static class Processor extends com.facebook.fb303.FacebookService.Processor implements TProcessor {
-    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
-    public Processor(Iface iface)
-    {
-      super(iface);
-      iface_ = iface;
-      processMap_.put("create_database", new create_database());
-      processMap_.put("get_database", new get_database());
-      processMap_.put("drop_database", new drop_database());
-      processMap_.put("get_databases", new get_databases());
-      processMap_.put("get_all_databases", new get_all_databases());
-      processMap_.put("alter_database", new alter_database());
-      processMap_.put("get_type", new get_type());
-      processMap_.put("create_type", new create_type());
-      processMap_.put("drop_type", new drop_type());
-      processMap_.put("get_type_all", new get_type_all());
-      processMap_.put("get_fields", new get_fields());
-      processMap_.put("get_schema", new get_schema());
-      processMap_.put("create_table", new create_table());
-      processMap_.put("drop_table", new drop_table());
-      processMap_.put("get_tables", new get_tables());
-      processMap_.put("get_all_tables", new get_all_tables());
-      processMap_.put("get_table", new get_table());
-      processMap_.put("alter_table", new alter_table());
-      processMap_.put("add_partition", new add_partition());
-      processMap_.put("append_partition", new append_partition());
-      processMap_.put("append_partition_by_name", new append_partition_by_name());
-      processMap_.put("drop_partition", new drop_partition());
-      processMap_.put("drop_partition_by_name", new drop_partition_by_name());
-      processMap_.put("get_partition", new get_partition());
-      processMap_.put("get_partition_by_name", new get_partition_by_name());
-      processMap_.put("get_partitions", new get_partitions());
-      processMap_.put("get_partition_names", new get_partition_names());
-      processMap_.put("get_partitions_ps", new get_partitions_ps());
-      processMap_.put("get_partition_names_ps", new get_partition_names_ps());
-      processMap_.put("get_partitions_by_filter", new get_partitions_by_filter());
+    public static class create_role_call extends TAsyncMethodCall {
+      private Role role;
+      public create_role_call(Role role, AsyncMethodCallback<create_role_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.role = role;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("create_role", TMessageType.CALL, 0));
+        create_role_args args = new create_role_args();
+        args.setRole(role);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean 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_create_role();
+      }
+    }
+
+    public void drop_role(String role_name, AsyncMethodCallback<drop_role_call> resultHandler) throws TException {
+      checkReady();
+      drop_role_call method_call = new drop_role_call(role_name, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class drop_role_call extends TAsyncMethodCall {
+      private String role_name;
+      public drop_role_call(String role_name, AsyncMethodCallback<drop_role_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.role_name = role_name;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("drop_role", TMessageType.CALL, 0));
+        drop_role_args args = new drop_role_args();
+        args.setRole_name(role_name);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean 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_drop_role();
+      }
+    }
+
+    public void grant_role(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, AsyncMethodCallback<grant_role_call> resultHandler) throws TException {
+      checkReady();
+      grant_role_call method_call = new grant_role_call(role_name, principal_name, principal_type, grantor, grantorType, grant_option, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class grant_role_call extends TAsyncMethodCall {
+      private String role_name;
+      private String principal_name;
+      private PrincipalType principal_type;
+      private String grantor;
+      private PrincipalType grantorType;
+      private boolean grant_option;
+      public grant_role_call(String role_name, String principal_name, PrincipalType principal_type, String grantor, PrincipalType grantorType, boolean grant_option, AsyncMethodCallback<grant_role_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.role_name = role_name;
+        this.principal_name = principal_name;
+        this.principal_type = principal_type;
+        this.grantor = grantor;
+        this.grantorType = grantorType;
+        this.grant_option = grant_option;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("grant_role", TMessageType.CALL, 0));
+        grant_role_args args = new grant_role_args();
+        args.setRole_name(role_name);
+        args.setPrincipal_name(principal_name);
+        args.setPrincipal_type(principal_type);
+        args.setGrantor(grantor);
+        args.setGrantorType(grantorType);
+        args.setGrant_option(grant_option);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean 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_grant_role();
+      }
+    }
+
+    public void revoke_role(String role_name, String principal_name, PrincipalType principal_type, AsyncMethodCallback<revoke_role_call> resultHandler) throws TException {
+      checkReady();
+      revoke_role_call method_call = new revoke_role_call(role_name, principal_name, principal_type, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class revoke_role_call extends TAsyncMethodCall {
+      private String role_name;
+      private String principal_name;
+      private PrincipalType principal_type;
+      public revoke_role_call(String role_name, String principal_name, PrincipalType principal_type, AsyncMethodCallback<revoke_role_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.role_name = role_name;
+        this.principal_name = principal_name;
+        this.principal_type = principal_type;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("revoke_role", TMessageType.CALL, 0));
+        revoke_role_args args = new revoke_role_args();
+        args.setRole_name(role_name);
+        args.setPrincipal_name(principal_name);
+        args.setPrincipal_type(principal_type);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean 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_revoke_role();
+      }
+    }
+
+    public void list_roles(String principal_name, PrincipalType principal_type, AsyncMethodCallback<list_roles_call> resultHandler) throws TException {
+      checkReady();
+      list_roles_call method_call = new list_roles_call(principal_name, principal_type, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class list_roles_call extends TAsyncMethodCall {
+      private String principal_name;
+      private PrincipalType principal_type;
+      public list_roles_call(String principal_name, PrincipalType principal_type, AsyncMethodCallback<list_roles_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.principal_name = principal_name;
+        this.principal_type = principal_type;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("list_roles", TMessageType.CALL, 0));
+        list_roles_args args = new list_roles_args();
+        args.setPrincipal_name(principal_name);
+        args.setPrincipal_type(principal_type);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<Role> 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_list_roles();
+      }
+    }
+
+    public void get_privilege_set(HiveObjectRef hiveObject, String user_name, List<String> group_names, AsyncMethodCallback<get_privilege_set_call> resultHandler) throws TException {
+      checkReady();
+      get_privilege_set_call method_call = new get_privilege_set_call(hiveObject, user_name, group_names, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class get_privilege_set_call extends TAsyncMethodCall {
+      private HiveObjectRef hiveObject;
+      private String user_name;
+      private List<String> group_names;
+      public get_privilege_set_call(HiveObjectRef hiveObject, String user_name, List<String> group_names, AsyncMethodCallback<get_privilege_set_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.hiveObject = hiveObject;
+        this.user_name = user_name;
+        this.group_names = group_names;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("get_privilege_set", TMessageType.CALL, 0));
+        get_privilege_set_args args = new get_privilege_set_args();
+        args.setHiveObject(hiveObject);
+        args.setUser_name(user_name);
+        args.setGroup_names(group_names);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public PrincipalPrivilegeSet 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_privilege_set();
+      }
+    }
+
+    public void list_privileges(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, AsyncMethodCallback<list_privileges_call> resultHandler) throws TException {
+      checkReady();
+      list_privileges_call method_call = new list_privileges_call(principal_name, principal_type, hiveObject, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class list_privileges_call extends TAsyncMethodCall {
+      private String principal_name;
+      private PrincipalType principal_type;
+      private HiveObjectRef hiveObject;
+      public list_privileges_call(String principal_name, PrincipalType principal_type, HiveObjectRef hiveObject, AsyncMethodCallback<list_privileges_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.principal_name = principal_name;
+        this.principal_type = principal_type;
+        this.hiveObject = hiveObject;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("list_privileges", TMessageType.CALL, 0));
+        list_privileges_args args = new list_privileges_args();
+        args.setPrincipal_name(principal_name);
+        args.setPrincipal_type(principal_type);
+        args.setHiveObject(hiveObject);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<HiveObjectPrivilege> 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_list_privileges();
+      }
+    }
+
+    public void grant_privileges(PrivilegeBag privileges, AsyncMethodCallback<grant_privileges_call> resultHandler) throws TException {
+      checkReady();
+      grant_privileges_call method_call = new grant_privileges_call(privileges, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class grant_privileges_call extends TAsyncMethodCall {
+      private PrivilegeBag privileges;
+      public grant_privileges_call(PrivilegeBag privileges, AsyncMethodCallback<grant_privileges_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.privileges = privileges;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("grant_privileges", TMessageType.CALL, 0));
+        grant_privileges_args args = new grant_privileges_args();
+        args.setPrivileges(privileges);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean 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_grant_privileges();
+      }
+    }
+
+    public void revoke_privileges(PrivilegeBag privileges, AsyncMethodCallback<revoke_privileges_call> resultHandler) throws TException {
+      checkReady();
+      revoke_privileges_call method_call = new revoke_privileges_call(privileges, resultHandler, this, protocolFactory, transport);
+      manager.call(method_call);
+    }
+
+    public static class revoke_privileges_call extends TAsyncMethodCall {
+      private PrivilegeBag privileges;
+      public revoke_privileges_call(PrivilegeBag privileges, AsyncMethodCallback<revoke_privileges_call> resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.privileges = privileges;
+      }
+
+      public void write_args(TProtocol prot) throws TException {
+        prot.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.CALL, 0));
+        revoke_privileges_args args = new revoke_privileges_args();
+        args.setPrivileges(privileges);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public boolean 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_revoke_privileges();
+      }
+    }
+
+  }
+
+  public static class Processor extends com.facebook.fb303.FacebookService.Processor implements TProcessor {
+    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+    public Processor(Iface iface)
+    {
+      super(iface);
+      iface_ = iface;
+      processMap_.put("create_database", new create_database());
+      processMap_.put("get_database", new get_database());
+      processMap_.put("drop_database", new drop_database());
+      processMap_.put("get_databases", new get_databases());
+      processMap_.put("get_all_databases", new get_all_databases());
+      processMap_.put("alter_database", new alter_database());
+      processMap_.put("get_type", new get_type());
+      processMap_.put("create_type", new create_type());
+      processMap_.put("drop_type", new drop_type());
+      processMap_.put("get_type_all", new get_type_all());
+      processMap_.put("get_fields", new get_fields());
+      processMap_.put("get_schema", new get_schema());
+      processMap_.put("create_table", new create_table());
+      processMap_.put("drop_table", new drop_table());
+      processMap_.put("get_tables", new get_tables());
+      processMap_.put("get_all_tables", new get_all_tables());
+      processMap_.put("get_table", new get_table());
+      processMap_.put("alter_table", new alter_table());
+      processMap_.put("add_partition", new add_partition());
+      processMap_.put("append_partition", new append_partition());
+      processMap_.put("append_partition_by_name", new append_partition_by_name());
+      processMap_.put("drop_partition", new drop_partition());
+      processMap_.put("drop_partition_by_name", new drop_partition_by_name());
+      processMap_.put("get_partition", new get_partition());
+      processMap_.put("get_partition_with_auth", new get_partition_with_auth());
+      processMap_.put("get_partition_by_name", new get_partition_by_name());
+      processMap_.put("get_partitions", new get_partitions());
+      processMap_.put("get_partitions_with_auth", new get_partitions_with_auth());
+      processMap_.put("get_partition_names", new get_partition_names());
+      processMap_.put("get_partitions_ps", new get_partitions_ps());
+      processMap_.put("get_partitions_ps_with_auth", new get_partitions_ps_with_auth());
+      processMap_.put("get_partition_names_ps", new get_partition_names_ps());
+      processMap_.put("get_partitions_by_filter", new get_partitions_by_filter());
       processMap_.put("alter_partition", new alter_partition());
       processMap_.put("get_config_value", new get_config_value());
       processMap_.put("partition_name_to_vals", new partition_name_to_vals());
@@ -3387,6 +4387,15 @@ public class ThriftHiveMetastore {
       processMap_.put("get_index_by_name", new get_index_by_name());
       processMap_.put("get_indexes", new get_indexes());
       processMap_.put("get_index_names", new get_index_names());
+      processMap_.put("create_role", new create_role());
+      processMap_.put("drop_role", new drop_role());
+      processMap_.put("grant_role", new grant_role());
+      processMap_.put("revoke_role", new revoke_role());
+      processMap_.put("list_roles", new list_roles());
+      processMap_.put("get_privilege_set", new get_privilege_set());
+      processMap_.put("list_privileges", new list_privileges());
+      processMap_.put("grant_privileges", new grant_privileges());
+      processMap_.put("revoke_privileges", new revoke_privileges());
     }
 
     private Iface iface_;
@@ -4383,6 +5392,46 @@ public class ThriftHiveMetastore {
 
     }
 
+    private class get_partition_with_auth implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        get_partition_with_auth_args args = new get_partition_with_auth_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        get_partition_with_auth_result result = new get_partition_with_auth_result();
+        try {
+          result.success = iface_.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        } catch (NoSuchObjectException o2) {
+          result.o2 = o2;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing get_partition_with_auth", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_with_auth");
+          oprot.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
     private class get_partition_by_name implements ProcessFunction {
       public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
       {
@@ -4463,6 +5512,46 @@ public class ThriftHiveMetastore {
 
     }
 
+    private class get_partitions_with_auth implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        get_partitions_with_auth_args args = new get_partitions_with_auth_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        get_partitions_with_auth_result result = new get_partitions_with_auth_result();
+        try {
+          result.success = iface_.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names);
+        } catch (NoSuchObjectException o1) {
+          result.o1 = o1;
+        } catch (MetaException o2) {
+          result.o2 = o2;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing get_partitions_with_auth", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_with_auth");
+          oprot.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
     private class get_partition_names implements ProcessFunction {
       public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
       {
@@ -4539,6 +5628,46 @@ public class ThriftHiveMetastore {
 
     }
 
+    private class get_partitions_ps_with_auth implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result();
+        try {
+          result.success = iface_.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names);
+        } catch (NoSuchObjectException o1) {
+          result.o1 = o1;
+        } catch (MetaException o2) {
+          result.o2 = o2;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing get_partitions_ps_with_auth", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_ps_with_auth");
+          oprot.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
     private class get_partition_names_ps implements ProcessFunction {
       public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
       {
@@ -5012,98 +6141,446 @@ public class ThriftHiveMetastore {
 
     }
 
-  }
-
-  public static class create_database_args implements TBase<create_database_args, create_database_args._Fields>, java.io.Serializable, Cloneable   {
-    private static final TStruct STRUCT_DESC = new TStruct("create_database_args");
-
-    private static final TField DATABASE_FIELD_DESC = new TField("database", TType.STRUCT, (short)1);
-
-    private Database database;
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    public enum _Fields implements TFieldIdEnum {
-      DATABASE((short)1, "database");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
+    private class create_role implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        create_role_args args = new create_role_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("create_role", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
         }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // DATABASE
-            return DATABASE;
-          default:
-            return null;
+        iprot.readMessageEnd();
+        create_role_result result = new create_role_result();
+        try {
+          result.success = iface_.create_role(args.role);
+          result.setSuccessIsSet(true);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing create_role", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_role");
+          oprot.writeMessageBegin(new TMessage("create_role", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
         }
+        oprot.writeMessageBegin(new TMessage("create_role", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
       }
 
-      /**
-       * 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 class drop_role implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        drop_role_args args = new drop_role_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("drop_role", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        drop_role_result result = new drop_role_result();
+        try {
+          result.success = iface_.drop_role(args.role_name);
+          result.setSuccessIsSet(true);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing drop_role", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_role");
+          oprot.writeMessageBegin(new TMessage("drop_role", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("drop_role", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
       }
 
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
+    }
 
-      public short getThriftFieldId() {
-        return _thriftId;
+    private class grant_role implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        grant_role_args args = new grant_role_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("grant_role", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        grant_role_result result = new grant_role_result();
+        try {
+          result.success = iface_.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option);
+          result.setSuccessIsSet(true);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing grant_role", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing grant_role");
+          oprot.writeMessageBegin(new TMessage("grant_role", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("grant_role", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
       }
 
-      public String getFieldName() {
-        return _fieldName;
-      }
     }
 
-    // isset id assignments
+    private class revoke_role implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        revoke_role_args args = new revoke_role_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("revoke_role", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        revoke_role_result result = new revoke_role_result();
+        try {
+          result.success = iface_.revoke_role(args.role_name, args.principal_name, args.principal_type);
+          result.setSuccessIsSet(true);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing revoke_role", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing revoke_role");
+          oprot.writeMessageBegin(new TMessage("revoke_role", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("revoke_role", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
 
-    public static final Map<_Fields, FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, 
-          new StructMetaData(TType.STRUCT, Database.class)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap);
     }
 
-    public create_database_args() {
-    }
+    private class list_roles implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        list_roles_args args = new list_roles_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("list_roles", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        list_roles_result result = new list_roles_result();
+        try {
+          result.success = iface_.list_roles(args.principal_name, args.principal_type);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing list_roles", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_roles");
+          oprot.writeMessageBegin(new TMessage("list_roles", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("list_roles", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
 
-    public create_database_args(
-      Database database)
-    {
-      this();
-      this.database = database;
     }
 
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public create_database_args(create_database_args other) {
+    private class get_privilege_set implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        get_privilege_set_args args = new get_privilege_set_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("get_privilege_set", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        get_privilege_set_result result = new get_privilege_set_result();
+        try {
+          result.success = iface_.get_privilege_set(args.hiveObject, args.user_name, args.group_names);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing get_privilege_set", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_privilege_set");
+          oprot.writeMessageBegin(new TMessage("get_privilege_set", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("get_privilege_set", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class list_privileges implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        list_privileges_args args = new list_privileges_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("list_privileges", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        list_privileges_result result = new list_privileges_result();
+        try {
+          result.success = iface_.list_privileges(args.principal_name, args.principal_type, args.hiveObject);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing list_privileges", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_privileges");
+          oprot.writeMessageBegin(new TMessage("list_privileges", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("list_privileges", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class grant_privileges implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        grant_privileges_args args = new grant_privileges_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("grant_privileges", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        grant_privileges_result result = new grant_privileges_result();
+        try {
+          result.success = iface_.grant_privileges(args.privileges);
+          result.setSuccessIsSet(true);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing grant_privileges", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing grant_privileges");
+          oprot.writeMessageBegin(new TMessage("grant_privileges", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("grant_privileges", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+    private class revoke_privileges implements ProcessFunction {
+      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
+      {
+        revoke_privileges_args args = new revoke_privileges_args();
+        try {
+          args.read(iprot);
+        } catch (TProtocolException e) {
+          iprot.readMessageEnd();
+          TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage());
+          oprot.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        iprot.readMessageEnd();
+        revoke_privileges_result result = new revoke_privileges_result();
+        try {
+          result.success = iface_.revoke_privileges(args.privileges);
+          result.setSuccessIsSet(true);
+        } catch (MetaException o1) {
+          result.o1 = o1;
+        } catch (Throwable th) {
+          LOGGER.error("Internal error processing revoke_privileges", th);
+          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing revoke_privileges");
+          oprot.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.EXCEPTION, seqid));
+          x.write(oprot);
+          oprot.writeMessageEnd();
+          oprot.getTransport().flush();
+          return;
+        }
+        oprot.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.REPLY, seqid));
+        result.write(oprot);
+        oprot.writeMessageEnd();
+        oprot.getTransport().flush();
+      }
+
+    }
+
+  }
+
+  public static class create_database_args implements TBase<create_database_args, create_database_args._Fields>, java.io.Serializable, Cloneable   {
+    private static final TStruct STRUCT_DESC = new TStruct("create_database_args");
+
+    private static final TField DATABASE_FIELD_DESC = new TField("database", TType.STRUCT, (short)1);
+
+    private Database database;
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements TFieldIdEnum {
+      DATABASE((short)1, "database");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // DATABASE
+            return DATABASE;
+          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.DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, 
+          new StructMetaData(TType.STRUCT, Database.class)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap);
+    }
+
+    public create_database_args() {
+    }
+
+    public create_database_args(
+      Database database)
+    {
+      this();
+      this.database = database;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public create_database_args(create_database_args other) {
       if (other.isSetDatabase()) {
         this.database = new Database(other.database);
       }
@@ -7893,13 +9370,13 @@ public class ThriftHiveMetastore {
           case 0: // SUCCESS
             if (field.type == TType.LIST) {
               {
-                TList _list63 = iprot.readListBegin();
-                this.success = new ArrayList<String>(_list63.size);
-                for (int _i64 = 0; _i64 < _list63.size; ++_i64)
+                TList _list98 = iprot.readListBegin();
+                this.success = new ArrayList<String>(_list98.size);
+                for (int _i99 = 0; _i99 < _list98.size; ++_i99)
                 {
-                  String _elem65;
-                  _elem65 = iprot.readString();
-                  this.success.add(_elem65);
+                  String _elem100;
+                  _elem100 = iprot.readString();
+                  this.success.add(_elem100);
                 }
                 iprot.readListEnd();
               }
@@ -7931,9 +9408,9 @@ public class ThriftHiveMetastore {
         oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
         {
           oprot.writeListBegin(new TList(TType.STRING, this.success.size()));
-          for (String _iter66 : this.success)
+          for (String _iter101 : this.success)
           {
-            oprot.writeString(_iter66);
+            oprot.writeString(_iter101);
           }
           oprot.writeListEnd();
         }
@@ -8479,13 +9956,13 @@ public class ThriftHiveMetastore {
           case 0: // SUCCESS
             if (field.type == TType.LIST) {
               {
-                TList _list67 = iprot.readListBegin();
-                this.success = new ArrayList<String>(_list67.size);
-                for (int _i68 = 0; _i68 < _list67.size; ++_i68)

[... 23253 lines stripped ...]