Class: Apache::Hadoop::Hbase::Thrift::Hbase::Processor

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

Instance Method Summary collapse

Instance Method Details

#process_atomicIncrement(seqid, iprot, oprot) ⇒ Object



802
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/massive_record/thrift/hbase.rb', line 802

def process_atomicIncrement(seqid, iprot, oprot)
  args = read_args(iprot, AtomicIncrement_args)
  result = AtomicIncrement_result.new()
  begin
    result.success = @handler.atomicIncrement(args.tableName, args.row, args.column, args.value)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia
    result.ia = ia
  end
  write_result(result, oprot, 'atomicIncrement', seqid)
end

#process_compact(seqid, iprot, oprot) ⇒ Object



592
593
594
595
596
597
598
599
600
601
# File 'lib/massive_record/thrift/hbase.rb', line 592

def process_compact(seqid, iprot, oprot)
  args = read_args(iprot, Compact_args)
  result = Compact_result.new()
  begin
    @handler.compact(args.tableNameOrRegionName)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'compact', seqid)
end

#process_createTable(seqid, iprot, oprot) ⇒ Object



647
648
649
650
651
652
653
654
655
656
657
658
659
660
# File 'lib/massive_record/thrift/hbase.rb', line 647

def process_createTable(seqid, iprot, oprot)
  args = read_args(iprot, CreateTable_args)
  result = CreateTable_result.new()
  begin
    @handler.createTable(args.tableName, args.columnFamilies)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia
    result.ia = ia
  rescue Apache::Hadoop::Hbase::Thrift::AlreadyExists => exist
    result.exist = exist
  end
  write_result(result, oprot, 'createTable', seqid)
end

#process_deleteAll(seqid, iprot, oprot) ⇒ Object



815
816
817
818
819
820
821
822
823
824
# File 'lib/massive_record/thrift/hbase.rb', line 815

def process_deleteAll(seqid, iprot, oprot)
  args = read_args(iprot, DeleteAll_args)
  result = DeleteAll_result.new()
  begin
    @handler.deleteAll(args.tableName, args.row, args.column)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'deleteAll', seqid)
end

#process_deleteAllRow(seqid, iprot, oprot) ⇒ Object



837
838
839
840
841
842
843
844
845
846
# File 'lib/massive_record/thrift/hbase.rb', line 837

def process_deleteAllRow(seqid, iprot, oprot)
  args = read_args(iprot, DeleteAllRow_args)
  result = DeleteAllRow_result.new()
  begin
    @handler.deleteAllRow(args.tableName, args.row)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'deleteAllRow', seqid)
end

#process_deleteAllRowTs(seqid, iprot, oprot) ⇒ Object



848
849
850
851
852
853
854
855
856
857
# File 'lib/massive_record/thrift/hbase.rb', line 848

def process_deleteAllRowTs(seqid, iprot, oprot)
  args = read_args(iprot, DeleteAllRowTs_args)
  result = DeleteAllRowTs_result.new()
  begin
    @handler.deleteAllRowTs(args.tableName, args.row, args.timestamp)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'deleteAllRowTs', seqid)
end

#process_deleteAllTs(seqid, iprot, oprot) ⇒ Object



826
827
828
829
830
831
832
833
834
835
# File 'lib/massive_record/thrift/hbase.rb', line 826

def process_deleteAllTs(seqid, iprot, oprot)
  args = read_args(iprot, DeleteAllTs_args)
  result = DeleteAllTs_result.new()
  begin
    @handler.deleteAllTs(args.tableName, args.row, args.column, args.timestamp)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'deleteAllTs', seqid)
end

#process_deleteTable(seqid, iprot, oprot) ⇒ Object



662
663
664
665
666
667
668
669
670
671
# File 'lib/massive_record/thrift/hbase.rb', line 662

def process_deleteTable(seqid, iprot, oprot)
  args = read_args(iprot, DeleteTable_args)
  result = DeleteTable_result.new()
  begin
    @handler.deleteTable(args.tableName)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'deleteTable', seqid)
end

#process_disableTable(seqid, iprot, oprot) ⇒ Object



570
571
572
573
574
575
576
577
578
579
# File 'lib/massive_record/thrift/hbase.rb', line 570

