You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by cw...@apache.org on 2012/11/07 05:55:04 UTC

svn commit: r1406465 [8/15] - in /hive/trunk: common/src/java/org/apache/hadoop/hive/conf/ conf/ data/files/ metastore/if/ metastore/src/gen/thrift/gen-cpp/ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ metastore/src/gen/t...

Modified: hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php?rev=1406465&r1=1406464&r2=1406465&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php Wed Nov  7 04:55:00 2012
@@ -65,6 +65,12 @@ interface ThriftHiveMetastoreIf extends 
   public function get_index_by_name($db_name, $tbl_name, $index_name);
   public function get_indexes($db_name, $tbl_name, $max_indexes);
   public function get_index_names($db_name, $tbl_name, $max_indexes);
+  public function update_table_column_statistics($stats_obj);
+  public function update_partition_column_statistics($stats_obj);
+  public function get_table_column_statistics($db_name, $tbl_name, $col_name);
+  public function get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name);
+  public function delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name);
+  public function delete_table_column_statistics($db_name, $tbl_name, $col_name);
   public function create_role($role);
   public function drop_role($role_name);
   public function get_role_names();
@@ -3314,34 +3320,34 @@ class ThriftHiveMetastoreClient extends 
     throw new Exception("get_index_names failed: unknown result");
   }
 
-  public function create_role($role)
+  public function update_table_column_statistics($stats_obj)
   {
-    $this->send_create_role($role);
-    return $this->recv_create_role();
+    $this->send_update_table_column_statistics($stats_obj);
+    return $this->recv_update_table_column_statistics();
   }
 
-  public function send_create_role($role)
+  public function send_update_table_column_statistics($stats_obj)
   {
-    $args = new ThriftHiveMetastore_create_role_args();
-    $args->role = $role;
+    $args = new ThriftHiveMetastore_update_table_column_statistics_args();
+    $args->stats_obj = $stats_obj;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'create_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'update_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('update_table_column_statistics', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_create_role()
+  public function recv_update_table_column_statistics()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_create_role_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_update_table_column_statistics_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3355,7 +3361,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_create_role_result();
+      $result = new ThriftHiveMetastore_update_table_column_statistics_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3365,37 +3371,46 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("create_role failed: unknown result");
+    if ($result->o2 !== null) {
+      throw $result->o2;
+    }
+    if ($result->o3 !== null) {
+      throw $result->o3;
+    }
+    if ($result->o4 !== null) {
+      throw $result->o4;
+    }
+    throw new Exception("update_table_column_statistics failed: unknown result");
   }
 
-  public function drop_role($role_name)
+  public function update_partition_column_statistics($stats_obj)
   {
-    $this->send_drop_role($role_name);
-    return $this->recv_drop_role();
+    $this->send_update_partition_column_statistics($stats_obj);
+    return $this->recv_update_partition_column_statistics();
   }
 
-  public function send_drop_role($role_name)
+  public function send_update_partition_column_statistics($stats_obj)
   {
-    $args = new ThriftHiveMetastore_drop_role_args();
-    $args->role_name = $role_name;
+    $args = new ThriftHiveMetastore_update_partition_column_statistics_args();
+    $args->stats_obj = $stats_obj;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'drop_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'update_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('update_partition_column_statistics', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_drop_role()
+  public function recv_update_partition_column_statistics()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_drop_role_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_update_partition_column_statistics_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3409,7 +3424,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_drop_role_result();
+      $result = new ThriftHiveMetastore_update_partition_column_statistics_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3419,36 +3434,48 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("drop_role failed: unknown result");
+    if ($result->o2 !== null) {
+      throw $result->o2;
+    }
+    if ($result->o3 !== null) {
+      throw $result->o3;
+    }
+    if ($result->o4 !== null) {
+      throw $result->o4;
+    }
+    throw new Exception("update_partition_column_statistics failed: unknown result");
   }
 
-  public function get_role_names()
+  public function get_table_column_statistics($db_name, $tbl_name, $col_name)
   {
-    $this->send_get_role_names();
-    return $this->recv_get_role_names();
+    $this->send_get_table_column_statistics($db_name, $tbl_name, $col_name);
+    return $this->recv_get_table_column_statistics();
   }
 
-  public function send_get_role_names()
+  public function send_get_table_column_statistics($db_name, $tbl_name, $col_name)
   {
-    $args = new ThriftHiveMetastore_get_role_names_args();
+    $args = new ThriftHiveMetastore_get_table_column_statistics_args();
+    $args->db_name = $db_name;
+    $args->tbl_name = $tbl_name;
+    $args->col_name = $col_name;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'get_role_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'get_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('get_role_names', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('get_table_column_statistics', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_get_role_names()
+  public function recv_get_table_column_statistics()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_role_names_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_table_column_statistics_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3462,7 +3489,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_get_role_names_result();
+      $result = new ThriftHiveMetastore_get_table_column_statistics_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3472,42 +3499,49 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("get_role_names failed: unknown result");
+    if ($result->o2 !== null) {
+      throw $result->o2;
+    }
+    if ($result->o3 !== null) {
+      throw $result->o3;
+    }
+    if ($result->o4 !== null) {
+      throw $result->o4;
+    }
+    throw new Exception("get_table_column_statistics failed: unknown result");
   }
 
-  public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option)
+  public function get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name)
   {
-    $this->send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option);
-    return $this->recv_grant_role();
+    $this->send_get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name);
+    return $this->recv_get_partition_column_statistics();
   }
 
