source: proiecte/HadoopJUnit/hadoop-0.20.1/src/contrib/thriftfs/gen-rb/ThriftHadoopFileSystem.rb @ 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: 25.5 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
7require 'thrift/protocol'
8require 'thrift'
9require 'hadoopfs_types'
10
11module ThriftHadoopFileSystem
12  class Client
13    include Thrift::Client
14
15    def setInactivityTimeoutPeriod(periodInSeconds)
16      send_setInactivityTimeoutPeriod(periodInSeconds)
17      recv_setInactivityTimeoutPeriod()
18    end
19
20    def send_setInactivityTimeoutPeriod(periodInSeconds)
21      send_message('setInactivityTimeoutPeriod', SetInactivityTimeoutPeriod_args, :periodInSeconds => periodInSeconds)
22    end
23
24    def recv_setInactivityTimeoutPeriod()
25      result = receive_message(SetInactivityTimeoutPeriod_result)
26      return
27    end
28
29    def shutdown(status)
30      send_shutdown(status)
31      recv_shutdown()
32    end
33
34    def send_shutdown(status)
35      send_message('shutdown', Shutdown_args, :status => status)
36    end
37
38    def recv_shutdown()
39      result = receive_message(Shutdown_result)
40      return
41    end
42
43    def create(path)
44      send_create(path)
45      return recv_create()
46    end
47
48    def send_create(path)
49      send_message('create', Create_args, :path => path)
50    end
51
52    def recv_create()
53      result = receive_message(Create_result)
54      return result.success unless result.success.nil?
55      raise result.ouch unless result.ouch.nil?
56      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'create failed: unknown result')
57    end
58
59    def createFile(path, mode, overwrite, bufferSize, block_replication, blocksize)
60      send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize)
61      return recv_createFile()
62    end
63
64    def send_createFile(path, mode, overwrite, bufferSize, block_replication, blocksize)
65      send_message('createFile', CreateFile_args, :path => path, :mode => mode, :overwrite => overwrite, :bufferSize => bufferSize, :block_replication => block_replication, :blocksize => blocksize)
66    end
67
68    def recv_createFile()
69      result = receive_message(CreateFile_result)
70      return result.success unless result.success.nil?
71      raise result.ouch unless result.ouch.nil?
72      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'createFile failed: unknown result')
73    end
74
75    def open(path)
76      send_open(path)
77      return recv_open()
78    end
79
80    def send_open(path)
81      send_message('open', Open_args, :path => path)
82    end
83
84    def recv_open()
85      result = receive_message(Open_result)
86      return result.success unless result.success.nil?
87      raise result.ouch unless result.ouch.nil?
88      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'open failed: unknown result')
89    end
90
91    def append(path)
92      send_append(path)
93      return recv_append()
94    end
95
96    def send_append(path)
97      send_message('append', Append_args, :path => path)
98    end
99
100    def recv_append()
101      result = receive_message(Append_result)
102      return result.success unless result.success.nil?
103      raise result.ouch unless result.ouch.nil?
104      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'append failed: unknown result')
105    end
106
107    def write(handle, data)
108      send_write(handle, data)
109      return recv_write()
110    end
111
112    def send_write(handle, data)
113      send_message('write', Write_args, :handle => handle, :data => data)
114    end
115
116    def recv_write()
117      result = receive_message(Write_result)
118      return result.success unless result.success.nil?
119      raise result.ouch unless result.ouch.nil?
120      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'write failed: unknown result')
121    end
122
123    def read(handle, offset, size)
124      send_read(handle, offset, size)
125      return recv_read()
126    end
127
128    def send_read(handle, offset, size)
129      send_message('read', Read_args, :handle => handle, :offset => offset, :size => size)
130    end
131
132    def recv_read()
133      result = receive_message(Read_result)
134      return result.success unless result.success.nil?
135      raise result.ouch unless result.ouch.nil?
136      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'read failed: unknown result')
137    end
138
139    def close(out)
140      send_close(out)
141      return recv_close()
142    end
143
144    def send_close(out)
145      send_message('close', Close_args, :out => out)
146    end
147
148    def recv_close()
149      result = receive_message(Close_result)
150      return result.success unless result.success.nil?
151      raise result.ouch unless result.ouch.nil?
152      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'close failed: unknown result')
153    end
154
155    def rm(path, recursive)
156      send_rm(path, recursive)
157      return recv_rm()
158    end
159
160    def send_rm(path, recursive)
161      send_message('rm', Rm_args, :path => path, :recursive => recursive)
162    end
163
164    def recv_rm()
165      result = receive_message(Rm_result)
166      return result.success unless result.success.nil?
167      raise result.ouch unless result.ouch.nil?
168      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'rm failed: unknown result')
169    end
170
171    def rename(path, dest)
172      send_rename(path, dest)
173      return recv_rename()
174    end
175
176    def send_rename(path, dest)
177      send_message('rename', Rename_args, :path => path, :dest => dest)
178    end
179
180    def recv_rename()
181      result = receive_message(Rename_result)
182      return result.success unless result.success.nil?
183      raise result.ouch unless result.ouch.nil?
184      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'rename failed: unknown result')
185    end
186
187    def mkdirs(path)
188      send_mkdirs(path)
189      return recv_mkdirs()
190    end
191
192    def send_mkdirs(path)
193      send_message('mkdirs', Mkdirs_args, :path => path)
194    end
195
196    def recv_mkdirs()
197      result = receive_message(Mkdirs_result)
198      return result.success unless result.success.nil?
199      raise result.ouch unless result.ouch.nil?
200      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'mkdirs failed: unknown result')
201    end
202
203    def exists(path)
204      send_exists(path)
205      return recv_exists()
206    end
207
208    def send_exists(path)
209      send_message('exists', Exists_args, :path => path)
210    end
211
212    def recv_exists()
213      result = receive_message(Exists_result)
214      return result.success unless result.success.nil?
215      raise result.ouch unless result.ouch.nil?
216      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'exists failed: unknown result')
217    end
218
219    def stat(path)
220      send_stat(path)
221      return recv_stat()
222    end
223
224    def send_stat(path)
225      send_message('stat', Stat_args, :path => path)
226    end
227
228    def recv_stat()
229      result = receive_message(Stat_result)
230      return result.success unless result.success.nil?
231      raise result.ouch unless result.ouch.nil?
232      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'stat failed: unknown result')
233    end
234
235    def listStatus(path)
236      send_listStatus(path)
237      return recv_listStatus()
238    end
239
240    def send_listStatus(path)
241      send_message('listStatus', ListStatus_args, :path => path)
242    end
243
244    def recv_listStatus()
245      result = receive_message(ListStatus_result)
246      return result.success unless result.success.nil?
247      raise result.ouch unless result.ouch.nil?
248      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'listStatus failed: unknown result')
249    end
250
251    def chmod(path, mode)
252      send_chmod(path, mode)
253      recv_chmod()
254    end
255
256    def send_chmod(path, mode)
257      send_message('chmod', Chmod_args, :path => path, :mode => mode)
258    end
259
260    def recv_chmod()
261      result = receive_message(Chmod_result)
262      raise result.ouch unless result.ouch.nil?
263      return
264    end
265
266    def chown(path, owner, group)
267      send_chown(path, owner, group)
268      recv_chown()
269    end
270
271    def send_chown(path, owner, group)
272      send_message('chown', Chown_args, :path => path, :owner => owner, :group => group)
273    end
274
275    def recv_chown()
276      result = receive_message(Chown_result)
277      raise result.ouch unless result.ouch.nil?
278      return
279    end
280
281    def setReplication(path, replication)
282      send_setReplication(path, replication)
283      recv_setReplication()
284    end
285
286    def send_setReplication(path, replication)
287      send_message('setReplication', SetReplication_args, :path => path, :replication => replication)
288    end
289
290    def recv_setReplication()
291      result = receive_message(SetReplication_result)
292      raise result.ouch unless result.ouch.nil?
293      return
294    end
295
296    def getFileBlockLocations(path, start, length)
297      send_getFileBlockLocations(path, start, length)
298      return recv_getFileBlockLocations()
299    end
300
301    def send_getFileBlockLocations(path, start, length)
302      send_message('getFileBlockLocations', GetFileBlockLocations_args, :path => path, :start => start, :length => length)
303    end
304
305    def recv_getFileBlockLocations()
306      result = receive_message(GetFileBlockLocations_result)
307      return result.success unless result.success.nil?
308      raise result.ouch unless result.ouch.nil?
309      raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getFileBlockLocations failed: unknown result')
310    end
311
312  end
313
314  class Processor
315    include Thrift::Processor
316
317    def process_setInactivityTimeoutPeriod(seqid, iprot, oprot)
318      args = read_args(iprot, SetInactivityTimeoutPeriod_args)
319      result = SetInactivityTimeoutPeriod_result.new()
320      @handler.setInactivityTimeoutPeriod(args.periodInSeconds)
321      write_result(result, oprot, 'setInactivityTimeoutPeriod', seqid)
322    end
323
324    def process_shutdown(seqid, iprot, oprot)
325      args = read_args(iprot, Shutdown_args)
326      result = Shutdown_result.new()
327      @handler.shutdown(args.status)
328      write_result(result, oprot, 'shutdown', seqid)
329    end
330
331    def process_create(seqid, iprot, oprot)
332      args = read_args(iprot, Create_args)
333      result = Create_result.new()
334      begin
335        result.success = @handler.create(args.path)
336      rescue ThriftIOException => ouch
337        result.ouch = ouch
338      end
339      write_result(result, oprot, 'create', seqid)
340    end
341
342    def process_createFile(seqid, iprot, oprot)
343      args = read_args(iprot, CreateFile_args)
344      result = CreateFile_result.new()
345      begin
346        result.success = @handler.createFile(args.path, args.mode, args.overwrite, args.bufferSize, args.block_replication, args.blocksize)
347      rescue ThriftIOException => ouch
348        result.ouch = ouch
349      end
350      write_result(result, oprot, 'createFile', seqid)
351    end
352
353    def process_open(seqid, iprot, oprot)
354      args = read_args(iprot, Open_args)
355      result = Open_result.new()
356      begin
357        result.success = @handler.open(args.path)
358      rescue ThriftIOException => ouch
359        result.ouch = ouch
360      end
361      write_result(result, oprot, 'open', seqid)
362    end
363
364    def process_append(seqid, iprot, oprot)
365      args = read_args(iprot, Append_args)
366      result = Append_result.new()
367      begin
368        result.success = @handler.append(args.path)
369      rescue ThriftIOException => ouch
370        result.ouch = ouch
371      end
372      write_result(result, oprot, 'append', seqid)
373    end
374
375    def process_write(seqid, iprot, oprot)
376      args = read_args(iprot, Write_args)
377      result = Write_result.new()
378      begin
379        result.success = @handler.write(args.handle, args.data)
380      rescue ThriftIOException => ouch
381        result.ouch = ouch
382      end
383      write_result(result, oprot, 'write', seqid)
384    end
385
386    def process_read(seqid, iprot, oprot)
387      args = read_args(iprot, Read_args)
388      result = Read_result.new()
389      begin
390        result.success = @handler.read(args.handle, args.offset, args.size)
391      rescue ThriftIOException => ouch
392        result.ouch = ouch
393      end
394      write_result(result, oprot, 'read', seqid)
395    end
396
397    def process_close(seqid, iprot, oprot)
398      args = read_args(iprot, Close_args)
399      result = Close_result.new()
400      begin
401        result.success = @handler.close(args.out)
402      rescue ThriftIOException => ouch
403        result.ouch = ouch
404      end
405      write_result(result, oprot, 'close', seqid)
406    end
407
408    def process_rm(seqid, iprot, oprot)
409      args = read_args(iprot, Rm_args)
410      result = Rm_result.new()
411      begin
412        result.success = @handler.rm(args.path, args.recursive)
413      rescue ThriftIOException => ouch
414        result.ouch = ouch
415      end
416      write_result(result, oprot, 'rm', seqid)
417    end
418
419    def process_rename(seqid, iprot, oprot)
420      args = read_args(iprot, Rename_args)
421      result = Rename_result.new()
422      begin
423        result.success = @handler.rename(args.path, args.dest)
424      rescue ThriftIOException => ouch
425        result.ouch = ouch
426      end
427      write_result(result, oprot, 'rename', seqid)
428    end
429
430    def process_mkdirs(seqid, iprot, oprot)
431      args = read_args(iprot, Mkdirs_args)
432      result = Mkdirs_result.new()
433      begin
434        result.success = @handler.mkdirs(args.path)
435      rescue ThriftIOException => ouch
436        result.ouch = ouch
437      end
438      write_result(result, oprot, 'mkdirs', seqid)
439    end
440
441    def process_exists(seqid, iprot, oprot)
442      args = read_args(iprot, Exists_args)
443      result = Exists_result.new()
444      begin
445        result.success = @handler.exists(args.path)
446      rescue ThriftIOException => ouch
447        result.ouch = ouch
448      end
449      write_result(result, oprot, 'exists', seqid)
450    end
451
452    def process_stat(seqid, iprot, oprot)
453      args = read_args(iprot, Stat_args)
454      result = Stat_result.new()
455      begin
456        result.success = @handler.stat(args.path)
457      rescue ThriftIOException => ouch
458        result.ouch = ouch
459      end
460      write_result(result, oprot, 'stat', seqid)
461    end
462
463    def process_listStatus(seqid, iprot, oprot)
464      args = read_args(iprot, ListStatus_args)
465      result = ListStatus_result.new()
466      begin
467        result.success = @handler.listStatus(args.path)
468      rescue ThriftIOException => ouch
469        result.ouch = ouch
470      end
471      write_result(result, oprot, 'listStatus', seqid)
472    end
473
474    def process_chmod(seqid, iprot, oprot)
475      args = read_args(iprot, Chmod_args)
476      result = Chmod_result.new()
477      begin
478        @handler.chmod(args.path, args.mode)
479      rescue ThriftIOException => ouch
480        result.ouch = ouch
481      end
482      write_result(result, oprot, 'chmod', seqid)
483    end
484
485    def process_chown(seqid, iprot, oprot)
486      args = read_args(iprot, Chown_args)
487      result = Chown_result.new()
488      begin
489        @handler.chown(args.path, args.owner, args.group)
490      rescue ThriftIOException => ouch
491        result.ouch = ouch
492      end
493      write_result(result, oprot, 'chown', seqid)
494    end
495
496    def process_setReplication(seqid, iprot, oprot)
497      args = read_args(iprot, SetReplication_args)
498      result = SetReplication_result.new()
499      begin
500        @handler.setReplication(args.path, args.replication)
501      rescue ThriftIOException => ouch
502        result.ouch = ouch
503      end
504      write_result(result, oprot, 'setReplication', seqid)
505    end
506
507    def process_getFileBlockLocations(seqid, iprot, oprot)
508      args = read_args(iprot, GetFileBlockLocations_args)
509      result = GetFileBlockLocations_result.new()
510      begin
511        result.success = @handler.getFileBlockLocations(args.path, args.start, args.length)
512      rescue ThriftIOException => ouch
513        result.ouch = ouch
514      end
515      write_result(result, oprot, 'getFileBlockLocations', seqid)
516    end
517
518  end
519
520  # HELPER FUNCTIONS AND STRUCTURES
521
522  class SetInactivityTimeoutPeriod_args
523    include Thrift::Struct
524    Thrift::Struct.field_accessor self, :periodInSeconds
525    FIELDS = {
526      1 => {:type => Thrift::Types::I64, :name => 'periodInSeconds'}
527    }
528  end
529
530  class SetInactivityTimeoutPeriod_result
531    include Thrift::Struct
532    FIELDS = {
533
534    }
535  end
536
537  class Shutdown_args
538    include Thrift::Struct
539    Thrift::Struct.field_accessor self, :status
540    FIELDS = {
541      1 => {:type => Thrift::Types::I32, :name => 'status'}
542    }
543  end
544
545  class Shutdown_result
546    include Thrift::Struct
547    FIELDS = {
548
549    }
550  end
551
552  class Create_args
553    include Thrift::Struct
554    Thrift::Struct.field_accessor self, :path
555    FIELDS = {
556      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
557    }
558  end
559
560  class Create_result
561    include Thrift::Struct
562    Thrift::Struct.field_accessor self, :success, :ouch
563    FIELDS = {
564      0 => {:type => Thrift::Types::STRUCT, :name => 'success', :class => ThriftHandle},
565      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
566    }
567  end
568
569  class CreateFile_args
570    include Thrift::Struct
571    Thrift::Struct.field_accessor self, :path, :mode, :overwrite, :bufferSize, :block_replication, :blocksize
572    FIELDS = {
573      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
574      2 => {:type => Thrift::Types::I16, :name => 'mode'},
575      3 => {:type => Thrift::Types::BOOL, :name => 'overwrite'},
576      4 => {:type => Thrift::Types::I32, :name => 'bufferSize'},
577      5 => {:type => Thrift::Types::I16, :name => 'block_replication'},
578      6 => {:type => Thrift::Types::I64, :name => 'blocksize'}
579    }
580  end
581
582  class CreateFile_result
583    include Thrift::Struct
584    Thrift::Struct.field_accessor self, :success, :ouch
585    FIELDS = {
586      0 => {:type => Thrift::Types::STRUCT, :name => 'success', :class => ThriftHandle},
587      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
588    }
589  end
590
591  class Open_args
592    include Thrift::Struct
593    Thrift::Struct.field_accessor self, :path
594    FIELDS = {
595      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
596    }
597  end
598
599  class Open_result
600    include Thrift::Struct
601    Thrift::Struct.field_accessor self, :success, :ouch
602    FIELDS = {
603      0 => {:type => Thrift::Types::STRUCT, :name => 'success', :class => ThriftHandle},
604      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
605    }
606  end
607
608  class Append_args
609    include Thrift::Struct
610    Thrift::Struct.field_accessor self, :path
611    FIELDS = {
612      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
613    }
614  end
615
616  class Append_result
617    include Thrift::Struct
618    Thrift::Struct.field_accessor self, :success, :ouch
619    FIELDS = {
620      0 => {:type => Thrift::Types::STRUCT, :name => 'success', :class => ThriftHandle},
621      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
622    }
623  end
624
625  class Write_args
626    include Thrift::Struct
627    Thrift::Struct.field_accessor self, :handle, :data
628    FIELDS = {
629      1 => {:type => Thrift::Types::STRUCT, :name => 'handle', :class => ThriftHandle},
630      -1 => {:type => Thrift::Types::STRING, :name => 'data'}
631    }
632  end
633
634  class Write_result
635    include Thrift::Struct
636    Thrift::Struct.field_accessor self, :success, :ouch
637    FIELDS = {
638      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
639      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
640    }
641  end
642
643  class Read_args
644    include Thrift::Struct
645    Thrift::Struct.field_accessor self, :handle, :offset, :size
646    FIELDS = {
647      1 => {:type => Thrift::Types::STRUCT, :name => 'handle', :class => ThriftHandle},
648      -1 => {:type => Thrift::Types::I64, :name => 'offset'},
649      -2 => {:type => Thrift::Types::I32, :name => 'size'}
650    }
651  end
652
653  class Read_result
654    include Thrift::Struct
655    Thrift::Struct.field_accessor self, :success, :ouch
656    FIELDS = {
657      0 => {:type => Thrift::Types::STRING, :name => 'success'},
658      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
659    }
660  end
661
662  class Close_args
663    include Thrift::Struct
664    Thrift::Struct.field_accessor self, :out
665    FIELDS = {
666      1 => {:type => Thrift::Types::STRUCT, :name => 'out', :class => ThriftHandle}
667    }
668  end
669
670  class Close_result
671    include Thrift::Struct
672    Thrift::Struct.field_accessor self, :success, :ouch
673    FIELDS = {
674      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
675      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
676    }
677  end
678
679  class Rm_args
680    include Thrift::Struct
681    Thrift::Struct.field_accessor self, :path, :recursive
682    FIELDS = {
683      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
684      2 => {:type => Thrift::Types::BOOL, :name => 'recursive'}
685    }
686  end
687
688  class Rm_result
689    include Thrift::Struct
690    Thrift::Struct.field_accessor self, :success, :ouch
691    FIELDS = {
692      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
693      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
694    }
695  end
696
697  class Rename_args
698    include Thrift::Struct
699    Thrift::Struct.field_accessor self, :path, :dest
700    FIELDS = {
701      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
702      2 => {:type => Thrift::Types::STRUCT, :name => 'dest', :class => Pathname}
703    }
704  end
705
706  class Rename_result
707    include Thrift::Struct
708    Thrift::Struct.field_accessor self, :success, :ouch
709    FIELDS = {
710      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
711      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
712    }
713  end
714
715  class Mkdirs_args
716    include Thrift::Struct
717    Thrift::Struct.field_accessor self, :path
718    FIELDS = {
719      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
720    }
721  end
722
723  class Mkdirs_result
724    include Thrift::Struct
725    Thrift::Struct.field_accessor self, :success, :ouch
726    FIELDS = {
727      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
728      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
729    }
730  end
731
732  class Exists_args
733    include Thrift::Struct
734    Thrift::Struct.field_accessor self, :path
735    FIELDS = {
736      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
737    }
738  end
739
740  class Exists_result
741    include Thrift::Struct
742    Thrift::Struct.field_accessor self, :success, :ouch
743    FIELDS = {
744      0 => {:type => Thrift::Types::BOOL, :name => 'success'},
745      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
746    }
747  end
748
749  class Stat_args
750    include Thrift::Struct
751    Thrift::Struct.field_accessor self, :path
752    FIELDS = {
753      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
754    }
755  end
756
757  class Stat_result
758    include Thrift::Struct
759    Thrift::Struct.field_accessor self, :success, :ouch
760    FIELDS = {
761      0 => {:type => Thrift::Types::STRUCT, :name => 'success', :class => FileStatus},
762      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
763    }
764  end
765
766  class ListStatus_args
767    include Thrift::Struct
768    Thrift::Struct.field_accessor self, :path
769    FIELDS = {
770      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname}
771    }
772  end
773
774  class ListStatus_result
775    include Thrift::Struct
776    Thrift::Struct.field_accessor self, :success, :ouch
777    FIELDS = {
778      0 => {:type => Thrift::Types::LIST, :name => 'success', :element => {:type => Thrift::Types::STRUCT, :class => FileStatus}},
779      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
780    }
781  end
782
783  class Chmod_args
784    include Thrift::Struct
785    Thrift::Struct.field_accessor self, :path, :mode
786    FIELDS = {
787      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
788      2 => {:type => Thrift::Types::I16, :name => 'mode'}
789    }
790  end
791
792  class Chmod_result
793    include Thrift::Struct
794    Thrift::Struct.field_accessor self, :ouch
795    FIELDS = {
796      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
797    }
798  end
799
800  class Chown_args
801    include Thrift::Struct
802    Thrift::Struct.field_accessor self, :path, :owner, :group
803    FIELDS = {
804      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
805      2 => {:type => Thrift::Types::STRING, :name => 'owner'},
806      3 => {:type => Thrift::Types::STRING, :name => 'group'}
807    }
808  end
809
810  class Chown_result
811    include Thrift::Struct
812    Thrift::Struct.field_accessor self, :ouch
813    FIELDS = {
814      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
815    }
816  end
817
818  class SetReplication_args
819    include Thrift::Struct
820    Thrift::Struct.field_accessor self, :path, :replication
821    FIELDS = {
822      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
823      2 => {:type => Thrift::Types::I16, :name => 'replication'}
824    }
825  end
826
827  class SetReplication_result
828    include Thrift::Struct
829    Thrift::Struct.field_accessor self, :ouch
830    FIELDS = {
831      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
832    }
833  end
834
835  class GetFileBlockLocations_args
836    include Thrift::Struct
837    Thrift::Struct.field_accessor self, :path, :start, :length
838    FIELDS = {
839      1 => {:type => Thrift::Types::STRUCT, :name => 'path', :class => Pathname},
840      2 => {:type => Thrift::Types::I64, :name => 'start'},
841      3 => {:type => Thrift::Types::I64, :name => 'length'}
842    }
843  end
844
845  class GetFileBlockLocations_result
846    include Thrift::Struct
847    Thrift::Struct.field_accessor self, :success, :ouch
848    FIELDS = {
849      0 => {:type => Thrift::Types::LIST, :name => 'success', :element => {:type => Thrift::Types::STRUCT, :class => BlockLocation}},
850      1 => {:type => Thrift::Types::STRUCT, :name => 'ouch', :class => ThriftIOException}
851    }
852  end
853
854end
855
Note: See TracBrowser for help on using the repository browser.