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->tableName); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::LST) { $this->columnFamilies = array(); $_size39 = 0; $_etype42 = 0; $xfer += $input->readListBegin($_etype42, $_size39); for ($_i43 = 0; $_i43 < $_size39; ++$_i43) { $elem44 = null; $elem44 = new ColumnDescriptor(); $xfer += $elem44->read($input); $this->columnFamilies[] = $elem44; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }
public function __construct($vals = null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array(1 => array('var' => 'name', 'type' => TType::STRING), 2 => array('var' => 'maxVersions', 'type' => TType::I32), 3 => array('var' => 'compression', 'type' => TType::STRING), 4 => array('var' => 'inMemory', 'type' => TType::BOOL), 5 => array('var' => 'bloomFilterType', 'type' => TType::STRING), 6 => array('var' => 'bloomFilterVectorSize', 'type' => TType::I32), 7 => array('var' => 'bloomFilterNbHashes', 'type' => TType::I32), 8 => array('var' => 'blockCacheEnabled', 'type' => TType::BOOL), 9 => array('var' => 'timeToLive', 'type' => TType::I32)); } if (is_array($vals)) { if (isset($vals['name'])) { $this->name = $vals['name']; } if (isset($vals['maxVersions'])) { $this->maxVersions = $vals['maxVersions']; } if (isset($vals['compression'])) { $this->compression = $vals['compression']; } if (isset($vals['inMemory'])) { $this->inMemory = $vals['inMemory']; } if (isset($vals['bloomFilterType'])) { $this->bloomFilterType = $vals['bloomFilterType']; } if (isset($vals['bloomFilterVectorSize'])) { $this->bloomFilterVectorSize = $vals['bloomFilterVectorSize']; } if (isset($vals['bloomFilterNbHashes'])) { $this->bloomFilterNbHashes = $vals['bloomFilterNbHashes']; } if (isset($vals['blockCacheEnabled'])) { $this->blockCacheEnabled = $vals['blockCacheEnabled']; } if (isset($vals['timeToLive'])) { $this->timeToLive = $vals['timeToLive']; } } }