Class: ThriftHiveMetastore::Processor

Inherits:
FacebookService::Processor show all
Includes:
Thrift::Processor
Defined in:
lib/thrift/thrift_hive_metastore.rb

Direct Known Subclasses

ThriftHive::Processor

Instance Method Summary collapse

Methods inherited from FacebookService::Processor

#process_aliveSince, #process_getCounter, #process_getCounters, #process_getCpuProfile, #process_getName, #process_getOption, #process_getOptions, #process_getStatus, #process_getStatusDetails, #process_getVersion, #process_reinitialize, #process_setOption, #process_shutdown

Instance Method Details

#process_add_index(seqid, iprot, oprot) ⇒ Object



1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
# File 'lib/thrift/thrift_hive_metastore.rb', line 1086

def process_add_index(seqid, iprot, oprot)
  args = read_args(iprot, Add_index_args)
  result = Add_index_result.new()
  begin
    result.success = @handler.add_index(args.new_index, args.index_table)
  rescue InvalidObjectException => o1
    result.o1 = o1
  rescue AlreadyExistsException => o2
    result.o2 = o2
  rescue MetaException => o3
    result.o3 = o3
  end
  write_result(result, oprot, 'add_index', seqid)
end

#process_add_partition(seqid, iprot, oprot) ⇒ Object



884
885
886
887
888
889
890
891
892
893
894
895
896
897
# File 'lib/thrift/thrift_hive_metastore.rb', line 884

def process_add_partition(seqid, iprot, oprot)
  args = read_args(iprot, Add_partition_args)
  result = Add_partition_result.new()
  begin
    result.success = @handler.add_partition(args.new_part)
  rescue InvalidObjectException => o1
    result.o1 = o1
  rescue AlreadyExistsException => o2
    result.o2 = o2
  rescue MetaException => o3
    result.o3 = o3
  end
  write_result(result, oprot, 'add_partition', seqid)
end

#process_alter_partition(seqid, iprot, oprot) ⇒ Object



1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
# File 'lib/thrift/thrift_hive_metastore.rb', line 1040

def process_alter_partition(seqid, iprot, oprot)
  args = read_args(iprot, Alter_partition_args)
  result = Alter_partition_result.new()
  begin
    @handler.alter_partition(args.db_name, args.tbl_name, args.new_part)
  rescue InvalidOperationException => o1
    result.o1 = o1
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'alter_partition', seqid)
end

#process_alter_table(seqid, iprot, oprot) ⇒ Object



871
872
873
874
875
876
877
878
879
880
881
882
# File 'lib/thrift/thrift_hive_metastore.rb', line 871

def process_alter_table(seqid, iprot, oprot)
  args = read_args(iprot, Alter_table_args)
  result = Alter_table_result.new()
  begin
    @handler.alter_table(args.dbname, args.tbl_name, args.new_tbl)
  rescue InvalidOperationException => o1
    result.o1 = o1
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'alter_table', seqid)
end

#process_append_partition(seqid, iprot, oprot) ⇒ Object



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

def process_append_partition(seqid, iprot, oprot)
  args = read_args(iprot, Append_partition_args)
  result = Append_partition_result.new()
  begin
    result.success = @handler.append_partition(args.db_name, args.tbl_name, args.part_vals)
  rescue InvalidObjectException => o1
    result.o1 = o1
  rescue AlreadyExistsException => o2
    result.o2 = o2
  rescue MetaException => o3
    result.o3 = o3
  end
  write_result(result, oprot, 'append_partition', seqid)
end

#process_append_partition_by_name(seqid, iprot, oprot) ⇒ Object



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

def process_append_partition_by_name(seqid, iprot, oprot)
  args = read_args(iprot, Append_partition_by_name_args)
  result = Append_partition_by_name_result.new()
  begin
    result.success = @handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name)
  rescue InvalidObjectException => o1
    result.o1 = o1
  rescue AlreadyExistsException => o2
    result.o2 = o2
  rescue MetaException => o3
    result.o3 = o3
  end
  write_result(result, oprot, 'append_partition_by_name', seqid)
end

#process_create_database(seqid, iprot, oprot) ⇒ Object



