ThriftHadoopFileSystem.php
上传用户:quxuerui
上传日期:2018-01-08
资源大小:41811k
文件大小:131k
- public $success = null;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::STRING,
- ),
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_read_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->success);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_read_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
- $xfer += $output->writeString($this->success);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_close_args {
- static $_TSPEC;
- public $out = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'out',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftHandle',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['out'])) {
- $this->out = $vals['out'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_close_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->out = new ThriftHandle();
- $xfer += $this->out->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_close_args');
- if ($this->out !== null) {
- if (!is_object($this->out)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('out', TType::STRUCT, 1);
- $xfer += $this->out->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_close_result {
- static $_TSPEC;
- public $success = null;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::BOOL,
- ),
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_close_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->success);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_close_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
- $xfer += $output->writeBool($this->success);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_rm_args {
- static $_TSPEC;
- public $path = null;
- public $recursive = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'path',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- 2 => array(
- 'var' => 'recursive',
- 'type' => TType::BOOL,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['path'])) {
- $this->path = $vals['path'];
- }
- if (isset($vals['recursive'])) {
- $this->recursive = $vals['recursive'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_rm_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->path = new Pathname();
- $xfer += $this->path->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->recursive);
- } 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('ThriftHadoopFileSystem_rm_args');
- if ($this->path !== null) {
- if (!is_object($this->path)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
- $xfer += $this->path->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->recursive !== null) {
- $xfer += $output->writeFieldBegin('recursive', TType::BOOL, 2);
- $xfer += $output->writeBool($this->recursive);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_rm_result {
- static $_TSPEC;
- public $success = null;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::BOOL,
- ),
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_rm_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->success);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rm_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
- $xfer += $output->writeBool($this->success);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_rename_args {
- static $_TSPEC;
- public $path = null;
- public $dest = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'path',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- 2 => array(
- 'var' => 'dest',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['path'])) {
- $this->path = $vals['path'];
- }
- if (isset($vals['dest'])) {
- $this->dest = $vals['dest'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_rename_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->path = new Pathname();
- $xfer += $this->path->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRUCT) {
- $this->dest = new Pathname();
- $xfer += $this->dest->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rename_args');
- if ($this->path !== null) {
- if (!is_object($this->path)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
- $xfer += $this->path->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->dest !== null) {
- if (!is_object($this->dest)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('dest', TType::STRUCT, 2);
- $xfer += $this->dest->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_rename_result {
- static $_TSPEC;
- public $success = null;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::BOOL,
- ),
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_rename_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->success);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rename_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
- $xfer += $output->writeBool($this->success);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_mkdirs_args {
- static $_TSPEC;
- public $path = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'path',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['path'])) {
- $this->path = $vals['path'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_mkdirs_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->path = new Pathname();
- $xfer += $this->path->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_mkdirs_args');
- if ($this->path !== null) {
- if (!is_object($this->path)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
- $xfer += $this->path->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_mkdirs_result {
- static $_TSPEC;
- public $success = null;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::BOOL,
- ),
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_mkdirs_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->success);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_mkdirs_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
- $xfer += $output->writeBool($this->success);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_exists_args {
- static $_TSPEC;
- public $path = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'path',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['path'])) {
- $this->path = $vals['path'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_exists_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->path = new Pathname();
- $xfer += $this->path->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_exists_args');
- if ($this->path !== null) {
- if (!is_object($this->path)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
- $xfer += $this->path->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_exists_result {
- static $_TSPEC;
- public $success = null;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::BOOL,
- ),
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_exists_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::BOOL) {
- $xfer += $input->readBool($this->success);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_exists_result');
- if ($this->success !== null) {
- $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
- $xfer += $output->writeBool($this->success);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_stat_args {
- static $_TSPEC;
- public $path = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'path',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['path'])) {
- $this->path = $vals['path'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_stat_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->path = new Pathname();
- $xfer += $this->path->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_stat_args');
- if ($this->path !== null) {
- if (!is_object($this->path)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
- $xfer += $this->path->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_stat_result {
- static $_TSPEC;
- public $success = null;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::STRUCT,
- 'class' => 'FileStatus',
- ),
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_stat_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::STRUCT) {
- $this->success = new FileStatus();
- $xfer += $this->success->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_stat_result');
- if ($this->success !== null) {
- if (!is_object($this->success)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
- $xfer += $this->success->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_listStatus_args {
- static $_TSPEC;
- public $path = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'path',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['path'])) {
- $this->path = $vals['path'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_listStatus_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->path = new Pathname();
- $xfer += $this->path->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_listStatus_args');
- if ($this->path !== null) {
- if (!is_object($this->path)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
- $xfer += $this->path->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_listStatus_result {
- static $_TSPEC;
- public $success = null;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'FileStatus',
- ),
- ),
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_listStatus_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::LST) {
- $this->success = array();
- $_size14 = 0;
- $_etype17 = 0;
- $xfer += $input->readListBegin($_etype17, $_size14);
- for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
- {
- $elem19 = null;
- $elem19 = new FileStatus();
- $xfer += $elem19->read($input);
- $this->success []= $elem19;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_listStatus_result');
- if ($this->success !== null) {
- if (!is_array($this->success)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('success', TType::LST, 0);
- {
- $output->writeListBegin(TType::STRUCT, count($this->success));
- {
- foreach ($this->success as $iter20)
- {
- $xfer += $iter20->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_chmod_args {
- static $_TSPEC;
- public $path = null;
- public $mode = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'path',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- 2 => array(
- 'var' => 'mode',
- 'type' => TType::I16,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['path'])) {
- $this->path = $vals['path'];
- }
- if (isset($vals['mode'])) {
- $this->mode = $vals['mode'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_chmod_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->path = new Pathname();
- $xfer += $this->path->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I16) {
- $xfer += $input->readI16($this->mode);
- } 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('ThriftHadoopFileSystem_chmod_args');
- if ($this->path !== null) {
- if (!is_object($this->path)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
- $xfer += $this->path->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->mode !== null) {
- $xfer += $output->writeFieldBegin('mode', TType::I16, 2);
- $xfer += $output->writeI16($this->mode);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_chmod_result {
- static $_TSPEC;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_chmod_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chmod_result');
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_chown_args {
- static $_TSPEC;
- public $path = null;
- public $owner = null;
- public $group = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'path',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- 2 => array(
- 'var' => 'owner',
- 'type' => TType::STRING,
- ),
- 3 => array(
- 'var' => 'group',
- 'type' => TType::STRING,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['path'])) {
- $this->path = $vals['path'];
- }
- if (isset($vals['owner'])) {
- $this->owner = $vals['owner'];
- }
- if (isset($vals['group'])) {
- $this->group = $vals['group'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_chown_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->path = new Pathname();
- $xfer += $this->path->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->owner);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::STRING) {
- $xfer += $input->readString($this->group);
- } 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('ThriftHadoopFileSystem_chown_args');
- if ($this->path !== null) {
- if (!is_object($this->path)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
- $xfer += $this->path->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->owner !== null) {
- $xfer += $output->writeFieldBegin('owner', TType::STRING, 2);
- $xfer += $output->writeString($this->owner);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->group !== null) {
- $xfer += $output->writeFieldBegin('group', TType::STRING, 3);
- $xfer += $output->writeString($this->group);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_chown_result {
- static $_TSPEC;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_chown_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chown_result');
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_setReplication_args {
- static $_TSPEC;
- public $path = null;
- public $replication = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'path',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- 2 => array(
- 'var' => 'replication',
- 'type' => TType::I16,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['path'])) {
- $this->path = $vals['path'];
- }
- if (isset($vals['replication'])) {
- $this->replication = $vals['replication'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_setReplication_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->path = new Pathname();
- $xfer += $this->path->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I16) {
- $xfer += $input->readI16($this->replication);
- } 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('ThriftHadoopFileSystem_setReplication_args');
- if ($this->path !== null) {
- if (!is_object($this->path)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
- $xfer += $this->path->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->replication !== null) {
- $xfer += $output->writeFieldBegin('replication', TType::I16, 2);
- $xfer += $output->writeI16($this->replication);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_setReplication_result {
- static $_TSPEC;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_setReplication_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setReplication_result');
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_getFileBlockLocations_args {
- static $_TSPEC;
- public $path = null;
- public $start = null;
- public $length = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'path',
- 'type' => TType::STRUCT,
- 'class' => 'Pathname',
- ),
- 2 => array(
- 'var' => 'start',
- 'type' => TType::I64,
- ),
- 3 => array(
- 'var' => 'length',
- 'type' => TType::I64,
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['path'])) {
- $this->path = $vals['path'];
- }
- if (isset($vals['start'])) {
- $this->start = $vals['start'];
- }
- if (isset($vals['length'])) {
- $this->length = $vals['length'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_getFileBlockLocations_args';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->path = new Pathname();
- $xfer += $this->path->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 2:
- if ($ftype == TType::I64) {
- $xfer += $input->readI64($this->start);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 3:
- if ($ftype == TType::I64) {
- $xfer += $input->readI64($this->length);
- } 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('ThriftHadoopFileSystem_getFileBlockLocations_args');
- if ($this->path !== null) {
- if (!is_object($this->path)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
- $xfer += $this->path->write($output);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->start !== null) {
- $xfer += $output->writeFieldBegin('start', TType::I64, 2);
- $xfer += $output->writeI64($this->start);
- $xfer += $output->writeFieldEnd();
- }
- if ($this->length !== null) {
- $xfer += $output->writeFieldBegin('length', TType::I64, 3);
- $xfer += $output->writeI64($this->length);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystem_getFileBlockLocations_result {
- static $_TSPEC;
- public $success = null;
- public $ouch = null;
- public function __construct($vals=null) {
- if (!isset(self::$_TSPEC)) {
- self::$_TSPEC = array(
- 0 => array(
- 'var' => 'success',
- 'type' => TType::LST,
- 'etype' => TType::STRUCT,
- 'elem' => array(
- 'type' => TType::STRUCT,
- 'class' => 'BlockLocation',
- ),
- ),
- 1 => array(
- 'var' => 'ouch',
- 'type' => TType::STRUCT,
- 'class' => 'ThriftIOException',
- ),
- );
- }
- if (is_array($vals)) {
- if (isset($vals['success'])) {
- $this->success = $vals['success'];
- }
- if (isset($vals['ouch'])) {
- $this->ouch = $vals['ouch'];
- }
- }
- }
- public function getName() {
- return 'ThriftHadoopFileSystem_getFileBlockLocations_result';
- }
- public function read($input)
- {
- $xfer = 0;
- $fname = null;
- $ftype = 0;
- $fid = 0;
- $xfer += $input->readStructBegin($fname);
- while (true)
- {
- $xfer += $input->readFieldBegin($fname, $ftype, $fid);
- if ($ftype == TType::STOP) {
- break;
- }
- switch ($fid)
- {
- case 0:
- if ($ftype == TType::LST) {
- $this->success = array();
- $_size21 = 0;
- $_etype24 = 0;
- $xfer += $input->readListBegin($_etype24, $_size21);
- for ($_i25 = 0; $_i25 < $_size21; ++$_i25)
- {
- $elem26 = null;
- $elem26 = new BlockLocation();
- $xfer += $elem26->read($input);
- $this->success []= $elem26;
- }
- $xfer += $input->readListEnd();
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- case 1:
- if ($ftype == TType::STRUCT) {
- $this->ouch = new ThriftIOException();
- $xfer += $this->ouch->read($input);
- } else {
- $xfer += $input->skip($ftype);
- }
- break;
- default:
- $xfer += $input->skip($ftype);
- break;
- }
- $xfer += $input->readFieldEnd();
- }
- $xfer += $input->readStructEnd();
- return $xfer;
- }
- public function write($output) {
- $xfer = 0;
- $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_getFileBlockLocations_result');
- if ($this->success !== null) {
- if (!is_array($this->success)) {
- throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
- }
- $xfer += $output->writeFieldBegin('success', TType::LST, 0);
- {
- $output->writeListBegin(TType::STRUCT, count($this->success));
- {
- foreach ($this->success as $iter27)
- {
- $xfer += $iter27->write($output);
- }
- }
- $output->writeListEnd();
- }
- $xfer += $output->writeFieldEnd();
- }
- if ($this->ouch !== null) {
- $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
- $xfer += $this->ouch->write($output);
- $xfer += $output->writeFieldEnd();
- }
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
- }
- class ThriftHadoopFileSystemProcessor {
- protected $handler_ = null;
- public function __construct($handler) {
- $this->handler_ = $handler;
- }
- public function process($input, $output) {
- $rseqid = 0;
- $fname = null;
- $mtype = 0;
- $input->readMessageBegin($fname, $mtype, $rseqid);
- $methodname = 'process_'.$fname;
- if (!method_exists($this, $methodname)) {
- $input->skip(TType::STRUCT);
- $input->readMessageEnd();
- $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD);
- $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid);
- $x->write($output);
- $output->writeMessageEnd();
- $output->getTransport()->flush();
- return;
- }
- $this->$methodname($rseqid, $input, $output);
- return true;
- }
- protected function process_setInactivityTimeoutPeriod($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result();
- $this->handler_->setInactivityTimeoutPeriod($args->periodInSeconds);
- $output->writeMessageBegin('setInactivityTimeoutPeriod', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_shutdown($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_shutdown_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_shutdown_result();
- $this->handler_->shutdown($args->status);
- $output->writeMessageBegin('shutdown', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_create($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_create_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_create_result();
- try {
- $result->success = $this->handler_->create($args->path);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('create', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_createFile($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_createFile_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_createFile_result();
- try {
- $result->success = $this->handler_->createFile($args->path, $args->mode, $args->overwrite, $args->bufferSize, $args->block_replication, $args->blocksize);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('createFile', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_open($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_open_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_open_result();
- try {
- $result->success = $this->handler_->open($args->path);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('open', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_append($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_append_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_append_result();
- try {
- $result->success = $this->handler_->append($args->path);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('append', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_write($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_write_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_write_result();
- try {
- $result->success = $this->handler_->write($args->handle, $args->data);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('write', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_read($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_read_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_read_result();
- try {
- $result->success = $this->handler_->read($args->handle, $args->offset, $args->size);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('read', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_close($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_close_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_close_result();
- try {
- $result->success = $this->handler_->close($args->out);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('close', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_rm($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_rm_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_rm_result();
- try {
- $result->success = $this->handler_->rm($args->path, $args->recursive);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('rm', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_rename($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_rename_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_rename_result();
- try {
- $result->success = $this->handler_->rename($args->path, $args->dest);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('rename', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_mkdirs($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_mkdirs_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_mkdirs_result();
- try {
- $result->success = $this->handler_->mkdirs($args->path);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('mkdirs', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_exists($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_exists_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_exists_result();
- try {
- $result->success = $this->handler_->exists($args->path);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('exists', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_stat($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_stat_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_stat_result();
- try {
- $result->success = $this->handler_->stat($args->path);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('stat', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_listStatus($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_listStatus_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_listStatus_result();
- try {
- $result->success = $this->handler_->listStatus($args->path);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('listStatus', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_chmod($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_chmod_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_chmod_result();
- try {
- $this->handler_->chmod($args->path, $args->mode);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('chmod', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_chown($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_chown_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_chown_result();
- try {
- $this->handler_->chown($args->path, $args->owner, $args->group);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('chown', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_setReplication($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_setReplication_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_setReplication_result();
- try {
- $this->handler_->setReplication($args->path, $args->replication);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('setReplication', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- protected function process_getFileBlockLocations($seqid, $input, $output) {
- $args = new ThriftHadoopFileSystem_getFileBlockLocations_args();
- $args->read($input);
- $input->readMessageEnd();
- $result = new ThriftHadoopFileSystem_getFileBlockLocations_result();
- try {
- $result->success = $this->handler_->getFileBlockLocations($args->path, $args->start, $args->length);
- } catch (ThriftIOException $ouch) {
- $result->ouch = $ouch;
- }
- $output->writeMessageBegin('getFileBlockLocations', TMessageType::REPLY, $seqid);
- $result->write($output);
- $output->getTransport()->flush();
- }
- }
- ?>