Class: ThriftHadoopFileSystem::Processor

Inherits:
Object
  • Object
show all
Includes:
Thrift::Processor
Defined in:
lib/thrift/thrift_hadoop_file_system.rb

Instance Method Summary collapse

Instance Method Details

#process_append(seqid, iprot, oprot) ⇒ Object



363
364
365
366
367
368
369
370
371
372
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 363

def process_append(seqid, iprot, oprot)
  args = read_args(iprot, Append_args)
  result = Append_result.new()
  begin
    result.success = @handler.append(args.path)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'append', seqid)
end

#process_chmod(seqid, iprot, oprot) ⇒ Object



473
474
475
476
477
478
479
480
481
482
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 473

def process_chmod(seqid, iprot, oprot)
  args = read_args(iprot, Chmod_args)
  result = Chmod_result.new()
  begin
    @handler.chmod(args.path, args.mode)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'chmod', seqid)
end

#process_chown(seqid, iprot, oprot) ⇒ Object



484
485
486
487
488
489
490
491
492
493
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 484

def process_chown(seqid, iprot, oprot)
  args = read_args(iprot, Chown_args)
  result = Chown_result.new()
  begin
    @handler.chown(args.path, args.owner, args.group)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'chown', seqid)
end

#process_close(seqid, iprot, oprot) ⇒ Object



396
397
398
399
400
401
402
403
404
405
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 396

def process_close(seqid, iprot, oprot)
  args = read_args(iprot, Close_args)
  result = Close_result.new()
  begin
    result.success = @handler.close(args.out)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'close', seqid)
end

#process_create(seqid, iprot, oprot) ⇒ Object



330
331
332
333
334
335
336
337
338
339
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 330

def process_create(seqid, iprot, oprot)
  args = read_args(iprot, Create_args)
  result = Create_result.new()
  begin
    result.success = @handler.create(args.path)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'create', seqid)
end

#process_createFile(seqid, iprot, oprot) ⇒ Object



341
342
343
344
345
346
347
348
349
350
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 341

def process_createFile(seqid, iprot, oprot)
  args = read_args(iprot, CreateFile_args)
  result = CreateFile_result.new()
  begin
    result.success = @handler.createFile(args.path, args.mode, args.overwrite, args.bufferSize, args.block_replication, args.blocksize)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'createFile', seqid)
end

#process_exists(seqid, iprot, oprot) ⇒ Object



440
441
442
443
444
445
446
447
448
449
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 440

def process_exists(seqid, iprot, oprot)
  args = read_args(iprot, Exists_args)
  result = Exists_result.new()
  begin
    result.success = @handler.exists(args.path)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'exists', seqid)
end

#process_getFileBlockLocations(seqid, iprot, oprot) ⇒ Object



506
507
508
509
510
511
512
513
514
515
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 506

def process_getFileBlockLocations(seqid, iprot, oprot)
  args = read_args(iprot, GetFileBlockLocations_args)
  result = GetFileBlockLocations_result.new()
  begin
    result.success = @handler.getFileBlockLocations(args.path, args.start, args.length)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'getFileBlockLocations', seqid)
end

#process_listStatus(seqid, iprot, oprot) ⇒ Object



462
463
464
465
466
467
468
469
470
471
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 462

def process_listStatus(seqid, iprot, oprot)
  args = read_args(iprot, ListStatus_args)
  result = ListStatus_result.new()
  begin
    result.success = @handler.listStatus(args.path)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'listStatus', seqid)
end

#process_mkdirs(seqid, iprot, oprot) ⇒ Object



429
430
431
432
433
434
435
436
437
438
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 429

def process_mkdirs(seqid, iprot, oprot)
  args = read_args(iprot, Mkdirs_args)
  result = Mkdirs_result.new()
  begin
    result.success = @handler.mkdirs(args.path)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'mkdirs', seqid)
end

#process_open(seqid, iprot, oprot) ⇒ Object



352
353
354
355
356
357
358
359
360
361
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 352

def process_open(seqid, iprot, oprot)
  args = read_args(iprot, Open_args)
  result = Open_result.new()
  begin
    result.success = @handler.open(args.path)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'open', seqid)
end

#process_read(seqid, iprot, oprot) ⇒ Object



385
386
387
388
389
390
391
392
393
394
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 385

def process_read(seqid, iprot, oprot)
  args = read_args(iprot, Read_args)
  result = Read_result.new()
  begin
    result.success = @handler.read(args.handle, args.offset, args.size)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'read', seqid)
end

#process_rename(seqid, iprot, oprot) ⇒ Object



418
419
420
421
422
423
424
425
426
427
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 418

def process_rename(seqid, iprot, oprot)
  args = read_args(iprot, Rename_args)
  result = Rename_result.new()
  begin
    result.success = @handler.rename(args.path, args.dest)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'rename', seqid)
end

#process_rm(seqid, iprot, oprot) ⇒ Object



407
408
409
410
411
412
413
414
415
416
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 407

def process_rm(seqid, iprot, oprot)
  args = read_args(iprot, Rm_args)
  result = Rm_result.new()
  begin
    result.success = @handler.rm(args.path, args.recursive)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'rm', seqid)
end

#process_setInactivityTimeoutPeriod(seqid, iprot, oprot) ⇒ Object



316
317
318
319
320
321
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 316

def process_setInactivityTimeoutPeriod(seqid, iprot, oprot)
  args = read_args(iprot, SetInactivityTimeoutPeriod_args)
  result = SetInactivityTimeoutPeriod_result.new()
  @handler.setInactivityTimeoutPeriod(args.periodInSeconds)
  write_result(result, oprot, 'setInactivityTimeoutPeriod', seqid)
end

#process_setReplication(seqid, iprot, oprot) ⇒ Object



495
496
497
498
499
500
501
502
503
504
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 495

def process_setReplication(seqid, iprot, oprot)
  args = read_args(iprot, SetReplication_args)
  result = SetReplication_result.new()
  begin
    @handler.setReplication(args.path, args.replication)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'setReplication', seqid)
end

#process_shutdown(seqid, iprot, oprot) ⇒ Object



323
324
325
326
327
328
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 323

def process_shutdown(seqid, iprot, oprot)
  args = read_args(iprot, Shutdown_args)
  result = Shutdown_result.new()
  @handler.shutdown(args.status)
  write_result(result, oprot, 'shutdown', seqid)
end

#process_stat(seqid, iprot, oprot) ⇒ Object



451
452
453
454
455
456
457
458
459
460
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 451

def process_stat(seqid, iprot, oprot)
  args = read_args(iprot, Stat_args)
  result = Stat_result.new()
  begin
    result.success = @handler.stat(args.path)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'stat', seqid)
end

#process_write(seqid, iprot, oprot) ⇒ Object



374
375
376
377
378
379
380
381
382
383
# File 'lib/thrift/thrift_hadoop_file_system.rb', line 374

def process_write(seqid, iprot, oprot)
  args = read_args(iprot, Write_args)
  result = Write_result.new()
  begin
    result.success = @handler.write(args.handle, args.data)
  rescue ThriftIOException => ouch
    result.ouch = ouch
  end
  write_result(result, oprot, 'write', seqid)
end