659
660
661
662
663
664
665
666
667
668
669
670
671
672
# File 'lib/thrift/thrift_hive_metastore.rb', line 659

def process_create_database(seqid, iprot, oprot)
  args = read_args(iprot, Create_database_args)
  result = Create_database_result.new()
  begin
    @handler.create_database(args.database)
  rescue AlreadyExistsException => o1
    result.o1 = o1
  rescue InvalidObjectException => o2
    result.o2 = o2
  rescue MetaException => o3
    result.o3 = o3
  end
  write_result(result, oprot, 'create_database', seqid)
end

#process_create_table(seqid, iprot, oprot) ⇒ Object



806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
# File 'lib/thrift/thrift_hive_metastore.rb', line 806

def process_create_table(seqid, iprot, oprot)
  args = read_args(iprot, Create_table_args)
  result = Create_table_result.new()
  begin
    @handler.create_table(args.tbl)
  rescue AlreadyExistsException => o1
    result.o1 = o1
  rescue InvalidObjectException => o2
    result.o2 = o2
  rescue MetaException => o3
    result.o3 = o3
  rescue NoSuchObjectException => o4
    result.o4 = o4
  end
  write_result(result, oprot, 'create_table', seqid)
end

#process_create_type(seqid, iprot, oprot) ⇒ Object



737
738
739
740
741
742
743
744
745
746
747
748
749
750
# File 'lib/thrift/thrift_hive_metastore.rb', line 737

def process_create_type(seqid, iprot, oprot)
  args = read_args(iprot, Create_type_args)
  result = Create_type_result.new()
  begin
    result.success = @handler.create_type(args.type)
  rescue AlreadyExistsException => o1
    result.o1 = o1
  rescue InvalidObjectException => o2
    result.o2 = o2
  rescue MetaException => o3
    result.o3 = o3
  end
  write_result(result, oprot, 'create_type', seqid)
end

#process_drop_database(seqid, iprot, oprot) ⇒ Object



687
688
689
690
691
692
693
694
695
696
697
698
699
700
# File 'lib/thrift/thrift_hive_metastore.rb', line 687

def process_drop_database(seqid, iprot, oprot)
  args = read_args(iprot, Drop_database_args)
  result = Drop_database_result.new()
  begin
    @handler.drop_database(args.name, args.deleteData)
  rescue NoSuchObjectException => o1
    result.o1 = o1
  rescue InvalidOperationException => o2
    result.o2 = o2
  rescue MetaException => o3
    result.o3 = o3
  end
  write_result(result, oprot, 'drop_database', seqid)
end

#process_drop_index_by_name(seqid, iprot, oprot) ⇒ Object



1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
# File 'lib/thrift/thrift_hive_metastore.rb', line 1101

def process_drop_index_by_name(seqid, iprot, oprot)
  args = read_args(iprot, Drop_index_by_name_args)
  result = Drop_index_by_name_result.new()
  begin
    result.success = @handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData)
  rescue NoSuchObjectException => o1
    result.o1 = o1
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'drop_index_by_name', seqid)
end

#process_drop_partition(seqid, iprot, oprot) ⇒ Object



929
930
931
932
933
934
935
936
937
938
939
940
# File 'lib/thrift/thrift_hive_metastore.rb', line 929

def process_drop_partition(seqid, iprot, oprot)
  args = read_args(iprot, Drop_partition_args)
  result = Drop_partition_result.new()
  begin
    result.success = @handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData)
  rescue NoSuchObjectException => o1
    result.o1 = o1
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'drop_partition', seqid)
end

#process_drop_partition_by_name(seqid, iprot, oprot) ⇒ Object



942
943
944
945
946
947
948
949
950
951
952
953
# File 'lib/thrift/thrift_hive_metastore.rb', line 942

def process_drop_partition_by_name(seqid, iprot, oprot)
  args = read_args(iprot, Drop_partition_by_name_args)
  result = Drop_partition_by_name_result.new()
  begin
    result.success = @handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData)
  rescue NoSuchObjectException => o1
    result.o1 = o1
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'drop_partition_by_name', seqid)
end