-  public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option)
+  public function send_get_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name)
   {
-    $args = new ThriftHiveMetastore_grant_role_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 = new ThriftHiveMetastore_get_partition_column_statistics_args();
+    $args->db_name = $db_name;
+    $args->tbl_name = $tbl_name;
+    $args->part_name = $part_name;
+    $args->col_name = $col_name;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'grant_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'get_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('grant_role', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('get_partition_column_statistics', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_grant_role()
+  public function recv_get_partition_column_statistics()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_grant_role_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_partition_column_statistics_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3521,7 +3555,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_grant_role_result();
+      $result = new ThriftHiveMetastore_get_partition_column_statistics_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3531,39 +3565,49 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("grant_role failed: unknown result");
+    if ($result->o2 !== null) {
+      throw $result->o2;
+    }
+    if ($result->o3 !== null) {
+      throw $result->o3;
+    }
+    if ($result->o4 !== null) {
+      throw $result->o4;
+    }
+    throw new Exception("get_partition_column_statistics failed: unknown result");
   }
 
-  public function revoke_role($role_name, $principal_name, $principal_type)
+  public function delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name)
   {
-    $this->send_revoke_role($role_name, $principal_name, $principal_type);
-    return $this->recv_revoke_role();
+    $this->send_delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name);
+    return $this->recv_delete_partition_column_statistics();
   }
 
-  public function send_revoke_role($role_name, $principal_name, $principal_type)
+  public function send_delete_partition_column_statistics($db_name, $tbl_name, $part_name, $col_name)
   {
-    $args = new ThriftHiveMetastore_revoke_role_args();
-    $args->role_name = $role_name;
-    $args->principal_name = $principal_name;
-    $args->principal_type = $principal_type;
+    $args = new ThriftHiveMetastore_delete_partition_column_statistics_args();
+    $args->db_name = $db_name;
+    $args->tbl_name = $tbl_name;
+    $args->part_name = $part_name;
+    $args->col_name = $col_name;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'delete_partition_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('delete_partition_column_statistics', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_revoke_role()
+  public function recv_delete_partition_column_statistics()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_revoke_role_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_delete_partition_column_statistics_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3577,7 +3621,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_revoke_role_result();
+      $result = new ThriftHiveMetastore_delete_partition_column_statistics_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3587,38 +3631,48 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("revoke_role failed: unknown result");
+    if ($result->o2 !== null) {
+      throw $result->o2;
+    }
+    if ($result->o3 !== null) {
+      throw $result->o3;
+    }
+    if ($result->o4 !== null) {
+      throw $result->o4;
+    }
+    throw new Exception("delete_partition_column_statistics failed: unknown result");
   }
 
-  public function list_roles($principal_name, $principal_type)
+  public function delete_table_column_statistics($db_name, $tbl_name, $col_name)
   {
-    $this->send_list_roles($principal_name, $principal_type);
-    return $this->recv_list_roles();
+    $this->send_delete_table_column_statistics($db_name, $tbl_name, $col_name);
+    return $this->recv_delete_table_column_statistics();
   }
 
