Beispiel #1
0
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 1:
                 if ($ftype == TType::LST) {
                     $this->fieldSchemas = array();
                     $_size202 = 0;
                     $_etype205 = 0;
                     $xfer += $input->readListBegin($_etype205, $_size202);
                     for ($_i206 = 0; $_i206 < $_size202; ++$_i206) {
                         $elem207 = null;
                         $elem207 = new \metastore\FieldSchema();
                         $xfer += $elem207->read($input);
                         $this->fieldSchemas[] = $elem207;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::MAP) {
                     $this->properties = array();
                     $_size208 = 0;
                     $_ktype209 = 0;
                     $_vtype210 = 0;
                     $xfer += $input->readMapBegin($_ktype209, $_vtype210, $_size208);
                     for ($_i212 = 0; $_i212 < $_size208; ++$_i212) {
                         $key213 = '';
                         $val214 = '';
                         $xfer += $input->readString($key213);
                         $xfer += $input->readString($val214);
                         $this->properties[$key213] = $val214;
                     }
                     $xfer += $input->readMapEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Beispiel #2
0
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 1:
                 if ($ftype == TType::LST) {
                     $this->fieldSchemas = array();
                     $_size151 = 0;
                     $_etype154 = 0;
                     $xfer += $input->readListBegin($_etype154, $_size151);
                     for ($_i155 = 0; $_i155 < $_size151; ++$_i155) {
                         $elem156 = null;
                         $elem156 = new \metastore\FieldSchema();
                         $xfer += $elem156->read($input);
                         $this->fieldSchemas[] = $elem156;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::MAP) {
                     $this->properties = array();
                     $_size157 = 0;
                     $_ktype158 = 0;
                     $_vtype159 = 0;
                     $xfer += $input->readMapBegin($_ktype158, $_vtype159, $_size157);
                     for ($_i161 = 0; $_i161 < $_size157; ++$_i161) {
                         $key162 = '';
                         $val163 = '';
                         $xfer += $input->readString($key162);
                         $xfer += $input->readString($val163);
                         $this->properties[$key162] = $val163;
                     }
                     $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 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();
                     $_size206 = 0;
                     $_etype209 = 0;
                     $xfer += $input->readListBegin($_etype209, $_size206);
                     for ($_i210 = 0; $_i210 < $_size206; ++$_i210) {
                         $elem211 = null;
                         $elem211 = new \metastore\FieldSchema();
                         $xfer += $elem211->read($input);
                         $this->success[] = $elem211;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == TType::STRUCT) {
                     $this->o1 = new \metastore\MetaException();
                     $xfer += $this->o1->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::STRUCT) {
                     $this->o2 = new \metastore\UnknownTableException();
                     $xfer += $this->o2->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::STRUCT) {
                     $this->o3 = new \metastore\UnknownDBException();
                     $xfer += $this->o3->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }