hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [15/31] hive git commit: HIVE-16575: Support for 'UNIQUE' and 'NOT NULL' constraints (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
Date Thu, 25 May 2017 20:49:54 GMT
http://git-wip-us.apache.org/repos/asf/hive/blob/696be9f5/metastore/src/gen/thrift/gen-php/metastore/Types.php
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-php/metastore/Types.php b/metastore/src/gen/thrift/gen-php/metastore/Types.php
index 74f0028..9321301 100644
--- a/metastore/src/gen/thrift/gen-php/metastore/Types.php
+++ b/metastore/src/gen/thrift/gen-php/metastore/Types.php
@@ -1003,70 +1003,109 @@ class SQLForeignKey {
 
 }
 
-class Type {
+class SQLUniqueConstraint {
   static $_TSPEC;
 
   /**
    * @var string
    */
-  public $name = null;
+  public $table_db = null;
   /**
    * @var string
    */
-  public $type1 = null;
+  public $table_name = null;
   /**
    * @var string
    */
-  public $type2 = null;
+  public $column_name = null;
   /**
-   * @var \metastore\FieldSchema[]
+   * @var int
    */
-  public $fields = null;
+  public $key_seq = null;
+  /**
+   * @var string
+   */
+  public $uk_name = null;
+  /**
+   * @var bool
+   */
+  public $enable_cstr = null;
+  /**
+   * @var bool
+   */
+  public $validate_cstr = null;
+  /**
+   * @var bool
+   */
+  public $rely_cstr = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'name',
+          'var' => 'table_db',
           'type' => TType::STRING,
           ),
         2 => array(
-          'var' => 'type1',
+          'var' => 'table_name',
           'type' => TType::STRING,
           ),
         3 => array(
-          'var' => 'type2',
+          'var' => 'column_name',
           'type' => TType::STRING,
           ),
         4 => array(
-          'var' => 'fields',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\metastore\FieldSchema',
-            ),
+          'var' => 'key_seq',
+          'type' => TType::I32,
+          ),
+        5 => array(
+          'var' => 'uk_name',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'enable_cstr',
+          'type' => TType::BOOL,
+          ),
+        7 => array(
+          'var' => 'validate_cstr',
+          'type' => TType::BOOL,
+          ),
+        8 => array(
+          'var' => 'rely_cstr',
+          'type' => TType::BOOL,
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['name'])) {
-        $this->name = $vals['name'];
+      if (isset($vals['table_db'])) {
+        $this->table_db = $vals['table_db'];
       }
-      if (isset($vals['type1'])) {
-        $this->type1 = $vals['type1'];
+      if (isset($vals['table_name'])) {
+        $this->table_name = $vals['table_name'];
       }
-      if (isset($vals['type2'])) {
-        $this->type2 = $vals['type2'];
+      if (isset($vals['column_name'])) {
+        $this->column_name = $vals['column_name'];
       }
-      if (isset($vals['fields'])) {
-        $this->fields = $vals['fields'];
+      if (isset($vals['key_seq'])) {
+        $this->key_seq = $vals['key_seq'];
+      }
+      if (isset($vals['uk_name'])) {
+        $this->uk_name = $vals['uk_name'];
+      }
+      if (isset($vals['enable_cstr'])) {
+        $this->enable_cstr = $vals['enable_cstr'];
+      }
+      if (isset($vals['validate_cstr'])) {
+        $this->validate_cstr = $vals['validate_cstr'];
+      }
+      if (isset($vals['rely_cstr'])) {
+        $this->rely_cstr = $vals['rely_cstr'];
       }
     }
   }
 
   public function getName() {
-    return 'Type';
+    return 'SQLUniqueConstraint';
   }
 
   public function read($input)
@@ -1086,39 +1125,56 @@ class Type {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->name);
+            $xfer += $input->readString($this->table_db);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 2:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->type1);
+            $xfer += $input->readString($this->table_name);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 3:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->type2);
+            $xfer += $input->readString($this->column_name);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 4:
-          if ($ftype == TType::LST) {
-            $this->fields = array();
-            $_size0 = 0;
-            $_etype3 = 0;
-            $xfer += $input->readListBegin($_etype3, $_size0);
-            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
-            {
-              $elem5 = null;
-              $elem5 = new \metastore\FieldSchema();
-              $xfer += $elem5->read($input);
-              $this->fields []= $elem5;
-            }
-            $xfer += $input->readListEnd();
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->key_seq);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->uk_name);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->enable_cstr);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->validate_cstr);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->rely_cstr);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -1135,37 +1191,45 @@ class Type {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Type');
-    if ($this->name !== null) {
-      $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
-      $xfer += $output->writeString($this->name);
+    $xfer += $output->writeStructBegin('SQLUniqueConstraint');
+    if ($this->table_db !== null) {
+      $xfer += $output->writeFieldBegin('table_db', TType::STRING, 1);
+      $xfer += $output->writeString($this->table_db);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->type1 !== null) {
-      $xfer += $output->writeFieldBegin('type1', TType::STRING, 2);
-      $xfer += $output->writeString($this->type1);
+    if ($this->table_name !== null) {
+      $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2);
+      $xfer += $output->writeString($this->table_name);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->type2 !== null) {
-      $xfer += $output->writeFieldBegin('type2', TType::STRING, 3);
-      $xfer += $output->writeString($this->type2);
+    if ($this->column_name !== null) {
+      $xfer += $output->writeFieldBegin('column_name', TType::STRING, 3);
+      $xfer += $output->writeString($this->column_name);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->fields !== null) {
-      if (!is_array($this->fields)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('fields', TType::LST, 4);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->fields));
-        {
-          foreach ($this->fields as $iter6)
-          {
-            $xfer += $iter6->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
+    if ($this->key_seq !== null) {
+      $xfer += $output->writeFieldBegin('key_seq', TType::I32, 4);
+      $xfer += $output->writeI32($this->key_seq);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->uk_name !== null) {
+      $xfer += $output->writeFieldBegin('uk_name', TType::STRING, 5);
+      $xfer += $output->writeString($this->uk_name);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->enable_cstr !== null) {
+      $xfer += $output->writeFieldBegin('enable_cstr', TType::BOOL, 6);
+      $xfer += $output->writeBool($this->enable_cstr);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->validate_cstr !== null) {
+      $xfer += $output->writeFieldBegin('validate_cstr', TType::BOOL, 7);
+      $xfer += $output->writeBool($this->validate_cstr);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->rely_cstr !== null) {
+      $xfer += $output->writeFieldBegin('rely_cstr', TType::BOOL, 8);
+      $xfer += $output->writeBool($this->rely_cstr);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -1175,80 +1239,98 @@ class Type {
 
 }
 
-class HiveObjectRef {
+class SQLNotNullConstraint {
   static $_TSPEC;
 
   /**
-   * @var int
+   * @var string
    */
-  public $objectType = null;
+  public $table_db = null;
   /**
    * @var string
    */
-  public $dbName = null;
+  public $table_name = null;
   /**
    * @var string
    */
-  public $objectName = null;
+  public $column_name = null;
   /**
-   * @var string[]
+   * @var string
    */
-  public $partValues = null;
+  public $nn_name = null;
   /**
-   * @var string
+   * @var bool
    */
-  public $columnName = null;
+  public $enable_cstr = null;
+  /**
+   * @var bool
+   */
+  public $validate_cstr = null;
+  /**
+   * @var bool
+   */
+  public $rely_cstr = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'objectType',
-          'type' => TType::I32,
+          'var' => 'table_db',
+          'type' => TType::STRING,
           ),
         2 => array(
-          'var' => 'dbName',
+          'var' => 'table_name',
           'type' => TType::STRING,
           ),
         3 => array(
-          'var' => 'objectName',
+          'var' => 'column_name',
           'type' => TType::STRING,
           ),
         4 => array(
-          'var' => 'partValues',
-          'type' => TType::LST,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
+          'var' => 'nn_name',
+          'type' => TType::STRING,
           ),
         5 => array(
-          'var' => 'columnName',
-          'type' => TType::STRING,
+          'var' => 'enable_cstr',
+          'type' => TType::BOOL,
+          ),
+        6 => array(
+          'var' => 'validate_cstr',
+          'type' => TType::BOOL,
+          ),
+        7 => array(
+          'var' => 'rely_cstr',
+          'type' => TType::BOOL,
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['objectType'])) {
-        $this->objectType = $vals['objectType'];
+      if (isset($vals['table_db'])) {
+        $this->table_db = $vals['table_db'];
       }
-      if (isset($vals['dbName'])) {
-        $this->dbName = $vals['dbName'];
+      if (isset($vals['table_name'])) {
+        $this->table_name = $vals['table_name'];
       }
-      if (isset($vals['objectName'])) {
-        $this->objectName = $vals['objectName'];
+      if (isset($vals['column_name'])) {
+        $this->column_name = $vals['column_name'];
       }
-      if (isset($vals['partValues'])) {
-        $this->partValues = $vals['partValues'];
+      if (isset($vals['nn_name'])) {
+        $this->nn_name = $vals['nn_name'];
       }
-      if (isset($vals['columnName'])) {
-        $this->columnName = $vals['columnName'];
+      if (isset($vals['enable_cstr'])) {
+        $this->enable_cstr = $vals['enable_cstr'];
       }
-    }
-  }
+      if (isset($vals['validate_cstr'])) {
+        $this->validate_cstr = $vals['validate_cstr'];
+      }
+      if (isset($vals['rely_cstr'])) {
+        $this->rely_cstr = $vals['rely_cstr'];
+      }
+    }
+  }
 
   public function getName() {
-    return 'HiveObjectRef';
+    return 'SQLNotNullConstraint';
   }
 
   public function read($input)
@@ -1267,46 +1349,50 @@ class HiveObjectRef {
       switch ($fid)
       {
         case 1:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->objectType);
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->table_db);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 2:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->dbName);
+            $xfer += $input->readString($this->table_name);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 3:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->objectName);
+            $xfer += $input->readString($this->column_name);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 4:
-          if ($ftype == TType::LST) {
-            $this->partValues = array();
-            $_size7 = 0;
-            $_etype10 = 0;
-            $xfer += $input->readListBegin($_etype10, $_size7);
-            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
-            {
-              $elem12 = null;
-              $xfer += $input->readString($elem12);
-              $this->partValues []= $elem12;
-            }
-            $xfer += $input->readListEnd();
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->nn_name);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 5:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->columnName);
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->enable_cstr);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->validate_cstr);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->rely_cstr);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -1323,42 +1409,40 @@ class HiveObjectRef {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('HiveObjectRef');
-    if ($this->objectType !== null) {
-      $xfer += $output->writeFieldBegin('objectType', TType::I32, 1);
-      $xfer += $output->writeI32($this->objectType);
+    $xfer += $output->writeStructBegin('SQLNotNullConstraint');
+    if ($this->table_db !== null) {
+      $xfer += $output->writeFieldBegin('table_db', TType::STRING, 1);
+      $xfer += $output->writeString($this->table_db);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->dbName !== null) {
-      $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2);
-      $xfer += $output->writeString($this->dbName);
+    if ($this->table_name !== null) {
+      $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2);
+      $xfer += $output->writeString($this->table_name);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->objectName !== null) {
-      $xfer += $output->writeFieldBegin('objectName', TType::STRING, 3);
-      $xfer += $output->writeString($this->objectName);
+    if ($this->column_name !== null) {
+      $xfer += $output->writeFieldBegin('column_name', TType::STRING, 3);
+      $xfer += $output->writeString($this->column_name);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->partValues !== null) {
-      if (!is_array($this->partValues)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('partValues', TType::LST, 4);
-      {
-        $output->writeListBegin(TType::STRING, count($this->partValues));
-        {
-          foreach ($this->partValues as $iter13)
-          {
-            $xfer += $output->writeString($iter13);
-          }
-        }
-        $output->writeListEnd();
-      }
+    if ($this->nn_name !== null) {
+      $xfer += $output->writeFieldBegin('nn_name', TType::STRING, 4);
+      $xfer += $output->writeString($this->nn_name);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->columnName !== null) {
-      $xfer += $output->writeFieldBegin('columnName', TType::STRING, 5);
-      $xfer += $output->writeString($this->columnName);
+    if ($this->enable_cstr !== null) {
+      $xfer += $output->writeFieldBegin('enable_cstr', TType::BOOL, 5);
+      $xfer += $output->writeBool($this->enable_cstr);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->validate_cstr !== null) {
+      $xfer += $output->writeFieldBegin('validate_cstr', TType::BOOL, 6);
+      $xfer += $output->writeBool($this->validate_cstr);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->rely_cstr !== null) {
+      $xfer += $output->writeFieldBegin('rely_cstr', TType::BOOL, 7);
+      $xfer += $output->writeBool($this->rely_cstr);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -1368,76 +1452,70 @@ class HiveObjectRef {
 
 }
 
-class PrivilegeGrantInfo {
+class Type {
   static $_TSPEC;
 
   /**
    * @var string
    */
-  public $privilege = null;
-  /**
-   * @var int
-   */
-  public $createTime = null;
+  public $name = null;
   /**
    * @var string
    */
-  public $grantor = null;
+  public $type1 = null;
   /**
-   * @var int
+   * @var string
    */
-  public $grantorType = null;
+  public $type2 = null;
   /**
-   * @var bool
+   * @var \metastore\FieldSchema[]
    */
-  public $grantOption = null;
+  public $fields = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'privilege',
+          'var' => 'name',
           'type' => TType::STRING,
           ),
         2 => array(
-          'var' => 'createTime',
-          'type' => TType::I32,
+          'var' => 'type1',
+          'type' => TType::STRING,
           ),
         3 => array(
-          'var' => 'grantor',
+          'var' => 'type2',
           'type' => TType::STRING,
           ),
         4 => array(
-          'var' => 'grantorType',
-          'type' => TType::I32,
-          ),
-        5 => array(
-          'var' => 'grantOption',
-          'type' => TType::BOOL,
+          'var' => 'fields',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\metastore\FieldSchema',
+            ),
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['privilege'])) {
-        $this->privilege = $vals['privilege'];
-      }
-      if (isset($vals['createTime'])) {
-        $this->createTime = $vals['createTime'];
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
       }
-      if (isset($vals['grantor'])) {
-        $this->grantor = $vals['grantor'];
+      if (isset($vals['type1'])) {
+        $this->type1 = $vals['type1'];
       }
-      if (isset($vals['grantorType'])) {
-        $this->grantorType = $vals['grantorType'];
+      if (isset($vals['type2'])) {
+        $this->type2 = $vals['type2'];
       }
-      if (isset($vals['grantOption'])) {
-        $this->grantOption = $vals['grantOption'];
+      if (isset($vals['fields'])) {
+        $this->fields = $vals['fields'];
       }
     }
   }
 
   public function getName() {
-    return 'PrivilegeGrantInfo';
+    return 'Type';
   }
 
   public function read($input)
@@ -1457,35 +1535,39 @@ class PrivilegeGrantInfo {
       {
         case 1:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->privilege);
+            $xfer += $input->readString($this->name);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 2:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->createTime);
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->type1);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 3:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->grantor);
+            $xfer += $input->readString($this->type2);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 4:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->grantorType);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->grantOption);
+          if ($ftype == TType::LST) {
+            $this->fields = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $elem5 = new \metastore\FieldSchema();
+              $xfer += $elem5->read($input);
+              $this->fields []= $elem5;
+            }
+            $xfer += $input->readListEnd();
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -1502,30 +1584,37 @@ class PrivilegeGrantInfo {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('PrivilegeGrantInfo');
-    if ($this->privilege !== null) {
-      $xfer += $output->writeFieldBegin('privilege', TType::STRING, 1);
-      $xfer += $output->writeString($this->privilege);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->createTime !== null) {
-      $xfer += $output->writeFieldBegin('createTime', TType::I32, 2);
-      $xfer += $output->writeI32($this->createTime);
+    $xfer += $output->writeStructBegin('Type');
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+      $xfer += $output->writeString($this->name);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->grantor !== null) {
-      $xfer += $output->writeFieldBegin('grantor', TType::STRING, 3);
-      $xfer += $output->writeString($this->grantor);
+    if ($this->type1 !== null) {
+      $xfer += $output->writeFieldBegin('type1', TType::STRING, 2);
+      $xfer += $output->writeString($this->type1);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->grantorType !== null) {
-      $xfer += $output->writeFieldBegin('grantorType', TType::I32, 4);
-      $xfer += $output->writeI32($this->grantorType);
+    if ($this->type2 !== null) {
+      $xfer += $output->writeFieldBegin('type2', TType::STRING, 3);
+      $xfer += $output->writeString($this->type2);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->grantOption !== null) {
-      $xfer += $output->writeFieldBegin('grantOption', TType::BOOL, 5);
-      $xfer += $output->writeBool($this->grantOption);
+    if ($this->fields !== null) {
+      if (!is_array($this->fields)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('fields', TType::LST, 4);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->fields));
+        {
+          foreach ($this->fields as $iter6)
+          {
+            $xfer += $iter6->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -1535,67 +1624,80 @@ class PrivilegeGrantInfo {
 
 }
 
-class HiveObjectPrivilege {
+class HiveObjectRef {
   static $_TSPEC;
 
   /**
-   * @var \metastore\HiveObjectRef
+   * @var int
    */
-  public $hiveObject = null;
+  public $objectType = null;
   /**
    * @var string
    */
-  public $principalName = null;
+  public $dbName = null;
   /**
-   * @var int
+   * @var string
    */
-  public $principalType = null;
+  public $objectName = null;
   /**
-   * @var \metastore\PrivilegeGrantInfo
+   * @var string[]
    */
-  public $grantInfo = null;
+  public $partValues = null;
+  /**
+   * @var string
+   */
+  public $columnName = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'hiveObject',
-          'type' => TType::STRUCT,
-          'class' => '\metastore\HiveObjectRef',
+          'var' => 'objectType',
+          'type' => TType::I32,
           ),
         2 => array(
-          'var' => 'principalName',
+          'var' => 'dbName',
           'type' => TType::STRING,
           ),
         3 => array(
-          'var' => 'principalType',
-          'type' => TType::I32,
+          'var' => 'objectName',
+          'type' => TType::STRING,
           ),
         4 => array(
-          'var' => 'grantInfo',
-          'type' => TType::STRUCT,
-          'class' => '\metastore\PrivilegeGrantInfo',
+          'var' => 'partValues',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        5 => array(
+          'var' => 'columnName',
+          'type' => TType::STRING,
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['hiveObject'])) {
-        $this->hiveObject = $vals['hiveObject'];
+      if (isset($vals['objectType'])) {
+        $this->objectType = $vals['objectType'];
       }
-      if (isset($vals['principalName'])) {
-        $this->principalName = $vals['principalName'];
+      if (isset($vals['dbName'])) {
+        $this->dbName = $vals['dbName'];
       }
-      if (isset($vals['principalType'])) {
-        $this->principalType = $vals['principalType'];
+      if (isset($vals['objectName'])) {
+        $this->objectName = $vals['objectName'];
       }
-      if (isset($vals['grantInfo'])) {
-        $this->grantInfo = $vals['grantInfo'];
+      if (isset($vals['partValues'])) {
+        $this->partValues = $vals['partValues'];
+      }
+      if (isset($vals['columnName'])) {
+        $this->columnName = $vals['columnName'];
       }
     }
   }
 
   public function getName() {
-    return 'HiveObjectPrivilege';
+    return 'HiveObjectRef';
   }
 
   public function read($input)
@@ -1614,31 +1716,46 @@ class HiveObjectPrivilege {
       switch ($fid)
       {
         case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->hiveObject = new \metastore\HiveObjectRef();
-            $xfer += $this->hiveObject->read($input);
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->objectType);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 2:
           if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->principalName);
+            $xfer += $input->readString($this->dbName);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 3:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->principalType);
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->objectName);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 4:
-          if ($ftype == TType::STRUCT) {
-            $this->grantInfo = new \metastore\PrivilegeGrantInfo();
-            $xfer += $this->grantInfo->read($input);
+          if ($ftype == TType::LST) {
+            $this->partValues = array();
+            $_size7 = 0;
+            $_etype10 = 0;
+            $xfer += $input->readListBegin($_etype10, $_size7);
+            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+            {
+              $elem12 = null;
+              $xfer += $input->readString($elem12);
+              $this->partValues []= $elem12;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->columnName);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -1655,31 +1772,42 @@ class HiveObjectPrivilege {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('HiveObjectPrivilege');
-    if ($this->hiveObject !== null) {
-      if (!is_object($this->hiveObject)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 1);
-      $xfer += $this->hiveObject->write($output);
+    $xfer += $output->writeStructBegin('HiveObjectRef');
+    if ($this->objectType !== null) {
+      $xfer += $output->writeFieldBegin('objectType', TType::I32, 1);
+      $xfer += $output->writeI32($this->objectType);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->principalName !== null) {
-      $xfer += $output->writeFieldBegin('principalName', TType::STRING, 2);
-      $xfer += $output->writeString($this->principalName);
+    if ($this->dbName !== null) {
+      $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2);
+      $xfer += $output->writeString($this->dbName);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->principalType !== null) {
-      $xfer += $output->writeFieldBegin('principalType', TType::I32, 3);
-      $xfer += $output->writeI32($this->principalType);
+    if ($this->objectName !== null) {
+      $xfer += $output->writeFieldBegin('objectName', TType::STRING, 3);
+      $xfer += $output->writeString($this->objectName);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->grantInfo !== null) {
-      if (!is_object($this->grantInfo)) {
+    if ($this->partValues !== null) {
+      if (!is_array($this->partValues)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('grantInfo', TType::STRUCT, 4);
-      $xfer += $this->grantInfo->write($output);
+      $xfer += $output->writeFieldBegin('partValues', TType::LST, 4);
+      {
+        $output->writeListBegin(TType::STRING, count($this->partValues));
+        {
+          foreach ($this->partValues as $iter13)
+          {
+            $xfer += $output->writeString($iter13);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->columnName !== null) {
+      $xfer += $output->writeFieldBegin('columnName', TType::STRING, 5);
+      $xfer += $output->writeString($this->columnName);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -1689,37 +1817,76 @@ class HiveObjectPrivilege {
 
 }
 
-class PrivilegeBag {
+class PrivilegeGrantInfo {
   static $_TSPEC;
 
   /**
-   * @var \metastore\HiveObjectPrivilege[]
+   * @var string
    */
-  public $privileges = null;
+  public $privilege = null;
+  /**
+   * @var int
+   */
+  public $createTime = null;
+  /**
+   * @var string
+   */
+  public $grantor = null;
+  /**
+   * @var int
+   */
+  public $grantorType = null;
+  /**
+   * @var bool
+   */
+  public $grantOption = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'privileges',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\metastore\HiveObjectPrivilege',
-            ),
+          'var' => 'privilege',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'createTime',
+          'type' => TType::I32,
+          ),
+        3 => array(
+          'var' => 'grantor',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'grantorType',
+          'type' => TType::I32,
+          ),
+        5 => array(
+          'var' => 'grantOption',
+          'type' => TType::BOOL,
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['privileges'])) {
-        $this->privileges = $vals['privileges'];
+      if (isset($vals['privilege'])) {
+        $this->privilege = $vals['privilege'];
+      }
+      if (isset($vals['createTime'])) {
+        $this->createTime = $vals['createTime'];
+      }
+      if (isset($vals['grantor'])) {
+        $this->grantor = $vals['grantor'];
+      }
+      if (isset($vals['grantorType'])) {
+        $this->grantorType = $vals['grantorType'];
+      }
+      if (isset($vals['grantOption'])) {
+        $this->grantOption = $vals['grantOption'];
       }
     }
   }
 
   public function getName() {
-    return 'PrivilegeBag';
+    return 'PrivilegeGrantInfo';
   }
 
   public function read($input)
@@ -1738,19 +1905,36 @@ class PrivilegeBag {
       switch ($fid)
       {
         case 1:
-          if ($ftype == TType::LST) {
-            $this->privileges = array();
-            $_size14 = 0;
-            $_etype17 = 0;
-            $xfer += $input->readListBegin($_etype17, $_size14);
-            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
-            {
-              $elem19 = null;
-              $elem19 = new \metastore\HiveObjectPrivilege();
-              $xfer += $elem19->read($input);
-              $this->privileges []= $elem19;
-            }
-            $xfer += $input->readListEnd();
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->privilege);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->createTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->grantor);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->grantorType);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->grantOption);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -1767,118 +1951,100 @@ class PrivilegeBag {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('PrivilegeBag');
-    if ($this->privileges !== null) {
-      if (!is_array($this->privileges)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('privileges', TType::LST, 1);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->privileges));
-        {
-          foreach ($this->privileges as $iter20)
-          {
-            $xfer += $iter20->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
+    $xfer += $output->writeStructBegin('PrivilegeGrantInfo');
+    if ($this->privilege !== null) {
+      $xfer += $output->writeFieldBegin('privilege', TType::STRING, 1);
+      $xfer += $output->writeString($this->privilege);
       $xfer += $output->writeFieldEnd();
     }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class PrincipalPrivilegeSet {
-  static $_TSPEC;
-
-  /**
-   * @var array
-   */
-  public $userPrivileges = null;
+    if ($this->createTime !== null) {
+      $xfer += $output->writeFieldBegin('createTime', TType::I32, 2);
+      $xfer += $output->writeI32($this->createTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->grantor !== null) {
+      $xfer += $output->writeFieldBegin('grantor', TType::STRING, 3);
+      $xfer += $output->writeString($this->grantor);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->grantorType !== null) {
+      $xfer += $output->writeFieldBegin('grantorType', TType::I32, 4);
+      $xfer += $output->writeI32($this->grantorType);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->grantOption !== null) {
+      $xfer += $output->writeFieldBegin('grantOption', TType::BOOL, 5);
+      $xfer += $output->writeBool($this->grantOption);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class HiveObjectPrivilege {
+  static $_TSPEC;
+
   /**
-   * @var array
+   * @var \metastore\HiveObjectRef
    */
-  public $groupPrivileges = null;
+  public $hiveObject = null;
   /**
-   * @var array
+   * @var string
    */
-  public $rolePrivileges = null;
+  public $principalName = null;
+  /**
+   * @var int
+   */
+  public $principalType = null;
+  /**
+   * @var \metastore\PrivilegeGrantInfo
+   */
+  public $grantInfo = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'userPrivileges',
-          'type' => TType::MAP,
-          'ktype' => TType::STRING,
-          'vtype' => TType::LST,
-          'key' => array(
-            'type' => TType::STRING,
-          ),
-          'val' => array(
-            'type' => TType::LST,
-            'etype' => TType::STRUCT,
-            'elem' => array(
-              'type' => TType::STRUCT,
-              'class' => '\metastore\PrivilegeGrantInfo',
-              ),
-            ),
+          'var' => 'hiveObject',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\HiveObjectRef',
           ),
         2 => array(
-          'var' => 'groupPrivileges',
-          'type' => TType::MAP,
-          'ktype' => TType::STRING,
-          'vtype' => TType::LST,
-          'key' => array(
-            'type' => TType::STRING,
-          ),
-          'val' => array(
-            'type' => TType::LST,
-            'etype' => TType::STRUCT,
-            'elem' => array(
-              'type' => TType::STRUCT,
-              'class' => '\metastore\PrivilegeGrantInfo',
-              ),
-            ),
+          'var' => 'principalName',
+          'type' => TType::STRING,
           ),
         3 => array(
-          'var' => 'rolePrivileges',
-          'type' => TType::MAP,
-          'ktype' => TType::STRING,
-          'vtype' => TType::LST,
-          'key' => array(
-            'type' => TType::STRING,
+          'var' => 'principalType',
+          'type' => TType::I32,
           ),
-          'val' => array(
-            'type' => TType::LST,
-            'etype' => TType::STRUCT,
-            'elem' => array(
-              'type' => TType::STRUCT,
-              'class' => '\metastore\PrivilegeGrantInfo',
-              ),
-            ),
+        4 => array(
+          'var' => 'grantInfo',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\PrivilegeGrantInfo',
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['userPrivileges'])) {
-        $this->userPrivileges = $vals['userPrivileges'];
+      if (isset($vals['hiveObject'])) {
+        $this->hiveObject = $vals['hiveObject'];
       }
-      if (isset($vals['groupPrivileges'])) {
-        $this->groupPrivileges = $vals['groupPrivileges'];
+      if (isset($vals['principalName'])) {
+        $this->principalName = $vals['principalName'];
       }
-      if (isset($vals['rolePrivileges'])) {
-        $this->rolePrivileges = $vals['rolePrivileges'];
+      if (isset($vals['principalType'])) {
+        $this->principalType = $vals['principalType'];
+      }
+      if (isset($vals['grantInfo'])) {
+        $this->grantInfo = $vals['grantInfo'];
       }
     }
   }
 
   public function getName() {
-    return 'PrincipalPrivilegeSet';
+    return 'HiveObjectPrivilege';
   }
 
   public function read($input)
@@ -1897,94 +2063,31 @@ class PrincipalPrivilegeSet {
       switch ($fid)
       {
         case 1:
-          if ($ftype == TType::MAP) {
-            $this->userPrivileges = array();
-            $_size21 = 0;
-            $_ktype22 = 0;
-            $_vtype23 = 0;
-            $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21);
-            for ($_i25 = 0; $_i25 < $_size21; ++$_i25)
-            {
-              $key26 = '';
-              $val27 = array();
-              $xfer += $input->readString($key26);
-              $val27 = array();
-              $_size28 = 0;
-              $_etype31 = 0;
-              $xfer += $input->readListBegin($_etype31, $_size28);
-              for ($_i32 = 0; $_i32 < $_size28; ++$_i32)
-              {
-                $elem33 = null;
-                $elem33 = new \metastore\PrivilegeGrantInfo();
-                $xfer += $elem33->read($input);
-                $val27 []= $elem33;
-              }
-              $xfer += $input->readListEnd();
-              $this->userPrivileges[$key26] = $val27;
-            }
-            $xfer += $input->readMapEnd();
+          if ($ftype == TType::STRUCT) {
+            $this->hiveObject = new \metastore\HiveObjectRef();
+            $xfer += $this->hiveObject->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 2:
-          if ($ftype == TType::MAP) {
-            $this->groupPrivileges = array();
-            $_size34 = 0;
-            $_ktype35 = 0;
-            $_vtype36 = 0;
-            $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34);
-            for ($_i38 = 0; $_i38 < $_size34; ++$_i38)
-            {
-              $key39 = '';
-              $val40 = array();
-              $xfer += $input->readString($key39);
-              $val40 = array();
-              $_size41 = 0;
-              $_etype44 = 0;
-              $xfer += $input->readListBegin($_etype44, $_size41);
-              for ($_i45 = 0; $_i45 < $_size41; ++$_i45)
-              {
-                $elem46 = null;
-                $elem46 = new \metastore\PrivilegeGrantInfo();
-                $xfer += $elem46->read($input);
-                $val40 []= $elem46;
-              }
-              $xfer += $input->readListEnd();
-              $this->groupPrivileges[$key39] = $val40;
-            }
-            $xfer += $input->readMapEnd();
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->principalName);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 3:
-          if ($ftype == TType::MAP) {
-            $this->rolePrivileges = array();
-            $_size47 = 0;
-            $_ktype48 = 0;
-            $_vtype49 = 0;
-            $xfer += $input->readMapBegin($_ktype48, $_vtype49, $_size47);
-            for ($_i51 = 0; $_i51 < $_size47; ++$_i51)
-            {
-              $key52 = '';
-              $val53 = array();
-              $xfer += $input->readString($key52);
-              $val53 = array();
-              $_size54 = 0;
-              $_etype57 = 0;
-              $xfer += $input->readListBegin($_etype57, $_size54);
-              for ($_i58 = 0; $_i58 < $_size54; ++$_i58)
-              {
-                $elem59 = null;
-                $elem59 = new \metastore\PrivilegeGrantInfo();
-                $xfer += $elem59->read($input);
-                $val53 []= $elem59;
-              }
-              $xfer += $input->readListEnd();
-              $this->rolePrivileges[$key52] = $val53;
-            }
-            $xfer += $input->readMapEnd();
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->principalType);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRUCT) {
+            $this->grantInfo = new \metastore\PrivilegeGrantInfo();
+            $xfer += $this->grantInfo->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -2001,86 +2104,31 @@ class PrincipalPrivilegeSet {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('PrincipalPrivilegeSet');
-    if ($this->userPrivileges !== null) {
-      if (!is_array($this->userPrivileges)) {
+    $xfer += $output->writeStructBegin('HiveObjectPrivilege');
+    if ($this->hiveObject !== null) {
+      if (!is_object($this->hiveObject)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('userPrivileges', TType::MAP, 1);
-      {
-        $output->writeMapBegin(TType::STRING, TType::LST, count($this->userPrivileges));
-        {
-          foreach ($this->userPrivileges as $kiter60 => $viter61)
-          {
-            $xfer += $output->writeString($kiter60);
-            {
-              $output->writeListBegin(TType::STRUCT, count($viter61));
-              {
-                foreach ($viter61 as $iter62)
-                {
-                  $xfer += $iter62->write($output);
-                }
-              }
-              $output->writeListEnd();
-            }
-          }
-        }
-        $output->writeMapEnd();
-      }
+      $xfer += $output->writeFieldBegin('hiveObject', TType::STRUCT, 1);
+      $xfer += $this->hiveObject->write($output);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->groupPrivileges !== null) {
-      if (!is_array($this->groupPrivileges)) {
+    if ($this->principalName !== null) {
+      $xfer += $output->writeFieldBegin('principalName', TType::STRING, 2);
+      $xfer += $output->writeString($this->principalName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->principalType !== null) {
+      $xfer += $output->writeFieldBegin('principalType', TType::I32, 3);
+      $xfer += $output->writeI32($this->principalType);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->grantInfo !== null) {
+      if (!is_object($this->grantInfo)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('groupPrivileges', TType::MAP, 2);
-      {
-        $output->writeMapBegin(TType::STRING, TType::LST, count($this->groupPrivileges));
-        {
-          foreach ($this->groupPrivileges as $kiter63 => $viter64)
-          {
-            $xfer += $output->writeString($kiter63);
-            {
-              $output->writeListBegin(TType::STRUCT, count($viter64));
-              {
-                foreach ($viter64 as $iter65)
-                {
-                  $xfer += $iter65->write($output);
-                }
-              }
-              $output->writeListEnd();
-            }
-          }
-        }
-        $output->writeMapEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->rolePrivileges !== null) {
-      if (!is_array($this->rolePrivileges)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('rolePrivileges', TType::MAP, 3);
-      {
-        $output->writeMapBegin(TType::STRING, TType::LST, count($this->rolePrivileges));
-        {
-          foreach ($this->rolePrivileges as $kiter66 => $viter67)
-          {
-            $xfer += $output->writeString($kiter66);
-            {
-              $output->writeListBegin(TType::STRUCT, count($viter67));
-              {
-                foreach ($viter67 as $iter68)
-                {
-                  $xfer += $iter68->write($output);
-                }
-              }
-              $output->writeListEnd();
-            }
-          }
-        }
-        $output->writeMapEnd();
-      }
+      $xfer += $output->writeFieldBegin('grantInfo', TType::STRUCT, 4);
+      $xfer += $this->grantInfo->write($output);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -2090,55 +2138,37 @@ class PrincipalPrivilegeSet {
 
 }
 
-class GrantRevokePrivilegeRequest {
+class PrivilegeBag {
   static $_TSPEC;
 
   /**
-   * @var int
-   */
-  public $requestType = null;
-  /**
-   * @var \metastore\PrivilegeBag
+   * @var \metastore\HiveObjectPrivilege[]
    */
   public $privileges = null;
-  /**
-   * @var bool
-   */
-  public $revokeGrantOption = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'requestType',
-          'type' => TType::I32,
-          ),
-        2 => array(
           'var' => 'privileges',
-          'type' => TType::STRUCT,
-          'class' => '\metastore\PrivilegeBag',
-          ),
-        3 => array(
-          'var' => 'revokeGrantOption',
-          'type' => TType::BOOL,
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\metastore\HiveObjectPrivilege',
+            ),
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['requestType'])) {
-        $this->requestType = $vals['requestType'];
-      }
       if (isset($vals['privileges'])) {
         $this->privileges = $vals['privileges'];
       }
-      if (isset($vals['revokeGrantOption'])) {
-        $this->revokeGrantOption = $vals['revokeGrantOption'];
-      }
     }
   }
 
   public function getName() {
-    return 'GrantRevokePrivilegeRequest';
+    return 'PrivilegeBag';
   }
 
   public function read($input)
@@ -2157,23 +2187,19 @@ class GrantRevokePrivilegeRequest {
       switch ($fid)
       {
         case 1:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->requestType);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->privileges = new \metastore\PrivilegeBag();
-            $xfer += $this->privileges->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->revokeGrantOption);
+          if ($ftype == TType::LST) {
+            $this->privileges = array();
+            $_size14 = 0;
+            $_etype17 = 0;
+            $xfer += $input->readListBegin($_etype17, $_size14);
+            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
+            {
+              $elem19 = null;
+              $elem19 = new \metastore\HiveObjectPrivilege();
+              $xfer += $elem19->read($input);
+              $this->privileges []= $elem19;
+            }
+            $xfer += $input->readListEnd();
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -2190,23 +2216,22 @@ class GrantRevokePrivilegeRequest {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('GrantRevokePrivilegeRequest');
-    if ($this->requestType !== null) {
-      $xfer += $output->writeFieldBegin('requestType', TType::I32, 1);
-      $xfer += $output->writeI32($this->requestType);
-      $xfer += $output->writeFieldEnd();
-    }
+    $xfer += $output->writeStructBegin('PrivilegeBag');
     if ($this->privileges !== null) {
-      if (!is_object($this->privileges)) {
+      if (!is_array($this->privileges)) {
         throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
       }
-      $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 2);
-      $xfer += $this->privileges->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->revokeGrantOption !== null) {
-      $xfer += $output->writeFieldBegin('revokeGrantOption', TType::BOOL, 3);
-      $xfer += $output->writeBool($this->revokeGrantOption);
+      $xfer += $output->writeFieldBegin('privileges', TType::LST, 1);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->privileges));
+        {
+          foreach ($this->privileges as $iter20)
+          {
+            $xfer += $iter20->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -2216,32 +2241,93 @@ class GrantRevokePrivilegeRequest {
 
 }
 
-class GrantRevokePrivilegeResponse {
+class PrincipalPrivilegeSet {
   static $_TSPEC;
 
   /**
-   * @var bool
+   * @var array
    */
-  public $success = null;
+  public $userPrivileges = null;
+  /**
+   * @var array
+   */
+  public $groupPrivileges = null;
+  /**
+   * @var array
+   */
+  public $rolePrivileges = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'success',
-          'type' => TType::BOOL,
+          'var' => 'userPrivileges',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::LST,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::LST,
+            'etype' => TType::STRUCT,
+            'elem' => array(
+              'type' => TType::STRUCT,
+              'class' => '\metastore\PrivilegeGrantInfo',
+              ),
+            ),
+          ),
+        2 => array(
+          'var' => 'groupPrivileges',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::LST,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::LST,
+            'etype' => TType::STRUCT,
+            'elem' => array(
+              'type' => TType::STRUCT,
+              'class' => '\metastore\PrivilegeGrantInfo',
+              ),
+            ),
+          ),
+        3 => array(
+          'var' => 'rolePrivileges',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::LST,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::LST,
+            'etype' => TType::STRUCT,
+            'elem' => array(
+              'type' => TType::STRUCT,
+              'class' => '\metastore\PrivilegeGrantInfo',
+              ),
+            ),
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
+      if (isset($vals['userPrivileges'])) {
+        $this->userPrivileges = $vals['userPrivileges'];
+      }
+      if (isset($vals['groupPrivileges'])) {
+        $this->groupPrivileges = $vals['groupPrivileges'];
+      }
+      if (isset($vals['rolePrivileges'])) {
+        $this->rolePrivileges = $vals['rolePrivileges'];
       }
     }
   }
 
   public function getName() {
-    return 'GrantRevokePrivilegeResponse';
+    return 'PrincipalPrivilegeSet';
   }
 
   public function read($input)
@@ -2260,28 +2346,190 @@ class GrantRevokePrivilegeResponse {
       switch ($fid)
       {
         case 1:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->success);
+          if ($ftype == TType::MAP) {
+            $this->userPrivileges = array();
+            $_size21 = 0;
+            $_ktype22 = 0;
+            $_vtype23 = 0;
+            $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21);
+            for ($_i25 = 0; $_i25 < $_size21; ++$_i25)
+            {
+              $key26 = '';
+              $val27 = array();
+              $xfer += $input->readString($key26);
+              $val27 = array();
+              $_size28 = 0;
+              $_etype31 = 0;
+              $xfer += $input->readListBegin($_etype31, $_size28);
+              for ($_i32 = 0; $_i32 < $_size28; ++$_i32)
+              {
+                $elem33 = null;
+                $elem33 = new \metastore\PrivilegeGrantInfo();
+                $xfer += $elem33->read($input);
+                $val27 []= $elem33;
+              }
+              $xfer += $input->readListEnd();
+              $this->userPrivileges[$key26] = $val27;
+            }
+            $xfer += $input->readMapEnd();
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
+        case 2:
+          if ($ftype == TType::MAP) {
+            $this->groupPrivileges = array();
+            $_size34 = 0;
+            $_ktype35 = 0;
+            $_vtype36 = 0;
+            $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34);
+            for ($_i38 = 0; $_i38 < $_size34; ++$_i38)
+            {
+              $key39 = '';
+              $val40 = array();
+              $xfer += $input->readString($key39);
+              $val40 = array();
+              $_size41 = 0;
+              $_etype44 = 0;
+              $xfer += $input->readListBegin($_etype44, $_size41);
+              for ($_i45 = 0; $_i45 < $_size41; ++$_i45)
+              {
+                $elem46 = null;
+                $elem46 = new \metastore\PrivilegeGrantInfo();
+                $xfer += $elem46->read($input);
+                $val40 []= $elem46;
+              }
+              $xfer += $input->readListEnd();
+              $this->groupPrivileges[$key39] = $val40;
+            }
+            $xfer += $input->readMapEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::MAP) {
+            $this->rolePrivileges = array();
+            $_size47 = 0;
+            $_ktype48 = 0;
+            $_vtype49 = 0;
+            $xfer += $input->readMapBegin($_ktype48, $_vtype49, $_size47);
+            for ($_i51 = 0; $_i51 < $_size47; ++$_i51)
+            {
+              $key52 = '';
+              $val53 = array();
+              $xfer += $input->readString($key52);
+              $val53 = array();
+              $_size54 = 0;
+              $_etype57 = 0;
+              $xfer += $input->readListBegin($_etype57, $_size54);
+              for ($_i58 = 0; $_i58 < $_size54; ++$_i58)
+              {
+                $elem59 = null;
+                $elem59 = new \metastore\PrivilegeGrantInfo();
+                $xfer += $elem59->read($input);
+                $val53 []= $elem59;
+              }
+              $xfer += $input->readListEnd();
+              $this->rolePrivileges[$key52] = $val53;
+            }
+            $xfer += $input->readMapEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('GrantRevokePrivilegeResponse');
-    if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::BOOL, 1);
-      $xfer += $output->writeBool($this->success);
+    $xfer += $output->writeStructBegin('PrincipalPrivilegeSet');
+    if ($this->userPrivileges !== null) {
+      if (!is_array($this->userPrivileges)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('userPrivileges', TType::MAP, 1);
+      {
+        $output->writeMapBegin(TType::STRING, TType::LST, count($this->userPrivileges));
+        {
+          foreach ($this->userPrivileges as $kiter60 => $viter61)
+          {
+            $xfer += $output->writeString($kiter60);
+            {
+              $output->writeListBegin(TType::STRUCT, count($viter61));
+              {
+                foreach ($viter61 as $iter62)
+                {
+                  $xfer += $iter62->write($output);
+                }
+              }
+              $output->writeListEnd();
+            }
+          }
+        }
+        $output->writeMapEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->groupPrivileges !== null) {
+      if (!is_array($this->groupPrivileges)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('groupPrivileges', TType::MAP, 2);
+      {
+        $output->writeMapBegin(TType::STRING, TType::LST, count($this->groupPrivileges));
+        {
+          foreach ($this->groupPrivileges as $kiter63 => $viter64)
+          {
+            $xfer += $output->writeString($kiter63);
+            {
+              $output->writeListBegin(TType::STRUCT, count($viter64));
+              {
+                foreach ($viter64 as $iter65)
+                {
+                  $xfer += $iter65->write($output);
+                }
+              }
+              $output->writeListEnd();
+            }
+          }
+        }
+        $output->writeMapEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->rolePrivileges !== null) {
+      if (!is_array($this->rolePrivileges)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('rolePrivileges', TType::MAP, 3);
+      {
+        $output->writeMapBegin(TType::STRING, TType::LST, count($this->rolePrivileges));
+        {
+          foreach ($this->rolePrivileges as $kiter66 => $viter67)
+          {
+            $xfer += $output->writeString($kiter66);
+            {
+              $output->writeListBegin(TType::STRUCT, count($viter67));
+              {
+                foreach ($viter67 as $iter68)
+                {
+                  $xfer += $iter68->write($output);
+                }
+              }
+              $output->writeListEnd();
+            }
+          }
+        }
+        $output->writeMapEnd();
+      }
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -2291,54 +2539,55 @@ class GrantRevokePrivilegeResponse {
 
 }
 
-class Role {
+class GrantRevokePrivilegeRequest {
   static $_TSPEC;
 
   /**
-   * @var string
+   * @var int
    */
-  public $roleName = null;
+  public $requestType = null;
   /**
-   * @var int
+   * @var \metastore\PrivilegeBag
    */
-  public $createTime = null;
+  public $privileges = null;
   /**
-   * @var string
+   * @var bool
    */
-  public $ownerName = null;
+  public $revokeGrantOption = null;
 
   public function __construct($vals=null) {
     if (!isset(self::$_TSPEC)) {
       self::$_TSPEC = array(
         1 => array(
-          'var' => 'roleName',
-          'type' => TType::STRING,
+          'var' => 'requestType',
+          'type' => TType::I32,
           ),
         2 => array(
-          'var' => 'createTime',
-          'type' => TType::I32,
+          'var' => 'privileges',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\PrivilegeBag',
           ),
         3 => array(
-          'var' => 'ownerName',
-          'type' => TType::STRING,
+          'var' => 'revokeGrantOption',
+          'type' => TType::BOOL,
           ),
         );
     }
     if (is_array($vals)) {
-      if (isset($vals['roleName'])) {
-        $this->roleName = $vals['roleName'];
+      if (isset($vals['requestType'])) {
+        $this->requestType = $vals['requestType'];
       }
-      if (isset($vals['createTime'])) {
-        $this->createTime = $vals['createTime'];
+      if (isset($vals['privileges'])) {
+        $this->privileges = $vals['privileges'];
       }
-      if (isset($vals['ownerName'])) {
-        $this->ownerName = $vals['ownerName'];
+      if (isset($vals['revokeGrantOption'])) {
+        $this->revokeGrantOption = $vals['revokeGrantOption'];
       }
     }
   }
 
   public function getName() {
-    return 'Role';
+    return 'GrantRevokePrivilegeRequest';
   }
 
   public function read($input)
@@ -2357,22 +2606,23 @@ class Role {
       switch ($fid)
       {
         case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->roleName);
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->requestType);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 2:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->createTime);
+          if ($ftype == TType::STRUCT) {
+            $this->privileges = new \metastore\PrivilegeBag();
+            $xfer += $this->privileges->read($input);
           } else {
             $xfer += $input->skip($ftype);
           }
           break;
         case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->ownerName);
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->revokeGrantOption);
           } else {
             $xfer += $input->skip($ftype);
           }
@@ -2389,20 +2639,23 @@ class Role {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('Role');
-    if ($this->roleName !== null) {
-      $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1);
-      $xfer += $output->writeString($this->roleName);
+    $xfer += $output->writeStructBegin('GrantRevokePrivilegeRequest');
+    if ($this->requestType !== null) {
+      $xfer += $output->writeFieldBegin('requestType', TType::I32, 1);
+      $xfer += $output->writeI32($this->requestType);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->createTime !== null) {
-      $xfer += $output->writeFieldBegin('createTime', TType::I32, 2);
-      $xfer += $output->writeI32($this->createTime);
+    if ($this->privileges !== null) {
+      if (!is_object($this->privileges)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 2);
+      $xfer += $this->privileges->write($output);
       $xfer += $output->writeFieldEnd();
     }
-    if ($this->ownerName !== null) {
-      $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 3);
-      $xfer += $output->writeString($this->ownerName);
+    if ($this->revokeGrantOption !== null) {
+      $xfer += $output->writeFieldBegin('revokeGrantOption', TType::BOOL, 3);
+      $xfer += $output->writeBool($this->revokeGrantOption);
       $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
@@ -2412,34 +2665,230 @@ class Role {
 
 }
 
-class RolePrincipalGrant {
+class GrantRevokePrivilegeResponse {
   static $_TSPEC;
 
   /**
-   * @var string
-   */
-  public $roleName = null;
-  /**
-   * @var string
-   */
-  public $principalName = null;
-  /**
-   * @var int
-   */
-  public $principalType = null;
-  /**
    * @var bool
    */
-  public $grantOption = null;
-  /**
-   * @var int
-   */
-  public $grantTime = null;
-  /**
-   * @var string
-   */
-  public $grantorName = null;
-  /**
+  public $success = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'GrantRevokePrivilegeResponse';
+  }
+
+  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::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } 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('GrantRevokePrivilegeResponse');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Role {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $roleName = null;
+  /**
+   * @var int
+   */
+  public $createTime = null;
+  /**
+   * @var string
+   */
+  public $ownerName = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'roleName',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'createTime',
+          'type' => TType::I32,
+          ),
+        3 => array(
+          'var' => 'ownerName',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['roleName'])) {
+        $this->roleName = $vals['roleName'];
+      }
+      if (isset($vals['createTime'])) {
+        $this->createTime = $vals['createTime'];
+      }
+      if (isset($vals['ownerName'])) {
+        $this->ownerName = $vals['ownerName'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Role';
+  }
+
+  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->roleName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->createTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->ownerName);
+          } 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('Role');
+    if ($this->roleName !== null) {
+      $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1);
+      $xfer += $output->writeString($this->roleName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->createTime !== null) {
+      $xfer += $output->writeFieldBegin('createTime', TType::I32, 2);
+      $xfer += $output->writeI32($this->createTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ownerName !== null) {
+      $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 3);
+      $xfer += $output->writeString($this->ownerName);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class RolePrincipalGrant {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $roleName = null;
+  /**
+   * @var string
+   */
+  public $principalName = null;
+  /**
+   * @var int
+   */
+  public $principalType = null;
+  /**
+   * @var bool
+   */
+  public $grantOption = null;
+  /**
+   * @var int
+   */
+  public $grantTime = null;
+  /**
+   * @var string
+   */
+  public $grantorName = null;
+  /**
    * @var int
    */
   public $grantorPrincipalType = null;
@@ -2979,24 +3428,1524 @@ class GetPrincipalsInRoleResponse {
 
   public function write($output) {
     $xfer = 0;
-    $xfer += $output->writeStructBegin('GetPrincipalsInRoleResponse');
-    if ($this->principalGrants !== null) {
-      if (!is_array($this->principalGrants)) {
+    $xfer += $output->writeStructBegin('GetPrincipalsInRoleResponse');
+    if ($this->principalGrants !== null) {
+      if (!is_array($this->principalGrants)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('principalGrants', TType::LST, 1);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->principalGrants));
+        {
+          foreach ($this->principalGrants as $iter82)
+          {
+            $xfer += $iter82->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class GrantRevokeRoleRequest {
+  static $_TSPEC;
+
+  /**
+   * @var int
+   */
+  public $requestType = null;
+  /**
+   * @var string
+   */
+  public $roleName = null;
+  /**
+   * @var string
+   */
+  public $principalName = null;
+  /**
+   * @var int
+   */
+  public $principalType = null;
+  /**
+   * @var string
+   */
+  public $grantor = null;
+  /**
+   * @var int
+   */
+  public $grantorType = null;
+  /**
+   * @var bool
+   */
+  public $grantOption = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'requestType',
+          'type' => TType::I32,
+          ),
+        2 => array(
+          'var' => 'roleName',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'principalName',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'principalType',
+          'type' => TType::I32,
+          ),
+        5 => array(
+          'var' => 'grantor',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'grantorType',
+          'type' => TType::I32,
+          ),
+        7 => array(
+          'var' => 'grantOption',
+          'type' => TType::BOOL,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['requestType'])) {
+        $this->requestType = $vals['requestType'];
+      }
+      if (isset($vals['roleName'])) {
+        $this->roleName = $vals['roleName'];
+      }
+      if (isset($vals['principalName'])) {
+        $this->principalName = $vals['principalName'];
+      }
+      if (isset($vals['principalType'])) {
+        $this->principalType = $vals['principalType'];
+      }
+      if (isset($vals['grantor'])) {
+        $this->grantor = $vals['grantor'];
+      }
+      if (isset($vals['grantorType'])) {
+        $this->grantorType = $vals['grantorType'];
+      }
+      if (isset($vals['grantOption'])) {
+        $this->grantOption = $vals['grantOption'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'GrantRevokeRoleRequest';
+  }
+
+  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::I32) {
+            $xfer += $input->readI32($this->requestType);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->roleName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->principalName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->principalType);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->grantor);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->grantorType);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->grantOption);
+          } 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('GrantRevokeRoleRequest');
+    if ($this->requestType !== null) {
+      $xfer += $output->writeFieldBegin('requestType', TType::I32, 1);
+      $xfer += $output->writeI32($this->requestType);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->roleName !== null) {
+      $xfer += $output->writeFieldBegin('roleName', TType::STRING, 2);
+      $xfer += $output->writeString($this->roleName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->principalName !== null) {
+      $xfer += $output->writeFieldBegin('principalName', TType::STRING, 3);
+      $xfer += $output->writeString($this->principalName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->principalType !== null) {
+      $xfer += $output->writeFieldBegin('principalType', TType::I32, 4);
+      $xfer += $output->writeI32($this->principalType);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->grantor !== null) {
+      $xfer += $output->writeFieldBegin('grantor', TType::STRING, 5);
+      $xfer += $output->writeString($this->grantor);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->grantorType !== null) {
+      $xfer += $output->writeFieldBegin('grantorType', TType::I32, 6);
+      $xfer += $output->writeI32($this->grantorType);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->grantOption !== null) {
+      $xfer += $output->writeFieldBegin('grantOption', TType::BOOL, 7);
+      $xfer += $output->writeBool($this->grantOption);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class GrantRevokeRoleResponse {
+  static $_TSPEC;
+
+  /**
+   * @var bool
+   */
+  public $success = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'success',
+          'type' => TType::BOOL,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['success'])) {
+        $this->success = $vals['success'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'GrantRevokeRoleResponse';
+  }
+
+  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::BOOL) {
+            $xfer += $input->readBool($this->success);
+          } 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('GrantRevokeRoleResponse');
+    if ($this->success !== null) {
+      $xfer += $output->writeFieldBegin('success', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->success);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class Database {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $name = null;
+  /**
+   * @var string
+   */
+  public $description = null;
+  /**
+   * @var string
+   */
+  public $locationUri = null;
+  /**
+   * @var array
+   */
+  public $parameters = null;
+  /**
+   * @var \metastore\PrincipalPrivilegeSet
+   */
+  public $privileges = null;
+  /**
+   * @var string
+   */
+  public $ownerName = null;
+  /**
+   * @var int
+   */
+  public $ownerType = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'name',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'description',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'locationUri',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'parameters',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::STRING,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        5 => array(
+          'var' => 'privileges',
+          'type' => TType::STRUCT,
+          'class' => '\metastore\PrincipalPrivilegeSet',
+          ),
+        6 => array(
+          'var' => 'ownerName',
+          'type' => TType::STRING,
+          ),
+        7 => array(
+          'var' => 'ownerType',
+          'type' => TType::I32,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
+      }
+      if (isset($vals['description'])) {
+        $this->description = $vals['description'];
+      }
+      if (isset($vals['locationUri'])) {
+        $this->locationUri = $vals['locationUri'];
+      }
+      if (isset($vals['parameters'])) {
+        $this->parameters = $vals['parameters'];
+      }
+      if (isset($vals['privileges'])) {
+        $this->privileges = $vals['privileges'];
+      }
+      if (isset($vals['ownerName'])) {
+        $this->ownerName = $vals['ownerName'];
+      }
+      if (isset($vals['ownerType'])) {
+        $this->ownerType = $vals['ownerType'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'Database';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->name);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->description);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->locationUri);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::MAP) {
+            $this->parameters = array();
+            $_size83 = 0;
+            $_ktype84 = 0;
+            $_vtype85 = 0;
+            $xfer += $input->readMapBegin($_ktype84, $_vtype85, $_size83);
+            for ($_i87 = 0; $_i87 < $_size83; ++$_i87)
+            {
+              $key88 = '';
+              $val89 = '';
+              $xfer += $input->readString($key88);
+              $xfer += $input->readString($val89);
+              $this->parameters[$key88] = $val89;
+            }
+            $xfer += $input->readMapEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRUCT) {
+            $this->privileges = new \metastore\PrincipalPrivilegeSet();
+            $xfer += $this->privileges->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->ownerName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->ownerType);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('Database');
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+      $xfer += $output->writeString($this->name);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->description !== null) {
+      $xfer += $output->writeFieldBegin('description', TType::STRING, 2);
+      $xfer += $output->writeString($this->description);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->locationUri !== null) {
+      $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3);
+      $xfer += $output->writeString($this->locationUri);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->parameters !== null) {
+      if (!is_array($this->parameters)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('parameters', TType::MAP, 4);
+      {
+        $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters));
+        {
+          foreach ($this->parameters as $kiter90 => $viter91)
+          {
+            $xfer += $output->writeString($kiter90);
+            $xfer += $output->writeString($viter91);
+          }
+        }
+        $output->writeMapEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->privileges !== null) {
+      if (!is_object($this->privileges)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 5);
+      $xfer += $this->privileges->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ownerName !== null) {
+      $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 6);
+      $xfe

<TRUNCATED>

Mime
View raw message