-  public function send_list_roles($principal_name, $principal_type)
+  public function send_delete_table_column_statistics($db_name, $tbl_name, $col_name)
   {
-    $args = new ThriftHiveMetastore_list_roles_args();
-    $args->principal_name = $principal_name;
-    $args->principal_type = $principal_type;
+    $args = new ThriftHiveMetastore_delete_table_column_statistics_args();
+    $args->db_name = $db_name;
+    $args->tbl_name = $tbl_name;
+    $args->col_name = $col_name;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'list_roles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'delete_table_column_statistics', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('delete_table_column_statistics', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_list_roles()
+  public function recv_delete_table_column_statistics()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_list_roles_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_delete_table_column_statistics_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3632,7 +3686,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_list_roles_result();
+      $result = new ThriftHiveMetastore_delete_table_column_statistics_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3642,39 +3696,46 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("list_roles failed: unknown result");
+    if ($result->o2 !== null) {
+      throw $result->o2;
+    }
+    if ($result->o3 !== null) {
+      throw $result->o3;
+    }
+    if ($result->o4 !== null) {
+      throw $result->o4;
+    }
+    throw new Exception("delete_table_column_statistics failed: unknown result");
   }
 
-  public function get_privilege_set($hiveObject, $user_name, $group_names)
+  public function create_role($role)
   {
-    $this->send_get_privilege_set($hiveObject, $user_name, $group_names);
-    return $this->recv_get_privilege_set();
+    $this->send_create_role($role);
+    return $this->recv_create_role();
   }
 
