source: proiecte/HadoopJUnit/hadoop-0.20.1/src/contrib/thriftfs/gen-cpp/ThriftHadoopFileSystem.h @ 120

Last change on this file since 120 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: 60.3 KB
Line 
1/**
2 * Autogenerated by Thrift
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 */
6#ifndef ThriftHadoopFileSystem_H
7#define ThriftHadoopFileSystem_H
8
9#include <TProcessor.h>
10#include "hadoopfs_types.h"
11
12
13
14class ThriftHadoopFileSystemIf {
15 public:
16  virtual ~ThriftHadoopFileSystemIf() {}
17  virtual void setInactivityTimeoutPeriod(const int64_t periodInSeconds) = 0;
18  virtual void shutdown(const int32_t status) = 0;
19  virtual void create(ThriftHandle& _return, const Pathname& path) = 0;
20  virtual void createFile(ThriftHandle& _return, const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize) = 0;
21  virtual void open(ThriftHandle& _return, const Pathname& path) = 0;
22  virtual void append(ThriftHandle& _return, const Pathname& path) = 0;
23  virtual bool write(const ThriftHandle& handle, const std::string& data) = 0;
24  virtual void read(std::string& _return, const ThriftHandle& handle, const int64_t offset, const int32_t size) = 0;
25  virtual bool close(const ThriftHandle& out) = 0;
26  virtual bool rm(const Pathname& path, const bool recursive) = 0;
27  virtual bool rename(const Pathname& path, const Pathname& dest) = 0;
28  virtual bool mkdirs(const Pathname& path) = 0;
29  virtual bool exists(const Pathname& path) = 0;
30  virtual void stat(FileStatus& _return, const Pathname& path) = 0;
31  virtual void listStatus(std::vector<FileStatus> & _return, const Pathname& path) = 0;
32  virtual void chmod(const Pathname& path, const int16_t mode) = 0;
33  virtual void chown(const Pathname& path, const std::string& owner, const std::string& group) = 0;
34  virtual void setReplication(const Pathname& path, const int16_t replication) = 0;
35  virtual void getFileBlockLocations(std::vector<BlockLocation> & _return, const Pathname& path, const int64_t start, const int64_t length) = 0;
36};
37
38class ThriftHadoopFileSystemNull : virtual public ThriftHadoopFileSystemIf {
39 public:
40  virtual ~ThriftHadoopFileSystemNull() {}
41  void setInactivityTimeoutPeriod(const int64_t /* periodInSeconds */) {
42    return;
43  }
44  void shutdown(const int32_t /* status */) {
45    return;
46  }
47  void create(ThriftHandle& /* _return */, const Pathname& /* path */) {
48    return;
49  }
50  void createFile(ThriftHandle& /* _return */, const Pathname& /* path */, const int16_t /* mode */, const bool /* overwrite */, const int32_t /* bufferSize */, const int16_t /* block_replication */, const int64_t /* blocksize */) {
51    return;
52  }
53  void open(ThriftHandle& /* _return */, const Pathname& /* path */) {
54    return;
55  }
56  void append(ThriftHandle& /* _return */, const Pathname& /* path */) {
57    return;
58  }
59  bool write(const ThriftHandle& /* handle */, const std::string& /* data */) {
60    bool _return = false;
61    return _return;
62  }
63  void read(std::string& /* _return */, const ThriftHandle& /* handle */, const int64_t /* offset */, const int32_t /* size */) {
64    return;
65  }
66  bool close(const ThriftHandle& /* out */) {
67    bool _return = false;
68    return _return;
69  }
70  bool rm(const Pathname& /* path */, const bool /* recursive */) {
71    bool _return = false;
72    return _return;
73  }
74  bool rename(const Pathname& /* path */, const Pathname& /* dest */) {
75    bool _return = false;
76    return _return;
77  }
78  bool mkdirs(const Pathname& /* path */) {
79    bool _return = false;
80    return _return;
81  }
82  bool exists(const Pathname& /* path */) {
83    bool _return = false;
84    return _return;
85  }
86  void stat(FileStatus& /* _return */, const Pathname& /* path */) {
87    return;
88  }
89  void listStatus(std::vector<FileStatus> & /* _return */, const Pathname& /* path */) {
90    return;
91  }
92  void chmod(const Pathname& /* path */, const int16_t /* mode */) {
93    return;
94  }
95  void chown(const Pathname& /* path */, const std::string& /* owner */, const std::string& /* group */) {
96    return;
97  }
98  void setReplication(const Pathname& /* path */, const int16_t /* replication */) {
99    return;
100  }
101  void getFileBlockLocations(std::vector<BlockLocation> & /* _return */, const Pathname& /* path */, const int64_t /* start */, const int64_t /* length */) {
102    return;
103  }
104};
105
106class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args {
107 public:
108
109  ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args() : periodInSeconds(0) {
110  }
111
112  virtual ~ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args() throw() {}
113
114  int64_t periodInSeconds;
115
116  struct __isset {
117    __isset() : periodInSeconds(false) {}
118    bool periodInSeconds;
119  } __isset;
120
121  bool operator == (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args & rhs) const
122  {
123    if (!(periodInSeconds == rhs.periodInSeconds))
124      return false;
125    return true;
126  }
127  bool operator != (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args &rhs) const {
128    return !(*this == rhs);
129  }
130
131  bool operator < (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_args & ) const;
132
133  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
134  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
135
136};
137
138class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_pargs {
139 public:
140
141
142  virtual ~ThriftHadoopFileSystem_setInactivityTimeoutPeriod_pargs() throw() {}
143
144  const int64_t* periodInSeconds;
145
146  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
147
148};
149
150class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result {
151 public:
152
153  ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result() {
154  }
155
156  virtual ~ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result() throw() {}
157
158
159  bool operator == (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result & /* rhs */) const
160  {
161    return true;
162  }
163  bool operator != (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result &rhs) const {
164    return !(*this == rhs);
165  }
166
167  bool operator < (const ThriftHadoopFileSystem_setInactivityTimeoutPeriod_result & ) const;
168
169  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
170  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
171
172};
173
174class ThriftHadoopFileSystem_setInactivityTimeoutPeriod_presult {
175 public:
176
177
178  virtual ~ThriftHadoopFileSystem_setInactivityTimeoutPeriod_presult() throw() {}
179
180
181  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
182
183};
184
185class ThriftHadoopFileSystem_shutdown_args {
186 public:
187
188  ThriftHadoopFileSystem_shutdown_args() : status(0) {
189  }
190
191  virtual ~ThriftHadoopFileSystem_shutdown_args() throw() {}
192
193  int32_t status;
194
195  struct __isset {
196    __isset() : status(false) {}
197    bool status;
198  } __isset;
199
200  bool operator == (const ThriftHadoopFileSystem_shutdown_args & rhs) const
201  {
202    if (!(status == rhs.status))
203      return false;
204    return true;
205  }
206  bool operator != (const ThriftHadoopFileSystem_shutdown_args &rhs) const {
207    return !(*this == rhs);
208  }
209
210  bool operator < (const ThriftHadoopFileSystem_shutdown_args & ) const;
211
212  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
213  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
214
215};
216
217class ThriftHadoopFileSystem_shutdown_pargs {
218 public:
219
220
221  virtual ~ThriftHadoopFileSystem_shutdown_pargs() throw() {}
222
223  const int32_t* status;
224
225  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
226
227};
228
229class ThriftHadoopFileSystem_shutdown_result {
230 public:
231
232  ThriftHadoopFileSystem_shutdown_result() {
233  }
234
235  virtual ~ThriftHadoopFileSystem_shutdown_result() throw() {}
236
237
238  bool operator == (const ThriftHadoopFileSystem_shutdown_result & /* rhs */) const
239  {
240    return true;
241  }
242  bool operator != (const ThriftHadoopFileSystem_shutdown_result &rhs) const {
243    return !(*this == rhs);
244  }
245
246  bool operator < (const ThriftHadoopFileSystem_shutdown_result & ) const;
247
248  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
249  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
250
251};
252
253class ThriftHadoopFileSystem_shutdown_presult {
254 public:
255
256
257  virtual ~ThriftHadoopFileSystem_shutdown_presult() throw() {}
258
259
260  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
261
262};
263
264class ThriftHadoopFileSystem_create_args {
265 public:
266
267  ThriftHadoopFileSystem_create_args() {
268  }
269
270  virtual ~ThriftHadoopFileSystem_create_args() throw() {}
271
272  Pathname path;
273
274  struct __isset {
275    __isset() : path(false) {}
276    bool path;
277  } __isset;
278
279  bool operator == (const ThriftHadoopFileSystem_create_args & rhs) const
280  {
281    if (!(path == rhs.path))
282      return false;
283    return true;
284  }
285  bool operator != (const ThriftHadoopFileSystem_create_args &rhs) const {
286    return !(*this == rhs);
287  }
288
289  bool operator < (const ThriftHadoopFileSystem_create_args & ) const;
290
291  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
292  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
293
294};
295
296class ThriftHadoopFileSystem_create_pargs {
297 public:
298
299
300  virtual ~ThriftHadoopFileSystem_create_pargs() throw() {}
301
302  const Pathname* path;
303
304  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
305
306};
307
308class ThriftHadoopFileSystem_create_result {
309 public:
310
311  ThriftHadoopFileSystem_create_result() {
312  }
313
314  virtual ~ThriftHadoopFileSystem_create_result() throw() {}
315
316  ThriftHandle success;
317  ThriftIOException ouch;
318
319  struct __isset {
320    __isset() : success(false), ouch(false) {}
321    bool success;
322    bool ouch;
323  } __isset;
324
325  bool operator == (const ThriftHadoopFileSystem_create_result & rhs) const
326  {
327    if (!(success == rhs.success))
328      return false;
329    if (!(ouch == rhs.ouch))
330      return false;
331    return true;
332  }
333  bool operator != (const ThriftHadoopFileSystem_create_result &rhs) const {
334    return !(*this == rhs);
335  }
336
337  bool operator < (const ThriftHadoopFileSystem_create_result & ) const;
338
339  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
340  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
341
342};
343
344class ThriftHadoopFileSystem_create_presult {
345 public:
346
347
348  virtual ~ThriftHadoopFileSystem_create_presult() throw() {}
349
350  ThriftHandle* success;
351  ThriftIOException ouch;
352
353  struct __isset {
354    __isset() : success(false), ouch(false) {}
355    bool success;
356    bool ouch;
357  } __isset;
358
359  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
360
361};
362
363class ThriftHadoopFileSystem_createFile_args {
364 public:
365
366  ThriftHadoopFileSystem_createFile_args() : mode(0), overwrite(0), bufferSize(0), block_replication(0), blocksize(0) {
367  }
368
369  virtual ~ThriftHadoopFileSystem_createFile_args() throw() {}
370
371  Pathname path;
372  int16_t mode;
373  bool overwrite;
374  int32_t bufferSize;
375  int16_t block_replication;
376  int64_t blocksize;
377
378  struct __isset {
379    __isset() : path(false), mode(false), overwrite(false), bufferSize(false), block_replication(false), blocksize(false) {}
380    bool path;
381    bool mode;
382    bool overwrite;
383    bool bufferSize;
384    bool block_replication;
385    bool blocksize;
386  } __isset;
387
388  bool operator == (const ThriftHadoopFileSystem_createFile_args & rhs) const
389  {
390    if (!(path == rhs.path))
391      return false;
392    if (!(mode == rhs.mode))
393      return false;
394    if (!(overwrite == rhs.overwrite))
395      return false;
396    if (!(bufferSize == rhs.bufferSize))
397      return false;
398    if (!(block_replication == rhs.block_replication))
399      return false;
400    if (!(blocksize == rhs.blocksize))
401      return false;
402    return true;
403  }
404  bool operator != (const ThriftHadoopFileSystem_createFile_args &rhs) const {
405    return !(*this == rhs);
406  }
407
408  bool operator < (const ThriftHadoopFileSystem_createFile_args & ) const;
409
410  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
411  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
412
413};
414
415class ThriftHadoopFileSystem_createFile_pargs {
416 public:
417
418
419  virtual ~ThriftHadoopFileSystem_createFile_pargs() throw() {}
420
421  const Pathname* path;
422  const int16_t* mode;
423  const bool* overwrite;
424  const int32_t* bufferSize;
425  const int16_t* block_replication;
426  const int64_t* blocksize;
427
428  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
429
430};
431
432class ThriftHadoopFileSystem_createFile_result {
433 public:
434
435  ThriftHadoopFileSystem_createFile_result() {
436  }
437
438  virtual ~ThriftHadoopFileSystem_createFile_result() throw() {}
439
440  ThriftHandle success;
441  ThriftIOException ouch;
442
443  struct __isset {
444    __isset() : success(false), ouch(false) {}
445    bool success;
446    bool ouch;
447  } __isset;
448
449  bool operator == (const ThriftHadoopFileSystem_createFile_result & rhs) const
450  {
451    if (!(success == rhs.success))
452      return false;
453    if (!(ouch == rhs.ouch))
454      return false;
455    return true;
456  }
457  bool operator != (const ThriftHadoopFileSystem_createFile_result &rhs) const {
458    return !(*this == rhs);
459  }
460
461  bool operator < (const ThriftHadoopFileSystem_createFile_result & ) const;
462
463  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
464  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
465
466};
467
468class ThriftHadoopFileSystem_createFile_presult {
469 public:
470
471
472  virtual ~ThriftHadoopFileSystem_createFile_presult() throw() {}
473
474  ThriftHandle* success;
475  ThriftIOException ouch;
476
477  struct __isset {
478    __isset() : success(false), ouch(false) {}
479    bool success;
480    bool ouch;
481  } __isset;
482
483  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
484
485};
486
487class ThriftHadoopFileSystem_open_args {
488 public:
489
490  ThriftHadoopFileSystem_open_args() {
491  }
492
493  virtual ~ThriftHadoopFileSystem_open_args() throw() {}
494
495  Pathname path;
496
497  struct __isset {
498    __isset() : path(false) {}
499    bool path;
500  } __isset;
501
502  bool operator == (const ThriftHadoopFileSystem_open_args & rhs) const
503  {
504    if (!(path == rhs.path))
505      return false;
506    return true;
507  }
508  bool operator != (const ThriftHadoopFileSystem_open_args &rhs) const {
509    return !(*this == rhs);
510  }
511
512  bool operator < (const ThriftHadoopFileSystem_open_args & ) const;
513
514  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
515  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
516
517};
518
519class ThriftHadoopFileSystem_open_pargs {
520 public:
521
522
523  virtual ~ThriftHadoopFileSystem_open_pargs() throw() {}
524
525  const Pathname* path;
526
527  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
528
529};
530
531class ThriftHadoopFileSystem_open_result {
532 public:
533
534  ThriftHadoopFileSystem_open_result() {
535  }
536
537  virtual ~ThriftHadoopFileSystem_open_result() throw() {}
538
539  ThriftHandle success;
540  ThriftIOException ouch;
541
542  struct __isset {
543    __isset() : success(false), ouch(false) {}
544    bool success;
545    bool ouch;
546  } __isset;
547
548  bool operator == (const ThriftHadoopFileSystem_open_result & rhs) const
549  {
550    if (!(success == rhs.success))
551      return false;
552    if (!(ouch == rhs.ouch))
553      return false;
554    return true;
555  }
556  bool operator != (const ThriftHadoopFileSystem_open_result &rhs) const {
557    return !(*this == rhs);
558  }
559
560  bool operator < (const ThriftHadoopFileSystem_open_result & ) const;
561
562  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
563  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
564
565};
566
567class ThriftHadoopFileSystem_open_presult {
568 public:
569
570
571  virtual ~ThriftHadoopFileSystem_open_presult() throw() {}
572
573  ThriftHandle* success;
574  ThriftIOException ouch;
575
576  struct __isset {
577    __isset() : success(false), ouch(false) {}
578    bool success;
579    bool ouch;
580  } __isset;
581
582  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
583
584};
585
586class ThriftHadoopFileSystem_append_args {
587 public:
588
589  ThriftHadoopFileSystem_append_args() {
590  }
591
592  virtual ~ThriftHadoopFileSystem_append_args() throw() {}
593
594  Pathname path;
595
596  struct __isset {
597    __isset() : path(false) {}
598    bool path;
599  } __isset;
600
601  bool operator == (const ThriftHadoopFileSystem_append_args & rhs) const
602  {
603    if (!(path == rhs.path))
604      return false;
605    return true;
606  }
607  bool operator != (const ThriftHadoopFileSystem_append_args &rhs) const {
608    return !(*this == rhs);
609  }
610
611  bool operator < (const ThriftHadoopFileSystem_append_args & ) const;
612
613  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
614  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
615
616};
617
618class ThriftHadoopFileSystem_append_pargs {
619 public:
620
621
622  virtual ~ThriftHadoopFileSystem_append_pargs() throw() {}
623
624  const Pathname* path;
625
626  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
627
628};
629
630class ThriftHadoopFileSystem_append_result {
631 public:
632
633  ThriftHadoopFileSystem_append_result() {
634  }
635
636  virtual ~ThriftHadoopFileSystem_append_result() throw() {}
637
638  ThriftHandle success;
639  ThriftIOException ouch;
640
641  struct __isset {
642    __isset() : success(false), ouch(false) {}
643    bool success;
644    bool ouch;
645  } __isset;
646
647  bool operator == (const ThriftHadoopFileSystem_append_result & rhs) const
648  {
649    if (!(success == rhs.success))
650      return false;
651    if (!(ouch == rhs.ouch))
652      return false;
653    return true;
654  }
655  bool operator != (const ThriftHadoopFileSystem_append_result &rhs) const {
656    return !(*this == rhs);
657  }
658
659  bool operator < (const ThriftHadoopFileSystem_append_result & ) const;
660
661  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
662  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
663
664};
665
666class ThriftHadoopFileSystem_append_presult {
667 public:
668
669
670  virtual ~ThriftHadoopFileSystem_append_presult() throw() {}
671
672  ThriftHandle* success;
673  ThriftIOException ouch;
674
675  struct __isset {
676    __isset() : success(false), ouch(false) {}
677    bool success;
678    bool ouch;
679  } __isset;
680
681  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
682
683};
684
685class ThriftHadoopFileSystem_write_args {
686 public:
687
688  ThriftHadoopFileSystem_write_args() : data("") {
689  }
690
691  virtual ~ThriftHadoopFileSystem_write_args() throw() {}
692
693  ThriftHandle handle;
694  std::string data;
695
696  struct __isset {
697    __isset() : handle(false), data(false) {}
698    bool handle;
699    bool data;
700  } __isset;
701
702  bool operator == (const ThriftHadoopFileSystem_write_args & rhs) const
703  {
704    if (!(handle == rhs.handle))
705      return false;
706    if (!(data == rhs.data))
707      return false;
708    return true;
709  }
710  bool operator != (const ThriftHadoopFileSystem_write_args &rhs) const {
711    return !(*this == rhs);
712  }
713
714  bool operator < (const ThriftHadoopFileSystem_write_args & ) const;
715
716  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
717  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
718
719};
720
721class ThriftHadoopFileSystem_write_pargs {
722 public:
723
724
725  virtual ~ThriftHadoopFileSystem_write_pargs() throw() {}
726
727  const ThriftHandle* handle;
728  const std::string* data;
729
730  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
731
732};
733
734class ThriftHadoopFileSystem_write_result {
735 public:
736
737  ThriftHadoopFileSystem_write_result() : success(0) {
738  }
739
740  virtual ~ThriftHadoopFileSystem_write_result() throw() {}
741
742  bool success;
743  ThriftIOException ouch;
744
745  struct __isset {
746    __isset() : success(false), ouch(false) {}
747    bool success;
748    bool ouch;
749  } __isset;
750
751  bool operator == (const ThriftHadoopFileSystem_write_result & rhs) const
752  {
753    if (!(success == rhs.success))
754      return false;
755    if (!(ouch == rhs.ouch))
756      return false;
757    return true;
758  }
759  bool operator != (const ThriftHadoopFileSystem_write_result &rhs) const {
760    return !(*this == rhs);
761  }
762
763  bool operator < (const ThriftHadoopFileSystem_write_result & ) const;
764
765  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
766  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
767
768};
769
770class ThriftHadoopFileSystem_write_presult {
771 public:
772
773
774  virtual ~ThriftHadoopFileSystem_write_presult() throw() {}
775
776  bool* success;
777  ThriftIOException ouch;
778
779  struct __isset {
780    __isset() : success(false), ouch(false) {}
781    bool success;
782    bool ouch;
783  } __isset;
784
785  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
786
787};
788
789class ThriftHadoopFileSystem_read_args {
790 public:
791
792  ThriftHadoopFileSystem_read_args() : offset(0), size(0) {
793  }
794
795  virtual ~ThriftHadoopFileSystem_read_args() throw() {}
796
797  ThriftHandle handle;
798  int64_t offset;
799  int32_t size;
800
801  struct __isset {
802    __isset() : handle(false), offset(false), size(false) {}
803    bool handle;
804    bool offset;
805    bool size;
806  } __isset;
807
808  bool operator == (const ThriftHadoopFileSystem_read_args & rhs) const
809  {
810    if (!(handle == rhs.handle))
811      return false;
812    if (!(offset == rhs.offset))
813      return false;
814    if (!(size == rhs.size))
815      return false;
816    return true;
817  }
818  bool operator != (const ThriftHadoopFileSystem_read_args &rhs) const {
819    return !(*this == rhs);
820  }
821
822  bool operator < (const ThriftHadoopFileSystem_read_args & ) const;
823
824  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
825  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
826
827};
828
829class ThriftHadoopFileSystem_read_pargs {
830 public:
831
832
833  virtual ~ThriftHadoopFileSystem_read_pargs() throw() {}
834
835  const ThriftHandle* handle;
836  const int64_t* offset;
837  const int32_t* size;
838
839  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
840
841};
842
843class ThriftHadoopFileSystem_read_result {
844 public:
845
846  ThriftHadoopFileSystem_read_result() : success("") {
847  }
848
849  virtual ~ThriftHadoopFileSystem_read_result() throw() {}
850
851  std::string success;
852  ThriftIOException ouch;
853
854  struct __isset {
855    __isset() : success(false), ouch(false) {}
856    bool success;
857    bool ouch;
858  } __isset;
859
860  bool operator == (const ThriftHadoopFileSystem_read_result & rhs) const
861  {
862    if (!(success == rhs.success))
863      return false;
864    if (!(ouch == rhs.ouch))
865      return false;
866    return true;
867  }
868  bool operator != (const ThriftHadoopFileSystem_read_result &rhs) const {
869    return !(*this == rhs);
870  }
871
872  bool operator < (const ThriftHadoopFileSystem_read_result & ) const;
873
874  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
875  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
876
877};
878
879class ThriftHadoopFileSystem_read_presult {
880 public:
881
882
883  virtual ~ThriftHadoopFileSystem_read_presult() throw() {}
884
885  std::string* success;
886  ThriftIOException ouch;
887
888  struct __isset {
889    __isset() : success(false), ouch(false) {}
890    bool success;
891    bool ouch;
892  } __isset;
893
894  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
895
896};
897
898class ThriftHadoopFileSystem_close_args {
899 public:
900
901  ThriftHadoopFileSystem_close_args() {
902  }
903
904  virtual ~ThriftHadoopFileSystem_close_args() throw() {}
905
906  ThriftHandle out;
907
908  struct __isset {
909    __isset() : out(false) {}
910    bool out;
911  } __isset;
912
913  bool operator == (const ThriftHadoopFileSystem_close_args & rhs) const
914  {
915    if (!(out == rhs.out))
916      return false;
917    return true;
918  }
919  bool operator != (const ThriftHadoopFileSystem_close_args &rhs) const {
920    return !(*this == rhs);
921  }
922
923  bool operator < (const ThriftHadoopFileSystem_close_args & ) const;
924
925  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
926  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
927
928};
929
930class ThriftHadoopFileSystem_close_pargs {
931 public:
932
933
934  virtual ~ThriftHadoopFileSystem_close_pargs() throw() {}
935
936  const ThriftHandle* out;
937
938  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
939
940};
941
942class ThriftHadoopFileSystem_close_result {
943 public:
944
945  ThriftHadoopFileSystem_close_result() : success(0) {
946  }
947
948  virtual ~ThriftHadoopFileSystem_close_result() throw() {}
949
950  bool success;
951  ThriftIOException ouch;
952
953  struct __isset {
954    __isset() : success(false), ouch(false) {}
955    bool success;
956    bool ouch;
957  } __isset;
958
959  bool operator == (const ThriftHadoopFileSystem_close_result & rhs) const
960  {
961    if (!(success == rhs.success))
962      return false;
963    if (!(ouch == rhs.ouch))
964      return false;
965    return true;
966  }
967  bool operator != (const ThriftHadoopFileSystem_close_result &rhs) const {
968    return !(*this == rhs);
969  }
970
971  bool operator < (const ThriftHadoopFileSystem_close_result & ) const;
972
973  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
974  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
975
976};
977
978class ThriftHadoopFileSystem_close_presult {
979 public:
980
981
982  virtual ~ThriftHadoopFileSystem_close_presult() throw() {}
983
984  bool* success;
985  ThriftIOException ouch;
986
987  struct __isset {
988    __isset() : success(false), ouch(false) {}
989    bool success;
990    bool ouch;
991  } __isset;
992
993  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
994
995};
996
997class ThriftHadoopFileSystem_rm_args {
998 public:
999
1000  ThriftHadoopFileSystem_rm_args() : recursive(0) {
1001  }
1002
1003  virtual ~ThriftHadoopFileSystem_rm_args() throw() {}
1004
1005  Pathname path;
1006  bool recursive;
1007
1008  struct __isset {
1009    __isset() : path(false), recursive(false) {}
1010    bool path;
1011    bool recursive;
1012  } __isset;
1013
1014  bool operator == (const ThriftHadoopFileSystem_rm_args & rhs) const
1015  {
1016    if (!(path == rhs.path))
1017      return false;
1018    if (!(recursive == rhs.recursive))
1019      return false;
1020    return true;
1021  }
1022  bool operator != (const ThriftHadoopFileSystem_rm_args &rhs) const {
1023    return !(*this == rhs);
1024  }
1025
1026  bool operator < (const ThriftHadoopFileSystem_rm_args & ) const;
1027
1028  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1029  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1030
1031};
1032
1033class ThriftHadoopFileSystem_rm_pargs {
1034 public:
1035
1036
1037  virtual ~ThriftHadoopFileSystem_rm_pargs() throw() {}
1038
1039  const Pathname* path;
1040  const bool* recursive;
1041
1042  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1043
1044};
1045
1046class ThriftHadoopFileSystem_rm_result {
1047 public:
1048
1049  ThriftHadoopFileSystem_rm_result() : success(0) {
1050  }
1051
1052  virtual ~ThriftHadoopFileSystem_rm_result() throw() {}
1053
1054  bool success;
1055  ThriftIOException ouch;
1056
1057  struct __isset {
1058    __isset() : success(false), ouch(false) {}
1059    bool success;
1060    bool ouch;
1061  } __isset;
1062
1063  bool operator == (const ThriftHadoopFileSystem_rm_result & rhs) const
1064  {
1065    if (!(success == rhs.success))
1066      return false;
1067    if (!(ouch == rhs.ouch))
1068      return false;
1069    return true;
1070  }
1071  bool operator != (const ThriftHadoopFileSystem_rm_result &rhs) const {
1072    return !(*this == rhs);
1073  }
1074
1075  bool operator < (const ThriftHadoopFileSystem_rm_result & ) const;
1076
1077  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1078  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1079
1080};
1081
1082class ThriftHadoopFileSystem_rm_presult {
1083 public:
1084
1085
1086  virtual ~ThriftHadoopFileSystem_rm_presult() throw() {}
1087
1088  bool* success;
1089  ThriftIOException ouch;
1090
1091  struct __isset {
1092    __isset() : success(false), ouch(false) {}
1093    bool success;
1094    bool ouch;
1095  } __isset;
1096
1097  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1098
1099};
1100
1101class ThriftHadoopFileSystem_rename_args {
1102 public:
1103
1104  ThriftHadoopFileSystem_rename_args() {
1105  }
1106
1107  virtual ~ThriftHadoopFileSystem_rename_args() throw() {}
1108
1109  Pathname path;
1110  Pathname dest;
1111
1112  struct __isset {
1113    __isset() : path(false), dest(false) {}
1114    bool path;
1115    bool dest;
1116  } __isset;
1117
1118  bool operator == (const ThriftHadoopFileSystem_rename_args & rhs) const
1119  {
1120    if (!(path == rhs.path))
1121      return false;
1122    if (!(dest == rhs.dest))
1123      return false;
1124    return true;
1125  }
1126  bool operator != (const ThriftHadoopFileSystem_rename_args &rhs) const {
1127    return !(*this == rhs);
1128  }
1129
1130  bool operator < (const ThriftHadoopFileSystem_rename_args & ) const;
1131
1132  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1133  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1134
1135};
1136
1137class ThriftHadoopFileSystem_rename_pargs {
1138 public:
1139
1140
1141  virtual ~ThriftHadoopFileSystem_rename_pargs() throw() {}
1142
1143  const Pathname* path;
1144  const Pathname* dest;
1145
1146  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1147
1148};
1149
1150class ThriftHadoopFileSystem_rename_result {
1151 public:
1152
1153  ThriftHadoopFileSystem_rename_result() : success(0) {
1154  }
1155
1156  virtual ~ThriftHadoopFileSystem_rename_result() throw() {}
1157
1158  bool success;
1159  ThriftIOException ouch;
1160
1161  struct __isset {
1162    __isset() : success(false), ouch(false) {}
1163    bool success;
1164    bool ouch;
1165  } __isset;
1166
1167  bool operator == (const ThriftHadoopFileSystem_rename_result & rhs) const
1168  {
1169    if (!(success == rhs.success))
1170      return false;
1171    if (!(ouch == rhs.ouch))
1172      return false;
1173    return true;
1174  }
1175  bool operator != (const ThriftHadoopFileSystem_rename_result &rhs) const {
1176    return !(*this == rhs);
1177  }
1178
1179  bool operator < (const ThriftHadoopFileSystem_rename_result & ) const;
1180
1181  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1182  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1183
1184};
1185
1186class ThriftHadoopFileSystem_rename_presult {
1187 public:
1188
1189
1190  virtual ~ThriftHadoopFileSystem_rename_presult() throw() {}
1191
1192  bool* success;
1193  ThriftIOException ouch;
1194
1195  struct __isset {
1196    __isset() : success(false), ouch(false) {}
1197    bool success;
1198    bool ouch;
1199  } __isset;
1200
1201  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1202
1203};
1204
1205class ThriftHadoopFileSystem_mkdirs_args {
1206 public:
1207
1208  ThriftHadoopFileSystem_mkdirs_args() {
1209  }
1210
1211  virtual ~ThriftHadoopFileSystem_mkdirs_args() throw() {}
1212
1213  Pathname path;
1214
1215  struct __isset {
1216    __isset() : path(false) {}
1217    bool path;
1218  } __isset;
1219
1220  bool operator == (const ThriftHadoopFileSystem_mkdirs_args & rhs) const
1221  {
1222    if (!(path == rhs.path))
1223      return false;
1224    return true;
1225  }
1226  bool operator != (const ThriftHadoopFileSystem_mkdirs_args &rhs) const {
1227    return !(*this == rhs);
1228  }
1229
1230  bool operator < (const ThriftHadoopFileSystem_mkdirs_args & ) const;
1231
1232  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1233  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1234
1235};
1236
1237class ThriftHadoopFileSystem_mkdirs_pargs {
1238 public:
1239
1240
1241  virtual ~ThriftHadoopFileSystem_mkdirs_pargs() throw() {}
1242
1243  const Pathname* path;
1244
1245  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1246
1247};
1248
1249class ThriftHadoopFileSystem_mkdirs_result {
1250 public:
1251
1252  ThriftHadoopFileSystem_mkdirs_result() : success(0) {
1253  }
1254
1255  virtual ~ThriftHadoopFileSystem_mkdirs_result() throw() {}
1256
1257  bool success;
1258  ThriftIOException ouch;
1259
1260  struct __isset {
1261    __isset() : success(false), ouch(false) {}
1262    bool success;
1263    bool ouch;
1264  } __isset;
1265
1266  bool operator == (const ThriftHadoopFileSystem_mkdirs_result & rhs) const
1267  {
1268    if (!(success == rhs.success))
1269      return false;
1270    if (!(ouch == rhs.ouch))
1271      return false;
1272    return true;
1273  }
1274  bool operator != (const ThriftHadoopFileSystem_mkdirs_result &rhs) const {
1275    return !(*this == rhs);
1276  }
1277
1278  bool operator < (const ThriftHadoopFileSystem_mkdirs_result & ) const;
1279
1280  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1281  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1282
1283};
1284
1285class ThriftHadoopFileSystem_mkdirs_presult {
1286 public:
1287
1288
1289  virtual ~ThriftHadoopFileSystem_mkdirs_presult() throw() {}
1290
1291  bool* success;
1292  ThriftIOException ouch;
1293
1294  struct __isset {
1295    __isset() : success(false), ouch(false) {}
1296    bool success;
1297    bool ouch;
1298  } __isset;
1299
1300  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1301
1302};
1303
1304class ThriftHadoopFileSystem_exists_args {
1305 public:
1306
1307  ThriftHadoopFileSystem_exists_args() {
1308  }
1309
1310  virtual ~ThriftHadoopFileSystem_exists_args() throw() {}
1311
1312  Pathname path;
1313
1314  struct __isset {
1315    __isset() : path(false) {}
1316    bool path;
1317  } __isset;
1318
1319  bool operator == (const ThriftHadoopFileSystem_exists_args & rhs) const
1320  {
1321    if (!(path == rhs.path))
1322      return false;
1323    return true;
1324  }
1325  bool operator != (const ThriftHadoopFileSystem_exists_args &rhs) const {
1326    return !(*this == rhs);
1327  }
1328
1329  bool operator < (const ThriftHadoopFileSystem_exists_args & ) const;
1330
1331  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1332  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1333
1334};
1335
1336class ThriftHadoopFileSystem_exists_pargs {
1337 public:
1338
1339
1340  virtual ~ThriftHadoopFileSystem_exists_pargs() throw() {}
1341
1342  const Pathname* path;
1343
1344  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1345
1346};
1347
1348class ThriftHadoopFileSystem_exists_result {
1349 public:
1350
1351  ThriftHadoopFileSystem_exists_result() : success(0) {
1352  }
1353
1354  virtual ~ThriftHadoopFileSystem_exists_result() throw() {}
1355
1356  bool success;
1357  ThriftIOException ouch;
1358
1359  struct __isset {
1360    __isset() : success(false), ouch(false) {}
1361    bool success;
1362    bool ouch;
1363  } __isset;
1364
1365  bool operator == (const ThriftHadoopFileSystem_exists_result & rhs) const
1366  {
1367    if (!(success == rhs.success))
1368      return false;
1369    if (!(ouch == rhs.ouch))
1370      return false;
1371    return true;
1372  }
1373  bool operator != (const ThriftHadoopFileSystem_exists_result &rhs) const {
1374    return !(*this == rhs);
1375  }
1376
1377  bool operator < (const ThriftHadoopFileSystem_exists_result & ) const;
1378
1379  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1380  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1381
1382};
1383
1384class ThriftHadoopFileSystem_exists_presult {
1385 public:
1386
1387
1388  virtual ~ThriftHadoopFileSystem_exists_presult() throw() {}
1389
1390  bool* success;
1391  ThriftIOException ouch;
1392
1393  struct __isset {
1394    __isset() : success(false), ouch(false) {}
1395    bool success;
1396    bool ouch;
1397  } __isset;
1398
1399  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1400
1401};
1402
1403class ThriftHadoopFileSystem_stat_args {
1404 public:
1405
1406  ThriftHadoopFileSystem_stat_args() {
1407  }
1408
1409  virtual ~ThriftHadoopFileSystem_stat_args() throw() {}
1410
1411  Pathname path;
1412
1413  struct __isset {
1414    __isset() : path(false) {}
1415    bool path;
1416  } __isset;
1417
1418  bool operator == (const ThriftHadoopFileSystem_stat_args & rhs) const
1419  {
1420    if (!(path == rhs.path))
1421      return false;
1422    return true;
1423  }
1424  bool operator != (const ThriftHadoopFileSystem_stat_args &rhs) const {
1425    return !(*this == rhs);
1426  }
1427
1428  bool operator < (const ThriftHadoopFileSystem_stat_args & ) const;
1429
1430  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1431  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1432
1433};
1434
1435class ThriftHadoopFileSystem_stat_pargs {
1436 public:
1437
1438
1439  virtual ~ThriftHadoopFileSystem_stat_pargs() throw() {}
1440
1441  const Pathname* path;
1442
1443  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1444
1445};
1446
1447class ThriftHadoopFileSystem_stat_result {
1448 public:
1449
1450  ThriftHadoopFileSystem_stat_result() {
1451  }
1452
1453  virtual ~ThriftHadoopFileSystem_stat_result() throw() {}
1454
1455  FileStatus success;
1456  ThriftIOException ouch;
1457
1458  struct __isset {
1459    __isset() : success(false), ouch(false) {}
1460    bool success;
1461    bool ouch;
1462  } __isset;
1463
1464  bool operator == (const ThriftHadoopFileSystem_stat_result & rhs) const
1465  {
1466    if (!(success == rhs.success))
1467      return false;
1468    if (!(ouch == rhs.ouch))
1469      return false;
1470    return true;
1471  }
1472  bool operator != (const ThriftHadoopFileSystem_stat_result &rhs) const {
1473    return !(*this == rhs);
1474  }
1475
1476  bool operator < (const ThriftHadoopFileSystem_stat_result & ) const;
1477
1478  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1479  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1480
1481};
1482
1483class ThriftHadoopFileSystem_stat_presult {
1484 public:
1485
1486
1487  virtual ~ThriftHadoopFileSystem_stat_presult() throw() {}
1488
1489  FileStatus* success;
1490  ThriftIOException ouch;
1491
1492  struct __isset {
1493    __isset() : success(false), ouch(false) {}
1494    bool success;
1495    bool ouch;
1496  } __isset;
1497
1498  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1499
1500};
1501
1502class ThriftHadoopFileSystem_listStatus_args {
1503 public:
1504
1505  ThriftHadoopFileSystem_listStatus_args() {
1506  }
1507
1508  virtual ~ThriftHadoopFileSystem_listStatus_args() throw() {}
1509
1510  Pathname path;
1511
1512  struct __isset {
1513    __isset() : path(false) {}
1514    bool path;
1515  } __isset;
1516
1517  bool operator == (const ThriftHadoopFileSystem_listStatus_args & rhs) const
1518  {
1519    if (!(path == rhs.path))
1520      return false;
1521    return true;
1522  }
1523  bool operator != (const ThriftHadoopFileSystem_listStatus_args &rhs) const {
1524    return !(*this == rhs);
1525  }
1526
1527  bool operator < (const ThriftHadoopFileSystem_listStatus_args & ) const;
1528
1529  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1530  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1531
1532};
1533
1534class ThriftHadoopFileSystem_listStatus_pargs {
1535 public:
1536
1537
1538  virtual ~ThriftHadoopFileSystem_listStatus_pargs() throw() {}
1539
1540  const Pathname* path;
1541
1542  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1543
1544};
1545
1546class ThriftHadoopFileSystem_listStatus_result {
1547 public:
1548
1549  ThriftHadoopFileSystem_listStatus_result() {
1550  }
1551
1552  virtual ~ThriftHadoopFileSystem_listStatus_result() throw() {}
1553
1554  std::vector<FileStatus>  success;
1555  ThriftIOException ouch;
1556
1557  struct __isset {
1558    __isset() : success(false), ouch(false) {}
1559    bool success;
1560    bool ouch;
1561  } __isset;
1562
1563  bool operator == (const ThriftHadoopFileSystem_listStatus_result & rhs) const
1564  {
1565    if (!(success == rhs.success))
1566      return false;
1567    if (!(ouch == rhs.ouch))
1568      return false;
1569    return true;
1570  }
1571  bool operator != (const ThriftHadoopFileSystem_listStatus_result &rhs) const {
1572    return !(*this == rhs);
1573  }
1574
1575  bool operator < (const ThriftHadoopFileSystem_listStatus_result & ) const;
1576
1577  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1578  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1579
1580};
1581
1582class ThriftHadoopFileSystem_listStatus_presult {
1583 public:
1584
1585
1586  virtual ~ThriftHadoopFileSystem_listStatus_presult() throw() {}
1587
1588  std::vector<FileStatus> * success;
1589  ThriftIOException ouch;
1590
1591  struct __isset {
1592    __isset() : success(false), ouch(false) {}
1593    bool success;
1594    bool ouch;
1595  } __isset;
1596
1597  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1598
1599};
1600
1601class ThriftHadoopFileSystem_chmod_args {
1602 public:
1603
1604  ThriftHadoopFileSystem_chmod_args() : mode(0) {
1605  }
1606
1607  virtual ~ThriftHadoopFileSystem_chmod_args() throw() {}
1608
1609  Pathname path;
1610  int16_t mode;
1611
1612  struct __isset {
1613    __isset() : path(false), mode(false) {}
1614    bool path;
1615    bool mode;
1616  } __isset;
1617
1618  bool operator == (const ThriftHadoopFileSystem_chmod_args & rhs) const
1619  {
1620    if (!(path == rhs.path))
1621      return false;
1622    if (!(mode == rhs.mode))
1623      return false;
1624    return true;
1625  }
1626  bool operator != (const ThriftHadoopFileSystem_chmod_args &rhs) const {
1627    return !(*this == rhs);
1628  }
1629
1630  bool operator < (const ThriftHadoopFileSystem_chmod_args & ) const;
1631
1632  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1633  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1634
1635};
1636
1637class ThriftHadoopFileSystem_chmod_pargs {
1638 public:
1639
1640
1641  virtual ~ThriftHadoopFileSystem_chmod_pargs() throw() {}
1642
1643  const Pathname* path;
1644  const int16_t* mode;
1645
1646  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1647
1648};
1649
1650class ThriftHadoopFileSystem_chmod_result {
1651 public:
1652
1653  ThriftHadoopFileSystem_chmod_result() {
1654  }
1655
1656  virtual ~ThriftHadoopFileSystem_chmod_result() throw() {}
1657
1658  ThriftIOException ouch;
1659
1660  struct __isset {
1661    __isset() : ouch(false) {}
1662    bool ouch;
1663  } __isset;
1664
1665  bool operator == (const ThriftHadoopFileSystem_chmod_result & rhs) const
1666  {
1667    if (!(ouch == rhs.ouch))
1668      return false;
1669    return true;
1670  }
1671  bool operator != (const ThriftHadoopFileSystem_chmod_result &rhs) const {
1672    return !(*this == rhs);
1673  }
1674
1675  bool operator < (const ThriftHadoopFileSystem_chmod_result & ) const;
1676
1677  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1678  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1679
1680};
1681
1682class ThriftHadoopFileSystem_chmod_presult {
1683 public:
1684
1685
1686  virtual ~ThriftHadoopFileSystem_chmod_presult() throw() {}
1687
1688  ThriftIOException ouch;
1689
1690  struct __isset {
1691    __isset() : ouch(false) {}
1692    bool ouch;
1693  } __isset;
1694
1695  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1696
1697};
1698
1699class ThriftHadoopFileSystem_chown_args {
1700 public:
1701
1702  ThriftHadoopFileSystem_chown_args() : owner(""), group("") {
1703  }
1704
1705  virtual ~ThriftHadoopFileSystem_chown_args() throw() {}
1706
1707  Pathname path;
1708  std::string owner;
1709  std::string group;
1710
1711  struct __isset {
1712    __isset() : path(false), owner(false), group(false) {}
1713    bool path;
1714    bool owner;
1715    bool group;
1716  } __isset;
1717
1718  bool operator == (const ThriftHadoopFileSystem_chown_args & rhs) const
1719  {
1720    if (!(path == rhs.path))
1721      return false;
1722    if (!(owner == rhs.owner))
1723      return false;
1724    if (!(group == rhs.group))
1725      return false;
1726    return true;
1727  }
1728  bool operator != (const ThriftHadoopFileSystem_chown_args &rhs) const {
1729    return !(*this == rhs);
1730  }
1731
1732  bool operator < (const ThriftHadoopFileSystem_chown_args & ) const;
1733
1734  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1735  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1736
1737};
1738
1739class ThriftHadoopFileSystem_chown_pargs {
1740 public:
1741
1742
1743  virtual ~ThriftHadoopFileSystem_chown_pargs() throw() {}
1744
1745  const Pathname* path;
1746  const std::string* owner;
1747  const std::string* group;
1748
1749  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1750
1751};
1752
1753class ThriftHadoopFileSystem_chown_result {
1754 public:
1755
1756  ThriftHadoopFileSystem_chown_result() {
1757  }
1758
1759  virtual ~ThriftHadoopFileSystem_chown_result() throw() {}
1760
1761  ThriftIOException ouch;
1762
1763  struct __isset {
1764    __isset() : ouch(false) {}
1765    bool ouch;
1766  } __isset;
1767
1768  bool operator == (const ThriftHadoopFileSystem_chown_result & rhs) const
1769  {
1770    if (!(ouch == rhs.ouch))
1771      return false;
1772    return true;
1773  }
1774  bool operator != (const ThriftHadoopFileSystem_chown_result &rhs) const {
1775    return !(*this == rhs);
1776  }
1777
1778  bool operator < (const ThriftHadoopFileSystem_chown_result & ) const;
1779
1780  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1781  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1782
1783};
1784
1785class ThriftHadoopFileSystem_chown_presult {
1786 public:
1787
1788
1789  virtual ~ThriftHadoopFileSystem_chown_presult() throw() {}
1790
1791  ThriftIOException ouch;
1792
1793  struct __isset {
1794    __isset() : ouch(false) {}
1795    bool ouch;
1796  } __isset;
1797
1798  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1799
1800};
1801
1802class ThriftHadoopFileSystem_setReplication_args {
1803 public:
1804
1805  ThriftHadoopFileSystem_setReplication_args() : replication(0) {
1806  }
1807
1808  virtual ~ThriftHadoopFileSystem_setReplication_args() throw() {}
1809
1810  Pathname path;
1811  int16_t replication;
1812
1813  struct __isset {
1814    __isset() : path(false), replication(false) {}
1815    bool path;
1816    bool replication;
1817  } __isset;
1818
1819  bool operator == (const ThriftHadoopFileSystem_setReplication_args & rhs) const
1820  {
1821    if (!(path == rhs.path))
1822      return false;
1823    if (!(replication == rhs.replication))
1824      return false;
1825    return true;
1826  }
1827  bool operator != (const ThriftHadoopFileSystem_setReplication_args &rhs) const {
1828    return !(*this == rhs);
1829  }
1830
1831  bool operator < (const ThriftHadoopFileSystem_setReplication_args & ) const;
1832
1833  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1834  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1835
1836};
1837
1838class ThriftHadoopFileSystem_setReplication_pargs {
1839 public:
1840
1841
1842  virtual ~ThriftHadoopFileSystem_setReplication_pargs() throw() {}
1843
1844  const Pathname* path;
1845  const int16_t* replication;
1846
1847  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1848
1849};
1850
1851class ThriftHadoopFileSystem_setReplication_result {
1852 public:
1853
1854  ThriftHadoopFileSystem_setReplication_result() {
1855  }
1856
1857  virtual ~ThriftHadoopFileSystem_setReplication_result() throw() {}
1858
1859  ThriftIOException ouch;
1860
1861  struct __isset {
1862    __isset() : ouch(false) {}
1863    bool ouch;
1864  } __isset;
1865
1866  bool operator == (const ThriftHadoopFileSystem_setReplication_result & rhs) const
1867  {
1868    if (!(ouch == rhs.ouch))
1869      return false;
1870    return true;
1871  }
1872  bool operator != (const ThriftHadoopFileSystem_setReplication_result &rhs) const {
1873    return !(*this == rhs);
1874  }
1875
1876  bool operator < (const ThriftHadoopFileSystem_setReplication_result & ) const;
1877
1878  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1879  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1880
1881};
1882
1883class ThriftHadoopFileSystem_setReplication_presult {
1884 public:
1885
1886
1887  virtual ~ThriftHadoopFileSystem_setReplication_presult() throw() {}
1888
1889  ThriftIOException ouch;
1890
1891  struct __isset {
1892    __isset() : ouch(false) {}
1893    bool ouch;
1894  } __isset;
1895
1896  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1897
1898};
1899
1900class ThriftHadoopFileSystem_getFileBlockLocations_args {
1901 public:
1902
1903  ThriftHadoopFileSystem_getFileBlockLocations_args() : start(0), length(0) {
1904  }
1905
1906  virtual ~ThriftHadoopFileSystem_getFileBlockLocations_args() throw() {}
1907
1908  Pathname path;
1909  int64_t start;
1910  int64_t length;
1911
1912  struct __isset {
1913    __isset() : path(false), start(false), length(false) {}
1914    bool path;
1915    bool start;
1916    bool length;
1917  } __isset;
1918
1919  bool operator == (const ThriftHadoopFileSystem_getFileBlockLocations_args & rhs) const
1920  {
1921    if (!(path == rhs.path))
1922      return false;
1923    if (!(start == rhs.start))
1924      return false;
1925    if (!(length == rhs.length))
1926      return false;
1927    return true;
1928  }
1929  bool operator != (const ThriftHadoopFileSystem_getFileBlockLocations_args &rhs) const {
1930    return !(*this == rhs);
1931  }
1932
1933  bool operator < (const ThriftHadoopFileSystem_getFileBlockLocations_args & ) const;
1934
1935  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1936  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1937
1938};
1939
1940class ThriftHadoopFileSystem_getFileBlockLocations_pargs {
1941 public:
1942
1943
1944  virtual ~ThriftHadoopFileSystem_getFileBlockLocations_pargs() throw() {}
1945
1946  const Pathname* path;
1947  const int64_t* start;
1948  const int64_t* length;
1949
1950  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1951
1952};
1953
1954class ThriftHadoopFileSystem_getFileBlockLocations_result {
1955 public:
1956
1957  ThriftHadoopFileSystem_getFileBlockLocations_result() {
1958  }
1959
1960  virtual ~ThriftHadoopFileSystem_getFileBlockLocations_result() throw() {}
1961
1962  std::vector<BlockLocation>  success;
1963  ThriftIOException ouch;
1964
1965  struct __isset {
1966    __isset() : success(false), ouch(false) {}
1967    bool success;
1968    bool ouch;
1969  } __isset;
1970
1971  bool operator == (const ThriftHadoopFileSystem_getFileBlockLocations_result & rhs) const
1972  {
1973    if (!(success == rhs.success))
1974      return false;
1975    if (!(ouch == rhs.ouch))
1976      return false;
1977    return true;
1978  }
1979  bool operator != (const ThriftHadoopFileSystem_getFileBlockLocations_result &rhs) const {
1980    return !(*this == rhs);
1981  }
1982
1983  bool operator < (const ThriftHadoopFileSystem_getFileBlockLocations_result & ) const;
1984
1985  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
1986  uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;
1987
1988};
1989
1990class ThriftHadoopFileSystem_getFileBlockLocations_presult {
1991 public:
1992
1993
1994  virtual ~ThriftHadoopFileSystem_getFileBlockLocations_presult() throw() {}
1995
1996  std::vector<BlockLocation> * success;
1997  ThriftIOException ouch;
1998
1999  struct __isset {
2000    __isset() : success(false), ouch(false) {}
2001    bool success;
2002    bool ouch;
2003  } __isset;
2004
2005  uint32_t read(facebook::thrift::protocol::TProtocol* iprot);
2006
2007};
2008
2009class ThriftHadoopFileSystemClient : virtual public ThriftHadoopFileSystemIf {
2010 public:
2011  ThriftHadoopFileSystemClient(boost::shared_ptr<facebook::thrift::protocol::TProtocol> prot) :
2012    piprot_(prot),
2013    poprot_(prot) {
2014    iprot_ = prot.get();
2015    oprot_ = prot.get();
2016  }
2017  ThriftHadoopFileSystemClient(boost::shared_ptr<facebook::thrift::protocol::TProtocol> iprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> oprot) :
2018    piprot_(iprot),
2019    poprot_(oprot) {
2020    iprot_ = iprot.get();
2021    oprot_ = oprot.get();
2022  }
2023  boost::shared_ptr<facebook::thrift::protocol::TProtocol> getInputProtocol() {
2024    return piprot_;
2025  }
2026  boost::shared_ptr<facebook::thrift::protocol::TProtocol> getOutputProtocol() {
2027    return poprot_;
2028  }
2029  void setInactivityTimeoutPeriod(const int64_t periodInSeconds);
2030  void send_setInactivityTimeoutPeriod(const int64_t periodInSeconds);
2031  void recv_setInactivityTimeoutPeriod();
2032  void shutdown(const int32_t status);
2033  void send_shutdown(const int32_t status);
2034  void recv_shutdown();
2035  void create(ThriftHandle& _return, const Pathname& path);
2036  void send_create(const Pathname& path);
2037  void recv_create(ThriftHandle& _return);
2038  void createFile(ThriftHandle& _return, const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize);
2039  void send_createFile(const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize);
2040  void recv_createFile(ThriftHandle& _return);
2041  void open(ThriftHandle& _return, const Pathname& path);
2042  void send_open(const Pathname& path);
2043  void recv_open(ThriftHandle& _return);
2044  void append(ThriftHandle& _return, const Pathname& path);
2045  void send_append(const Pathname& path);
2046  void recv_append(ThriftHandle& _return);
2047  bool write(const ThriftHandle& handle, const std::string& data);
2048  void send_write(const ThriftHandle& handle, const std::string& data);
2049  bool recv_write();
2050  void read(std::string& _return, const ThriftHandle& handle, const int64_t offset, const int32_t size);
2051  void send_read(const ThriftHandle& handle, const int64_t offset, const int32_t size);
2052  void recv_read(std::string& _return);
2053  bool close(const ThriftHandle& out);
2054  void send_close(const ThriftHandle& out);
2055  bool recv_close();
2056  bool rm(const Pathname& path, const bool recursive);
2057  void send_rm(const Pathname& path, const bool recursive);
2058  bool recv_rm();
2059  bool rename(const Pathname& path, const Pathname& dest);
2060  void send_rename(const Pathname& path, const Pathname& dest);
2061  bool recv_rename();
2062  bool mkdirs(const Pathname& path);
2063  void send_mkdirs(const Pathname& path);
2064  bool recv_mkdirs();
2065  bool exists(const Pathname& path);
2066  void send_exists(const Pathname& path);
2067  bool recv_exists();
2068  void stat(FileStatus& _return, const Pathname& path);
2069  void send_stat(const Pathname& path);
2070  void recv_stat(FileStatus& _return);
2071  void listStatus(std::vector<FileStatus> & _return, const Pathname& path);
2072  void send_listStatus(const Pathname& path);
2073  void recv_listStatus(std::vector<FileStatus> & _return);
2074  void chmod(const Pathname& path, const int16_t mode);
2075  void send_chmod(const Pathname& path, const int16_t mode);
2076  void recv_chmod();
2077  void chown(const Pathname& path, const std::string& owner, const std::string& group);
2078  void send_chown(const Pathname& path, const std::string& owner, const std::string& group);
2079  void recv_chown();
2080  void setReplication(const Pathname& path, const int16_t replication);
2081  void send_setReplication(const Pathname& path, const int16_t replication);
2082  void recv_setReplication();
2083  void getFileBlockLocations(std::vector<BlockLocation> & _return, const Pathname& path, const int64_t start, const int64_t length);
2084  void send_getFileBlockLocations(const Pathname& path, const int64_t start, const int64_t length);
2085  void recv_getFileBlockLocations(std::vector<BlockLocation> & _return);
2086 protected:
2087  boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot_;
2088  boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot_;
2089  facebook::thrift::protocol::TProtocol* iprot_;
2090  facebook::thrift::protocol::TProtocol* oprot_;
2091};
2092
2093class ThriftHadoopFileSystemProcessor : virtual public facebook::thrift::TProcessor {
2094 protected:
2095  boost::shared_ptr<ThriftHadoopFileSystemIf> iface_;
2096  virtual bool process_fn(facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid);
2097 private:
2098  std::map<std::string, void (ThriftHadoopFileSystemProcessor::*)(int32_t, facebook::thrift::protocol::TProtocol*, facebook::thrift::protocol::TProtocol*)> processMap_;
2099  void process_setInactivityTimeoutPeriod(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2100  void process_shutdown(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2101  void process_create(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2102  void process_createFile(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2103  void process_open(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2104  void process_append(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2105  void process_write(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2106  void process_read(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2107  void process_close(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2108  void process_rm(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2109  void process_rename(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2110  void process_mkdirs(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2111  void process_exists(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2112  void process_stat(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2113  void process_listStatus(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2114  void process_chmod(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2115  void process_chown(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2116  void process_setReplication(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2117  void process_getFileBlockLocations(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);
2118 public:
2119  ThriftHadoopFileSystemProcessor(boost::shared_ptr<ThriftHadoopFileSystemIf> iface) :
2120    iface_(iface) {
2121    processMap_["setInactivityTimeoutPeriod"] = &ThriftHadoopFileSystemProcessor::process_setInactivityTimeoutPeriod;
2122    processMap_["shutdown"] = &ThriftHadoopFileSystemProcessor::process_shutdown;
2123    processMap_["create"] = &ThriftHadoopFileSystemProcessor::process_create;
2124    processMap_["createFile"] = &ThriftHadoopFileSystemProcessor::process_createFile;
2125    processMap_["open"] = &ThriftHadoopFileSystemProcessor::process_open;
2126    processMap_["append"] = &ThriftHadoopFileSystemProcessor::process_append;
2127    processMap_["write"] = &ThriftHadoopFileSystemProcessor::process_write;
2128    processMap_["read"] = &ThriftHadoopFileSystemProcessor::process_read;
2129    processMap_["close"] = &ThriftHadoopFileSystemProcessor::process_close;
2130    processMap_["rm"] = &ThriftHadoopFileSystemProcessor::process_rm;
2131    processMap_["rename"] = &ThriftHadoopFileSystemProcessor::process_rename;
2132    processMap_["mkdirs"] = &ThriftHadoopFileSystemProcessor::process_mkdirs;
2133    processMap_["exists"] = &ThriftHadoopFileSystemProcessor::process_exists;
2134    processMap_["stat"] = &ThriftHadoopFileSystemProcessor::process_stat;
2135    processMap_["listStatus"] = &ThriftHadoopFileSystemProcessor::process_listStatus;
2136    processMap_["chmod"] = &ThriftHadoopFileSystemProcessor::process_chmod;
2137    processMap_["chown"] = &ThriftHadoopFileSystemProcessor::process_chown;
2138    processMap_["setReplication"] = &ThriftHadoopFileSystemProcessor::process_setReplication;
2139    processMap_["getFileBlockLocations"] = &ThriftHadoopFileSystemProcessor::process_getFileBlockLocations;
2140  }
2141
2142  virtual bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot);
2143  virtual ~ThriftHadoopFileSystemProcessor() {}
2144};
2145
2146class ThriftHadoopFileSystemMultiface : virtual public ThriftHadoopFileSystemIf {
2147 public:
2148  ThriftHadoopFileSystemMultiface(std::vector<boost::shared_ptr<ThriftHadoopFileSystemIf> >& ifaces) : ifaces_(ifaces) {
2149  }
2150  virtual ~ThriftHadoopFileSystemMultiface() {}
2151 protected:
2152  std::vector<boost::shared_ptr<ThriftHadoopFileSystemIf> > ifaces_;
2153  ThriftHadoopFileSystemMultiface() {}
2154  void add(boost::shared_ptr<ThriftHadoopFileSystemIf> iface) {
2155    ifaces_.push_back(iface);
2156  }
2157 public:
2158  void setInactivityTimeoutPeriod(const int64_t periodInSeconds) {
2159    uint32_t sz = ifaces_.size();
2160    for (uint32_t i = 0; i < sz; ++i) {
2161      ifaces_[i]->setInactivityTimeoutPeriod(periodInSeconds);
2162    }
2163  }
2164
2165  void shutdown(const int32_t status) {
2166    uint32_t sz = ifaces_.size();
2167    for (uint32_t i = 0; i < sz; ++i) {
2168      ifaces_[i]->shutdown(status);
2169    }
2170  }
2171
2172  void create(ThriftHandle& _return, const Pathname& path) {
2173    uint32_t sz = ifaces_.size();
2174    for (uint32_t i = 0; i < sz; ++i) {
2175      if (i == sz - 1) {
2176        ifaces_[i]->create(_return, path);
2177        return;
2178      } else {
2179        ifaces_[i]->create(_return, path);
2180      }
2181    }
2182  }
2183
2184  void createFile(ThriftHandle& _return, const Pathname& path, const int16_t mode, const bool overwrite, const int32_t bufferSize, const int16_t block_replication, const int64_t blocksize) {
2185    uint32_t sz = ifaces_.size();
2186    for (uint32_t i = 0; i < sz; ++i) {
2187      if (i == sz - 1) {
2188        ifaces_[i]->createFile(_return, path, mode, overwrite, bufferSize, block_replication, blocksize);
2189        return;
2190      } else {
2191        ifaces_[i]->createFile(_return, path, mode, overwrite, bufferSize, block_replication, blocksize);
2192      }
2193    }
2194  }
2195
2196  void open(ThriftHandle& _return, const Pathname& path) {
2197    uint32_t sz = ifaces_.size();
2198    for (uint32_t i = 0; i < sz; ++i) {
2199      if (i == sz - 1) {
2200        ifaces_[i]->open(_return, path);
2201        return;
2202      } else {
2203        ifaces_[i]->open(_return, path);
2204      }
2205    }
2206  }
2207
2208  void append(ThriftHandle& _return, const Pathname& path) {
2209    uint32_t sz = ifaces_.size();
2210    for (uint32_t i = 0; i < sz; ++i) {
2211      if (i == sz - 1) {
2212        ifaces_[i]->append(_return, path);
2213        return;
2214      } else {
2215        ifaces_[i]->append(_return, path);
2216      }
2217    }
2218  }
2219
2220  bool write(const ThriftHandle& handle, const std::string& data) {
2221    uint32_t sz = ifaces_.size();
2222    for (uint32_t i = 0; i < sz; ++i) {
2223      if (i == sz - 1) {
2224        return ifaces_[i]->write(handle, data);
2225      } else {
2226        ifaces_[i]->write(handle, data);
2227      }
2228    }
2229  }
2230
2231  void read(std::string& _return, const ThriftHandle& handle, const int64_t offset, const int32_t size) {
2232    uint32_t sz = ifaces_.size();
2233    for (uint32_t i = 0; i < sz; ++i) {
2234      if (i == sz - 1) {
2235        ifaces_[i]->read(_return, handle, offset, size);
2236        return;
2237      } else {
2238        ifaces_[i]->read(_return, handle, offset, size);
2239      }
2240    }
2241  }
2242
2243  bool close(const ThriftHandle& out) {
2244    uint32_t sz = ifaces_.size();
2245    for (uint32_t i = 0; i < sz; ++i) {
2246      if (i == sz - 1) {
2247        return ifaces_[i]->close(out);
2248      } else {
2249        ifaces_[i]->close(out);
2250      }
2251    }
2252  }
2253
2254  bool rm(const Pathname& path, const bool recursive) {
2255    uint32_t sz = ifaces_.size();
2256    for (uint32_t i = 0; i < sz; ++i) {
2257      if (i == sz - 1) {
2258        return ifaces_[i]->rm(path, recursive);
2259      } else {
2260        ifaces_[i]->rm(path, recursive);
2261      }
2262    }
2263  }
2264
2265  bool rename(const Pathname& path, const Pathname& dest) {
2266    uint32_t sz = ifaces_.size();
2267    for (uint32_t i = 0; i < sz; ++i) {
2268      if (i == sz - 1) {
2269        return ifaces_[i]->rename(path, dest);
2270      } else {
2271        ifaces_[i]->rename(path, dest);
2272      }
2273    }
2274  }
2275
2276  bool mkdirs(const Pathname& path) {
2277    uint32_t sz = ifaces_.size();
2278    for (uint32_t i = 0; i < sz; ++i) {
2279      if (i == sz - 1) {
2280        return ifaces_[i]->mkdirs(path);
2281      } else {
2282        ifaces_[i]->mkdirs(path);
2283      }
2284    }
2285  }
2286
2287  bool exists(const Pathname& path) {
2288    uint32_t sz = ifaces_.size();
2289    for (uint32_t i = 0; i < sz; ++i) {
2290      if (i == sz - 1) {
2291        return ifaces_[i]->exists(path);
2292      } else {
2293        ifaces_[i]->exists(path);
2294      }
2295    }
2296  }
2297
2298  void stat(FileStatus& _return, const Pathname& path) {
2299    uint32_t sz = ifaces_.size();
2300    for (uint32_t i = 0; i < sz; ++i) {
2301      if (i == sz - 1) {
2302        ifaces_[i]->stat(_return, path);
2303        return;
2304      } else {
2305        ifaces_[i]->stat(_return, path);
2306      }
2307    }
2308  }
2309
2310  void listStatus(std::vector<FileStatus> & _return, const Pathname& path) {
2311    uint32_t sz = ifaces_.size();
2312    for (uint32_t i = 0; i < sz; ++i) {
2313      if (i == sz - 1) {
2314        ifaces_[i]->listStatus(_return, path);
2315        return;
2316      } else {
2317        ifaces_[i]->listStatus(_return, path);
2318      }
2319    }
2320  }
2321
2322  void chmod(const Pathname& path, const int16_t mode) {
2323    uint32_t sz = ifaces_.size();
2324    for (uint32_t i = 0; i < sz; ++i) {
2325      ifaces_[i]->chmod(path, mode);
2326    }
2327  }
2328
2329  void chown(const Pathname& path, const std::string& owner, const std::string& group) {
2330    uint32_t sz = ifaces_.size();
2331    for (uint32_t i = 0; i < sz; ++i) {
2332      ifaces_[i]->chown(path, owner, group);
2333    }
2334  }
2335
2336  void setReplication(const Pathname& path, const int16_t replication) {
2337    uint32_t sz = ifaces_.size();
2338    for (uint32_t i = 0; i < sz; ++i) {
2339      ifaces_[i]->setReplication(path, replication);
2340    }
2341  }
2342
2343  void getFileBlockLocations(std::vector<BlockLocation> & _return, const Pathname& path, const int64_t start, const int64_t length) {
2344    uint32_t sz = ifaces_.size();
2345    for (uint32_t i = 0; i < sz; ++i) {
2346      if (i == sz - 1) {
2347        ifaces_[i]->getFileBlockLocations(_return, path, start, length);
2348        return;
2349      } else {
2350        ifaces_[i]->getFileBlockLocations(_return, path, start, length);
2351      }
2352    }
2353  }
2354
2355};
2356
2357
2358
2359#endif
Note: See TracBrowser for help on using the repository browser.