#process_drop_table(seqid, iprot, oprot) ⇒ Object



823
824
825
826
827
828
829
830
831
832
833
834
# File 'lib/thrift/thrift_hive_metastore.rb', line 823

def process_drop_table(seqid, iprot, oprot)
  args = read_args(iprot, Drop_table_args)
  result = Drop_table_result.new()
  begin
    @handler.drop_table(args.dbname, args.name, args.deleteData)
  rescue NoSuchObjectException => o1
    result.o1 = o1
  rescue MetaException => o3
    result.o3 = o3
  end
  write_result(result, oprot, 'drop_table', seqid)
end

#process_drop_type(seqid, iprot, oprot) ⇒ Object



752
753
754
755
756
757
758
759
760
761
762
763
# File 'lib/thrift/thrift_hive_metastore.rb', line 752

def process_drop_type(seqid, iprot, oprot)
  args = read_args(iprot, Drop_type_args)
  result = Drop_type_result.new()
  begin
    result.success = @handler.drop_type(args.type)
  rescue MetaException => o1
    result.o1 = o1
  rescue NoSuchObjectException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'drop_type', seqid)
end

#process_get_all_databases(seqid, iprot, oprot) ⇒ Object



713
714
715
716
717
718
719
720
721
722
# File 'lib/thrift/thrift_hive_metastore.rb', line 713

def process_get_all_databases(seqid, iprot, oprot)
  args = read_args(iprot, Get_all_databases_args)
  result = Get_all_databases_result.new()
  begin
    result.success = @handler.get_all_databases()
  rescue MetaException => o1
    result.o1 = o1
  end
  write_result(result, oprot, 'get_all_databases', seqid)
end

#process_get_all_tables(seqid, iprot, oprot) ⇒ Object



847
848
849
850
851
852
853
854
855
856
# File 'lib/thrift/thrift_hive_metastore.rb', line 847

def process_get_all_tables(seqid, iprot, oprot)
  args = read_args(iprot, Get_all_tables_args)
  result = Get_all_tables_result.new()
  begin
    result.success = @handler.get_all_tables(args.db_name)
  rescue MetaException => o1
    result.o1 = o1
  end
  write_result(result, oprot, 'get_all_tables', seqid)
end

#process_get_config_value(seqid, iprot, oprot) ⇒ Object



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

def process_get_config_value(seqid, iprot, oprot)
  args = read_args(iprot, Get_config_value_args)
  result = Get_config_value_result.new()
  begin
    result.success = @handler.get_config_value(args.name, args.defaultValue)
  rescue ConfigValSecurityException => o1
    result.o1 = o1
  end
  write_result(result, oprot, 'get_config_value', seqid)
end

#process_get_database(seqid, iprot, oprot) ⇒ Object



674
675
676
677
678
679
680
681
682
683
684
685
# File 'lib/thrift/thrift_hive_metastore.rb', line 674

def process_get_database(seqid, iprot, oprot)
  args = read_args(iprot, Get_database_args)
  result = Get_database_result.new()
  begin
    result.success = @handler.get_database(args.name)
  rescue NoSuchObjectException => o1
    result.o1 = o1
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_database', seqid)
end

#process_get_databases(seqid, iprot, oprot) ⇒ Object



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

def process_get_databases(seqid, iprot, oprot)
  args = read_args(iprot, Get_databases_args)
  result = Get_databases_result.new()
  begin
    result.success = @handler.get_databases(args.pattern)
  rescue MetaException => o1
    result.o1 = o1
  end
  write_result(result, oprot, 'get_databases', seqid)
end

#process_get_fields(seqid, iprot, oprot) ⇒ Object



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

def process_get_fields(seqid, iprot, oprot)
  args = read_args(iprot, Get_fields_args)
  result = Get_fields_result.new()
  begin
    result.success = @handler.get_fields(args.db_name, args.table_name)
  rescue MetaException => o1
    result.o1 = o1
  rescue UnknownTableException => o2
    result.o2 = o2
  rescue UnknownDBException => o3
    result.o3 = o3
  end
  write_result(result, oprot, 'get_fields', seqid)
end

#process_get_index_by_name(seqid, iprot, oprot) ⇒ Object



