source: proiecte/HadoopJUnit/hadoop-0.20.1/src/contrib/thriftfs/gen-php/ThriftHadoopFileSystem.php @ 176

Last change on this file since 176 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 131.2 KB
Line 
1<?php
2/**
3 * Autogenerated by Thrift
4 *
5 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6 */
7include_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
8
9include_once $GLOBALS['THRIFT_ROOT'].'/packages/hadoopfs/hadoopfs_types.php';
10
11interface ThriftHadoopFileSystemIf {
12  public function setInactivityTimeoutPeriod($periodInSeconds);
13  public function shutdown($status);
14  public function create($path);
15  public function createFile($path, $mode, $overwrite, $bufferSize, $block_replication, $blocksize);
16  public function open($path);
17  public function append($path);
18  public function write($handle, $data);
19  public function read($handle, $offset, $size);
20  public function close($out);
21  public function rm($path, $recursive);
22  public function rename($path, $dest);
23  public function mkdirs($path);
24  public function exists($path);
25  public function stat($path);
26  public function listStatus($path);
27  public function chmod($path, $mode);
28  public function chown($path, $owner, $group);
29  public function setReplication($path, $replication);
30  public function getFileBlockLocations($path, $start, $length);
31}
32
33class ThriftHadoopFileSystemClient implements ThriftHadoopFileSystemIf {
34  protected $input_ = null;
35  protected $output_ = null;
36
37  protected $seqid_ = 0;
38
39  public function __construct($input, $output=null) {
40    $this->input_ = $input;
41    $this->output_ = $output ? $output : $input;
42  }
43
44  public function setInactivityTimeoutPeriod($periodInSeconds)
45  {
46    $this->send_setInactivityTimeoutPeriod($periodInSeconds);
47    $this->recv_setInactivityTimeoutPeriod();
48  }
49
50  public function send_setInactivityTimeoutPeriod($periodInSeconds)
51  {
52    $args = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args();
53    $args->periodInSeconds = $periodInSeconds;
54    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
55    if ($bin_accel)
56    {
57      thrift_protocol_write_binary($this->output_, 'setInactivityTimeoutPeriod', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
58    }
59    else
60    {
61      $this->output_->writeMessageBegin('setInactivityTimeoutPeriod', TMessageType::CALL, $this->seqid_);
62      $args->write($this->output_);
63      $this->output_->writeMessageEnd();
64      $this->output_->getTransport()->flush();
65    }
66  }
67
68  public function recv_setInactivityTimeoutPeriod()
69  {
70    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
71    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result', $this->input_->isStrictRead());
72    else
73    {
74      $rseqid = 0;
75      $fname = null;
76      $mtype = 0;
77
78      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
79      if ($mtype == TMessageType::EXCEPTION) {
80        $x = new TApplicationException();
81        $x->read($this->input_);
82        $this->input_->readMessageEnd();
83        throw $x;
84      }
85      $result = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result();
86      $result->read($this->input_);
87      $this->input_->readMessageEnd();
88    }
89    return;
90  }
91
92  public function shutdown($status)
93  {
94    $this->send_shutdown($status);
95    $this->recv_shutdown();
96  }
97
98  public function send_shutdown($status)
99  {
100    $args = new ThriftHadoopFileSystem_shutdown_args();
101    $args->status = $status;
102    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
103    if ($bin_accel)
104    {
105      thrift_protocol_write_binary($this->output_, 'shutdown', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
106    }
107    else
108    {
109      $this->output_->writeMessageBegin('shutdown', TMessageType::CALL, $this->seqid_);
110      $args->write($this->output_);
111      $this->output_->writeMessageEnd();
112      $this->output_->getTransport()->flush();
113    }
114  }
115
116  public function recv_shutdown()
117  {
118    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
119    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_shutdown_result', $this->input_->isStrictRead());
120    else
121    {
122      $rseqid = 0;
123      $fname = null;
124      $mtype = 0;
125
126      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
127      if ($mtype == TMessageType::EXCEPTION) {
128        $x = new TApplicationException();
129        $x->read($this->input_);
130        $this->input_->readMessageEnd();
131        throw $x;
132      }
133      $result = new ThriftHadoopFileSystem_shutdown_result();
134      $result->read($this->input_);
135      $this->input_->readMessageEnd();
136    }
137    return;
138  }
139
140  public function create($path)
141  {
142    $this->send_create($path);
143    return $this->recv_create();
144  }
145
146  public function send_create($path)
147  {
148    $args = new ThriftHadoopFileSystem_create_args();
149    $args->path = $path;
150    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
151    if ($bin_accel)
152    {
153      thrift_protocol_write_binary($this->output_, 'create', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
154    }
155    else
156    {
157      $this->output_->writeMessageBegin('create', TMessageType::CALL, $this->seqid_);
158      $args->write($this->output_);
159      $this->output_->writeMessageEnd();
160      $this->output_->getTransport()->flush();
161    }
162  }
163
164  public function recv_create()
165  {
166    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
167    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_create_result', $this->input_->isStrictRead());
168    else
169    {
170      $rseqid = 0;
171      $fname = null;
172      $mtype = 0;
173
174      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
175      if ($mtype == TMessageType::EXCEPTION) {
176        $x = new TApplicationException();
177        $x->read($this->input_);
178        $this->input_->readMessageEnd();
179        throw $x;
180      }
181      $result = new ThriftHadoopFileSystem_create_result();
182      $result->read($this->input_);
183      $this->input_->readMessageEnd();
184    }
185    if ($result->success !== null) {
186      return $result->success;
187    }
188    if ($result->ouch !== null) {
189      throw $result->ouch;
190    }
191    throw new Exception("create failed: unknown result");
192  }
193
194  public function createFile($path, $mode, $overwrite, $bufferSize, $block_replication, $blocksize)
195  {
196    $this->send_createFile($path, $mode, $overwrite, $bufferSize, $block_replication, $blocksize);
197    return $this->recv_createFile();
198  }
199
200  public function send_createFile($path, $mode, $overwrite, $bufferSize, $block_replication, $blocksize)
201  {
202    $args = new ThriftHadoopFileSystem_createFile_args();
203    $args->path = $path;
204    $args->mode = $mode;
205    $args->overwrite = $overwrite;
206    $args->bufferSize = $bufferSize;
207    $args->block_replication = $block_replication;
208    $args->blocksize = $blocksize;
209    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
210    if ($bin_accel)
211    {
212      thrift_protocol_write_binary($this->output_, 'createFile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
213    }
214    else
215    {
216      $this->output_->writeMessageBegin('createFile', TMessageType::CALL, $this->seqid_);
217      $args->write($this->output_);
218      $this->output_->writeMessageEnd();
219      $this->output_->getTransport()->flush();
220    }
221  }
222
223  public function recv_createFile()
224  {
225    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
226    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_createFile_result', $this->input_->isStrictRead());
227    else
228    {
229      $rseqid = 0;
230      $fname = null;
231      $mtype = 0;
232
233      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
234      if ($mtype == TMessageType::EXCEPTION) {
235        $x = new TApplicationException();
236        $x->read($this->input_);
237        $this->input_->readMessageEnd();
238        throw $x;
239      }
240      $result = new ThriftHadoopFileSystem_createFile_result();
241      $result->read($this->input_);
242      $this->input_->readMessageEnd();
243    }
244    if ($result->success !== null) {
245      return $result->success;
246    }
247    if ($result->ouch !== null) {
248      throw $result->ouch;
249    }
250    throw new Exception("createFile failed: unknown result");
251  }
252
253  public function open($path)
254  {
255    $this->send_open($path);
256    return $this->recv_open();
257  }
258
259  public function send_open($path)
260  {
261    $args = new ThriftHadoopFileSystem_open_args();
262    $args->path = $path;
263    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
264    if ($bin_accel)
265    {
266      thrift_protocol_write_binary($this->output_, 'open', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
267    }
268    else
269    {
270      $this->output_->writeMessageBegin('open', TMessageType::CALL, $this->seqid_);
271      $args->write($this->output_);
272      $this->output_->writeMessageEnd();
273      $this->output_->getTransport()->flush();
274    }
275  }
276
277  public function recv_open()
278  {
279    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
280    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_open_result', $this->input_->isStrictRead());
281    else
282    {
283      $rseqid = 0;
284      $fname = null;
285      $mtype = 0;
286
287      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
288      if ($mtype == TMessageType::EXCEPTION) {
289        $x = new TApplicationException();
290        $x->read($this->input_);
291        $this->input_->readMessageEnd();
292        throw $x;
293      }
294      $result = new ThriftHadoopFileSystem_open_result();
295      $result->read($this->input_);
296      $this->input_->readMessageEnd();
297    }
298    if ($result->success !== null) {
299      return $result->success;
300    }
301    if ($result->ouch !== null) {
302      throw $result->ouch;
303    }
304    throw new Exception("open failed: unknown result");
305  }
306
307  public function append($path)
308  {
309    $this->send_append($path);
310    return $this->recv_append();
311  }
312
313  public function send_append($path)
314  {
315    $args = new ThriftHadoopFileSystem_append_args();
316    $args->path = $path;
317    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
318    if ($bin_accel)
319    {
320      thrift_protocol_write_binary($this->output_, 'append', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
321    }
322    else
323    {
324      $this->output_->writeMessageBegin('append', TMessageType::CALL, $this->seqid_);
325      $args->write($this->output_);
326      $this->output_->writeMessageEnd();
327      $this->output_->getTransport()->flush();
328    }
329  }
330
331  public function recv_append()
332  {
333    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
334    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_append_result', $this->input_->isStrictRead());
335    else
336    {
337      $rseqid = 0;
338      $fname = null;
339      $mtype = 0;
340
341      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
342      if ($mtype == TMessageType::EXCEPTION) {
343        $x = new TApplicationException();
344        $x->read($this->input_);
345        $this->input_->readMessageEnd();
346        throw $x;
347      }
348      $result = new ThriftHadoopFileSystem_append_result();
349      $result->read($this->input_);
350      $this->input_->readMessageEnd();
351    }
352    if ($result->success !== null) {
353      return $result->success;
354    }
355    if ($result->ouch !== null) {
356      throw $result->ouch;
357    }
358    throw new Exception("append failed: unknown result");
359  }
360
361  public function write($handle, $data)
362  {
363    $this->send_write($handle, $data);
364    return $this->recv_write();
365  }
366
367  public function send_write($handle, $data)
368  {
369    $args = new ThriftHadoopFileSystem_write_args();
370    $args->handle = $handle;
371    $args->data = $data;
372    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
373    if ($bin_accel)
374    {
375      thrift_protocol_write_binary($this->output_, 'write', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
376    }
377    else
378    {
379      $this->output_->writeMessageBegin('write', TMessageType::CALL, $this->seqid_);
380      $args->write($this->output_);
381      $this->output_->writeMessageEnd();
382      $this->output_->getTransport()->flush();
383    }
384  }
385
386  public function recv_write()
387  {
388    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
389    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_write_result', $this->input_->isStrictRead());
390    else
391    {
392      $rseqid = 0;
393      $fname = null;
394      $mtype = 0;
395
396      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
397      if ($mtype == TMessageType::EXCEPTION) {
398        $x = new TApplicationException();
399        $x->read($this->input_);
400        $this->input_->readMessageEnd();
401        throw $x;
402      }
403      $result = new ThriftHadoopFileSystem_write_result();
404      $result->read($this->input_);
405      $this->input_->readMessageEnd();
406    }
407    if ($result->success !== null) {
408      return $result->success;
409    }
410    if ($result->ouch !== null) {
411      throw $result->ouch;
412    }
413    throw new Exception("write failed: unknown result");
414  }
415
416  public function read($handle, $offset, $size)
417  {
418    $this->send_read($handle, $offset, $size);
419    return $this->recv_read();
420  }
421
422  public function send_read($handle, $offset, $size)
423  {
424    $args = new ThriftHadoopFileSystem_read_args();
425    $args->handle = $handle;
426    $args->offset = $offset;
427    $args->size = $size;
428    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
429    if ($bin_accel)
430    {
431      thrift_protocol_write_binary($this->output_, 'read', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
432    }
433    else
434    {
435      $this->output_->writeMessageBegin('read', TMessageType::CALL, $this->seqid_);
436      $args->write($this->output_);
437      $this->output_->writeMessageEnd();
438      $this->output_->getTransport()->flush();
439    }
440  }
441
442  public function recv_read()
443  {
444    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
445    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_read_result', $this->input_->isStrictRead());
446    else
447    {
448      $rseqid = 0;
449      $fname = null;
450      $mtype = 0;
451
452      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
453      if ($mtype == TMessageType::EXCEPTION) {
454        $x = new TApplicationException();
455        $x->read($this->input_);
456        $this->input_->readMessageEnd();
457        throw $x;
458      }
459      $result = new ThriftHadoopFileSystem_read_result();
460      $result->read($this->input_);
461      $this->input_->readMessageEnd();
462    }
463    if ($result->success !== null) {
464      return $result->success;
465    }
466    if ($result->ouch !== null) {
467      throw $result->ouch;
468    }
469    throw new Exception("read failed: unknown result");
470  }
471
472  public function close($out)
473  {
474    $this->send_close($out);
475    return $this->recv_close();
476  }
477
478  public function send_close($out)
479  {
480    $args = new ThriftHadoopFileSystem_close_args();
481    $args->out = $out;
482    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
483    if ($bin_accel)
484    {
485      thrift_protocol_write_binary($this->output_, 'close', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
486    }
487    else
488    {
489      $this->output_->writeMessageBegin('close', TMessageType::CALL, $this->seqid_);
490      $args->write($this->output_);
491      $this->output_->writeMessageEnd();
492      $this->output_->getTransport()->flush();
493    }
494  }
495
496  public function recv_close()
497  {
498    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
499    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_close_result', $this->input_->isStrictRead());
500    else
501    {
502      $rseqid = 0;
503      $fname = null;
504      $mtype = 0;
505
506      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
507      if ($mtype == TMessageType::EXCEPTION) {
508        $x = new TApplicationException();
509        $x->read($this->input_);
510        $this->input_->readMessageEnd();
511        throw $x;
512      }
513      $result = new ThriftHadoopFileSystem_close_result();
514      $result->read($this->input_);
515      $this->input_->readMessageEnd();
516    }
517    if ($result->success !== null) {
518      return $result->success;
519    }
520    if ($result->ouch !== null) {
521      throw $result->ouch;
522    }
523    throw new Exception("close failed: unknown result");
524  }
525
526  public function rm($path, $recursive)
527  {
528    $this->send_rm($path, $recursive);
529    return $this->recv_rm();
530  }
531
532  public function send_rm($path, $recursive)
533  {
534    $args = new ThriftHadoopFileSystem_rm_args();
535    $args->path = $path;
536    $args->recursive = $recursive;
537    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
538    if ($bin_accel)
539    {
540      thrift_protocol_write_binary($this->output_, 'rm', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
541    }
542    else
543    {
544      $this->output_->writeMessageBegin('rm', TMessageType::CALL, $this->seqid_);
545      $args->write($this->output_);
546      $this->output_->writeMessageEnd();
547      $this->output_->getTransport()->flush();
548    }
549  }
550
551  public function recv_rm()
552  {
553    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
554    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_rm_result', $this->input_->isStrictRead());
555    else
556    {
557      $rseqid = 0;
558      $fname = null;
559      $mtype = 0;
560
561      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
562      if ($mtype == TMessageType::EXCEPTION) {
563        $x = new TApplicationException();
564        $x->read($this->input_);
565        $this->input_->readMessageEnd();
566        throw $x;
567      }
568      $result = new ThriftHadoopFileSystem_rm_result();
569      $result->read($this->input_);
570      $this->input_->readMessageEnd();
571    }
572    if ($result->success !== null) {
573      return $result->success;
574    }
575    if ($result->ouch !== null) {
576      throw $result->ouch;
577    }
578    throw new Exception("rm failed: unknown result");
579  }
580
581  public function rename($path, $dest)
582  {
583    $this->send_rename($path, $dest);
584    return $this->recv_rename();
585  }
586
587  public function send_rename($path, $dest)
588  {
589    $args = new ThriftHadoopFileSystem_rename_args();
590    $args->path = $path;
591    $args->dest = $dest;
592    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
593    if ($bin_accel)
594    {
595      thrift_protocol_write_binary($this->output_, 'rename', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
596    }
597    else
598    {
599      $this->output_->writeMessageBegin('rename', TMessageType::CALL, $this->seqid_);
600      $args->write($this->output_);
601      $this->output_->writeMessageEnd();
602      $this->output_->getTransport()->flush();
603    }
604  }
605
606  public function recv_rename()
607  {
608    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
609    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_rename_result', $this->input_->isStrictRead());
610    else
611    {
612      $rseqid = 0;
613      $fname = null;
614      $mtype = 0;
615
616      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
617      if ($mtype == TMessageType::EXCEPTION) {
618        $x = new TApplicationException();
619        $x->read($this->input_);
620        $this->input_->readMessageEnd();
621        throw $x;
622      }
623      $result = new ThriftHadoopFileSystem_rename_result();
624      $result->read($this->input_);
625      $this->input_->readMessageEnd();
626    }
627    if ($result->success !== null) {
628      return $result->success;
629    }
630    if ($result->ouch !== null) {
631      throw $result->ouch;
632    }
633    throw new Exception("rename failed: unknown result");
634  }
635
636  public function mkdirs($path)
637  {
638    $this->send_mkdirs($path);
639    return $this->recv_mkdirs();
640  }
641
642  public function send_mkdirs($path)
643  {
644    $args = new ThriftHadoopFileSystem_mkdirs_args();
645    $args->path = $path;
646    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
647    if ($bin_accel)
648    {
649      thrift_protocol_write_binary($this->output_, 'mkdirs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
650    }
651    else
652    {
653      $this->output_->writeMessageBegin('mkdirs', TMessageType::CALL, $this->seqid_);
654      $args->write($this->output_);
655      $this->output_->writeMessageEnd();
656      $this->output_->getTransport()->flush();
657    }
658  }
659
660  public function recv_mkdirs()
661  {
662    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
663    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_mkdirs_result', $this->input_->isStrictRead());
664    else
665    {
666      $rseqid = 0;
667      $fname = null;
668      $mtype = 0;
669
670      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
671      if ($mtype == TMessageType::EXCEPTION) {
672        $x = new TApplicationException();
673        $x->read($this->input_);
674        $this->input_->readMessageEnd();
675        throw $x;
676      }
677      $result = new ThriftHadoopFileSystem_mkdirs_result();
678      $result->read($this->input_);
679      $this->input_->readMessageEnd();
680    }
681    if ($result->success !== null) {
682      return $result->success;
683    }
684    if ($result->ouch !== null) {
685      throw $result->ouch;
686    }
687    throw new Exception("mkdirs failed: unknown result");
688  }
689
690  public function exists($path)
691  {
692    $this->send_exists($path);
693    return $this->recv_exists();
694  }
695
696  public function send_exists($path)
697  {
698    $args = new ThriftHadoopFileSystem_exists_args();
699    $args->path = $path;
700    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
701    if ($bin_accel)
702    {
703      thrift_protocol_write_binary($this->output_, 'exists', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
704    }
705    else
706    {
707      $this->output_->writeMessageBegin('exists', TMessageType::CALL, $this->seqid_);
708      $args->write($this->output_);
709      $this->output_->writeMessageEnd();
710      $this->output_->getTransport()->flush();
711    }
712  }
713
714  public function recv_exists()
715  {
716    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
717    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_exists_result', $this->input_->isStrictRead());
718    else
719    {
720      $rseqid = 0;
721      $fname = null;
722      $mtype = 0;
723
724      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
725      if ($mtype == TMessageType::EXCEPTION) {
726        $x = new TApplicationException();
727        $x->read($this->input_);
728        $this->input_->readMessageEnd();
729        throw $x;
730      }
731      $result = new ThriftHadoopFileSystem_exists_result();
732      $result->read($this->input_);
733      $this->input_->readMessageEnd();
734    }
735    if ($result->success !== null) {
736      return $result->success;
737    }
738    if ($result->ouch !== null) {
739      throw $result->ouch;
740    }
741    throw new Exception("exists failed: unknown result");
742  }
743
744  public function stat($path)
745  {
746    $this->send_stat($path);
747    return $this->recv_stat();
748  }
749
750  public function send_stat($path)
751  {
752    $args = new ThriftHadoopFileSystem_stat_args();
753    $args->path = $path;
754    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
755    if ($bin_accel)
756    {
757      thrift_protocol_write_binary($this->output_, 'stat', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
758    }
759    else
760    {
761      $this->output_->writeMessageBegin('stat', TMessageType::CALL, $this->seqid_);
762      $args->write($this->output_);
763      $this->output_->writeMessageEnd();
764      $this->output_->getTransport()->flush();
765    }
766  }
767
768  public function recv_stat()
769  {
770    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
771    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_stat_result', $this->input_->isStrictRead());
772    else
773    {
774      $rseqid = 0;
775      $fname = null;
776      $mtype = 0;
777
778      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
779      if ($mtype == TMessageType::EXCEPTION) {
780        $x = new TApplicationException();
781        $x->read($this->input_);
782        $this->input_->readMessageEnd();
783        throw $x;
784      }
785      $result = new ThriftHadoopFileSystem_stat_result();
786      $result->read($this->input_);
787      $this->input_->readMessageEnd();
788    }
789    if ($result->success !== null) {
790      return $result->success;
791    }
792    if ($result->ouch !== null) {
793      throw $result->ouch;
794    }
795    throw new Exception("stat failed: unknown result");
796  }
797
798  public function listStatus($path)
799  {
800    $this->send_listStatus($path);
801    return $this->recv_listStatus();
802  }
803
804  public function send_listStatus($path)
805  {
806    $args = new ThriftHadoopFileSystem_listStatus_args();
807    $args->path = $path;
808    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
809    if ($bin_accel)
810    {
811      thrift_protocol_write_binary($this->output_, 'listStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
812    }
813    else
814    {
815      $this->output_->writeMessageBegin('listStatus', TMessageType::CALL, $this->seqid_);
816      $args->write($this->output_);
817      $this->output_->writeMessageEnd();
818      $this->output_->getTransport()->flush();
819    }
820  }
821
822  public function recv_listStatus()
823  {
824    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
825    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_listStatus_result', $this->input_->isStrictRead());
826    else
827    {
828      $rseqid = 0;
829      $fname = null;
830      $mtype = 0;
831
832      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
833      if ($mtype == TMessageType::EXCEPTION) {
834        $x = new TApplicationException();
835        $x->read($this->input_);
836        $this->input_->readMessageEnd();
837        throw $x;
838      }
839      $result = new ThriftHadoopFileSystem_listStatus_result();
840      $result->read($this->input_);
841      $this->input_->readMessageEnd();
842    }
843    if ($result->success !== null) {
844      return $result->success;
845    }
846    if ($result->ouch !== null) {
847      throw $result->ouch;
848    }
849    throw new Exception("listStatus failed: unknown result");
850  }
851
852  public function chmod($path, $mode)
853  {
854    $this->send_chmod($path, $mode);
855    $this->recv_chmod();
856  }
857
858  public function send_chmod($path, $mode)
859  {
860    $args = new ThriftHadoopFileSystem_chmod_args();
861    $args->path = $path;
862    $args->mode = $mode;
863    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
864    if ($bin_accel)
865    {
866      thrift_protocol_write_binary($this->output_, 'chmod', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
867    }
868    else
869    {
870      $this->output_->writeMessageBegin('chmod', TMessageType::CALL, $this->seqid_);
871      $args->write($this->output_);
872      $this->output_->writeMessageEnd();
873      $this->output_->getTransport()->flush();
874    }
875  }
876
877  public function recv_chmod()
878  {
879    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
880    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_chmod_result', $this->input_->isStrictRead());
881    else
882    {
883      $rseqid = 0;
884      $fname = null;
885      $mtype = 0;
886
887      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
888      if ($mtype == TMessageType::EXCEPTION) {
889        $x = new TApplicationException();
890        $x->read($this->input_);
891        $this->input_->readMessageEnd();
892        throw $x;
893      }
894      $result = new ThriftHadoopFileSystem_chmod_result();
895      $result->read($this->input_);
896      $this->input_->readMessageEnd();
897    }
898    if ($result->ouch !== null) {
899      throw $result->ouch;
900    }
901    return;
902  }
903
904  public function chown($path, $owner, $group)
905  {
906    $this->send_chown($path, $owner, $group);
907    $this->recv_chown();
908  }
909
910  public function send_chown($path, $owner, $group)
911  {
912    $args = new ThriftHadoopFileSystem_chown_args();
913    $args->path = $path;
914    $args->owner = $owner;
915    $args->group = $group;
916    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
917    if ($bin_accel)
918    {
919      thrift_protocol_write_binary($this->output_, 'chown', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
920    }
921    else
922    {
923      $this->output_->writeMessageBegin('chown', TMessageType::CALL, $this->seqid_);
924      $args->write($this->output_);
925      $this->output_->writeMessageEnd();
926      $this->output_->getTransport()->flush();
927    }
928  }
929
930  public function recv_chown()
931  {
932    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
933    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_chown_result', $this->input_->isStrictRead());
934    else
935    {
936      $rseqid = 0;
937      $fname = null;
938      $mtype = 0;
939
940      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
941      if ($mtype == TMessageType::EXCEPTION) {
942        $x = new TApplicationException();
943        $x->read($this->input_);
944        $this->input_->readMessageEnd();
945        throw $x;
946      }
947      $result = new ThriftHadoopFileSystem_chown_result();
948      $result->read($this->input_);
949      $this->input_->readMessageEnd();
950    }
951    if ($result->ouch !== null) {
952      throw $result->ouch;
953    }
954    return;
955  }
956
957  public function setReplication($path, $replication)
958  {
959    $this->send_setReplication($path, $replication);
960    $this->recv_setReplication();
961  }
962
963  public function send_setReplication($path, $replication)
964  {
965    $args = new ThriftHadoopFileSystem_setReplication_args();
966    $args->path = $path;
967    $args->replication = $replication;
968    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
969    if ($bin_accel)
970    {
971      thrift_protocol_write_binary($this->output_, 'setReplication', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
972    }
973    else
974    {
975      $this->output_->writeMessageBegin('setReplication', TMessageType::CALL, $this->seqid_);
976      $args->write($this->output_);
977      $this->output_->writeMessageEnd();
978      $this->output_->getTransport()->flush();
979    }
980  }
981
982  public function recv_setReplication()
983  {
984    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
985    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_setReplication_result', $this->input_->isStrictRead());
986    else
987    {
988      $rseqid = 0;
989      $fname = null;
990      $mtype = 0;
991
992      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
993      if ($mtype == TMessageType::EXCEPTION) {
994        $x = new TApplicationException();
995        $x->read($this->input_);
996        $this->input_->readMessageEnd();
997        throw $x;
998      }
999      $result = new ThriftHadoopFileSystem_setReplication_result();
1000      $result->read($this->input_);
1001      $this->input_->readMessageEnd();
1002    }
1003    if ($result->ouch !== null) {
1004      throw $result->ouch;
1005    }
1006    return;
1007  }
1008
1009  public function getFileBlockLocations($path, $start, $length)
1010  {
1011    $this->send_getFileBlockLocations($path, $start, $length);
1012    return $this->recv_getFileBlockLocations();
1013  }
1014
1015  public function send_getFileBlockLocations($path, $start, $length)
1016  {
1017    $args = new ThriftHadoopFileSystem_getFileBlockLocations_args();
1018    $args->path = $path;
1019    $args->start = $start;
1020    $args->length = $length;
1021    $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary');
1022    if ($bin_accel)
1023    {
1024      thrift_protocol_write_binary($this->output_, 'getFileBlockLocations', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
1025    }
1026    else
1027    {
1028      $this->output_->writeMessageBegin('getFileBlockLocations', TMessageType::CALL, $this->seqid_);
1029      $args->write($this->output_);
1030      $this->output_->writeMessageEnd();
1031      $this->output_->getTransport()->flush();
1032    }
1033  }
1034
1035  public function recv_getFileBlockLocations()
1036  {
1037    $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary');
1038    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHadoopFileSystem_getFileBlockLocations_result', $this->input_->isStrictRead());
1039    else
1040    {
1041      $rseqid = 0;
1042      $fname = null;
1043      $mtype = 0;
1044
1045      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
1046      if ($mtype == TMessageType::EXCEPTION) {
1047        $x = new TApplicationException();
1048        $x->read($this->input_);
1049        $this->input_->readMessageEnd();
1050        throw $x;
1051      }
1052      $result = new ThriftHadoopFileSystem_getFileBlockLocations_result();
1053      $result->read($this->input_);
1054      $this->input_->readMessageEnd();
1055    }
1056    if ($result->success !== null) {
1057      return $result->success;
1058    }
1059    if ($result->ouch !== null) {
1060      throw $result->ouch;
1061    }
1062    throw new Exception("getFileBlockLocations failed: unknown result");
1063  }
1064
1065}
1066
1067// HELPER FUNCTIONS AND STRUCTURES
1068
1069class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args {
1070  static $_TSPEC;
1071
1072  public $periodInSeconds = null;
1073
1074  public function __construct($vals=null) {
1075    if (!isset(self::$_TSPEC)) {
1076      self::$_TSPEC = array(
1077        1 => array(
1078          'var' => 'periodInSeconds',
1079          'type' => TType::I64,
1080          ),
1081        );
1082    }
1083    if (is_array($vals)) {
1084      if (isset($vals['periodInSeconds'])) {
1085        $this->periodInSeconds = $vals['periodInSeconds'];
1086      }
1087    }
1088  }
1089
1090  public function getName() {
1091    return 'ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args';
1092  }
1093
1094  public function read($input)
1095  {
1096    $xfer = 0;
1097    $fname = null;
1098    $ftype = 0;
1099    $fid = 0;
1100    $xfer += $input->readStructBegin($fname);
1101    while (true)
1102    {
1103      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1104      if ($ftype == TType::STOP) {
1105        break;
1106      }
1107      switch ($fid)
1108      {
1109        case 1:
1110          if ($ftype == TType::I64) {
1111            $xfer += $input->readI64($this->periodInSeconds);
1112          } else {
1113            $xfer += $input->skip($ftype);
1114          }
1115          break;
1116        default:
1117          $xfer += $input->skip($ftype);
1118          break;
1119      }
1120      $xfer += $input->readFieldEnd();
1121    }
1122    $xfer += $input->readStructEnd();
1123    return $xfer;
1124  }
1125
1126  public function write($output) {
1127    $xfer = 0;
1128    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args');
1129    if ($this->periodInSeconds !== null) {
1130      $xfer += $output->writeFieldBegin('periodInSeconds', TType::I64, 1);
1131      $xfer += $output->writeI64($this->periodInSeconds);
1132      $xfer += $output->writeFieldEnd();
1133    }
1134    $xfer += $output->writeFieldStop();
1135    $xfer += $output->writeStructEnd();
1136    return $xfer;
1137  }
1138
1139}
1140
1141class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result {
1142  static $_TSPEC;
1143
1144
1145  public function __construct() {
1146    if (!isset(self::$_TSPEC)) {
1147      self::$_TSPEC = array(
1148        );
1149    }
1150  }
1151
1152  public function getName() {
1153    return 'ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result';
1154  }
1155
1156  public function read($input)
1157  {
1158    $xfer = 0;
1159    $fname = null;
1160    $ftype = 0;
1161    $fid = 0;
1162    $xfer += $input->readStructBegin($fname);
1163    while (true)
1164    {
1165      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1166      if ($ftype == TType::STOP) {
1167        break;
1168      }
1169      switch ($fid)
1170      {
1171        default:
1172          $xfer += $input->skip($ftype);
1173          break;
1174      }
1175      $xfer += $input->readFieldEnd();
1176    }
1177    $xfer += $input->readStructEnd();
1178    return $xfer;
1179  }
1180
1181  public function write($output) {
1182    $xfer = 0;
1183    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result');
1184    $xfer += $output->writeFieldStop();
1185    $xfer += $output->writeStructEnd();
1186    return $xfer;
1187  }
1188
1189}
1190
1191class ThriftHadoopFileSystem_shutdown_args {
1192  static $_TSPEC;
1193
1194  public $status = null;
1195
1196  public function __construct($vals=null) {
1197    if (!isset(self::$_TSPEC)) {
1198      self::$_TSPEC = array(
1199        1 => array(
1200          'var' => 'status',
1201          'type' => TType::I32,
1202          ),
1203        );
1204    }
1205    if (is_array($vals)) {
1206      if (isset($vals['status'])) {
1207        $this->status = $vals['status'];
1208      }
1209    }
1210  }
1211
1212  public function getName() {
1213    return 'ThriftHadoopFileSystem_shutdown_args';
1214  }
1215
1216  public function read($input)
1217  {
1218    $xfer = 0;
1219    $fname = null;
1220    $ftype = 0;
1221    $fid = 0;
1222    $xfer += $input->readStructBegin($fname);
1223    while (true)
1224    {
1225      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1226      if ($ftype == TType::STOP) {
1227        break;
1228      }
1229      switch ($fid)
1230      {
1231        case 1:
1232          if ($ftype == TType::I32) {
1233            $xfer += $input->readI32($this->status);
1234          } else {
1235            $xfer += $input->skip($ftype);
1236          }
1237          break;
1238        default:
1239          $xfer += $input->skip($ftype);
1240          break;
1241      }
1242      $xfer += $input->readFieldEnd();
1243    }
1244    $xfer += $input->readStructEnd();
1245    return $xfer;
1246  }
1247
1248  public function write($output) {
1249    $xfer = 0;
1250    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_shutdown_args');
1251    if ($this->status !== null) {
1252      $xfer += $output->writeFieldBegin('status', TType::I32, 1);
1253      $xfer += $output->writeI32($this->status);
1254      $xfer += $output->writeFieldEnd();
1255    }
1256    $xfer += $output->writeFieldStop();
1257    $xfer += $output->writeStructEnd();
1258    return $xfer;
1259  }
1260
1261}
1262
1263class ThriftHadoopFileSystem_shutdown_result {
1264  static $_TSPEC;
1265
1266
1267  public function __construct() {
1268    if (!isset(self::$_TSPEC)) {
1269      self::$_TSPEC = array(
1270        );
1271    }
1272  }
1273
1274  public function getName() {
1275    return 'ThriftHadoopFileSystem_shutdown_result';
1276  }
1277
1278  public function read($input)
1279  {
1280    $xfer = 0;
1281    $fname = null;
1282    $ftype = 0;
1283    $fid = 0;
1284    $xfer += $input->readStructBegin($fname);
1285    while (true)
1286    {
1287      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1288      if ($ftype == TType::STOP) {
1289        break;
1290      }
1291      switch ($fid)
1292      {
1293        default:
1294          $xfer += $input->skip($ftype);
1295          break;
1296      }
1297      $xfer += $input->readFieldEnd();
1298    }
1299    $xfer += $input->readStructEnd();
1300    return $xfer;
1301  }
1302
1303  public function write($output) {
1304    $xfer = 0;
1305    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_shutdown_result');
1306    $xfer += $output->writeFieldStop();
1307    $xfer += $output->writeStructEnd();
1308    return $xfer;
1309  }
1310
1311}
1312
1313class ThriftHadoopFileSystem_create_args {
1314  static $_TSPEC;
1315
1316  public $path = null;
1317
1318  public function __construct($vals=null) {
1319    if (!isset(self::$_TSPEC)) {
1320      self::$_TSPEC = array(
1321        1 => array(
1322          'var' => 'path',
1323          'type' => TType::STRUCT,
1324          'class' => 'Pathname',
1325          ),
1326        );
1327    }
1328    if (is_array($vals)) {
1329      if (isset($vals['path'])) {
1330        $this->path = $vals['path'];
1331      }
1332    }
1333  }
1334
1335  public function getName() {
1336    return 'ThriftHadoopFileSystem_create_args';
1337  }
1338
1339  public function read($input)
1340  {
1341    $xfer = 0;
1342    $fname = null;
1343    $ftype = 0;
1344    $fid = 0;
1345    $xfer += $input->readStructBegin($fname);
1346    while (true)
1347    {
1348      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1349      if ($ftype == TType::STOP) {
1350        break;
1351      }
1352      switch ($fid)
1353      {
1354        case 1:
1355          if ($ftype == TType::STRUCT) {
1356            $this->path = new Pathname();
1357            $xfer += $this->path->read($input);
1358          } else {
1359            $xfer += $input->skip($ftype);
1360          }
1361          break;
1362        default:
1363          $xfer += $input->skip($ftype);
1364          break;
1365      }
1366      $xfer += $input->readFieldEnd();
1367    }
1368    $xfer += $input->readStructEnd();
1369    return $xfer;
1370  }
1371
1372  public function write($output) {
1373    $xfer = 0;
1374    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_create_args');
1375    if ($this->path !== null) {
1376      if (!is_object($this->path)) {
1377        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1378      }
1379      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
1380      $xfer += $this->path->write($output);
1381      $xfer += $output->writeFieldEnd();
1382    }
1383    $xfer += $output->writeFieldStop();
1384    $xfer += $output->writeStructEnd();
1385    return $xfer;
1386  }
1387
1388}
1389
1390class ThriftHadoopFileSystem_create_result {
1391  static $_TSPEC;
1392
1393  public $success = null;
1394  public $ouch = null;
1395
1396  public function __construct($vals=null) {
1397    if (!isset(self::$_TSPEC)) {
1398      self::$_TSPEC = array(
1399        0 => array(
1400          'var' => 'success',
1401          'type' => TType::STRUCT,
1402          'class' => 'ThriftHandle',
1403          ),
1404        1 => array(
1405          'var' => 'ouch',
1406          'type' => TType::STRUCT,
1407          'class' => 'ThriftIOException',
1408          ),
1409        );
1410    }
1411    if (is_array($vals)) {
1412      if (isset($vals['success'])) {
1413        $this->success = $vals['success'];
1414      }
1415      if (isset($vals['ouch'])) {
1416        $this->ouch = $vals['ouch'];
1417      }
1418    }
1419  }
1420
1421  public function getName() {
1422    return 'ThriftHadoopFileSystem_create_result';
1423  }
1424
1425  public function read($input)
1426  {
1427    $xfer = 0;
1428    $fname = null;
1429    $ftype = 0;
1430    $fid = 0;
1431    $xfer += $input->readStructBegin($fname);
1432    while (true)
1433    {
1434      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1435      if ($ftype == TType::STOP) {
1436        break;
1437      }
1438      switch ($fid)
1439      {
1440        case 0:
1441          if ($ftype == TType::STRUCT) {
1442            $this->success = new ThriftHandle();
1443            $xfer += $this->success->read($input);
1444          } else {
1445            $xfer += $input->skip($ftype);
1446          }
1447          break;
1448        case 1:
1449          if ($ftype == TType::STRUCT) {
1450            $this->ouch = new ThriftIOException();
1451            $xfer += $this->ouch->read($input);
1452          } else {
1453            $xfer += $input->skip($ftype);
1454          }
1455          break;
1456        default:
1457          $xfer += $input->skip($ftype);
1458          break;
1459      }
1460      $xfer += $input->readFieldEnd();
1461    }
1462    $xfer += $input->readStructEnd();
1463    return $xfer;
1464  }
1465
1466  public function write($output) {
1467    $xfer = 0;
1468    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_create_result');
1469    if ($this->success !== null) {
1470      if (!is_object($this->success)) {
1471        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1472      }
1473      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
1474      $xfer += $this->success->write($output);
1475      $xfer += $output->writeFieldEnd();
1476    }
1477    if ($this->ouch !== null) {
1478      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
1479      $xfer += $this->ouch->write($output);
1480      $xfer += $output->writeFieldEnd();
1481    }
1482    $xfer += $output->writeFieldStop();
1483    $xfer += $output->writeStructEnd();
1484    return $xfer;
1485  }
1486
1487}
1488
1489class ThriftHadoopFileSystem_createFile_args {
1490  static $_TSPEC;
1491
1492  public $path = null;
1493  public $mode = null;
1494  public $overwrite = null;
1495  public $bufferSize = null;
1496  public $block_replication = null;
1497  public $blocksize = null;
1498
1499  public function __construct($vals=null) {
1500    if (!isset(self::$_TSPEC)) {
1501      self::$_TSPEC = array(
1502        1 => array(
1503          'var' => 'path',
1504          'type' => TType::STRUCT,
1505          'class' => 'Pathname',
1506          ),
1507        2 => array(
1508          'var' => 'mode',
1509          'type' => TType::I16,
1510          ),
1511        3 => array(
1512          'var' => 'overwrite',
1513          'type' => TType::BOOL,
1514          ),
1515        4 => array(
1516          'var' => 'bufferSize',
1517          'type' => TType::I32,
1518          ),
1519        5 => array(
1520          'var' => 'block_replication',
1521          'type' => TType::I16,
1522          ),
1523        6 => array(
1524          'var' => 'blocksize',
1525          'type' => TType::I64,
1526          ),
1527        );
1528    }
1529    if (is_array($vals)) {
1530      if (isset($vals['path'])) {
1531        $this->path = $vals['path'];
1532      }
1533      if (isset($vals['mode'])) {
1534        $this->mode = $vals['mode'];
1535      }
1536      if (isset($vals['overwrite'])) {
1537        $this->overwrite = $vals['overwrite'];
1538      }
1539      if (isset($vals['bufferSize'])) {
1540        $this->bufferSize = $vals['bufferSize'];
1541      }
1542      if (isset($vals['block_replication'])) {
1543        $this->block_replication = $vals['block_replication'];
1544      }
1545      if (isset($vals['blocksize'])) {
1546        $this->blocksize = $vals['blocksize'];
1547      }
1548    }
1549  }
1550
1551  public function getName() {
1552    return 'ThriftHadoopFileSystem_createFile_args';
1553  }
1554
1555  public function read($input)
1556  {
1557    $xfer = 0;
1558    $fname = null;
1559    $ftype = 0;
1560    $fid = 0;
1561    $xfer += $input->readStructBegin($fname);
1562    while (true)
1563    {
1564      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1565      if ($ftype == TType::STOP) {
1566        break;
1567      }
1568      switch ($fid)
1569      {
1570        case 1:
1571          if ($ftype == TType::STRUCT) {
1572            $this->path = new Pathname();
1573            $xfer += $this->path->read($input);
1574          } else {
1575            $xfer += $input->skip($ftype);
1576          }
1577          break;
1578        case 2:
1579          if ($ftype == TType::I16) {
1580            $xfer += $input->readI16($this->mode);
1581          } else {
1582            $xfer += $input->skip($ftype);
1583          }
1584          break;
1585        case 3:
1586          if ($ftype == TType::BOOL) {
1587            $xfer += $input->readBool($this->overwrite);
1588          } else {
1589            $xfer += $input->skip($ftype);
1590          }
1591          break;
1592        case 4:
1593          if ($ftype == TType::I32) {
1594            $xfer += $input->readI32($this->bufferSize);
1595          } else {
1596            $xfer += $input->skip($ftype);
1597          }
1598          break;
1599        case 5:
1600          if ($ftype == TType::I16) {
1601            $xfer += $input->readI16($this->block_replication);
1602          } else {
1603            $xfer += $input->skip($ftype);
1604          }
1605          break;
1606        case 6:
1607          if ($ftype == TType::I64) {
1608            $xfer += $input->readI64($this->blocksize);
1609          } else {
1610            $xfer += $input->skip($ftype);
1611          }
1612          break;
1613        default:
1614          $xfer += $input->skip($ftype);
1615          break;
1616      }
1617      $xfer += $input->readFieldEnd();
1618    }
1619    $xfer += $input->readStructEnd();
1620    return $xfer;
1621  }
1622
1623  public function write($output) {
1624    $xfer = 0;
1625    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_createFile_args');
1626    if ($this->path !== null) {
1627      if (!is_object($this->path)) {
1628        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1629      }
1630      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
1631      $xfer += $this->path->write($output);
1632      $xfer += $output->writeFieldEnd();
1633    }
1634    if ($this->mode !== null) {
1635      $xfer += $output->writeFieldBegin('mode', TType::I16, 2);
1636      $xfer += $output->writeI16($this->mode);
1637      $xfer += $output->writeFieldEnd();
1638    }
1639    if ($this->overwrite !== null) {
1640      $xfer += $output->writeFieldBegin('overwrite', TType::BOOL, 3);
1641      $xfer += $output->writeBool($this->overwrite);
1642      $xfer += $output->writeFieldEnd();
1643    }
1644    if ($this->bufferSize !== null) {
1645      $xfer += $output->writeFieldBegin('bufferSize', TType::I32, 4);
1646      $xfer += $output->writeI32($this->bufferSize);
1647      $xfer += $output->writeFieldEnd();
1648    }
1649    if ($this->block_replication !== null) {
1650      $xfer += $output->writeFieldBegin('block_replication', TType::I16, 5);
1651      $xfer += $output->writeI16($this->block_replication);
1652      $xfer += $output->writeFieldEnd();
1653    }
1654    if ($this->blocksize !== null) {
1655      $xfer += $output->writeFieldBegin('blocksize', TType::I64, 6);
1656      $xfer += $output->writeI64($this->blocksize);
1657      $xfer += $output->writeFieldEnd();
1658    }
1659    $xfer += $output->writeFieldStop();
1660    $xfer += $output->writeStructEnd();
1661    return $xfer;
1662  }
1663
1664}
1665
1666class ThriftHadoopFileSystem_createFile_result {
1667  static $_TSPEC;
1668
1669  public $success = null;
1670  public $ouch = null;
1671
1672  public function __construct($vals=null) {
1673    if (!isset(self::$_TSPEC)) {
1674      self::$_TSPEC = array(
1675        0 => array(
1676          'var' => 'success',
1677          'type' => TType::STRUCT,
1678          'class' => 'ThriftHandle',
1679          ),
1680        1 => array(
1681          'var' => 'ouch',
1682          'type' => TType::STRUCT,
1683          'class' => 'ThriftIOException',
1684          ),
1685        );
1686    }
1687    if (is_array($vals)) {
1688      if (isset($vals['success'])) {
1689        $this->success = $vals['success'];
1690      }
1691      if (isset($vals['ouch'])) {
1692        $this->ouch = $vals['ouch'];
1693      }
1694    }
1695  }
1696
1697  public function getName() {
1698    return 'ThriftHadoopFileSystem_createFile_result';
1699  }
1700
1701  public function read($input)
1702  {
1703    $xfer = 0;
1704    $fname = null;
1705    $ftype = 0;
1706    $fid = 0;
1707    $xfer += $input->readStructBegin($fname);
1708    while (true)
1709    {
1710      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1711      if ($ftype == TType::STOP) {
1712        break;
1713      }
1714      switch ($fid)
1715      {
1716        case 0:
1717          if ($ftype == TType::STRUCT) {
1718            $this->success = new ThriftHandle();
1719            $xfer += $this->success->read($input);
1720          } else {
1721            $xfer += $input->skip($ftype);
1722          }
1723          break;
1724        case 1:
1725          if ($ftype == TType::STRUCT) {
1726            $this->ouch = new ThriftIOException();
1727            $xfer += $this->ouch->read($input);
1728          } else {
1729            $xfer += $input->skip($ftype);
1730          }
1731          break;
1732        default:
1733          $xfer += $input->skip($ftype);
1734          break;
1735      }
1736      $xfer += $input->readFieldEnd();
1737    }
1738    $xfer += $input->readStructEnd();
1739    return $xfer;
1740  }
1741
1742  public function write($output) {
1743    $xfer = 0;
1744    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_createFile_result');
1745    if ($this->success !== null) {
1746      if (!is_object($this->success)) {
1747        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1748      }
1749      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
1750      $xfer += $this->success->write($output);
1751      $xfer += $output->writeFieldEnd();
1752    }
1753    if ($this->ouch !== null) {
1754      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
1755      $xfer += $this->ouch->write($output);
1756      $xfer += $output->writeFieldEnd();
1757    }
1758    $xfer += $output->writeFieldStop();
1759    $xfer += $output->writeStructEnd();
1760    return $xfer;
1761  }
1762
1763}
1764
1765class ThriftHadoopFileSystem_open_args {
1766  static $_TSPEC;
1767
1768  public $path = null;
1769
1770  public function __construct($vals=null) {
1771    if (!isset(self::$_TSPEC)) {
1772      self::$_TSPEC = array(
1773        1 => array(
1774          'var' => 'path',
1775          'type' => TType::STRUCT,
1776          'class' => 'Pathname',
1777          ),
1778        );
1779    }
1780    if (is_array($vals)) {
1781      if (isset($vals['path'])) {
1782        $this->path = $vals['path'];
1783      }
1784    }
1785  }
1786
1787  public function getName() {
1788    return 'ThriftHadoopFileSystem_open_args';
1789  }
1790
1791  public function read($input)
1792  {
1793    $xfer = 0;
1794    $fname = null;
1795    $ftype = 0;
1796    $fid = 0;
1797    $xfer += $input->readStructBegin($fname);
1798    while (true)
1799    {
1800      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1801      if ($ftype == TType::STOP) {
1802        break;
1803      }
1804      switch ($fid)
1805      {
1806        case 1:
1807          if ($ftype == TType::STRUCT) {
1808            $this->path = new Pathname();
1809            $xfer += $this->path->read($input);
1810          } else {
1811            $xfer += $input->skip($ftype);
1812          }
1813          break;
1814        default:
1815          $xfer += $input->skip($ftype);
1816          break;
1817      }
1818      $xfer += $input->readFieldEnd();
1819    }
1820    $xfer += $input->readStructEnd();
1821    return $xfer;
1822  }
1823
1824  public function write($output) {
1825    $xfer = 0;
1826    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_open_args');
1827    if ($this->path !== null) {
1828      if (!is_object($this->path)) {
1829        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1830      }
1831      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
1832      $xfer += $this->path->write($output);
1833      $xfer += $output->writeFieldEnd();
1834    }
1835    $xfer += $output->writeFieldStop();
1836    $xfer += $output->writeStructEnd();
1837    return $xfer;
1838  }
1839
1840}
1841
1842class ThriftHadoopFileSystem_open_result {
1843  static $_TSPEC;
1844
1845  public $success = null;
1846  public $ouch = null;
1847
1848  public function __construct($vals=null) {
1849    if (!isset(self::$_TSPEC)) {
1850      self::$_TSPEC = array(
1851        0 => array(
1852          'var' => 'success',
1853          'type' => TType::STRUCT,
1854          'class' => 'ThriftHandle',
1855          ),
1856        1 => array(
1857          'var' => 'ouch',
1858          'type' => TType::STRUCT,
1859          'class' => 'ThriftIOException',
1860          ),
1861        );
1862    }
1863    if (is_array($vals)) {
1864      if (isset($vals['success'])) {
1865        $this->success = $vals['success'];
1866      }
1867      if (isset($vals['ouch'])) {
1868        $this->ouch = $vals['ouch'];
1869      }
1870    }
1871  }
1872
1873  public function getName() {
1874    return 'ThriftHadoopFileSystem_open_result';
1875  }
1876
1877  public function read($input)
1878  {
1879    $xfer = 0;
1880    $fname = null;
1881    $ftype = 0;
1882    $fid = 0;
1883    $xfer += $input->readStructBegin($fname);
1884    while (true)
1885    {
1886      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1887      if ($ftype == TType::STOP) {
1888        break;
1889      }
1890      switch ($fid)
1891      {
1892        case 0:
1893          if ($ftype == TType::STRUCT) {
1894            $this->success = new ThriftHandle();
1895            $xfer += $this->success->read($input);
1896          } else {
1897            $xfer += $input->skip($ftype);
1898          }
1899          break;
1900        case 1:
1901          if ($ftype == TType::STRUCT) {
1902            $this->ouch = new ThriftIOException();
1903            $xfer += $this->ouch->read($input);
1904          } else {
1905            $xfer += $input->skip($ftype);
1906          }
1907          break;
1908        default:
1909          $xfer += $input->skip($ftype);
1910          break;
1911      }
1912      $xfer += $input->readFieldEnd();
1913    }
1914    $xfer += $input->readStructEnd();
1915    return $xfer;
1916  }
1917
1918  public function write($output) {
1919    $xfer = 0;
1920    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_open_result');
1921    if ($this->success !== null) {
1922      if (!is_object($this->success)) {
1923        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
1924      }
1925      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
1926      $xfer += $this->success->write($output);
1927      $xfer += $output->writeFieldEnd();
1928    }
1929    if ($this->ouch !== null) {
1930      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
1931      $xfer += $this->ouch->write($output);
1932      $xfer += $output->writeFieldEnd();
1933    }
1934    $xfer += $output->writeFieldStop();
1935    $xfer += $output->writeStructEnd();
1936    return $xfer;
1937  }
1938
1939}
1940
1941class ThriftHadoopFileSystem_append_args {
1942  static $_TSPEC;
1943
1944  public $path = null;
1945
1946  public function __construct($vals=null) {
1947    if (!isset(self::$_TSPEC)) {
1948      self::$_TSPEC = array(
1949        1 => array(
1950          'var' => 'path',
1951          'type' => TType::STRUCT,
1952          'class' => 'Pathname',
1953          ),
1954        );
1955    }
1956    if (is_array($vals)) {
1957      if (isset($vals['path'])) {
1958        $this->path = $vals['path'];
1959      }
1960    }
1961  }
1962
1963  public function getName() {
1964    return 'ThriftHadoopFileSystem_append_args';
1965  }
1966
1967  public function read($input)
1968  {
1969    $xfer = 0;
1970    $fname = null;
1971    $ftype = 0;
1972    $fid = 0;
1973    $xfer += $input->readStructBegin($fname);
1974    while (true)
1975    {
1976      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
1977      if ($ftype == TType::STOP) {
1978        break;
1979      }
1980      switch ($fid)
1981      {
1982        case 1:
1983          if ($ftype == TType::STRUCT) {
1984            $this->path = new Pathname();
1985            $xfer += $this->path->read($input);
1986          } else {
1987            $xfer += $input->skip($ftype);
1988          }
1989          break;
1990        default:
1991          $xfer += $input->skip($ftype);
1992          break;
1993      }
1994      $xfer += $input->readFieldEnd();
1995    }
1996    $xfer += $input->readStructEnd();
1997    return $xfer;
1998  }
1999
2000  public function write($output) {
2001    $xfer = 0;
2002    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_append_args');
2003    if ($this->path !== null) {
2004      if (!is_object($this->path)) {
2005        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
2006      }
2007      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
2008      $xfer += $this->path->write($output);
2009      $xfer += $output->writeFieldEnd();
2010    }
2011    $xfer += $output->writeFieldStop();
2012    $xfer += $output->writeStructEnd();
2013    return $xfer;
2014  }
2015
2016}
2017
2018class ThriftHadoopFileSystem_append_result {
2019  static $_TSPEC;
2020
2021  public $success = null;
2022  public $ouch = null;
2023
2024  public function __construct($vals=null) {
2025    if (!isset(self::$_TSPEC)) {
2026      self::$_TSPEC = array(
2027        0 => array(
2028          'var' => 'success',
2029          'type' => TType::STRUCT,
2030          'class' => 'ThriftHandle',
2031          ),
2032        1 => array(
2033          'var' => 'ouch',
2034          'type' => TType::STRUCT,
2035          'class' => 'ThriftIOException',
2036          ),
2037        );
2038    }
2039    if (is_array($vals)) {
2040      if (isset($vals['success'])) {
2041        $this->success = $vals['success'];
2042      }
2043      if (isset($vals['ouch'])) {
2044        $this->ouch = $vals['ouch'];
2045      }
2046    }
2047  }
2048
2049  public function getName() {
2050    return 'ThriftHadoopFileSystem_append_result';
2051  }
2052
2053  public function read($input)
2054  {
2055    $xfer = 0;
2056    $fname = null;
2057    $ftype = 0;
2058    $fid = 0;
2059    $xfer += $input->readStructBegin($fname);
2060    while (true)
2061    {
2062      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2063      if ($ftype == TType::STOP) {
2064        break;
2065      }
2066      switch ($fid)
2067      {
2068        case 0:
2069          if ($ftype == TType::STRUCT) {
2070            $this->success = new ThriftHandle();
2071            $xfer += $this->success->read($input);
2072          } else {
2073            $xfer += $input->skip($ftype);
2074          }
2075          break;
2076        case 1:
2077          if ($ftype == TType::STRUCT) {
2078            $this->ouch = new ThriftIOException();
2079            $xfer += $this->ouch->read($input);
2080          } else {
2081            $xfer += $input->skip($ftype);
2082          }
2083          break;
2084        default:
2085          $xfer += $input->skip($ftype);
2086          break;
2087      }
2088      $xfer += $input->readFieldEnd();
2089    }
2090    $xfer += $input->readStructEnd();
2091    return $xfer;
2092  }
2093
2094  public function write($output) {
2095    $xfer = 0;
2096    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_append_result');
2097    if ($this->success !== null) {
2098      if (!is_object($this->success)) {
2099        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
2100      }
2101      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
2102      $xfer += $this->success->write($output);
2103      $xfer += $output->writeFieldEnd();
2104    }
2105    if ($this->ouch !== null) {
2106      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
2107      $xfer += $this->ouch->write($output);
2108      $xfer += $output->writeFieldEnd();
2109    }
2110    $xfer += $output->writeFieldStop();
2111    $xfer += $output->writeStructEnd();
2112    return $xfer;
2113  }
2114
2115}
2116
2117class ThriftHadoopFileSystem_write_args {
2118  static $_TSPEC;
2119
2120  public $handle = null;
2121  public $data = null;
2122
2123  public function __construct($vals=null) {
2124    if (!isset(self::$_TSPEC)) {
2125      self::$_TSPEC = array(
2126        1 => array(
2127          'var' => 'handle',
2128          'type' => TType::STRUCT,
2129          'class' => 'ThriftHandle',
2130          ),
2131        -1 => array(
2132          'var' => 'data',
2133          'type' => TType::STRING,
2134          ),
2135        );
2136    }
2137    if (is_array($vals)) {
2138      if (isset($vals['handle'])) {
2139        $this->handle = $vals['handle'];
2140      }
2141      if (isset($vals['data'])) {
2142        $this->data = $vals['data'];
2143      }
2144    }
2145  }
2146
2147  public function getName() {
2148    return 'ThriftHadoopFileSystem_write_args';
2149  }
2150
2151  public function read($input)
2152  {
2153    $xfer = 0;
2154    $fname = null;
2155    $ftype = 0;
2156    $fid = 0;
2157    $xfer += $input->readStructBegin($fname);
2158    while (true)
2159    {
2160      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2161      if ($ftype == TType::STOP) {
2162        break;
2163      }
2164      switch ($fid)
2165      {
2166        case 1:
2167          if ($ftype == TType::STRUCT) {
2168            $this->handle = new ThriftHandle();
2169            $xfer += $this->handle->read($input);
2170          } else {
2171            $xfer += $input->skip($ftype);
2172          }
2173          break;
2174        case -1:
2175          if ($ftype == TType::STRING) {
2176            $xfer += $input->readString($this->data);
2177          } else {
2178            $xfer += $input->skip($ftype);
2179          }
2180          break;
2181        default:
2182          $xfer += $input->skip($ftype);
2183          break;
2184      }
2185      $xfer += $input->readFieldEnd();
2186    }
2187    $xfer += $input->readStructEnd();
2188    return $xfer;
2189  }
2190
2191  public function write($output) {
2192    $xfer = 0;
2193    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_write_args');
2194    if ($this->handle !== null) {
2195      if (!is_object($this->handle)) {
2196        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
2197      }
2198      $xfer += $output->writeFieldBegin('handle', TType::STRUCT, 1);
2199      $xfer += $this->handle->write($output);
2200      $xfer += $output->writeFieldEnd();
2201    }
2202    if ($this->data !== null) {
2203      $xfer += $output->writeFieldBegin('data', TType::STRING, -1);
2204      $xfer += $output->writeString($this->data);
2205      $xfer += $output->writeFieldEnd();
2206    }
2207    $xfer += $output->writeFieldStop();
2208    $xfer += $output->writeStructEnd();
2209    return $xfer;
2210  }
2211
2212}
2213
2214class ThriftHadoopFileSystem_write_result {
2215  static $_TSPEC;
2216
2217  public $success = null;
2218  public $ouch = null;
2219
2220  public function __construct($vals=null) {
2221    if (!isset(self::$_TSPEC)) {
2222      self::$_TSPEC = array(
2223        0 => array(
2224          'var' => 'success',
2225          'type' => TType::BOOL,
2226          ),
2227        1 => array(
2228          'var' => 'ouch',
2229          'type' => TType::STRUCT,
2230          'class' => 'ThriftIOException',
2231          ),
2232        );
2233    }
2234    if (is_array($vals)) {
2235      if (isset($vals['success'])) {
2236        $this->success = $vals['success'];
2237      }
2238      if (isset($vals['ouch'])) {
2239        $this->ouch = $vals['ouch'];
2240      }
2241    }
2242  }
2243
2244  public function getName() {
2245    return 'ThriftHadoopFileSystem_write_result';
2246  }
2247
2248  public function read($input)
2249  {
2250    $xfer = 0;
2251    $fname = null;
2252    $ftype = 0;
2253    $fid = 0;
2254    $xfer += $input->readStructBegin($fname);
2255    while (true)
2256    {
2257      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2258      if ($ftype == TType::STOP) {
2259        break;
2260      }
2261      switch ($fid)
2262      {
2263        case 0:
2264          if ($ftype == TType::BOOL) {
2265            $xfer += $input->readBool($this->success);
2266          } else {
2267            $xfer += $input->skip($ftype);
2268          }
2269          break;
2270        case 1:
2271          if ($ftype == TType::STRUCT) {
2272            $this->ouch = new ThriftIOException();
2273            $xfer += $this->ouch->read($input);
2274          } else {
2275            $xfer += $input->skip($ftype);
2276          }
2277          break;
2278        default:
2279          $xfer += $input->skip($ftype);
2280          break;
2281      }
2282      $xfer += $input->readFieldEnd();
2283    }
2284    $xfer += $input->readStructEnd();
2285    return $xfer;
2286  }
2287
2288  public function write($output) {
2289    $xfer = 0;
2290    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_write_result');
2291    if ($this->success !== null) {
2292      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
2293      $xfer += $output->writeBool($this->success);
2294      $xfer += $output->writeFieldEnd();
2295    }
2296    if ($this->ouch !== null) {
2297      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
2298      $xfer += $this->ouch->write($output);
2299      $xfer += $output->writeFieldEnd();
2300    }
2301    $xfer += $output->writeFieldStop();
2302    $xfer += $output->writeStructEnd();
2303    return $xfer;
2304  }
2305
2306}
2307
2308class ThriftHadoopFileSystem_read_args {
2309  static $_TSPEC;
2310
2311  public $handle = null;
2312  public $offset = null;
2313  public $size = null;
2314
2315  public function __construct($vals=null) {
2316    if (!isset(self::$_TSPEC)) {
2317      self::$_TSPEC = array(
2318        1 => array(
2319          'var' => 'handle',
2320          'type' => TType::STRUCT,
2321          'class' => 'ThriftHandle',
2322          ),
2323        -1 => array(
2324          'var' => 'offset',
2325          'type' => TType::I64,
2326          ),
2327        -2 => array(
2328          'var' => 'size',
2329          'type' => TType::I32,
2330          ),
2331        );
2332    }
2333    if (is_array($vals)) {
2334      if (isset($vals['handle'])) {
2335        $this->handle = $vals['handle'];
2336      }
2337      if (isset($vals['offset'])) {
2338        $this->offset = $vals['offset'];
2339      }
2340      if (isset($vals['size'])) {
2341        $this->size = $vals['size'];
2342      }
2343    }
2344  }
2345
2346  public function getName() {
2347    return 'ThriftHadoopFileSystem_read_args';
2348  }
2349
2350  public function read($input)
2351  {
2352    $xfer = 0;
2353    $fname = null;
2354    $ftype = 0;
2355    $fid = 0;
2356    $xfer += $input->readStructBegin($fname);
2357    while (true)
2358    {
2359      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2360      if ($ftype == TType::STOP) {
2361        break;
2362      }
2363      switch ($fid)
2364      {
2365        case 1:
2366          if ($ftype == TType::STRUCT) {
2367            $this->handle = new ThriftHandle();
2368            $xfer += $this->handle->read($input);
2369          } else {
2370            $xfer += $input->skip($ftype);
2371          }
2372          break;
2373        case -1:
2374          if ($ftype == TType::I64) {
2375            $xfer += $input->readI64($this->offset);
2376          } else {
2377            $xfer += $input->skip($ftype);
2378          }
2379          break;
2380        case -2:
2381          if ($ftype == TType::I32) {
2382            $xfer += $input->readI32($this->size);
2383          } else {
2384            $xfer += $input->skip($ftype);
2385          }
2386          break;
2387        default:
2388          $xfer += $input->skip($ftype);
2389          break;
2390      }
2391      $xfer += $input->readFieldEnd();
2392    }
2393    $xfer += $input->readStructEnd();
2394    return $xfer;
2395  }
2396
2397  public function write($output) {
2398    $xfer = 0;
2399    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_read_args');
2400    if ($this->handle !== null) {
2401      if (!is_object($this->handle)) {
2402        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
2403      }
2404      $xfer += $output->writeFieldBegin('handle', TType::STRUCT, 1);
2405      $xfer += $this->handle->write($output);
2406      $xfer += $output->writeFieldEnd();
2407    }
2408    if ($this->offset !== null) {
2409      $xfer += $output->writeFieldBegin('offset', TType::I64, -1);
2410      $xfer += $output->writeI64($this->offset);
2411      $xfer += $output->writeFieldEnd();
2412    }
2413    if ($this->size !== null) {
2414      $xfer += $output->writeFieldBegin('size', TType::I32, -2);
2415      $xfer += $output->writeI32($this->size);
2416      $xfer += $output->writeFieldEnd();
2417    }
2418    $xfer += $output->writeFieldStop();
2419    $xfer += $output->writeStructEnd();
2420    return $xfer;
2421  }
2422
2423}
2424
2425class ThriftHadoopFileSystem_read_result {
2426  static $_TSPEC;
2427
2428  public $success = null;
2429  public $ouch = null;
2430
2431  public function __construct($vals=null) {
2432    if (!isset(self::$_TSPEC)) {
2433      self::$_TSPEC = array(
2434        0 => array(
2435          'var' => 'success',
2436          'type' => TType::STRING,
2437          ),
2438        1 => array(
2439          'var' => 'ouch',
2440          'type' => TType::STRUCT,
2441          'class' => 'ThriftIOException',
2442          ),
2443        );
2444    }
2445    if (is_array($vals)) {
2446      if (isset($vals['success'])) {
2447        $this->success = $vals['success'];
2448      }
2449      if (isset($vals['ouch'])) {
2450        $this->ouch = $vals['ouch'];
2451      }
2452    }
2453  }
2454
2455  public function getName() {
2456    return 'ThriftHadoopFileSystem_read_result';
2457  }
2458
2459  public function read($input)
2460  {
2461    $xfer = 0;
2462    $fname = null;
2463    $ftype = 0;
2464    $fid = 0;
2465    $xfer += $input->readStructBegin($fname);
2466    while (true)
2467    {
2468      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2469      if ($ftype == TType::STOP) {
2470        break;
2471      }
2472      switch ($fid)
2473      {
2474        case 0:
2475          if ($ftype == TType::STRING) {
2476            $xfer += $input->readString($this->success);
2477          } else {
2478            $xfer += $input->skip($ftype);
2479          }
2480          break;
2481        case 1:
2482          if ($ftype == TType::STRUCT) {
2483            $this->ouch = new ThriftIOException();
2484            $xfer += $this->ouch->read($input);
2485          } else {
2486            $xfer += $input->skip($ftype);
2487          }
2488          break;
2489        default:
2490          $xfer += $input->skip($ftype);
2491          break;
2492      }
2493      $xfer += $input->readFieldEnd();
2494    }
2495    $xfer += $input->readStructEnd();
2496    return $xfer;
2497  }
2498
2499  public function write($output) {
2500    $xfer = 0;
2501    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_read_result');
2502    if ($this->success !== null) {
2503      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
2504      $xfer += $output->writeString($this->success);
2505      $xfer += $output->writeFieldEnd();
2506    }
2507    if ($this->ouch !== null) {
2508      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
2509      $xfer += $this->ouch->write($output);
2510      $xfer += $output->writeFieldEnd();
2511    }
2512    $xfer += $output->writeFieldStop();
2513    $xfer += $output->writeStructEnd();
2514    return $xfer;
2515  }
2516
2517}
2518
2519class ThriftHadoopFileSystem_close_args {
2520  static $_TSPEC;
2521
2522  public $out = null;
2523
2524  public function __construct($vals=null) {
2525    if (!isset(self::$_TSPEC)) {
2526      self::$_TSPEC = array(
2527        1 => array(
2528          'var' => 'out',
2529          'type' => TType::STRUCT,
2530          'class' => 'ThriftHandle',
2531          ),
2532        );
2533    }
2534    if (is_array($vals)) {
2535      if (isset($vals['out'])) {
2536        $this->out = $vals['out'];
2537      }
2538    }
2539  }
2540
2541  public function getName() {
2542    return 'ThriftHadoopFileSystem_close_args';
2543  }
2544
2545  public function read($input)
2546  {
2547    $xfer = 0;
2548    $fname = null;
2549    $ftype = 0;
2550    $fid = 0;
2551    $xfer += $input->readStructBegin($fname);
2552    while (true)
2553    {
2554      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2555      if ($ftype == TType::STOP) {
2556        break;
2557      }
2558      switch ($fid)
2559      {
2560        case 1:
2561          if ($ftype == TType::STRUCT) {
2562            $this->out = new ThriftHandle();
2563            $xfer += $this->out->read($input);
2564          } else {
2565            $xfer += $input->skip($ftype);
2566          }
2567          break;
2568        default:
2569          $xfer += $input->skip($ftype);
2570          break;
2571      }
2572      $xfer += $input->readFieldEnd();
2573    }
2574    $xfer += $input->readStructEnd();
2575    return $xfer;
2576  }
2577
2578  public function write($output) {
2579    $xfer = 0;
2580    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_close_args');
2581    if ($this->out !== null) {
2582      if (!is_object($this->out)) {
2583        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
2584      }
2585      $xfer += $output->writeFieldBegin('out', TType::STRUCT, 1);
2586      $xfer += $this->out->write($output);
2587      $xfer += $output->writeFieldEnd();
2588    }
2589    $xfer += $output->writeFieldStop();
2590    $xfer += $output->writeStructEnd();
2591    return $xfer;
2592  }
2593
2594}
2595
2596class ThriftHadoopFileSystem_close_result {
2597  static $_TSPEC;
2598
2599  public $success = null;
2600  public $ouch = null;
2601
2602  public function __construct($vals=null) {
2603    if (!isset(self::$_TSPEC)) {
2604      self::$_TSPEC = array(
2605        0 => array(
2606          'var' => 'success',
2607          'type' => TType::BOOL,
2608          ),
2609        1 => array(
2610          'var' => 'ouch',
2611          'type' => TType::STRUCT,
2612          'class' => 'ThriftIOException',
2613          ),
2614        );
2615    }
2616    if (is_array($vals)) {
2617      if (isset($vals['success'])) {
2618        $this->success = $vals['success'];
2619      }
2620      if (isset($vals['ouch'])) {
2621        $this->ouch = $vals['ouch'];
2622      }
2623    }
2624  }
2625
2626  public function getName() {
2627    return 'ThriftHadoopFileSystem_close_result';
2628  }
2629
2630  public function read($input)
2631  {
2632    $xfer = 0;
2633    $fname = null;
2634    $ftype = 0;
2635    $fid = 0;
2636    $xfer += $input->readStructBegin($fname);
2637    while (true)
2638    {
2639      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2640      if ($ftype == TType::STOP) {
2641        break;
2642      }
2643      switch ($fid)
2644      {
2645        case 0:
2646          if ($ftype == TType::BOOL) {
2647            $xfer += $input->readBool($this->success);
2648          } else {
2649            $xfer += $input->skip($ftype);
2650          }
2651          break;
2652        case 1:
2653          if ($ftype == TType::STRUCT) {
2654            $this->ouch = new ThriftIOException();
2655            $xfer += $this->ouch->read($input);
2656          } else {
2657            $xfer += $input->skip($ftype);
2658          }
2659          break;
2660        default:
2661          $xfer += $input->skip($ftype);
2662          break;
2663      }
2664      $xfer += $input->readFieldEnd();
2665    }
2666    $xfer += $input->readStructEnd();
2667    return $xfer;
2668  }
2669
2670  public function write($output) {
2671    $xfer = 0;
2672    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_close_result');
2673    if ($this->success !== null) {
2674      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
2675      $xfer += $output->writeBool($this->success);
2676      $xfer += $output->writeFieldEnd();
2677    }
2678    if ($this->ouch !== null) {
2679      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
2680      $xfer += $this->ouch->write($output);
2681      $xfer += $output->writeFieldEnd();
2682    }
2683    $xfer += $output->writeFieldStop();
2684    $xfer += $output->writeStructEnd();
2685    return $xfer;
2686  }
2687
2688}
2689
2690class ThriftHadoopFileSystem_rm_args {
2691  static $_TSPEC;
2692
2693  public $path = null;
2694  public $recursive = null;
2695
2696  public function __construct($vals=null) {
2697    if (!isset(self::$_TSPEC)) {
2698      self::$_TSPEC = array(
2699        1 => array(
2700          'var' => 'path',
2701          'type' => TType::STRUCT,
2702          'class' => 'Pathname',
2703          ),
2704        2 => array(
2705          'var' => 'recursive',
2706          'type' => TType::BOOL,
2707          ),
2708        );
2709    }
2710    if (is_array($vals)) {
2711      if (isset($vals['path'])) {
2712        $this->path = $vals['path'];
2713      }
2714      if (isset($vals['recursive'])) {
2715        $this->recursive = $vals['recursive'];
2716      }
2717    }
2718  }
2719
2720  public function getName() {
2721    return 'ThriftHadoopFileSystem_rm_args';
2722  }
2723
2724  public function read($input)
2725  {
2726    $xfer = 0;
2727    $fname = null;
2728    $ftype = 0;
2729    $fid = 0;
2730    $xfer += $input->readStructBegin($fname);
2731    while (true)
2732    {
2733      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2734      if ($ftype == TType::STOP) {
2735        break;
2736      }
2737      switch ($fid)
2738      {
2739        case 1:
2740          if ($ftype == TType::STRUCT) {
2741            $this->path = new Pathname();
2742            $xfer += $this->path->read($input);
2743          } else {
2744            $xfer += $input->skip($ftype);
2745          }
2746          break;
2747        case 2:
2748          if ($ftype == TType::BOOL) {
2749            $xfer += $input->readBool($this->recursive);
2750          } else {
2751            $xfer += $input->skip($ftype);
2752          }
2753          break;
2754        default:
2755          $xfer += $input->skip($ftype);
2756          break;
2757      }
2758      $xfer += $input->readFieldEnd();
2759    }
2760    $xfer += $input->readStructEnd();
2761    return $xfer;
2762  }
2763
2764  public function write($output) {
2765    $xfer = 0;
2766    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rm_args');
2767    if ($this->path !== null) {
2768      if (!is_object($this->path)) {
2769        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
2770      }
2771      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
2772      $xfer += $this->path->write($output);
2773      $xfer += $output->writeFieldEnd();
2774    }
2775    if ($this->recursive !== null) {
2776      $xfer += $output->writeFieldBegin('recursive', TType::BOOL, 2);
2777      $xfer += $output->writeBool($this->recursive);
2778      $xfer += $output->writeFieldEnd();
2779    }
2780    $xfer += $output->writeFieldStop();
2781    $xfer += $output->writeStructEnd();
2782    return $xfer;
2783  }
2784
2785}
2786
2787class ThriftHadoopFileSystem_rm_result {
2788  static $_TSPEC;
2789
2790  public $success = null;
2791  public $ouch = null;
2792
2793  public function __construct($vals=null) {
2794    if (!isset(self::$_TSPEC)) {
2795      self::$_TSPEC = array(
2796        0 => array(
2797          'var' => 'success',
2798          'type' => TType::BOOL,
2799          ),
2800        1 => array(
2801          'var' => 'ouch',
2802          'type' => TType::STRUCT,
2803          'class' => 'ThriftIOException',
2804          ),
2805        );
2806    }
2807    if (is_array($vals)) {
2808      if (isset($vals['success'])) {
2809        $this->success = $vals['success'];
2810      }
2811      if (isset($vals['ouch'])) {
2812        $this->ouch = $vals['ouch'];
2813      }
2814    }
2815  }
2816
2817  public function getName() {
2818    return 'ThriftHadoopFileSystem_rm_result';
2819  }
2820
2821  public function read($input)
2822  {
2823    $xfer = 0;
2824    $fname = null;
2825    $ftype = 0;
2826    $fid = 0;
2827    $xfer += $input->readStructBegin($fname);
2828    while (true)
2829    {
2830      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2831      if ($ftype == TType::STOP) {
2832        break;
2833      }
2834      switch ($fid)
2835      {
2836        case 0:
2837          if ($ftype == TType::BOOL) {
2838            $xfer += $input->readBool($this->success);
2839          } else {
2840            $xfer += $input->skip($ftype);
2841          }
2842          break;
2843        case 1:
2844          if ($ftype == TType::STRUCT) {
2845            $this->ouch = new ThriftIOException();
2846            $xfer += $this->ouch->read($input);
2847          } else {
2848            $xfer += $input->skip($ftype);
2849          }
2850          break;
2851        default:
2852          $xfer += $input->skip($ftype);
2853          break;
2854      }
2855      $xfer += $input->readFieldEnd();
2856    }
2857    $xfer += $input->readStructEnd();
2858    return $xfer;
2859  }
2860
2861  public function write($output) {
2862    $xfer = 0;
2863    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rm_result');
2864    if ($this->success !== null) {
2865      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
2866      $xfer += $output->writeBool($this->success);
2867      $xfer += $output->writeFieldEnd();
2868    }
2869    if ($this->ouch !== null) {
2870      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
2871      $xfer += $this->ouch->write($output);
2872      $xfer += $output->writeFieldEnd();
2873    }
2874    $xfer += $output->writeFieldStop();
2875    $xfer += $output->writeStructEnd();
2876    return $xfer;
2877  }
2878
2879}
2880
2881class ThriftHadoopFileSystem_rename_args {
2882  static $_TSPEC;
2883
2884  public $path = null;
2885  public $dest = null;
2886
2887  public function __construct($vals=null) {
2888    if (!isset(self::$_TSPEC)) {
2889      self::$_TSPEC = array(
2890        1 => array(
2891          'var' => 'path',
2892          'type' => TType::STRUCT,
2893          'class' => 'Pathname',
2894          ),
2895        2 => array(
2896          'var' => 'dest',
2897          'type' => TType::STRUCT,
2898          'class' => 'Pathname',
2899          ),
2900        );
2901    }
2902    if (is_array($vals)) {
2903      if (isset($vals['path'])) {
2904        $this->path = $vals['path'];
2905      }
2906      if (isset($vals['dest'])) {
2907        $this->dest = $vals['dest'];
2908      }
2909    }
2910  }
2911
2912  public function getName() {
2913    return 'ThriftHadoopFileSystem_rename_args';
2914  }
2915
2916  public function read($input)
2917  {
2918    $xfer = 0;
2919    $fname = null;
2920    $ftype = 0;
2921    $fid = 0;
2922    $xfer += $input->readStructBegin($fname);
2923    while (true)
2924    {
2925      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
2926      if ($ftype == TType::STOP) {
2927        break;
2928      }
2929      switch ($fid)
2930      {
2931        case 1:
2932          if ($ftype == TType::STRUCT) {
2933            $this->path = new Pathname();
2934            $xfer += $this->path->read($input);
2935          } else {
2936            $xfer += $input->skip($ftype);
2937          }
2938          break;
2939        case 2:
2940          if ($ftype == TType::STRUCT) {
2941            $this->dest = new Pathname();
2942            $xfer += $this->dest->read($input);
2943          } else {
2944            $xfer += $input->skip($ftype);
2945          }
2946          break;
2947        default:
2948          $xfer += $input->skip($ftype);
2949          break;
2950      }
2951      $xfer += $input->readFieldEnd();
2952    }
2953    $xfer += $input->readStructEnd();
2954    return $xfer;
2955  }
2956
2957  public function write($output) {
2958    $xfer = 0;
2959    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rename_args');
2960    if ($this->path !== null) {
2961      if (!is_object($this->path)) {
2962        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
2963      }
2964      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
2965      $xfer += $this->path->write($output);
2966      $xfer += $output->writeFieldEnd();
2967    }
2968    if ($this->dest !== null) {
2969      if (!is_object($this->dest)) {
2970        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
2971      }
2972      $xfer += $output->writeFieldBegin('dest', TType::STRUCT, 2);
2973      $xfer += $this->dest->write($output);
2974      $xfer += $output->writeFieldEnd();
2975    }
2976    $xfer += $output->writeFieldStop();
2977    $xfer += $output->writeStructEnd();
2978    return $xfer;
2979  }
2980
2981}
2982
2983class ThriftHadoopFileSystem_rename_result {
2984  static $_TSPEC;
2985
2986  public $success = null;
2987  public $ouch = null;
2988
2989  public function __construct($vals=null) {
2990    if (!isset(self::$_TSPEC)) {
2991      self::$_TSPEC = array(
2992        0 => array(
2993          'var' => 'success',
2994          'type' => TType::BOOL,
2995          ),
2996        1 => array(
2997          'var' => 'ouch',
2998          'type' => TType::STRUCT,
2999          'class' => 'ThriftIOException',
3000          ),
3001        );
3002    }
3003    if (is_array($vals)) {
3004      if (isset($vals['success'])) {
3005        $this->success = $vals['success'];
3006      }
3007      if (isset($vals['ouch'])) {
3008        $this->ouch = $vals['ouch'];
3009      }
3010    }
3011  }
3012
3013  public function getName() {
3014    return 'ThriftHadoopFileSystem_rename_result';
3015  }
3016
3017  public function read($input)
3018  {
3019    $xfer = 0;
3020    $fname = null;
3021    $ftype = 0;
3022    $fid = 0;
3023    $xfer += $input->readStructBegin($fname);
3024    while (true)
3025    {
3026      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3027      if ($ftype == TType::STOP) {
3028        break;
3029      }
3030      switch ($fid)
3031      {
3032        case 0:
3033          if ($ftype == TType::BOOL) {
3034            $xfer += $input->readBool($this->success);
3035          } else {
3036            $xfer += $input->skip($ftype);
3037          }
3038          break;
3039        case 1:
3040          if ($ftype == TType::STRUCT) {
3041            $this->ouch = new ThriftIOException();
3042            $xfer += $this->ouch->read($input);
3043          } else {
3044            $xfer += $input->skip($ftype);
3045          }
3046          break;
3047        default:
3048          $xfer += $input->skip($ftype);
3049          break;
3050      }
3051      $xfer += $input->readFieldEnd();
3052    }
3053    $xfer += $input->readStructEnd();
3054    return $xfer;
3055  }
3056
3057  public function write($output) {
3058    $xfer = 0;
3059    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_rename_result');
3060    if ($this->success !== null) {
3061      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
3062      $xfer += $output->writeBool($this->success);
3063      $xfer += $output->writeFieldEnd();
3064    }
3065    if ($this->ouch !== null) {
3066      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
3067      $xfer += $this->ouch->write($output);
3068      $xfer += $output->writeFieldEnd();
3069    }
3070    $xfer += $output->writeFieldStop();
3071    $xfer += $output->writeStructEnd();
3072    return $xfer;
3073  }
3074
3075}
3076
3077class ThriftHadoopFileSystem_mkdirs_args {
3078  static $_TSPEC;
3079
3080  public $path = null;
3081
3082  public function __construct($vals=null) {
3083    if (!isset(self::$_TSPEC)) {
3084      self::$_TSPEC = array(
3085        1 => array(
3086          'var' => 'path',
3087          'type' => TType::STRUCT,
3088          'class' => 'Pathname',
3089          ),
3090        );
3091    }
3092    if (is_array($vals)) {
3093      if (isset($vals['path'])) {
3094        $this->path = $vals['path'];
3095      }
3096    }
3097  }
3098
3099  public function getName() {
3100    return 'ThriftHadoopFileSystem_mkdirs_args';
3101  }
3102
3103  public function read($input)
3104  {
3105    $xfer = 0;
3106    $fname = null;
3107    $ftype = 0;
3108    $fid = 0;
3109    $xfer += $input->readStructBegin($fname);
3110    while (true)
3111    {
3112      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3113      if ($ftype == TType::STOP) {
3114        break;
3115      }
3116      switch ($fid)
3117      {
3118        case 1:
3119          if ($ftype == TType::STRUCT) {
3120            $this->path = new Pathname();
3121            $xfer += $this->path->read($input);
3122          } else {
3123            $xfer += $input->skip($ftype);
3124          }
3125          break;
3126        default:
3127          $xfer += $input->skip($ftype);
3128          break;
3129      }
3130      $xfer += $input->readFieldEnd();
3131    }
3132    $xfer += $input->readStructEnd();
3133    return $xfer;
3134  }
3135
3136  public function write($output) {
3137    $xfer = 0;
3138    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_mkdirs_args');
3139    if ($this->path !== null) {
3140      if (!is_object($this->path)) {
3141        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
3142      }
3143      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
3144      $xfer += $this->path->write($output);
3145      $xfer += $output->writeFieldEnd();
3146    }
3147    $xfer += $output->writeFieldStop();
3148    $xfer += $output->writeStructEnd();
3149    return $xfer;
3150  }
3151
3152}
3153
3154class ThriftHadoopFileSystem_mkdirs_result {
3155  static $_TSPEC;
3156
3157  public $success = null;
3158  public $ouch = null;
3159
3160  public function __construct($vals=null) {
3161    if (!isset(self::$_TSPEC)) {
3162      self::$_TSPEC = array(
3163        0 => array(
3164          'var' => 'success',
3165          'type' => TType::BOOL,
3166          ),
3167        1 => array(
3168          'var' => 'ouch',
3169          'type' => TType::STRUCT,
3170          'class' => 'ThriftIOException',
3171          ),
3172        );
3173    }
3174    if (is_array($vals)) {
3175      if (isset($vals['success'])) {
3176        $this->success = $vals['success'];
3177      }
3178      if (isset($vals['ouch'])) {
3179        $this->ouch = $vals['ouch'];
3180      }
3181    }
3182  }
3183
3184  public function getName() {
3185    return 'ThriftHadoopFileSystem_mkdirs_result';
3186  }
3187
3188  public function read($input)
3189  {
3190    $xfer = 0;
3191    $fname = null;
3192    $ftype = 0;
3193    $fid = 0;
3194    $xfer += $input->readStructBegin($fname);
3195    while (true)
3196    {
3197      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3198      if ($ftype == TType::STOP) {
3199        break;
3200      }
3201      switch ($fid)
3202      {
3203        case 0:
3204          if ($ftype == TType::BOOL) {
3205            $xfer += $input->readBool($this->success);
3206          } else {
3207            $xfer += $input->skip($ftype);
3208          }
3209          break;
3210        case 1:
3211          if ($ftype == TType::STRUCT) {
3212            $this->ouch = new ThriftIOException();
3213            $xfer += $this->ouch->read($input);
3214          } else {
3215            $xfer += $input->skip($ftype);
3216          }
3217          break;
3218        default:
3219          $xfer += $input->skip($ftype);
3220          break;
3221      }
3222      $xfer += $input->readFieldEnd();
3223    }
3224    $xfer += $input->readStructEnd();
3225    return $xfer;
3226  }
3227
3228  public function write($output) {
3229    $xfer = 0;
3230    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_mkdirs_result');
3231    if ($this->success !== null) {
3232      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
3233      $xfer += $output->writeBool($this->success);
3234      $xfer += $output->writeFieldEnd();
3235    }
3236    if ($this->ouch !== null) {
3237      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
3238      $xfer += $this->ouch->write($output);
3239      $xfer += $output->writeFieldEnd();
3240    }
3241    $xfer += $output->writeFieldStop();
3242    $xfer += $output->writeStructEnd();
3243    return $xfer;
3244  }
3245
3246}
3247
3248class ThriftHadoopFileSystem_exists_args {
3249  static $_TSPEC;
3250
3251  public $path = null;
3252
3253  public function __construct($vals=null) {
3254    if (!isset(self::$_TSPEC)) {
3255      self::$_TSPEC = array(
3256        1 => array(
3257          'var' => 'path',
3258          'type' => TType::STRUCT,
3259          'class' => 'Pathname',
3260          ),
3261        );
3262    }
3263    if (is_array($vals)) {
3264      if (isset($vals['path'])) {
3265        $this->path = $vals['path'];
3266      }
3267    }
3268  }
3269
3270  public function getName() {
3271    return 'ThriftHadoopFileSystem_exists_args';
3272  }
3273
3274  public function read($input)
3275  {
3276    $xfer = 0;
3277    $fname = null;
3278    $ftype = 0;
3279    $fid = 0;
3280    $xfer += $input->readStructBegin($fname);
3281    while (true)
3282    {
3283      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3284      if ($ftype == TType::STOP) {
3285        break;
3286      }
3287      switch ($fid)
3288      {
3289        case 1:
3290          if ($ftype == TType::STRUCT) {
3291            $this->path = new Pathname();
3292            $xfer += $this->path->read($input);
3293          } else {
3294            $xfer += $input->skip($ftype);
3295          }
3296          break;
3297        default:
3298          $xfer += $input->skip($ftype);
3299          break;
3300      }
3301      $xfer += $input->readFieldEnd();
3302    }
3303    $xfer += $input->readStructEnd();
3304    return $xfer;
3305  }
3306
3307  public function write($output) {
3308    $xfer = 0;
3309    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_exists_args');
3310    if ($this->path !== null) {
3311      if (!is_object($this->path)) {
3312        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
3313      }
3314      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
3315      $xfer += $this->path->write($output);
3316      $xfer += $output->writeFieldEnd();
3317    }
3318    $xfer += $output->writeFieldStop();
3319    $xfer += $output->writeStructEnd();
3320    return $xfer;
3321  }
3322
3323}
3324
3325class ThriftHadoopFileSystem_exists_result {
3326  static $_TSPEC;
3327
3328  public $success = null;
3329  public $ouch = null;
3330
3331  public function __construct($vals=null) {
3332    if (!isset(self::$_TSPEC)) {
3333      self::$_TSPEC = array(
3334        0 => array(
3335          'var' => 'success',
3336          'type' => TType::BOOL,
3337          ),
3338        1 => array(
3339          'var' => 'ouch',
3340          'type' => TType::STRUCT,
3341          'class' => 'ThriftIOException',
3342          ),
3343        );
3344    }
3345    if (is_array($vals)) {
3346      if (isset($vals['success'])) {
3347        $this->success = $vals['success'];
3348      }
3349      if (isset($vals['ouch'])) {
3350        $this->ouch = $vals['ouch'];
3351      }
3352    }
3353  }
3354
3355  public function getName() {
3356    return 'ThriftHadoopFileSystem_exists_result';
3357  }
3358
3359  public function read($input)
3360  {
3361    $xfer = 0;
3362    $fname = null;
3363    $ftype = 0;
3364    $fid = 0;
3365    $xfer += $input->readStructBegin($fname);
3366    while (true)
3367    {
3368      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3369      if ($ftype == TType::STOP) {
3370        break;
3371      }
3372      switch ($fid)
3373      {
3374        case 0:
3375          if ($ftype == TType::BOOL) {
3376            $xfer += $input->readBool($this->success);
3377          } else {
3378            $xfer += $input->skip($ftype);
3379          }
3380          break;
3381        case 1:
3382          if ($ftype == TType::STRUCT) {
3383            $this->ouch = new ThriftIOException();
3384            $xfer += $this->ouch->read($input);
3385          } else {
3386            $xfer += $input->skip($ftype);
3387          }
3388          break;
3389        default:
3390          $xfer += $input->skip($ftype);
3391          break;
3392      }
3393      $xfer += $input->readFieldEnd();
3394    }
3395    $xfer += $input->readStructEnd();
3396    return $xfer;
3397  }
3398
3399  public function write($output) {
3400    $xfer = 0;
3401    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_exists_result');
3402    if ($this->success !== null) {
3403      $xfer += $output->writeFieldBegin('success', TType::BOOL, 0);
3404      $xfer += $output->writeBool($this->success);
3405      $xfer += $output->writeFieldEnd();
3406    }
3407    if ($this->ouch !== null) {
3408      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
3409      $xfer += $this->ouch->write($output);
3410      $xfer += $output->writeFieldEnd();
3411    }
3412    $xfer += $output->writeFieldStop();
3413    $xfer += $output->writeStructEnd();
3414    return $xfer;
3415  }
3416
3417}
3418
3419class ThriftHadoopFileSystem_stat_args {
3420  static $_TSPEC;
3421
3422  public $path = null;
3423
3424  public function __construct($vals=null) {
3425    if (!isset(self::$_TSPEC)) {
3426      self::$_TSPEC = array(
3427        1 => array(
3428          'var' => 'path',
3429          'type' => TType::STRUCT,
3430          'class' => 'Pathname',
3431          ),
3432        );
3433    }
3434    if (is_array($vals)) {
3435      if (isset($vals['path'])) {
3436        $this->path = $vals['path'];
3437      }
3438    }
3439  }
3440
3441  public function getName() {
3442    return 'ThriftHadoopFileSystem_stat_args';
3443  }
3444
3445  public function read($input)
3446  {
3447    $xfer = 0;
3448    $fname = null;
3449    $ftype = 0;
3450    $fid = 0;
3451    $xfer += $input->readStructBegin($fname);
3452    while (true)
3453    {
3454      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3455      if ($ftype == TType::STOP) {
3456        break;
3457      }
3458      switch ($fid)
3459      {
3460        case 1:
3461          if ($ftype == TType::STRUCT) {
3462            $this->path = new Pathname();
3463            $xfer += $this->path->read($input);
3464          } else {
3465            $xfer += $input->skip($ftype);
3466          }
3467          break;
3468        default:
3469          $xfer += $input->skip($ftype);
3470          break;
3471      }
3472      $xfer += $input->readFieldEnd();
3473    }
3474    $xfer += $input->readStructEnd();
3475    return $xfer;
3476  }
3477
3478  public function write($output) {
3479    $xfer = 0;
3480    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_stat_args');
3481    if ($this->path !== null) {
3482      if (!is_object($this->path)) {
3483        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
3484      }
3485      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
3486      $xfer += $this->path->write($output);
3487      $xfer += $output->writeFieldEnd();
3488    }
3489    $xfer += $output->writeFieldStop();
3490    $xfer += $output->writeStructEnd();
3491    return $xfer;
3492  }
3493
3494}
3495
3496class ThriftHadoopFileSystem_stat_result {
3497  static $_TSPEC;
3498
3499  public $success = null;
3500  public $ouch = null;
3501
3502  public function __construct($vals=null) {
3503    if (!isset(self::$_TSPEC)) {
3504      self::$_TSPEC = array(
3505        0 => array(
3506          'var' => 'success',
3507          'type' => TType::STRUCT,
3508          'class' => 'FileStatus',
3509          ),
3510        1 => array(
3511          'var' => 'ouch',
3512          'type' => TType::STRUCT,
3513          'class' => 'ThriftIOException',
3514          ),
3515        );
3516    }
3517    if (is_array($vals)) {
3518      if (isset($vals['success'])) {
3519        $this->success = $vals['success'];
3520      }
3521      if (isset($vals['ouch'])) {
3522        $this->ouch = $vals['ouch'];
3523      }
3524    }
3525  }
3526
3527  public function getName() {
3528    return 'ThriftHadoopFileSystem_stat_result';
3529  }
3530
3531  public function read($input)
3532  {
3533    $xfer = 0;
3534    $fname = null;
3535    $ftype = 0;
3536    $fid = 0;
3537    $xfer += $input->readStructBegin($fname);
3538    while (true)
3539    {
3540      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3541      if ($ftype == TType::STOP) {
3542        break;
3543      }
3544      switch ($fid)
3545      {
3546        case 0:
3547          if ($ftype == TType::STRUCT) {
3548            $this->success = new FileStatus();
3549            $xfer += $this->success->read($input);
3550          } else {
3551            $xfer += $input->skip($ftype);
3552          }
3553          break;
3554        case 1:
3555          if ($ftype == TType::STRUCT) {
3556            $this->ouch = new ThriftIOException();
3557            $xfer += $this->ouch->read($input);
3558          } else {
3559            $xfer += $input->skip($ftype);
3560          }
3561          break;
3562        default:
3563          $xfer += $input->skip($ftype);
3564          break;
3565      }
3566      $xfer += $input->readFieldEnd();
3567    }
3568    $xfer += $input->readStructEnd();
3569    return $xfer;
3570  }
3571
3572  public function write($output) {
3573    $xfer = 0;
3574    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_stat_result');
3575    if ($this->success !== null) {
3576      if (!is_object($this->success)) {
3577        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
3578      }
3579      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
3580      $xfer += $this->success->write($output);
3581      $xfer += $output->writeFieldEnd();
3582    }
3583    if ($this->ouch !== null) {
3584      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
3585      $xfer += $this->ouch->write($output);
3586      $xfer += $output->writeFieldEnd();
3587    }
3588    $xfer += $output->writeFieldStop();
3589    $xfer += $output->writeStructEnd();
3590    return $xfer;
3591  }
3592
3593}
3594
3595class ThriftHadoopFileSystem_listStatus_args {
3596  static $_TSPEC;
3597
3598  public $path = null;
3599
3600  public function __construct($vals=null) {
3601    if (!isset(self::$_TSPEC)) {
3602      self::$_TSPEC = array(
3603        1 => array(
3604          'var' => 'path',
3605          'type' => TType::STRUCT,
3606          'class' => 'Pathname',
3607          ),
3608        );
3609    }
3610    if (is_array($vals)) {
3611      if (isset($vals['path'])) {
3612        $this->path = $vals['path'];
3613      }
3614    }
3615  }
3616
3617  public function getName() {
3618    return 'ThriftHadoopFileSystem_listStatus_args';
3619  }
3620
3621  public function read($input)
3622  {
3623    $xfer = 0;
3624    $fname = null;
3625    $ftype = 0;
3626    $fid = 0;
3627    $xfer += $input->readStructBegin($fname);
3628    while (true)
3629    {
3630      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3631      if ($ftype == TType::STOP) {
3632        break;
3633      }
3634      switch ($fid)
3635      {
3636        case 1:
3637          if ($ftype == TType::STRUCT) {
3638            $this->path = new Pathname();
3639            $xfer += $this->path->read($input);
3640          } else {
3641            $xfer += $input->skip($ftype);
3642          }
3643          break;
3644        default:
3645          $xfer += $input->skip($ftype);
3646          break;
3647      }
3648      $xfer += $input->readFieldEnd();
3649    }
3650    $xfer += $input->readStructEnd();
3651    return $xfer;
3652  }
3653
3654  public function write($output) {
3655    $xfer = 0;
3656    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_listStatus_args');
3657    if ($this->path !== null) {
3658      if (!is_object($this->path)) {
3659        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
3660      }
3661      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
3662      $xfer += $this->path->write($output);
3663      $xfer += $output->writeFieldEnd();
3664    }
3665    $xfer += $output->writeFieldStop();
3666    $xfer += $output->writeStructEnd();
3667    return $xfer;
3668  }
3669
3670}
3671
3672class ThriftHadoopFileSystem_listStatus_result {
3673  static $_TSPEC;
3674
3675  public $success = null;
3676  public $ouch = null;
3677
3678  public function __construct($vals=null) {
3679    if (!isset(self::$_TSPEC)) {
3680      self::$_TSPEC = array(
3681        0 => array(
3682          'var' => 'success',
3683          'type' => TType::LST,
3684          'etype' => TType::STRUCT,
3685          'elem' => array(
3686            'type' => TType::STRUCT,
3687            'class' => 'FileStatus',
3688            ),
3689          ),
3690        1 => array(
3691          'var' => 'ouch',
3692          'type' => TType::STRUCT,
3693          'class' => 'ThriftIOException',
3694          ),
3695        );
3696    }
3697    if (is_array($vals)) {
3698      if (isset($vals['success'])) {
3699        $this->success = $vals['success'];
3700      }
3701      if (isset($vals['ouch'])) {
3702        $this->ouch = $vals['ouch'];
3703      }
3704    }
3705  }
3706
3707  public function getName() {
3708    return 'ThriftHadoopFileSystem_listStatus_result';
3709  }
3710
3711  public function read($input)
3712  {
3713    $xfer = 0;
3714    $fname = null;
3715    $ftype = 0;
3716    $fid = 0;
3717    $xfer += $input->readStructBegin($fname);
3718    while (true)
3719    {
3720      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3721      if ($ftype == TType::STOP) {
3722        break;
3723      }
3724      switch ($fid)
3725      {
3726        case 0:
3727          if ($ftype == TType::LST) {
3728            $this->success = array();
3729            $_size14 = 0;
3730            $_etype17 = 0;
3731            $xfer += $input->readListBegin($_etype17, $_size14);
3732            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
3733            {
3734              $elem19 = null;
3735              $elem19 = new FileStatus();
3736              $xfer += $elem19->read($input);
3737              $this->success []= $elem19;
3738            }
3739            $xfer += $input->readListEnd();
3740          } else {
3741            $xfer += $input->skip($ftype);
3742          }
3743          break;
3744        case 1:
3745          if ($ftype == TType::STRUCT) {
3746            $this->ouch = new ThriftIOException();
3747            $xfer += $this->ouch->read($input);
3748          } else {
3749            $xfer += $input->skip($ftype);
3750          }
3751          break;
3752        default:
3753          $xfer += $input->skip($ftype);
3754          break;
3755      }
3756      $xfer += $input->readFieldEnd();
3757    }
3758    $xfer += $input->readStructEnd();
3759    return $xfer;
3760  }
3761
3762  public function write($output) {
3763    $xfer = 0;
3764    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_listStatus_result');
3765    if ($this->success !== null) {
3766      if (!is_array($this->success)) {
3767        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
3768      }
3769      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
3770      {
3771        $output->writeListBegin(TType::STRUCT, count($this->success));
3772        {
3773          foreach ($this->success as $iter20)
3774          {
3775            $xfer += $iter20->write($output);
3776          }
3777        }
3778        $output->writeListEnd();
3779      }
3780      $xfer += $output->writeFieldEnd();
3781    }
3782    if ($this->ouch !== null) {
3783      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
3784      $xfer += $this->ouch->write($output);
3785      $xfer += $output->writeFieldEnd();
3786    }
3787    $xfer += $output->writeFieldStop();
3788    $xfer += $output->writeStructEnd();
3789    return $xfer;
3790  }
3791
3792}
3793
3794class ThriftHadoopFileSystem_chmod_args {
3795  static $_TSPEC;
3796
3797  public $path = null;
3798  public $mode = null;
3799
3800  public function __construct($vals=null) {
3801    if (!isset(self::$_TSPEC)) {
3802      self::$_TSPEC = array(
3803        1 => array(
3804          'var' => 'path',
3805          'type' => TType::STRUCT,
3806          'class' => 'Pathname',
3807          ),
3808        2 => array(
3809          'var' => 'mode',
3810          'type' => TType::I16,
3811          ),
3812        );
3813    }
3814    if (is_array($vals)) {
3815      if (isset($vals['path'])) {
3816        $this->path = $vals['path'];
3817      }
3818      if (isset($vals['mode'])) {
3819        $this->mode = $vals['mode'];
3820      }
3821    }
3822  }
3823
3824  public function getName() {
3825    return 'ThriftHadoopFileSystem_chmod_args';
3826  }
3827
3828  public function read($input)
3829  {
3830    $xfer = 0;
3831    $fname = null;
3832    $ftype = 0;
3833    $fid = 0;
3834    $xfer += $input->readStructBegin($fname);
3835    while (true)
3836    {
3837      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3838      if ($ftype == TType::STOP) {
3839        break;
3840      }
3841      switch ($fid)
3842      {
3843        case 1:
3844          if ($ftype == TType::STRUCT) {
3845            $this->path = new Pathname();
3846            $xfer += $this->path->read($input);
3847          } else {
3848            $xfer += $input->skip($ftype);
3849          }
3850          break;
3851        case 2:
3852          if ($ftype == TType::I16) {
3853            $xfer += $input->readI16($this->mode);
3854          } else {
3855            $xfer += $input->skip($ftype);
3856          }
3857          break;
3858        default:
3859          $xfer += $input->skip($ftype);
3860          break;
3861      }
3862      $xfer += $input->readFieldEnd();
3863    }
3864    $xfer += $input->readStructEnd();
3865    return $xfer;
3866  }
3867
3868  public function write($output) {
3869    $xfer = 0;
3870    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chmod_args');
3871    if ($this->path !== null) {
3872      if (!is_object($this->path)) {
3873        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
3874      }
3875      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
3876      $xfer += $this->path->write($output);
3877      $xfer += $output->writeFieldEnd();
3878    }
3879    if ($this->mode !== null) {
3880      $xfer += $output->writeFieldBegin('mode', TType::I16, 2);
3881      $xfer += $output->writeI16($this->mode);
3882      $xfer += $output->writeFieldEnd();
3883    }
3884    $xfer += $output->writeFieldStop();
3885    $xfer += $output->writeStructEnd();
3886    return $xfer;
3887  }
3888
3889}
3890
3891class ThriftHadoopFileSystem_chmod_result {
3892  static $_TSPEC;
3893
3894  public $ouch = null;
3895
3896  public function __construct($vals=null) {
3897    if (!isset(self::$_TSPEC)) {
3898      self::$_TSPEC = array(
3899        1 => array(
3900          'var' => 'ouch',
3901          'type' => TType::STRUCT,
3902          'class' => 'ThriftIOException',
3903          ),
3904        );
3905    }
3906    if (is_array($vals)) {
3907      if (isset($vals['ouch'])) {
3908        $this->ouch = $vals['ouch'];
3909      }
3910    }
3911  }
3912
3913  public function getName() {
3914    return 'ThriftHadoopFileSystem_chmod_result';
3915  }
3916
3917  public function read($input)
3918  {
3919    $xfer = 0;
3920    $fname = null;
3921    $ftype = 0;
3922    $fid = 0;
3923    $xfer += $input->readStructBegin($fname);
3924    while (true)
3925    {
3926      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
3927      if ($ftype == TType::STOP) {
3928        break;
3929      }
3930      switch ($fid)
3931      {
3932        case 1:
3933          if ($ftype == TType::STRUCT) {
3934            $this->ouch = new ThriftIOException();
3935            $xfer += $this->ouch->read($input);
3936          } else {
3937            $xfer += $input->skip($ftype);
3938          }
3939          break;
3940        default:
3941          $xfer += $input->skip($ftype);
3942          break;
3943      }
3944      $xfer += $input->readFieldEnd();
3945    }
3946    $xfer += $input->readStructEnd();
3947    return $xfer;
3948  }
3949
3950  public function write($output) {
3951    $xfer = 0;
3952    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chmod_result');
3953    if ($this->ouch !== null) {
3954      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
3955      $xfer += $this->ouch->write($output);
3956      $xfer += $output->writeFieldEnd();
3957    }
3958    $xfer += $output->writeFieldStop();
3959    $xfer += $output->writeStructEnd();
3960    return $xfer;
3961  }
3962
3963}
3964
3965class ThriftHadoopFileSystem_chown_args {
3966  static $_TSPEC;
3967
3968  public $path = null;
3969  public $owner = null;
3970  public $group = null;
3971
3972  public function __construct($vals=null) {
3973    if (!isset(self::$_TSPEC)) {
3974      self::$_TSPEC = array(
3975        1 => array(
3976          'var' => 'path',
3977          'type' => TType::STRUCT,
3978          'class' => 'Pathname',
3979          ),
3980        2 => array(
3981          'var' => 'owner',
3982          'type' => TType::STRING,
3983          ),
3984        3 => array(
3985          'var' => 'group',
3986          'type' => TType::STRING,
3987          ),
3988        );
3989    }
3990    if (is_array($vals)) {
3991      if (isset($vals['path'])) {
3992        $this->path = $vals['path'];
3993      }
3994      if (isset($vals['owner'])) {
3995        $this->owner = $vals['owner'];
3996      }
3997      if (isset($vals['group'])) {
3998        $this->group = $vals['group'];
3999      }
4000    }
4001  }
4002
4003  public function getName() {
4004    return 'ThriftHadoopFileSystem_chown_args';
4005  }
4006
4007  public function read($input)
4008  {
4009    $xfer = 0;
4010    $fname = null;
4011    $ftype = 0;
4012    $fid = 0;
4013    $xfer += $input->readStructBegin($fname);
4014    while (true)
4015    {
4016      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
4017      if ($ftype == TType::STOP) {
4018        break;
4019      }
4020      switch ($fid)
4021      {
4022        case 1:
4023          if ($ftype == TType::STRUCT) {
4024            $this->path = new Pathname();
4025            $xfer += $this->path->read($input);
4026          } else {
4027            $xfer += $input->skip($ftype);
4028          }
4029          break;
4030        case 2:
4031          if ($ftype == TType::STRING) {
4032            $xfer += $input->readString($this->owner);
4033          } else {
4034            $xfer += $input->skip($ftype);
4035          }
4036          break;
4037        case 3:
4038          if ($ftype == TType::STRING) {
4039            $xfer += $input->readString($this->group);
4040          } else {
4041            $xfer += $input->skip($ftype);
4042          }
4043          break;
4044        default:
4045          $xfer += $input->skip($ftype);
4046          break;
4047      }
4048      $xfer += $input->readFieldEnd();
4049    }
4050    $xfer += $input->readStructEnd();
4051    return $xfer;
4052  }
4053
4054  public function write($output) {
4055    $xfer = 0;
4056    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chown_args');
4057    if ($this->path !== null) {
4058      if (!is_object($this->path)) {
4059        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
4060      }
4061      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
4062      $xfer += $this->path->write($output);
4063      $xfer += $output->writeFieldEnd();
4064    }
4065    if ($this->owner !== null) {
4066      $xfer += $output->writeFieldBegin('owner', TType::STRING, 2);
4067      $xfer += $output->writeString($this->owner);
4068      $xfer += $output->writeFieldEnd();
4069    }
4070    if ($this->group !== null) {
4071      $xfer += $output->writeFieldBegin('group', TType::STRING, 3);
4072      $xfer += $output->writeString($this->group);
4073      $xfer += $output->writeFieldEnd();
4074    }
4075    $xfer += $output->writeFieldStop();
4076    $xfer += $output->writeStructEnd();
4077    return $xfer;
4078  }
4079
4080}
4081
4082class ThriftHadoopFileSystem_chown_result {
4083  static $_TSPEC;
4084
4085  public $ouch = null;
4086
4087  public function __construct($vals=null) {
4088    if (!isset(self::$_TSPEC)) {
4089      self::$_TSPEC = array(
4090        1 => array(
4091          'var' => 'ouch',
4092          'type' => TType::STRUCT,
4093          'class' => 'ThriftIOException',
4094          ),
4095        );
4096    }
4097    if (is_array($vals)) {
4098      if (isset($vals['ouch'])) {
4099        $this->ouch = $vals['ouch'];
4100      }
4101    }
4102  }
4103
4104  public function getName() {
4105    return 'ThriftHadoopFileSystem_chown_result';
4106  }
4107
4108  public function read($input)
4109  {
4110    $xfer = 0;
4111    $fname = null;
4112    $ftype = 0;
4113    $fid = 0;
4114    $xfer += $input->readStructBegin($fname);
4115    while (true)
4116    {
4117      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
4118      if ($ftype == TType::STOP) {
4119        break;
4120      }
4121      switch ($fid)
4122      {
4123        case 1:
4124          if ($ftype == TType::STRUCT) {
4125            $this->ouch = new ThriftIOException();
4126            $xfer += $this->ouch->read($input);
4127          } else {
4128            $xfer += $input->skip($ftype);
4129          }
4130          break;
4131        default:
4132          $xfer += $input->skip($ftype);
4133          break;
4134      }
4135      $xfer += $input->readFieldEnd();
4136    }
4137    $xfer += $input->readStructEnd();
4138    return $xfer;
4139  }
4140
4141  public function write($output) {
4142    $xfer = 0;
4143    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_chown_result');
4144    if ($this->ouch !== null) {
4145      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
4146      $xfer += $this->ouch->write($output);
4147      $xfer += $output->writeFieldEnd();
4148    }
4149    $xfer += $output->writeFieldStop();
4150    $xfer += $output->writeStructEnd();
4151    return $xfer;
4152  }
4153
4154}
4155
4156class ThriftHadoopFileSystem_setReplication_args {
4157  static $_TSPEC;
4158
4159  public $path = null;
4160  public $replication = null;
4161
4162  public function __construct($vals=null) {
4163    if (!isset(self::$_TSPEC)) {
4164      self::$_TSPEC = array(
4165        1 => array(
4166          'var' => 'path',
4167          'type' => TType::STRUCT,
4168          'class' => 'Pathname',
4169          ),
4170        2 => array(
4171          'var' => 'replication',
4172          'type' => TType::I16,
4173          ),
4174        );
4175    }
4176    if (is_array($vals)) {
4177      if (isset($vals['path'])) {
4178        $this->path = $vals['path'];
4179      }
4180      if (isset($vals['replication'])) {
4181        $this->replication = $vals['replication'];
4182      }
4183    }
4184  }
4185
4186  public function getName() {
4187    return 'ThriftHadoopFileSystem_setReplication_args';
4188  }
4189
4190  public function read($input)
4191  {
4192    $xfer = 0;
4193    $fname = null;
4194    $ftype = 0;
4195    $fid = 0;
4196    $xfer += $input->readStructBegin($fname);
4197    while (true)
4198    {
4199      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
4200      if ($ftype == TType::STOP) {
4201        break;
4202      }
4203      switch ($fid)
4204      {
4205        case 1:
4206          if ($ftype == TType::STRUCT) {
4207            $this->path = new Pathname();
4208            $xfer += $this->path->read($input);
4209          } else {
4210            $xfer += $input->skip($ftype);
4211          }
4212          break;
4213        case 2:
4214          if ($ftype == TType::I16) {
4215            $xfer += $input->readI16($this->replication);
4216          } else {
4217            $xfer += $input->skip($ftype);
4218          }
4219          break;
4220        default:
4221          $xfer += $input->skip($ftype);
4222          break;
4223      }
4224      $xfer += $input->readFieldEnd();
4225    }
4226    $xfer += $input->readStructEnd();
4227    return $xfer;
4228  }
4229
4230  public function write($output) {
4231    $xfer = 0;
4232    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setReplication_args');
4233    if ($this->path !== null) {
4234      if (!is_object($this->path)) {
4235        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
4236      }
4237      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
4238      $xfer += $this->path->write($output);
4239      $xfer += $output->writeFieldEnd();
4240    }
4241    if ($this->replication !== null) {
4242      $xfer += $output->writeFieldBegin('replication', TType::I16, 2);
4243      $xfer += $output->writeI16($this->replication);
4244      $xfer += $output->writeFieldEnd();
4245    }
4246    $xfer += $output->writeFieldStop();
4247    $xfer += $output->writeStructEnd();
4248    return $xfer;
4249  }
4250
4251}
4252
4253class ThriftHadoopFileSystem_setReplication_result {
4254  static $_TSPEC;
4255
4256  public $ouch = null;
4257
4258  public function __construct($vals=null) {
4259    if (!isset(self::$_TSPEC)) {
4260      self::$_TSPEC = array(
4261        1 => array(
4262          'var' => 'ouch',
4263          'type' => TType::STRUCT,
4264          'class' => 'ThriftIOException',
4265          ),
4266        );
4267    }
4268    if (is_array($vals)) {
4269      if (isset($vals['ouch'])) {
4270        $this->ouch = $vals['ouch'];
4271      }
4272    }
4273  }
4274
4275  public function getName() {
4276    return 'ThriftHadoopFileSystem_setReplication_result';
4277  }
4278
4279  public function read($input)
4280  {
4281    $xfer = 0;
4282    $fname = null;
4283    $ftype = 0;
4284    $fid = 0;
4285    $xfer += $input->readStructBegin($fname);
4286    while (true)
4287    {
4288      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
4289      if ($ftype == TType::STOP) {
4290        break;
4291      }
4292      switch ($fid)
4293      {
4294        case 1:
4295          if ($ftype == TType::STRUCT) {
4296            $this->ouch = new ThriftIOException();
4297            $xfer += $this->ouch->read($input);
4298          } else {
4299            $xfer += $input->skip($ftype);
4300          }
4301          break;
4302        default:
4303          $xfer += $input->skip($ftype);
4304          break;
4305      }
4306      $xfer += $input->readFieldEnd();
4307    }
4308    $xfer += $input->readStructEnd();
4309    return $xfer;
4310  }
4311
4312  public function write($output) {
4313    $xfer = 0;
4314    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_setReplication_result');
4315    if ($this->ouch !== null) {
4316      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
4317      $xfer += $this->ouch->write($output);
4318      $xfer += $output->writeFieldEnd();
4319    }
4320    $xfer += $output->writeFieldStop();
4321    $xfer += $output->writeStructEnd();
4322    return $xfer;
4323  }
4324
4325}
4326
4327class ThriftHadoopFileSystem_getFileBlockLocations_args {
4328  static $_TSPEC;
4329
4330  public $path = null;
4331  public $start = null;
4332  public $length = null;
4333
4334  public function __construct($vals=null) {
4335    if (!isset(self::$_TSPEC)) {
4336      self::$_TSPEC = array(
4337        1 => array(
4338          'var' => 'path',
4339          'type' => TType::STRUCT,
4340          'class' => 'Pathname',
4341          ),
4342        2 => array(
4343          'var' => 'start',
4344          'type' => TType::I64,
4345          ),
4346        3 => array(
4347          'var' => 'length',
4348          'type' => TType::I64,
4349          ),
4350        );
4351    }
4352    if (is_array($vals)) {
4353      if (isset($vals['path'])) {
4354        $this->path = $vals['path'];
4355      }
4356      if (isset($vals['start'])) {
4357        $this->start = $vals['start'];
4358      }
4359      if (isset($vals['length'])) {
4360        $this->length = $vals['length'];
4361      }
4362    }
4363  }
4364
4365  public function getName() {
4366    return 'ThriftHadoopFileSystem_getFileBlockLocations_args';
4367  }
4368
4369  public function read($input)
4370  {
4371    $xfer = 0;
4372    $fname = null;
4373    $ftype = 0;
4374    $fid = 0;
4375    $xfer += $input->readStructBegin($fname);
4376    while (true)
4377    {
4378      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
4379      if ($ftype == TType::STOP) {
4380        break;
4381      }
4382      switch ($fid)
4383      {
4384        case 1:
4385          if ($ftype == TType::STRUCT) {
4386            $this->path = new Pathname();
4387            $xfer += $this->path->read($input);
4388          } else {
4389            $xfer += $input->skip($ftype);
4390          }
4391          break;
4392        case 2:
4393          if ($ftype == TType::I64) {
4394            $xfer += $input->readI64($this->start);
4395          } else {
4396            $xfer += $input->skip($ftype);
4397          }
4398          break;
4399        case 3:
4400          if ($ftype == TType::I64) {
4401            $xfer += $input->readI64($this->length);
4402          } else {
4403            $xfer += $input->skip($ftype);
4404          }
4405          break;
4406        default:
4407          $xfer += $input->skip($ftype);
4408          break;
4409      }
4410      $xfer += $input->readFieldEnd();
4411    }
4412    $xfer += $input->readStructEnd();
4413    return $xfer;
4414  }
4415
4416  public function write($output) {
4417    $xfer = 0;
4418    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_getFileBlockLocations_args');
4419    if ($this->path !== null) {
4420      if (!is_object($this->path)) {
4421        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
4422      }
4423      $xfer += $output->writeFieldBegin('path', TType::STRUCT, 1);
4424      $xfer += $this->path->write($output);
4425      $xfer += $output->writeFieldEnd();
4426    }
4427    if ($this->start !== null) {
4428      $xfer += $output->writeFieldBegin('start', TType::I64, 2);
4429      $xfer += $output->writeI64($this->start);
4430      $xfer += $output->writeFieldEnd();
4431    }
4432    if ($this->length !== null) {
4433      $xfer += $output->writeFieldBegin('length', TType::I64, 3);
4434      $xfer += $output->writeI64($this->length);
4435      $xfer += $output->writeFieldEnd();
4436    }
4437    $xfer += $output->writeFieldStop();
4438    $xfer += $output->writeStructEnd();
4439    return $xfer;
4440  }
4441
4442}
4443
4444class ThriftHadoopFileSystem_getFileBlockLocations_result {
4445  static $_TSPEC;
4446
4447  public $success = null;
4448  public $ouch = null;
4449
4450  public function __construct($vals=null) {
4451    if (!isset(self::$_TSPEC)) {
4452      self::$_TSPEC = array(
4453        0 => array(
4454          'var' => 'success',
4455          'type' => TType::LST,
4456          'etype' => TType::STRUCT,
4457          'elem' => array(
4458            'type' => TType::STRUCT,
4459            'class' => 'BlockLocation',
4460            ),
4461          ),
4462        1 => array(
4463          'var' => 'ouch',
4464          'type' => TType::STRUCT,
4465          'class' => 'ThriftIOException',
4466          ),
4467        );
4468    }
4469    if (is_array($vals)) {
4470      if (isset($vals['success'])) {
4471        $this->success = $vals['success'];
4472      }
4473      if (isset($vals['ouch'])) {
4474        $this->ouch = $vals['ouch'];
4475      }
4476    }
4477  }
4478
4479  public function getName() {
4480    return 'ThriftHadoopFileSystem_getFileBlockLocations_result';
4481  }
4482
4483  public function read($input)
4484  {
4485    $xfer = 0;
4486    $fname = null;
4487    $ftype = 0;
4488    $fid = 0;
4489    $xfer += $input->readStructBegin($fname);
4490    while (true)
4491    {
4492      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
4493      if ($ftype == TType::STOP) {
4494        break;
4495      }
4496      switch ($fid)
4497      {
4498        case 0:
4499          if ($ftype == TType::LST) {
4500            $this->success = array();
4501            $_size21 = 0;
4502            $_etype24 = 0;
4503            $xfer += $input->readListBegin($_etype24, $_size21);
4504            for ($_i25 = 0; $_i25 < $_size21; ++$_i25)
4505            {
4506              $elem26 = null;
4507              $elem26 = new BlockLocation();
4508              $xfer += $elem26->read($input);
4509              $this->success []= $elem26;
4510            }
4511            $xfer += $input->readListEnd();
4512          } else {
4513            $xfer += $input->skip($ftype);
4514          }
4515          break;
4516        case 1:
4517          if ($ftype == TType::STRUCT) {
4518            $this->ouch = new ThriftIOException();
4519            $xfer += $this->ouch->read($input);
4520          } else {
4521            $xfer += $input->skip($ftype);
4522          }
4523          break;
4524        default:
4525          $xfer += $input->skip($ftype);
4526          break;
4527      }
4528      $xfer += $input->readFieldEnd();
4529    }
4530    $xfer += $input->readStructEnd();
4531    return $xfer;
4532  }
4533
4534  public function write($output) {
4535    $xfer = 0;
4536    $xfer += $output->writeStructBegin('ThriftHadoopFileSystem_getFileBlockLocations_result');
4537    if ($this->success !== null) {
4538      if (!is_array($this->success)) {
4539        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
4540      }
4541      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
4542      {
4543        $output->writeListBegin(TType::STRUCT, count($this->success));
4544        {
4545          foreach ($this->success as $iter27)
4546          {
4547            $xfer += $iter27->write($output);
4548          }
4549        }
4550        $output->writeListEnd();
4551      }
4552      $xfer += $output->writeFieldEnd();
4553    }
4554    if ($this->ouch !== null) {
4555      $xfer += $output->writeFieldBegin('ouch', TType::STRUCT, 1);
4556      $xfer += $this->ouch->write($output);
4557      $xfer += $output->writeFieldEnd();
4558    }
4559    $xfer += $output->writeFieldStop();
4560    $xfer += $output->writeStructEnd();
4561    return $xfer;
4562  }
4563
4564}
4565
4566class ThriftHadoopFileSystemProcessor {
4567  protected $handler_ = null;
4568  public function __construct($handler) {
4569    $this->handler_ = $handler;
4570  }
4571
4572  public function process($input, $output) {
4573    $rseqid = 0;
4574    $fname = null;
4575    $mtype = 0;
4576
4577    $input->readMessageBegin($fname, $mtype, $rseqid);
4578    $methodname = 'process_'.$fname;
4579    if (!method_exists($this, $methodname)) {
4580      $input->skip(TType::STRUCT);
4581      $input->readMessageEnd();
4582      $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD);
4583      $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid);
4584      $x->write($output);
4585      $output->writeMessageEnd();
4586      $output->getTransport()->flush();
4587      return;
4588    }
4589    $this->$methodname($rseqid, $input, $output);
4590    return true;
4591  }
4592
4593  protected function process_setInactivityTimeoutPeriod($seqid, $input, $output) {
4594    $args = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args();
4595    $args->read($input);
4596    $input->readMessageEnd();
4597    $result = new ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result();
4598    $this->handler_->setInactivityTimeoutPeriod($args->periodInSeconds);
4599    $output->writeMessageBegin('setInactivityTimeoutPeriod', TMessageType::REPLY, $seqid);
4600    $result->write($output);
4601    $output->getTransport()->flush();
4602  }
4603  protected function process_shutdown($seqid, $input, $output) {
4604    $args = new ThriftHadoopFileSystem_shutdown_args();
4605    $args->read($input);
4606    $input->readMessageEnd();
4607    $result = new ThriftHadoopFileSystem_shutdown_result();
4608    $this->handler_->shutdown($args->status);
4609    $output->writeMessageBegin('shutdown', TMessageType::REPLY, $seqid);
4610    $result->write($output);
4611    $output->getTransport()->flush();
4612  }
4613  protected function process_create($seqid, $input, $output) {
4614    $args = new ThriftHadoopFileSystem_create_args();
4615    $args->read($input);
4616    $input->readMessageEnd();
4617    $result = new ThriftHadoopFileSystem_create_result();
4618    try {
4619      $result->success = $this->handler_->create($args->path);
4620    } catch (ThriftIOException $ouch) {
4621      $result->ouch = $ouch;
4622    }
4623    $output->writeMessageBegin('create', TMessageType::REPLY, $seqid);
4624    $result->write($output);
4625    $output->getTransport()->flush();
4626  }
4627  protected function process_createFile($seqid, $input, $output) {
4628    $args = new ThriftHadoopFileSystem_createFile_args();
4629    $args->read($input);
4630    $input->readMessageEnd();
4631    $result = new ThriftHadoopFileSystem_createFile_result();
4632    try {
4633      $result->success = $this->handler_->createFile($args->path, $args->mode, $args->overwrite, $args->bufferSize, $args->block_replication, $args->blocksize);
4634    } catch (ThriftIOException $ouch) {
4635      $result->ouch = $ouch;
4636    }
4637    $output->writeMessageBegin('createFile', TMessageType::REPLY, $seqid);
4638    $result->write($output);
4639    $output->getTransport()->flush();
4640  }
4641  protected function process_open($seqid, $input, $output) {
4642    $args = new ThriftHadoopFileSystem_open_args();
4643    $args->read($input);
4644    $input->readMessageEnd();
4645    $result = new ThriftHadoopFileSystem_open_result();
4646    try {
4647      $result->success = $this->handler_->open($args->path);
4648    } catch (ThriftIOException $ouch) {
4649      $result->ouch = $ouch;
4650    }
4651    $output->writeMessageBegin('open', TMessageType::REPLY, $seqid);
4652    $result->write($output);
4653    $output->getTransport()->flush();
4654  }
4655  protected function process_append($seqid, $input, $output) {
4656    $args = new ThriftHadoopFileSystem_append_args();
4657    $args->read($input);
4658    $input->readMessageEnd();
4659    $result = new ThriftHadoopFileSystem_append_result();
4660    try {
4661      $result->success = $this->handler_->append($args->path);
4662    } catch (ThriftIOException $ouch) {
4663      $result->ouch = $ouch;
4664    }
4665    $output->writeMessageBegin('append', TMessageType::REPLY, $seqid);
4666    $result->write($output);
4667    $output->getTransport()->flush();
4668  }
4669  protected function process_write($seqid, $input, $output) {
4670    $args = new ThriftHadoopFileSystem_write_args();
4671    $args->read($input);
4672    $input->readMessageEnd();
4673    $result = new ThriftHadoopFileSystem_write_result();
4674    try {
4675      $result->success = $this->handler_->write($args->handle, $args->data);
4676    } catch (ThriftIOException $ouch) {
4677      $result->ouch = $ouch;
4678    }
4679    $output->writeMessageBegin('write', TMessageType::REPLY, $seqid);
4680    $result->write($output);
4681    $output->getTransport()->flush();
4682  }
4683  protected function process_read($seqid, $input, $output) {
4684    $args = new ThriftHadoopFileSystem_read_args();
4685    $args->read($input);
4686    $input->readMessageEnd();
4687    $result = new ThriftHadoopFileSystem_read_result();
4688    try {
4689      $result->success = $this->handler_->read($args->handle, $args->offset, $args->size);
4690    } catch (ThriftIOException $ouch) {
4691      $result->ouch = $ouch;
4692    }
4693    $output->writeMessageBegin('read', TMessageType::REPLY, $seqid);
4694    $result->write($output);
4695    $output->getTransport()->flush();
4696  }
4697  protected function process_close($seqid, $input, $output) {
4698    $args = new ThriftHadoopFileSystem_close_args();
4699    $args->read($input);
4700    $input->readMessageEnd();
4701    $result = new ThriftHadoopFileSystem_close_result();
4702    try {
4703      $result->success = $this->handler_->close($args->out);
4704    } catch (ThriftIOException $ouch) {
4705      $result->ouch = $ouch;
4706    }
4707    $output->writeMessageBegin('close', TMessageType::REPLY, $seqid);
4708    $result->write($output);
4709    $output->getTransport()->flush();
4710  }
4711  protected function process_rm($seqid, $input, $output) {
4712    $args = new ThriftHadoopFileSystem_rm_args();
4713    $args->read($input);
4714    $input->readMessageEnd();
4715    $result = new ThriftHadoopFileSystem_rm_result();
4716    try {
4717      $result->success = $this->handler_->rm($args->path, $args->recursive);
4718    } catch (ThriftIOException $ouch) {
4719      $result->ouch = $ouch;
4720    }
4721    $output->writeMessageBegin('rm', TMessageType::REPLY, $seqid);
4722    $result->write($output);
4723    $output->getTransport()->flush();
4724  }
4725  protected function process_rename($seqid, $input, $output) {
4726    $args = new ThriftHadoopFileSystem_rename_args();
4727    $args->read($input);
4728    $input->readMessageEnd();
4729    $result = new ThriftHadoopFileSystem_rename_result();
4730    try {
4731      $result->success = $this->handler_->rename($args->path, $args->dest);
4732    } catch (ThriftIOException $ouch) {
4733      $result->ouch = $ouch;
4734    }
4735    $output->writeMessageBegin('rename', TMessageType::REPLY, $seqid);
4736    $result->write($output);
4737    $output->getTransport()->flush();
4738  }
4739  protected function process_mkdirs($seqid, $input, $output) {
4740    $args = new ThriftHadoopFileSystem_mkdirs_args();
4741    $args->read($input);
4742    $input->readMessageEnd();
4743    $result = new ThriftHadoopFileSystem_mkdirs_result();
4744    try {
4745      $result->success = $this->handler_->mkdirs($args->path);
4746    } catch (ThriftIOException $ouch) {
4747      $result->ouch = $ouch;
4748    }
4749    $output->writeMessageBegin('mkdirs', TMessageType::REPLY, $seqid);
4750    $result->write($output);
4751    $output->getTransport()->flush();
4752  }
4753  protected function process_exists($seqid, $input, $output) {
4754    $args = new ThriftHadoopFileSystem_exists_args();
4755    $args->read($input);
4756    $input->readMessageEnd();
4757    $result = new ThriftHadoopFileSystem_exists_result();
4758    try {
4759      $result->success = $this->handler_->exists($args->path);
4760    } catch (ThriftIOException $ouch) {
4761      $result->ouch = $ouch;
4762    }
4763    $output->writeMessageBegin('exists', TMessageType::REPLY, $seqid);
4764    $result->write($output);
4765    $output->getTransport()->flush();
4766  }
4767  protected function process_stat($seqid, $input, $output) {
4768    $args = new ThriftHadoopFileSystem_stat_args();
4769    $args->read($input);
4770    $input->readMessageEnd();
4771    $result = new ThriftHadoopFileSystem_stat_result();
4772    try {
4773      $result->success = $this->handler_->stat($args->path);
4774    } catch (ThriftIOException $ouch) {
4775      $result->ouch = $ouch;
4776    }
4777    $output->writeMessageBegin('stat', TMessageType::REPLY, $seqid);
4778    $result->write($output);
4779    $output->getTransport()->flush();
4780  }
4781  protected function process_listStatus($seqid, $input, $output) {
4782    $args = new ThriftHadoopFileSystem_listStatus_args();
4783    $args->read($input);
4784    $input->readMessageEnd();
4785    $result = new ThriftHadoopFileSystem_listStatus_result();
4786    try {
4787      $result->success = $this->handler_->listStatus($args->path);
4788    } catch (ThriftIOException $ouch) {
4789      $result->ouch = $ouch;
4790    }
4791    $output->writeMessageBegin('listStatus', TMessageType::REPLY, $seqid);
4792    $result->write($output);
4793    $output->getTransport()->flush();
4794  }
4795  protected function process_chmod($seqid, $input, $output) {
4796    $args = new ThriftHadoopFileSystem_chmod_args();
4797    $args->read($input);
4798    $input->readMessageEnd();
4799    $result = new ThriftHadoopFileSystem_chmod_result();
4800    try {
4801      $this->handler_->chmod($args->path, $args->mode);
4802    } catch (ThriftIOException $ouch) {
4803      $result->ouch = $ouch;
4804    }
4805    $output->writeMessageBegin('chmod', TMessageType::REPLY, $seqid);
4806    $result->write($output);
4807    $output->getTransport()->flush();
4808  }
4809  protected function process_chown($seqid, $input, $output) {
4810    $args = new ThriftHadoopFileSystem_chown_args();
4811    $args->read($input);
4812    $input->readMessageEnd();
4813    $result = new ThriftHadoopFileSystem_chown_result();
4814    try {
4815      $this->handler_->chown($args->path, $args->owner, $args->group);
4816    } catch (ThriftIOException $ouch) {
4817      $result->ouch = $ouch;
4818    }
4819    $output->writeMessageBegin('chown', TMessageType::REPLY, $seqid);
4820    $result->write($output);
4821    $output->getTransport()->flush();
4822  }
4823  protected function process_setReplication($seqid, $input, $output) {
4824    $args = new ThriftHadoopFileSystem_setReplication_args();
4825    $args->read($input);
4826    $input->readMessageEnd();
4827    $result = new ThriftHadoopFileSystem_setReplication_result();
4828    try {
4829      $this->handler_->setReplication($args->path, $args->replication);
4830    } catch (ThriftIOException $ouch) {
4831      $result->ouch = $ouch;
4832    }
4833    $output->writeMessageBegin('setReplication', TMessageType::REPLY, $seqid);
4834    $result->write($output);
4835    $output->getTransport()->flush();
4836  }
4837  protected function process_getFileBlockLocations($seqid, $input, $output) {
4838    $args = new ThriftHadoopFileSystem_getFileBlockLocations_args();
4839    $args->read($input);
4840    $input->readMessageEnd();
4841    $result = new ThriftHadoopFileSystem_getFileBlockLocations_result();
4842    try {
4843      $result->success = $this->handler_->getFileBlockLocations($args->path, $args->start, $args->length);
4844    } catch (ThriftIOException $ouch) {
4845      $result->ouch = $ouch;
4846    }
4847    $output->writeMessageBegin('getFileBlockLocations', TMessageType::REPLY, $seqid);
4848    $result->write($output);
4849    $output->getTransport()->flush();
4850  }
4851}
4852?>
Note: See TracBrowser for help on using the repository browser.