Class: Apache::Hadoop::Hbase::Thrift2::THBaseService::Processor

Inherits:
Object
  • Object
show all
Includes:
Thrift::Processor
Defined in:
lib/hbase/t_h_base_service.rb

Instance Method Summary collapse

Instance Method Details

#process_append(seqid, iprot, oprot) ⇒ Object



417
418
419
420
421
422
423
424
425
426
# File 'lib/hbase/t_h_base_service.rb', line 417

def process_append(seqid, iprot, oprot)
  args = read_args(iprot, Append_args)
  result = Append_result.new()
  begin
    result.success = @handler.append(args.table, args.tappend)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'append', seqid)
end

#process_checkAndDelete(seqid, iprot, oprot) ⇒ Object



395
396
397
398
399
400
401
402
403
404
# File 'lib/hbase/t_h_base_service.rb', line 395

def process_checkAndDelete(seqid, iprot, oprot)
  args = read_args(iprot, CheckAndDelete_args)
  result = CheckAndDelete_result.new()
  begin
    result.success = @handler.checkAndDelete(args.table, args.row, args.family, args.qualifier, args.value, args.tdelete)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'checkAndDelete', seqid)
end

#process_checkAndPut(seqid, iprot, oprot) ⇒ Object



351
352
353
354
355
356
357
358
359
360
# File 'lib/hbase/t_h_base_service.rb', line 351

def process_checkAndPut(seqid, iprot, oprot)
  args = read_args(iprot, CheckAndPut_args)
  result = CheckAndPut_result.new()
  begin
    result.success = @handler.checkAndPut(args.table, args.row, args.family, args.qualifier, args.value, args.tput)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'checkAndPut', seqid)
end

#process_closeScanner(seqid, iprot, oprot) ⇒ Object



452
453
454
455
456
457
458
459
460
461
462
463
# File 'lib/hbase/t_h_base_service.rb', line 452

def process_closeScanner(seqid, iprot, oprot)
  args = read_args(iprot, CloseScanner_args)
  result = CloseScanner_result.new()
  begin
    @handler.closeScanner(args.scannerId)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIllegalArgument => ia
    result.ia = ia
  end
  write_result(result, oprot, 'closeScanner', seqid)
end

#process_deleteMultiple(seqid, iprot, oprot) ⇒ Object



384
385
386
387
388
389
390
391
392
393
# File 'lib/hbase/t_h_base_service.rb', line 384

def process_deleteMultiple(seqid, iprot, oprot)
  args = read_args(iprot, DeleteMultiple_args)
  result = DeleteMultiple_result.new()
  begin
    result.success = @handler.deleteMultiple(args.table, args.tdeletes)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'deleteMultiple', seqid)
end

#process_deleteSingle(seqid, iprot, oprot) ⇒ Object



373
374
375
376
377
378
379
380
381
382
# File 'lib/hbase/t_h_base_service.rb', line 373

def process_deleteSingle(seqid, iprot, oprot)
  args = read_args(iprot, DeleteSingle_args)
  result = DeleteSingle_result.new()
  begin
    @handler.deleteSingle(args.table, args.tdelete)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'deleteSingle', seqid)
end

#process_exists(seqid, iprot, oprot) ⇒ Object



307
308
309
310
311
312
313
314
315
316
# File 'lib/hbase/t_h_base_service.rb', line 307

def process_exists(seqid, iprot, oprot)
  args = read_args(iprot, Exists_args)
  result = Exists_result.new()
  begin
    result.success = @handler.exists(args.table, args.tget)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'exists', seqid)
end

#process_get(seqid, iprot, oprot) ⇒ Object



318
319
320
321
322
323
324
325
326
327
# File 'lib/hbase/t_h_base_service.rb', line 318

def process_get(seqid, iprot, oprot)
  args = read_args(iprot, Get_args)
  result = Get_result.new()
  begin
    result.success = @handler.get(args.table, args.tget)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'get', seqid)
end

#process_getAllRegionLocations(seqid, iprot, oprot) ⇒ Object



498
499
500
501
502
503
504
505
506
507
# File 'lib/hbase/t_h_base_service.rb', line 498

def process_getAllRegionLocations(seqid, iprot, oprot)
  args = read_args(iprot, GetAllRegionLocations_args)
  result = GetAllRegionLocations_result.new()
  begin
    result.success = @handler.getAllRegionLocations(args.table)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'getAllRegionLocations', seqid)