def process_disableTable(seqid, iprot, oprot)
  args = read_args(iprot, DisableTable_args)
  result = DisableTable_result.new()
  begin
    @handler.disableTable(args.tableName)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'disableTable', seqid)
end

#process_enableTable(seqid, iprot, oprot) ⇒ Object



559
560
561
562
563
564
565
566
567
568
# File 'lib/massive_record/thrift/hbase.rb', line 559

def process_enableTable(seqid, iprot, oprot)
  args = read_args(iprot, EnableTable_args)
  result = EnableTable_result.new()
  begin
    @handler.enableTable(args.tableName)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'enableTable', seqid)
end

#process_get(seqid, iprot, oprot) ⇒ Object



673
674
675
676
677
678
679
680
681
682
# File 'lib/massive_record/thrift/hbase.rb', line 673

def process_get(seqid, iprot, oprot)
  args = read_args(iprot, Get_args)
  result = Get_result.new()
  begin
    result.success = @handler.get(args.tableName, args.row, args.column)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'get', seqid)
end

#process_getColumnDescriptors(seqid, iprot, oprot) ⇒ Object



625
626
627
628
629
630
631
632
633
634
# File 'lib/massive_record/thrift/hbase.rb', line 625

def process_getColumnDescriptors(seqid, iprot, oprot)
  args = read_args(iprot, GetColumnDescriptors_args)
  result = GetColumnDescriptors_result.new()
  begin
    result.success = @handler.getColumnDescriptors(args.tableName)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getColumnDescriptors', seqid)
end

#process_getRow(seqid, iprot, oprot) ⇒ Object



706
707
708
709
710
711
712
713
714
715
# File 'lib/massive_record/thrift/hbase.rb', line 706

def process_getRow(seqid, iprot, oprot)
  args = read_args(iprot, GetRow_args)
  result = GetRow_result.new()
  begin
    result.success = @handler.getRow(args.tableName, args.row)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getRow', seqid)
end

#process_getRowTs(seqid, iprot, oprot) ⇒ Object



728
729
730
731
732
733
734
735
736
737
# File 'lib/massive_record/thrift/hbase.rb', line 728

def process_getRowTs(seqid, iprot, oprot)
  args = read_args(iprot, GetRowTs_args)
  result = GetRowTs_result.new()
  begin
    result.success = @handler.getRowTs(args.tableName, args.row, args.timestamp)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getRowTs', seqid)
end

#process_getRowWithColumns(seqid, iprot, oprot) ⇒ Object



717
718
719
720
721
722
723
724
725
726
# File 'lib/massive_record/thrift/hbase.rb', line 717

def process_getRowWithColumns(seqid, iprot, oprot)
  args = read_args(iprot, GetRowWithColumns_args)
  result = GetRowWithColumns_result.new()
  begin
    result.success = @handler.getRowWithColumns(args.tableName, args.row, args.columns)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getRowWithColumns', seqid)
end

#process_getRowWithColumnsTs(seqid, iprot, oprot) ⇒ Object



739
740
741
742
743
744
745
746
747
748
# File 'lib/massive_record/thrift/hbase.rb', line 739

def process_getRowWithColumnsTs(seqid, iprot, oprot)
  args = read_args(iprot, GetRowWithColumnsTs_args)
  result = GetRowWithColumnsTs_result.new()
  begin
    result.success = @handler.getRowWithColumnsTs(args.tableName, args.row, args.columns, args.timestamp)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getRowWithColumnsTs', seqid)
end

#process_getTableNames(seqid, iprot, oprot) ⇒ Object



614
615
616
617
618
619
620
621
622
623
# File 'lib/massive_record/thrift/hbase.rb', line 614

def process_getTableNames(seqid, iprot, oprot)
  args = read_args(iprot, GetTableNames_args)
  result = GetTableNames_result.new()
  begin
    result.success = @handler.getTableNames()
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getTableNames', seqid)
end

#process_getTableRegions(seqid, iprot, oprot) ⇒ Object



636
637
638
639
640
641
642
643
644
645
# File 'lib/massive_record/thrift/hbase.rb', line 636

def process_getTableRegions(seqid, iprot, oprot)
  args = read_args(iprot, GetTableRegions_args)
  result = GetTableRegions_result.new()
  begin
    result.success = @handler.getTableRegions(args.tableName)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getTableRegions', seqid)