-  public function send_get_privilege_set($hiveObject, $user_name, $group_names)
+  public function send_create_role($role)
   {
-    $args = new ThriftHiveMetastore_get_privilege_set_args();
-    $args->hiveObject = $hiveObject;
-    $args->user_name = $user_name;
-    $args->group_names = $group_names;
+    $args = new ThriftHiveMetastore_create_role_args();
+    $args->role = $role;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'get_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'create_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('get_privilege_set', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_get_privilege_set()
+  public function recv_create_role()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_privilege_set_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_create_role_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3688,7 +3749,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_get_privilege_set_result();
+      $result = new ThriftHiveMetastore_create_role_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3698,39 +3759,37 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("get_privilege_set failed: unknown result");
+    throw new Exception("create_role failed: unknown result");
   }
 
-  public function list_privileges($principal_name, $principal_type, $hiveObject)
+  public function drop_role($role_name)
   {
-    $this->send_list_privileges($principal_name, $principal_type, $hiveObject);
-    return $this->recv_list_privileges();
+    $this->send_drop_role($role_name);
+    return $this->recv_drop_role();
   }
 
-  public function send_list_privileges($principal_name, $principal_type, $hiveObject)
+  public function send_drop_role($role_name)
   {
-    $args = new ThriftHiveMetastore_list_privileges_args();
-    $args->principal_name = $principal_name;
-    $args->principal_type = $principal_type;
-    $args->hiveObject = $hiveObject;
+    $args = new ThriftHiveMetastore_drop_role_args();
+    $args->role_name = $role_name;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'list_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'drop_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('list_privileges', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_list_privileges()
+  public function recv_drop_role()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_list_privileges_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_drop_role_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3744,7 +3803,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_list_privileges_result();
+      $result = new ThriftHiveMetastore_drop_role_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3754,37 +3813,36 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("list_privileges failed: unknown result");
+    throw new Exception("drop_role failed: unknown result");
   }
 
-  public function grant_privileges($privileges)
+  public function get_role_names()
   {
-    $this->send_grant_privileges($privileges);
-    return $this->recv_grant_privileges();
+    $this->send_get_role_names();
+    return $this->recv_get_role_names();
   }
 
-  public function send_grant_privileges($privileges)
+  public function send_get_role_names()
   {
-    $args = new ThriftHiveMetastore_grant_privileges_args();
-    $args->privileges = $privileges;
+    $args = new ThriftHiveMetastore_get_role_names_args();
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'grant_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'get_role_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('grant_privileges', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('get_role_names', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_grant_privileges()
+  public function recv_get_role_names()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_grant_privileges_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_role_names_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3798,7 +3856,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_grant_privileges_result();
+      $result = new ThriftHiveMetastore_get_role_names_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3808,37 +3866,42 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("grant_privileges failed: unknown result");
+    throw new Exception("get_role_names failed: unknown result");
   }
 
-  public function revoke_privileges($privileges)
+  public function grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option)
   {
-    $this->send_revoke_privileges($privileges);
-    return $this->recv_revoke_privileges();
+    $this->send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option);
+    return $this->recv_grant_role();
   }
 
-  public function send_revoke_privileges($privileges)
+  public function send_grant_role($role_name, $principal_name, $principal_type, $grantor, $grantorType, $grant_option)
   {
-    $args = new ThriftHiveMetastore_revoke_privileges_args();
-    $args->privileges = $privileges;
+    $args = new ThriftHiveMetastore_grant_role_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;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'grant_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('grant_role', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_revoke_privileges()
+  public function recv_grant_role()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_revoke_privileges_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_grant_role_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3852,7 +3915,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_revoke_privileges_result();
+      $result = new ThriftHiveMetastore_grant_role_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3862,38 +3925,150 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("revoke_privileges failed: unknown result");
+    throw new Exception("grant_role failed: unknown result");
   }
 
-  public function set_ugi($user_name, $group_names)
+  public function revoke_role($role_name, $principal_name, $principal_type)
   {
-    $this->send_set_ugi($user_name, $group_names);
-    return $this->recv_set_ugi();
+    $this->send_revoke_role($role_name, $principal_name, $principal_type);
+    return $this->recv_revoke_role();
   }
 
-  public function send_set_ugi($user_name, $group_names)
+  public function send_revoke_role($role_name, $principal_name, $principal_type)
   {
-    $args = new ThriftHiveMetastore_set_ugi_args();
+    $args = new ThriftHiveMetastore_revoke_role_args();
+    $args->role_name = $role_name;
+    $args->principal_name = $principal_name;
+    $args->principal_type = $principal_type;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'revoke_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('revoke_role', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_revoke_role()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_revoke_role_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHiveMetastore_revoke_role_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    throw new Exception("revoke_role failed: unknown result");
+  }
+
+  public function list_roles($principal_name, $principal_type)
+  {
+    $this->send_list_roles($principal_name, $principal_type);
+    return $this->recv_list_roles();
+  }
+
+  public function send_list_roles($principal_name, $principal_type)
+  {
+    $args = new ThriftHiveMetastore_list_roles_args();
+    $args->principal_name = $principal_name;
+    $args->principal_type = $principal_type;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'list_roles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_list_roles()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_list_roles_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHiveMetastore_list_roles_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    throw new Exception("list_roles failed: unknown result");
+  }
+
+  public function get_privilege_set($hiveObject, $user_name, $group_names)
+  {
+    $this->send_get_privilege_set($hiveObject, $user_name, $group_names);
+    return $this->recv_get_privilege_set();
+  }
+
+  public function send_get_privilege_set($hiveObject, $user_name, $group_names)
+  {
+    $args = new ThriftHiveMetastore_get_privilege_set_args();
+    $args->hiveObject = $hiveObject;
     $args->user_name = $user_name;
     $args->group_names = $group_names;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'set_ugi', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'get_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('set_ugi', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('get_privilege_set', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_set_ugi()
+  public function recv_get_privilege_set()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_set_ugi_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_privilege_set_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3907,7 +4082,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_set_ugi_result();
+      $result = new ThriftHiveMetastore_get_privilege_set_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3917,38 +4092,39 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("set_ugi failed: unknown result");
+    throw new Exception("get_privilege_set failed: unknown result");
   }
 
-  public function get_delegation_token($token_owner, $renewer_kerberos_principal_name)
+  public function list_privileges($principal_name, $principal_type, $hiveObject)
   {
-    $this->send_get_delegation_token($token_owner, $renewer_kerberos_principal_name);
-    return $this->recv_get_delegation_token();
+    $this->send_list_privileges($principal_name, $principal_type, $hiveObject);
+    return $this->recv_list_privileges();
   }
 
-  public function send_get_delegation_token($token_owner, $renewer_kerberos_principal_name)
+  public function send_list_privileges($principal_name, $principal_type, $hiveObject)
   {
-    $args = new ThriftHiveMetastore_get_delegation_token_args();
-    $args->token_owner = $token_owner;
-    $args->renewer_kerberos_principal_name = $renewer_kerberos_principal_name;
+    $args = new ThriftHiveMetastore_list_privileges_args();
+    $args->principal_name = $principal_name;
+    $args->principal_type = $principal_type;
+    $args->hiveObject = $hiveObject;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'get_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'list_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('get_delegation_token', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('list_privileges', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_get_delegation_token()
+  public function recv_list_privileges()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_delegation_token_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_list_privileges_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -3962,7 +4138,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_get_delegation_token_result();
+      $result = new ThriftHiveMetastore_list_privileges_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -3972,37 +4148,37 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("get_delegation_token failed: unknown result");
+    throw new Exception("list_privileges failed: unknown result");
   }
 
-  public function renew_delegation_token($token_str_form)
+  public function grant_privileges($privileges)
   {
-    $this->send_renew_delegation_token($token_str_form);
-    return $this->recv_renew_delegation_token();
+    $this->send_grant_privileges($privileges);
+    return $this->recv_grant_privileges();
   }
 
-  public function send_renew_delegation_token($token_str_form)
+  public function send_grant_privileges($privileges)
   {
-    $args = new ThriftHiveMetastore_renew_delegation_token_args();
-    $args->token_str_form = $token_str_form;
+    $args = new ThriftHiveMetastore_grant_privileges_args();
+    $args->privileges = $privileges;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'renew_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'grant_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('renew_delegation_token', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('grant_privileges', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_renew_delegation_token()
+  public function recv_grant_privileges()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_renew_delegation_token_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_grant_privileges_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -4016,7 +4192,7 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_renew_delegation_token_result();
+      $result = new ThriftHiveMetastore_grant_privileges_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -4026,37 +4202,92 @@ class ThriftHiveMetastoreClient extends 
     if ($result->o1 !== null) {
       throw $result->o1;
     }
-    throw new Exception("renew_delegation_token failed: unknown result");
+    throw new Exception("grant_privileges failed: unknown result");
   }
 
-  public function cancel_delegation_token($token_str_form)
+  public function revoke_privileges($privileges)
   {
-    $this->send_cancel_delegation_token($token_str_form);
-    $this->recv_cancel_delegation_token();
+    $this->send_revoke_privileges($privileges);
+    return $this->recv_revoke_privileges();
   }
 
-  public function send_cancel_delegation_token($token_str_form)
+  public function send_revoke_privileges($privileges)
   {
-    $args = new ThriftHiveMetastore_cancel_delegation_token_args();
-    $args->token_str_form = $token_str_form;
+    $args = new ThriftHiveMetastore_revoke_privileges_args();
+    $args->privileges = $privileges;
     $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'cancel_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('cancel_delegation_token', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_cancel_delegation_token()
+  public function recv_revoke_privileges()
   {
     $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_cancel_delegation_token_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_revoke_privileges_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHiveMetastore_revoke_privileges_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    throw new Exception("revoke_privileges failed: unknown result");
+  }
+
+  public function set_ugi($user_name, $group_names)
+  {
+    $this->send_set_ugi($user_name, $group_names);
+    return $this->recv_set_ugi();
+  }
+
+  public function send_set_ugi($user_name, $group_names)
+  {
+    $args = new ThriftHiveMetastore_set_ugi_args();
+    $args->user_name = $user_name;
+    $args->group_names = $group_names;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'set_ugi', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('set_ugi', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_set_ugi()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_set_ugi_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -4070,44 +4301,1379 @@ class ThriftHiveMetastoreClient extends 
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new ThriftHiveMetastore_cancel_delegation_token_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
+      $result = new ThriftHiveMetastore_set_ugi_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    throw new Exception("set_ugi failed: unknown result");
+  }
+
+  public function get_delegation_token($token_owner, $renewer_kerberos_principal_name)
+  {
+    $this->send_get_delegation_token($token_owner, $renewer_kerberos_principal_name);
+    return $this->recv_get_delegation_token();
+  }
+
+  public function send_get_delegation_token($token_owner, $renewer_kerberos_principal_name)
+  {
+    $args = new ThriftHiveMetastore_get_delegation_token_args();
+    $args->token_owner = $token_owner;
+    $args->renewer_kerberos_principal_name = $renewer_kerberos_principal_name;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'get_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('get_delegation_token', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_get_delegation_token()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_get_delegation_token_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHiveMetastore_get_delegation_token_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    throw new Exception("get_delegation_token failed: unknown result");
+  }
+
+  public function renew_delegation_token($token_str_form)
+  {
+    $this->send_renew_delegation_token($token_str_form);
+    return $this->recv_renew_delegation_token();
+  }
+
+  public function send_renew_delegation_token($token_str_form)
+  {
+    $args = new ThriftHiveMetastore_renew_delegation_token_args();
+    $args->token_str_form = $token_str_form;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'renew_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('renew_delegation_token', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_renew_delegation_token()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_renew_delegation_token_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHiveMetastore_renew_delegation_token_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    throw new Exception("renew_delegation_token failed: unknown result");
+  }
+
+  public function cancel_delegation_token($token_str_form)
+  {
+    $this->send_cancel_delegation_token($token_str_form);
+    $this->recv_cancel_delegation_token();
+  }
+
+  public function send_cancel_delegation_token($token_str_form)
+  {
+    $args = new ThriftHiveMetastore_cancel_delegation_token_args();
+    $args->token_str_form = $token_str_form;
+    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'cancel_delegation_token', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('cancel_delegation_token', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_cancel_delegation_token()
+  {
+    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHiveMetastore_cancel_delegation_token_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new ThriftHiveMetastore_cancel_delegation_token_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->o1 !== null) {
+      throw $result->o1;
+    }
+    return;
+  }
+
+}
+
+// HELPER FUNCTIONS AND STRUCTURES
+
+class ThriftHiveMetastore_create_database_args {
+  static $_TSPEC;
+
+  public $database = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'database',
+          'type' => TType::STRUCT,
+          'class' => 'Database',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['database'])) {
+        $this->database = $vals['database'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_create_database_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->database = new Database();
+            $xfer += $this->database->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_args');
+    if ($this->database !== null) {
+      if (!is_object($this->database)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1);
+      $xfer += $this->database->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_create_database_result {
+  static $_TSPEC;
+
+  public $o1 = null;
+  public $o2 = null;
+  public $o3 = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'o1',
+          'type' => TType::STRUCT,
+          'class' => 'AlreadyExistsException',
+          ),
+        2 => array(
+          'var' => 'o2',
+          'type' => TType::STRUCT,
+          'class' => 'InvalidObjectException',
+          ),
+        3 => array(
+          'var' => 'o3',
+          'type' => TType::STRUCT,
+          'class' => 'MetaException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['o1'])) {
+        $this->o1 = $vals['o1'];
+      }
+      if (isset($vals['o2'])) {
+        $this->o2 = $vals['o2'];
+      }
+      if (isset($vals['o3'])) {
+        $this->o3 = $vals['o3'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_create_database_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->o1 = new AlreadyExistsException();
+            $xfer += $this->o1->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->o2 = new InvalidObjectException();
+            $xfer += $this->o2->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->o3 = new MetaException();
+            $xfer += $this->o3->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result');
+    if ($this->o1 !== null) {
+      $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+      $xfer += $this->o1->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o2 !== null) {
+      $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+      $xfer += $this->o2->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o3 !== null) {
+      $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+      $xfer += $this->o3->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_get_database_args {
+  static $_TSPEC;
+
+  public $name = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'name',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_get_database_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->name);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_args');
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+      $xfer += $output->writeString($this->name);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_get_database_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $o1 = null;
+  public $o2 = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => 'Database',
+          ),
+        1 => array(
+          'var' => 'o1',
+          'type' => TType::STRUCT,
+          'class' => 'NoSuchObjectException',
+          ),
+        2 => array(
+          'var' => 'o2',
+          'type' => TType::STRUCT,
+          'class' => 'MetaException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['o1'])) {
+        $this->o1 = $vals['o1'];
+      }
+      if (isset($vals['o2'])) {
+        $this->o2 = $vals['o2'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_get_database_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::STRUCT) {
+            $this->success = new Database();
+            $xfer += $this->success->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->o1 = new NoSuchObjectException();
+            $xfer += $this->o1->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->o2 = new MetaException();
+            $xfer += $this->o2->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_result');
+    if ($this->success !== null) {
+      if (!is_object($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
+      $xfer += $this->success->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o1 !== null) {
+      $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+      $xfer += $this->o1->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o2 !== null) {
+      $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+      $xfer += $this->o2->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_drop_database_args {
+  static $_TSPEC;
+
+  public $name = null;
+  public $deleteData = null;
+  public $cascade = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'name',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'deleteData',
+          'type' => TType::BOOL,
+          ),
+        3 => array(
+          'var' => 'cascade',
+          'type' => TType::BOOL,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
+      }
+      if (isset($vals['deleteData'])) {
+        $this->deleteData = $vals['deleteData'];
+      }
+      if (isset($vals['cascade'])) {
+        $this->cascade = $vals['cascade'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_drop_database_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->name);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->deleteData);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->cascade);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_args');
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+      $xfer += $output->writeString($this->name);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->deleteData !== null) {
+      $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2);
+      $xfer += $output->writeBool($this->deleteData);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->cascade !== null) {
+      $xfer += $output->writeFieldBegin('cascade', TType::BOOL, 3);
+      $xfer += $output->writeBool($this->cascade);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_drop_database_result {
+  static $_TSPEC;
+
+  public $o1 = null;
+  public $o2 = null;
+  public $o3 = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'o1',
+          'type' => TType::STRUCT,
+          'class' => 'NoSuchObjectException',
+          ),
+        2 => array(
+          'var' => 'o2',
+          'type' => TType::STRUCT,
+          'class' => 'InvalidOperationException',
+          ),
+        3 => array(
+          'var' => 'o3',
+          'type' => TType::STRUCT,
+          'class' => 'MetaException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['o1'])) {
+        $this->o1 = $vals['o1'];
+      }
+      if (isset($vals['o2'])) {
+        $this->o2 = $vals['o2'];
+      }
+      if (isset($vals['o3'])) {
+        $this->o3 = $vals['o3'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_drop_database_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->o1 = new NoSuchObjectException();
+            $xfer += $this->o1->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->o2 = new InvalidOperationException();
+            $xfer += $this->o2->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRUCT) {
+            $this->o3 = new MetaException();
+            $xfer += $this->o3->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result');
+    if ($this->o1 !== null) {
+      $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+      $xfer += $this->o1->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o2 !== null) {
+      $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+      $xfer += $this->o2->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o3 !== null) {
+      $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3);
+      $xfer += $this->o3->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_get_databases_args {
+  static $_TSPEC;
+
+  public $pattern = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'pattern',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['pattern'])) {
+        $this->pattern = $vals['pattern'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_get_databases_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->pattern);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_args');
+    if ($this->pattern !== null) {
+      $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1);
+      $xfer += $output->writeString($this->pattern);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_get_databases_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $o1 = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        1 => array(
+          'var' => 'o1',
+          'type' => TType::STRUCT,
+          'class' => 'MetaException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['o1'])) {
+        $this->o1 = $vals['o1'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_get_databases_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size227 = 0;
+            $_etype230 = 0;
+            $xfer += $input->readListBegin($_etype230, $_size227);
+            for ($_i231 = 0; $_i231 < $_size227; ++$_i231)
+            {
+              $elem232 = null;
+              $xfer += $input->readString($elem232);
+              $this->success []= $elem232;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->o1 = new MetaException();
+            $xfer += $this->o1->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRING, count($this->success));
+        {
+          foreach ($this->success as $iter233)
+          {
+            $xfer += $output->writeString($iter233);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o1 !== null) {
+      $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+      $xfer += $this->o1->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_get_all_databases_args {
+  static $_TSPEC;
+
+
+  public function __construct() {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        );
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_get_all_databases_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args');
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_get_all_databases_result {
+  static $_TSPEC;
+
+  public $success = null;
+  public $o1 = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        1 => array(
+          'var' => 'o1',
+          'type' => TType::STRUCT,
+          'class' => 'MetaException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+      if (isset($vals['o1'])) {
+        $this->o1 = $vals['o1'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_get_all_databases_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 0:
+          if ($ftype == TType::LST) {
+            $this->success = array();
+            $_size234 = 0;
+            $_etype237 = 0;
+            $xfer += $input->readListBegin($_etype237, $_size234);
+            for ($_i238 = 0; $_i238 < $_size234; ++$_i238)
+            {
+              $elem239 = null;
+              $xfer += $input->readString($elem239);
+              $this->success []= $elem239;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->o1 = new MetaException();
+            $xfer += $this->o1->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result');
+    if ($this->success !== null) {
+      if (!is_array($this->success)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
+      {
+        $output->writeListBegin(TType::STRING, count($this->success));
+        {
+          foreach ($this->success as $iter240)
+          {
+            $xfer += $output->writeString($iter240);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->o1 !== null) {
+      $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+      $xfer += $this->o1->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_alter_database_args {
+  static $_TSPEC;
+
+  public $dbname = null;
+  public $db = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'dbname',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'db',
+          'type' => TType::STRUCT,
+          'class' => 'Database',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['dbname'])) {
+        $this->dbname = $vals['dbname'];
+      }
+      if (isset($vals['db'])) {
+        $this->db = $vals['db'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_alter_database_args';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->dbname);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->db = new Database();
+            $xfer += $this->db->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_args');
+    if ($this->dbname !== null) {
+      $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1);
+      $xfer += $output->writeString($this->dbname);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->db !== null) {
+      if (!is_object($this->db)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('db', TType::STRUCT, 2);
+      $xfer += $this->db->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ThriftHiveMetastore_alter_database_result {
+  static $_TSPEC;
+
+  public $o1 = null;
+  public $o2 = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'o1',
+          'type' => TType::STRUCT,
+          'class' => 'MetaException',
+          ),
+        2 => array(
+          'var' => 'o2',
+          'type' => TType::STRUCT,
+          'class' => 'NoSuchObjectException',
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['o1'])) {
+        $this->o1 = $vals['o1'];
+      }
+      if (isset($vals['o2'])) {
+        $this->o2 = $vals['o2'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ThriftHiveMetastore_alter_database_result';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->o1 = new MetaException();
+            $xfer += $this->o1->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRUCT) {
+            $this->o2 = new NoSuchObjectException();
+            $xfer += $this->o2->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
     }
-    if ($result->o1 !== null) {
-      throw $result->o1;
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_database_result');
+    if ($this->o1 !== null) {
+      $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1);
+      $xfer += $this->o1->write($output);
+      $xfer += $output->writeFieldEnd();
     }
-    return;
+    if ($this->o2 !== null) {
+      $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2);
+      $xfer += $this->o2->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
   }
 
 }
 
-// HELPER FUNCTIONS AND STRUCTURES
-
-class ThriftHiveMetastore_create_database_args {
+class ThriftHiveMetastore_get_type_args {
   static $_TSPEC;
 
-  public $database = null;
+  public $name = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'database',
-          'type' => TType::STRUCT,
-          'class' => 'Database',
+          'var' => 'name',
+          'type' => TType::STRING,
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['database'])) {
-        $this->database = $vals['database'];
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
       }
     }
   }
 
   public function getName() {
-    return 'ThriftHiveMetastore_create_database_args';
+    return 'ThriftHiveMetastore_get_type_args';
   }
 
   public function read($input)
@@ -4126,9 +5692,8 @@ class ThriftHiveMetastore_create_databas
       switch ($fid)
       {
         case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->database = new Database();
-            $xfer += $this->database->read($input);
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->name);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -4145,13 +5710,10 @@ class ThriftHiveMetastore_create_databas
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_args');
-    if ($this->database !== null) {
-      if (!is_object($this->database)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1);
-      $xfer += $this->database->write($output);
+    $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_args');
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+      $xfer += $output->writeString($this->name);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -4161,48 +5723,48 @@ class ThriftHiveMetastore_create_databas
 
 }
 
-class ThriftHiveMetastore_create_database_result {
+class ThriftHiveMetastore_get_type_result {
   static $_TSPEC;
 
+  public $success = null;
   public $o1 = null;
   public $o2 = null;
-  public $o3 = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
+        0 => array(
+          'var' => 'success',
+          'type' => TType::STRUCT,
+          'class' => 'Type',
+          ),
         1 => array(
           'var' => 'o1',
           'type' => TType::STRUCT,
-          'class' => 'AlreadyExistsException',
+          'class' => 'MetaException',
           ),
         2 => array(
           'var' => 'o2',
           'type' => TType::STRUCT,
-          'class' => 'InvalidObjectException',
-          ),
-        3 => array(
-          'var' => 'o3',
-          'type' => TType::STRUCT,
-          'class' => 'MetaException',
+          'class' => 'NoSuchObjectException',
           ),
         );
     }
     if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
       if (isset($vals['o1'])) {
         $this->o1 = $vals['o1'];
       }
       if (isset($vals['o2'])) {
         $this->o2 = $vals['o2'];
       }
-      if (isset($vals['o3'])) {
-        $this->o3 = $vals['o3'];
-      }
     }
   }
 
   public function getName() {
-    return 'ThriftHiveMetastore_create_database_result';
+    return 'ThriftHiveMetastore_get_type_result';
   }
 
   public function read($input)
@@ -4220,26 +5782,26 @@ class ThriftHiveMetastore_create_databas
       }
       switch ($fid)
       {
-        case 1:
+        case 0:
           if ($ftype == TType::STRUCT) {
-            $this->o1 = new AlreadyExistsException();
-            $xfer += $this->o1->read($input);
+            $this->success = new Type();
+            $xfer += $this->success->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        case 2:
+        case 1:
           if ($ftype == TType::STRUCT) {
-            $this->o2 = new InvalidObjectException();
-            $xfer += $this->o2->read($input);
+            $this->o1 = new MetaException();
+            $xfer += $this->o1->read($input);

[... 13654 lines stripped ...]