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

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

Instance Method Summary collapse

Instance Method Details

#process_atomicIncrement(seqid, iprot, oprot) ⇒ Object



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

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



659
660
661
662
663
664
665
666
667
668
# File 'lib/thrift/hbase.rb', line 659

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



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

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



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

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



948
949
950
951
952
953
954
955
956
957
# File 'lib/thrift/hbase.rb', line 948

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



959
960
961
962
963
964
965
966
967
968
# File 'lib/thrift/hbase.rb', line 959

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



937
938
939
940
941
942
943
944
945
946
# File 'lib/thrift/hbase.rb', line 937

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



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

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



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

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



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

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



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

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



692
693
694
695
696
697
698
699
700
701
# File 'lib/thrift/hbase.rb', line 692

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



773
774
775
776
777
778
779
780
781
782
# File 'lib/thrift/hbase.rb', line 773

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_getRows(seqid, iprot, oprot) ⇒ Object



817
818
819
820
821
822
823
824
825
826
# File 'lib/thrift/hbase.rb', line 817

def process_getRows(seqid, iprot, oprot)
  args = read_args(iprot, GetRows_args)
  result = GetRows_result.new()
  begin
    result.success = @handler.getRows(args.tableName, args.rows)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getRows', seqid)
end

#process_getRowsTs(seqid, iprot, oprot) ⇒ Object



839
840
841
842
843
844
845
846
847
848
# File 'lib/thrift/hbase.rb', line 839

def process_getRowsTs(seqid, iprot, oprot)
  args = read_args(iprot, GetRowsTs_args)
  result = GetRowsTs_result.new()
  begin
    result.success = @handler.getRowsTs(args.tableName, args.rows, args.timestamp)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getRowsTs', seqid)
end

#process_getRowsWithColumns(seqid, iprot, oprot) ⇒ Object



828
829
830
831
832
833
834
835
836
837
# File 'lib/thrift/hbase.rb', line 828

def process_getRowsWithColumns(seqid, iprot, oprot)
  args = read_args(iprot, GetRowsWithColumns_args)
  result = GetRowsWithColumns_result.new()
  begin
    result.success = @handler.getRowsWithColumns(args.tableName, args.rows, args.columns)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getRowsWithColumns', seqid)
end

#process_getRowsWithColumnsTs(seqid, iprot, oprot) ⇒ Object



850
851
852
853
854
855
856
857
858
859
# File 'lib/thrift/hbase.rb', line 850

def process_getRowsWithColumnsTs(seqid, iprot, oprot)
  args = read_args(iprot, GetRowsWithColumnsTs_args)
  result = GetRowsWithColumnsTs_result.new()
  begin
    result.success = @handler.getRowsWithColumnsTs(args.tableName, args.rows, args.columns, args.timestamp)
  rescue Apache::Hadoop::Hbase::Thrift::IOError => io
    result.io = io
  end
  write_result(result, oprot, 'getRowsWithColumnsTs', seqid)
end

#process_getRowTs(seqid, iprot, oprot) ⇒ Object



795
796
797
798
799
800
801
802
803
804
# File 'lib/thrift/hbase.rb', line 795

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



784
785
786
787
788
789
790
791
792
793
# File 'lib/thrift/hbase.rb', line 784

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



806
807
808
809
810
811
812
813
814
815
# File 'lib/thrift/hbase.rb', line 806

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



681
682
683
684
685
686
687
688
689
690
# File 'lib/thrift/hbase.rb', line 681

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



703
704
705
706
707
708
709
710
711
712
# File 'lib/thrift/hbase.rb', line 703

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



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

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



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

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



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

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



670
671
672
673
674
675
676
677
678
679
# File 'lib/thrift/hbase.rb', line 670

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



861
862
863
864
865
866
867
868
869
870
871
872
# File 'lib/thrift/hbase.rb', line 861

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



887
888
889
890
891
892
893
894
895
896
897
898
# File 'lib/thrift/hbase.rb', line 887

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



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

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



874
875
876
877
878
879
880
881
882
883
884
885
# File 'lib/thrift/hbase.rb', line 874

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



1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
# File 'lib/thrift/hbase.rb', line 1051

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



1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
# File 'lib/thrift/hbase.rb', line 1025

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



1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'lib/thrift/hbase.rb', line 1038

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



970
971
972
973
974
975
976
977
978
979
# File 'lib/thrift/hbase.rb', line 970

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



1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
# File 'lib/thrift/hbase.rb', line 1003

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



992
993
994
995
996
997
998
999
1000
1001
# File 'lib/thrift/hbase.rb', line 992

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



981
982
983
984
985
986
987
988
989
990
# File 'lib/thrift/hbase.rb', line 981

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



1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
# File 'lib/thrift/hbase.rb', line 1014

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