end

#process_getVer(seqid, iprot, oprot) ⇒ Object



684
685
686
687
688
689
690
691
692
693
# File 'lib/massive_record/thrift/hbase.rb', line 684

def process_getVer(seqid, iprot, oprot)
  args = read_args(iprot, GetVer_args)
  result = GetVer_result.new()
  begin
    result.success = @handler.getVer(args.tableName, args.row, args.column, args.numVersions)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getVer', seqid)
end

#process_getVerTs(seqid, iprot, oprot) ⇒ Object



695
696
697
698
699
700
701
702
703
704
# File 'lib/massive_record/thrift/hbase.rb', line 695

def process_getVerTs(seqid, iprot, oprot)
  args = read_args(iprot, GetVerTs_args)
  result = GetVerTs_result.new()
  begin
    result.success = @handler.getVerTs(args.tableName, args.row, args.column, args.timestamp, args.numVersions)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getVerTs', seqid)
end

#process_isTableEnabled(seqid, iprot, oprot) ⇒ Object



581
582
583
584
585
586
587
588
589
590
# File 'lib/massive_record/thrift/hbase.rb', line 581

def process_isTableEnabled(seqid, iprot, oprot)
  args = read_args(iprot, IsTableEnabled_args)
  result = IsTableEnabled_result.new()
  begin
    result.success = @handler.isTableEnabled(args.tableName)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'isTableEnabled', seqid)
end

#process_majorCompact(seqid, iprot, oprot) ⇒ Object



603
604
605
606
607
608
609
610
611
612
# File 'lib/massive_record/thrift/hbase.rb', line 603

def process_majorCompact(seqid, iprot, oprot)
  args = read_args(iprot, MajorCompact_args)
  result = MajorCompact_result.new()
  begin
    @handler.majorCompact(args.tableNameOrRegionName)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'majorCompact', seqid)
end

#process_mutateRow(seqid, iprot, oprot) ⇒ Object



750
751
752
753
754
755
756
757
758
759
760
761
# File 'lib/massive_record/thrift/hbase.rb', line 750

def process_mutateRow(seqid, iprot, oprot)
  args = read_args(iprot, MutateRow_args)
  result = MutateRow_result.new()
  begin
    @handler.mutateRow(args.tableName, args.row, args.mutations)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia
    result.ia = ia
  end
  write_result(result, oprot, 'mutateRow', seqid)
end

#process_mutateRows(seqid, iprot, oprot) ⇒ Object



776
777
778
779
780
781
782
783
784
785
786
787
# File 'lib/massive_record/thrift/hbase.rb', line 776

def process_mutateRows(seqid, iprot, oprot)
  args = read_args(iprot, MutateRows_args)
  result = MutateRows_result.new()
  begin
    @handler.mutateRows(args.tableName, args.rowBatches)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia
    result.ia = ia
  end
  write_result(result, oprot, 'mutateRows', seqid)
end

#process_mutateRowsTs(seqid, iprot, oprot) ⇒ Object



789
790
791
792
793
794
795
796
797
798
799
800
# File 'lib/massive_record/thrift/hbase.rb', line 789

def process_mutateRowsTs(seqid, iprot, oprot)
  args = read_args(iprot, MutateRowsTs_args)
  result = MutateRowsTs_result.new()
  begin
    @handler.mutateRowsTs(args.tableName, args.rowBatches, args.timestamp)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia
    result.ia = ia
  end
  write_result(result, oprot, 'mutateRowsTs', seqid)
end

#process_mutateRowTs(seqid, iprot, oprot) ⇒ Object



763
764
765
766
767
768
769
770
771
772
773
774
# File 'lib/massive_record/thrift/hbase.rb', line 763

def process_mutateRowTs(seqid, iprot, oprot)
  args = read_args(iprot, MutateRowTs_args)
  result = MutateRowTs_result.new()
  begin
    @handler.mutateRowTs(args.tableName, args.row, args.mutations, args.timestamp)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia
    result.ia = ia
  end
  write_result(result, oprot, 'mutateRowTs', seqid)
end

#process_scannerClose(seqid, iprot, oprot) ⇒ Object