1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
# File 'lib/thrift/thrift_hive_metastore.rb', line 1114

def process_get_index_by_name(seqid, iprot, oprot)
  args = read_args(iprot, Get_index_by_name_args)
  result = Get_index_by_name_result.new()
  begin
    result.success = @handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name)
  rescue MetaException => o1
    result.o1 = o1
  rescue NoSuchObjectException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_index_by_name', seqid)
end

#process_get_index_names(seqid, iprot, oprot) ⇒ Object



1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
# File 'lib/thrift/thrift_hive_metastore.rb', line 1140

def process_get_index_names(seqid, iprot, oprot)
  args = read_args(iprot, Get_index_names_args)
  result = Get_index_names_result.new()
  begin
    result.success = @handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes)
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_index_names', seqid)
end

#process_get_indexes(seqid, iprot, oprot) ⇒ Object



1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
# File 'lib/thrift/thrift_hive_metastore.rb', line 1127

def process_get_indexes(seqid, iprot, oprot)
  args = read_args(iprot, Get_indexes_args)
  result = Get_indexes_result.new()
  begin
    result.success = @handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes)
  rescue NoSuchObjectException => o1
    result.o1 = o1
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_indexes', seqid)
end

#process_get_partition(seqid, iprot, oprot) ⇒ Object



955
956
957
958
959
960
961
962
963
964
965
966
# File 'lib/thrift/thrift_hive_metastore.rb', line 955

def process_get_partition(seqid, iprot, oprot)
  args = read_args(iprot, Get_partition_args)
  result = Get_partition_result.new()
  begin
    result.success = @handler.get_partition(args.db_name, args.tbl_name, args.part_vals)
  rescue MetaException => o1
    result.o1 = o1
  rescue NoSuchObjectException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_partition', seqid)
end

#process_get_partition_by_name(seqid, iprot, oprot) ⇒ Object



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

def process_get_partition_by_name(seqid, iprot, oprot)
  args = read_args(iprot, Get_partition_by_name_args)
  result = Get_partition_by_name_result.new()
  begin
    result.success = @handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name)
  rescue MetaException => o1
    result.o1 = o1
  rescue NoSuchObjectException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_partition_by_name', seqid)
end

#process_get_partition_names(seqid, iprot, oprot) ⇒ Object



994
995
996
997
998
999
1000
1001
1002
1003
# File 'lib/thrift/thrift_hive_metastore.rb', line 994

def process_get_partition_names(seqid, iprot, oprot)
  args = read_args(iprot, Get_partition_names_args)
  result = Get_partition_names_result.new()
  begin
    result.success = @handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts)
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_partition_names', seqid)
end

#process_get_partition_names_ps(seqid, iprot, oprot) ⇒ Object



1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
# File 'lib/thrift/thrift_hive_metastore.rb', line 1016

def process_get_partition_names_ps(seqid, iprot, oprot)
  args = read_args(iprot, Get_partition_names_ps_args)
  result = Get_partition_names_ps_result.new()
  begin
    result.success = @handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts)
  rescue MetaException => o1
    result.o1 = o1
  end
  write_result(result, oprot, 'get_partition_names_ps', seqid)
end

#process_get_partitions(seqid, iprot, oprot) ⇒ Object



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

def process_get_partitions(seqid, iprot, oprot)
  args = read_args(iprot, Get_partitions_args)
  result = Get_partitions_result.new()
  begin
    result.success = @handler.get_partitions(args.db_name, args.tbl_name, args.max_parts)
  rescue NoSuchObjectException => o1
    result.o1 = o1
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_partitions', seqid)
end

#process_get_partitions_by_filter(seqid, iprot, oprot) ⇒ Object



1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
# File 'lib/thrift/thrift_hive_metastore.rb', line 1027

def process_get_partitions_by_filter(seqid, iprot, oprot)
  args = read_args(iprot, Get_partitions_by_filter_args)
  result = Get_partitions_by_filter_result.new()
  begin
    result.success = @handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts)
  rescue MetaException => o1
    result.o1 = o1
  rescue NoSuchObjectException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_partitions_by_filter', seqid)
end