end

#process_getMultiple(seqid, iprot, oprot) ⇒ Object



329
330
331
332
333
334
335
336
337
338
# File 'lib/hbase/t_h_base_service.rb', line 329

def process_getMultiple(seqid, iprot, oprot)
  args = read_args(iprot, GetMultiple_args)
  result = GetMultiple_result.new()
  begin
    result.success = @handler.getMultiple(args.table, args.tgets)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'getMultiple', seqid)
end

#process_getRegionLocation(seqid, iprot, oprot) ⇒ Object



487
488
489
490
491
492
493
494
495
496
# File 'lib/hbase/t_h_base_service.rb', line 487

def process_getRegionLocation(seqid, iprot, oprot)
  args = read_args(iprot, GetRegionLocation_args)
  result = GetRegionLocation_result.new()
  begin
    result.success = @handler.getRegionLocation(args.table, args.row, args.reload)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'getRegionLocation', seqid)
end

#process_getScannerResults(seqid, iprot, oprot) ⇒ Object



476
477
478
479
480
481
482
483
484
485
# File 'lib/hbase/t_h_base_service.rb', line 476

def process_getScannerResults(seqid, iprot, oprot)
  args = read_args(iprot, GetScannerResults_args)
  result = GetScannerResults_result.new()
  begin
    result.success = @handler.getScannerResults(args.table, args.tscan, args.numRows)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'getScannerResults', seqid)
end

#process_getScannerRows(seqid, iprot, oprot) ⇒ Object



439
440
441
442
443
444
445
446
447
448
449
450
# File 'lib/hbase/t_h_base_service.rb', line 439

def process_getScannerRows(seqid, iprot, oprot)
  args = read_args(iprot, GetScannerRows_args)
  result = GetScannerRows_result.new()
  begin
    result.success = @handler.getScannerRows(args.scannerId, args.numRows)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIllegalArgument => ia
    result.ia = ia
  end
  write_result(result, oprot, 'getScannerRows', seqid)
end

#process_increment(seqid, iprot, oprot) ⇒ Object



406
407
408
409
410
411
412
413
414
415
# File 'lib/hbase/t_h_base_service.rb', line 406

def process_increment(seqid, iprot, oprot)
  args = read_args(iprot, Increment_args)
  result = Increment_result.new()
  begin
    result.success = @handler.increment(args.table, args.tincrement)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'increment', seqid)
end

#process_mutateRow(seqid, iprot, oprot) ⇒ Object



465
466
467
468
469
470
471
472
473
474
# File 'lib/hbase/t_h_base_service.rb', line 465

def process_mutateRow(seqid, iprot, oprot)
  args = read_args(iprot, MutateRow_args)
  result = MutateRow_result.new()
  begin
    @handler.mutateRow(args.table, args.trowMutations)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'mutateRow', seqid)
end

#process_openScanner(seqid, iprot, oprot) ⇒ Object



428
429
430
431
432
433
434
435
436
437
# File 'lib/hbase/t_h_base_service.rb', line 428

def process_openScanner(seqid, iprot, oprot)
  args = read_args(iprot, OpenScanner_args)
  result = OpenScanner_result.new()
  begin
    result.success = @handler.openScanner(args.table, args.tscan)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'openScanner', seqid)
end

#process_put(seqid, iprot, oprot) ⇒ Object



340
341
342
343
344
345
346
347
348
349
# File 'lib/hbase/t_h_base_service.rb', line 340

def process_put(seqid, iprot, oprot)
  args = read_args(iprot, Put_args)
  result = Put_result.new()
  begin
    @handler.put(args.table, args.tput)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'put', seqid)
end

#process_putMultiple(seqid, iprot, oprot) ⇒ Object



362
363
364
365
366
367
368
369
370
371
# File 'lib/hbase/t_h_base_service.rb', line 362

def process_putMultiple(seqid, iprot, oprot)
  args = read_args(iprot, PutMultiple_args)
  result = PutMultiple_result.new()
  begin
    @handler.putMultiple(args.table, args.tputs)
  rescue ::Apache::Hadoop::Hbase::Thrift2::TIOError => io
    result.io = io
  end
  write_result(result, oprot, 'putMultiple', seqid)
end