940
941
942
943
944
945
946
947
948
949
950
951
# File 'lib/massive_record/thrift/hbase.rb', line 940

def process_scannerClose(seqid, iprot, oprot)
  args = read_args(iprot, ScannerClose_args)
  result = ScannerClose_result.new()
  begin
    @handler.scannerClose(args.id)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia
    result.ia = ia
  end
  write_result(result, oprot, 'scannerClose', seqid)
end

#process_scannerGet(seqid, iprot, oprot) ⇒ Object



914
915
916
917
918
919
920
921
922
923
924
925
# File 'lib/massive_record/thrift/hbase.rb', line 914

def process_scannerGet(seqid, iprot, oprot)
  args = read_args(iprot, ScannerGet_args)
  result = ScannerGet_result.new()
  begin
    result.success = @handler.scannerGet(args.id)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia
    result.ia = ia
  end
  write_result(result, oprot, 'scannerGet', seqid)
end

#process_scannerGetList(seqid, iprot, oprot) ⇒ Object



927
928
929
930
931
932
933
934
935
936
937
938
# File 'lib/massive_record/thrift/hbase.rb', line 927

def process_scannerGetList(seqid, iprot, oprot)
  args = read_args(iprot, ScannerGetList_args)
  result = ScannerGetList_result.new()
  begin
    result.success = @handler.scannerGetList(args.id, args.nbRows)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia
    result.ia = ia
  end
  write_result(result, oprot, 'scannerGetList', seqid)
end

#process_scannerOpen(seqid, iprot, oprot) ⇒ Object



859
860
861
862
863
864
865
866
867
868
# File 'lib/massive_record/thrift/hbase.rb', line 859

def process_scannerOpen(seqid, iprot, oprot)
  args = read_args(iprot, ScannerOpen_args)
  result = ScannerOpen_result.new()
  begin
    result.success = @handler.scannerOpen(args.tableName, args.startRow, args.columns)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'scannerOpen', seqid)
end

#process_scannerOpenTs(seqid, iprot, oprot) ⇒ Object



892
893
894
895
896
897
898
899
900
901
# File 'lib/massive_record/thrift/hbase.rb', line 892

def process_scannerOpenTs(seqid, iprot, oprot)
  args = read_args(iprot, ScannerOpenTs_args)
  result = ScannerOpenTs_result.new()
  begin
    result.success = @handler.scannerOpenTs(args.tableName, args.startRow, args.columns, args.timestamp)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'scannerOpenTs', seqid)
end

#process_scannerOpenWithPrefix(seqid, iprot, oprot) ⇒ Object



881
882
883
884
885
886
887
888
889
890
# File 'lib/massive_record/thrift/hbase.rb', line 881

def process_scannerOpenWithPrefix(seqid, iprot, oprot)
  args = read_args(iprot, ScannerOpenWithPrefix_args)
  result = ScannerOpenWithPrefix_result.new()
  begin
    result.success = @handler.scannerOpenWithPrefix(args.tableName, args.startAndPrefix, args.columns)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'scannerOpenWithPrefix', seqid)
end

#process_scannerOpenWithStop(seqid, iprot, oprot) ⇒ Object



870
871
872
873
874
875
876
877
878
879
# File 'lib/massive_record/thrift/hbase.rb', line 870

def process_scannerOpenWithStop(seqid, iprot, oprot)
  args = read_args(iprot, ScannerOpenWithStop_args)
  result = ScannerOpenWithStop_result.new()
  begin
    result.success = @handler.scannerOpenWithStop(args.tableName, args.startRow, args.stopRow, args.columns)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'scannerOpenWithStop', seqid)
end

#process_scannerOpenWithStopTs(seqid, iprot, oprot) ⇒ Object



903
904
905
906
907
908
909
910
911
912
# File 'lib/massive_record/thrift/hbase.rb', line 903

def process_scannerOpenWithStopTs(seqid, iprot, oprot)
  args = read_args(iprot, ScannerOpenWithStopTs_args)
  result = ScannerOpenWithStopTs_result.new()
  begin
    result.success = @handler.scannerOpenWithStopTs(args.tableName, args.startRow, args.stopRow, args.columns, args.timestamp)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'scannerOpenWithStopTs', seqid)
end