#process_get_partitions_ps(seqid, iprot, oprot) ⇒ Object



1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/thrift/thrift_hive_metastore.rb', line 1005

def process_get_partitions_ps(seqid, iprot, oprot)
  args = read_args(iprot, Get_partitions_ps_args)
  result = Get_partitions_ps_result.new()
  begin
    result.success = @handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts)
  rescue MetaException => o1
    result.o1 = o1
  end
  write_result(result, oprot, 'get_partitions_ps', seqid)
end

#process_get_schema(seqid, iprot, oprot) ⇒ Object



791
792
793
794
795
796
797
798
799
800
801
802
803
804
# File 'lib/thrift/thrift_hive_metastore.rb', line 791

def process_get_schema(seqid, iprot, oprot)
  args = read_args(iprot, Get_schema_args)
  result = Get_schema_result.new()
  begin
    result.success = @handler.get_schema(args.db_name, args.table_name)
  rescue MetaException => o1
    result.o1 = o1
  rescue UnknownTableException => o2
    result.o2 = o2
  rescue UnknownDBException => o3
    result.o3 = o3
  end
  write_result(result, oprot, 'get_schema', seqid)
end

#process_get_table(seqid, iprot, oprot) ⇒ Object



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

def process_get_table(seqid, iprot, oprot)
  args = read_args(iprot, Get_table_args)
  result = Get_table_result.new()
  begin
    result.success = @handler.get_table(args.dbname, args.tbl_name)
  rescue MetaException => o1
    result.o1 = o1
  rescue NoSuchObjectException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_table', seqid)
end

#process_get_tables(seqid, iprot, oprot) ⇒ Object



836
837
838
839
840
841
842
843
844
845
# File 'lib/thrift/thrift_hive_metastore.rb', line 836

def process_get_tables(seqid, iprot, oprot)
  args = read_args(iprot, Get_tables_args)
  result = Get_tables_result.new()
  begin
    result.success = @handler.get_tables(args.db_name, args.pattern)
  rescue MetaException => o1
    result.o1 = o1
  end
  write_result(result, oprot, 'get_tables', seqid)
end

#process_get_type(seqid, iprot, oprot) ⇒ Object



724
725
726
727
728
729
730
731
732
733
734
735
# File 'lib/thrift/thrift_hive_metastore.rb', line 724

def process_get_type(seqid, iprot, oprot)
  args = read_args(iprot, Get_type_args)
  result = Get_type_result.new()
  begin
    result.success = @handler.get_type(args.name)
  rescue MetaException => o1
    result.o1 = o1
  rescue NoSuchObjectException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_type', seqid)
end

#process_get_type_all(seqid, iprot, oprot) ⇒ Object



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

def process_get_type_all(seqid, iprot, oprot)
  args = read_args(iprot, Get_type_all_args)
  result = Get_type_all_result.new()
  begin
    result.success = @handler.get_type_all(args.name)
  rescue MetaException => o2
    result.o2 = o2
  end
  write_result(result, oprot, 'get_type_all', seqid)
end

#process_partition_name_to_spec(seqid, iprot, oprot) ⇒ Object



1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
# File 'lib/thrift/thrift_hive_metastore.rb', line 1075

def process_partition_name_to_spec(seqid, iprot, oprot)
  args = read_args(iprot, Partition_name_to_spec_args)
  result = Partition_name_to_spec_result.new()
  begin
    result.success = @handler.partition_name_to_spec(args.part_name)
  rescue MetaException => o1
    result.o1 = o1
  end
  write_result(result, oprot, 'partition_name_to_spec', seqid)
end

#process_partition_name_to_vals(seqid, iprot, oprot) ⇒ Object



1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
# File 'lib/thrift/thrift_hive_metastore.rb', line 1064

def process_partition_name_to_vals(seqid, iprot, oprot)
  args = read_args(iprot, Partition_name_to_vals_args)
  result = Partition_name_to_vals_result.new()
  begin
    result.success = @handler.partition_name_to_vals(args.part_name)
  rescue MetaException => o1
    result.o1 = o1
  end
  write_result(result, oprot, 'partition_name_to_vals', seqid)
end