# # Autogenerated by Thrift Compiler (0.8.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # require 'thrift' require 'impala_internal_service_types' module Impala module Protocol module ImpalaInternalService class Client include ::Thrift::Client def ExecPlanFragment(params) send_ExecPlanFragment(params) return recv_ExecPlanFragment() end def send_ExecPlanFragment(params) send_message('ExecPlanFragment', ExecPlanFragment_args, :params => params) end def recv_ExecPlanFragment() result = receive_message(ExecPlanFragment_result) return result.success unless result.success.nil? raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ExecPlanFragment failed: unknown result') end def ReportExecStatus(params) send_ReportExecStatus(params) return recv_ReportExecStatus() end def send_ReportExecStatus(params) send_message('ReportExecStatus', ReportExecStatus_args, :params => params) end def recv_ReportExecStatus() result = receive_message(ReportExecStatus_result) return result.success unless result.success.nil? raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ReportExecStatus failed: unknown result') end def CancelPlanFragment(params) send_CancelPlanFragment(params) return recv_CancelPlanFragment() end def send_CancelPlanFragment(params) send_message('CancelPlanFragment', CancelPlanFragment_args, :params => params) end def recv_CancelPlanFragment() result = receive_message(CancelPlanFragment_result) return result.success unless result.success.nil? raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'CancelPlanFragment failed: unknown result') end def TransmitData(params) send_TransmitData(params) return recv_TransmitData() end def send_TransmitData(params) send_message('TransmitData', TransmitData_args, :params => params) end def recv_TransmitData() result = receive_message(TransmitData_result) return result.success unless result.success.nil? raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'TransmitData failed: unknown result') end end class Processor include ::Thrift::Processor def process_ExecPlanFragment(seqid, iprot, oprot) args = read_args(iprot, ExecPlanFragment_args) result = ExecPlanFragment_result.new() result.success = @handler.ExecPlanFragment(args.params) write_result(result, oprot, 'ExecPlanFragment', seqid) end def process_ReportExecStatus(seqid, iprot, oprot) args = read_args(iprot, ReportExecStatus_args) result = ReportExecStatus_result.new() result.success = @handler.ReportExecStatus(args.params) write_result(result, oprot, 'ReportExecStatus', seqid) end def process_CancelPlanFragment(seqid, iprot, oprot) args = read_args(iprot, CancelPlanFragment_args) result = CancelPlanFragment_result.new() result.success = @handler.CancelPlanFragment(args.params) write_result(result, oprot, 'CancelPlanFragment', seqid) end def process_TransmitData(seqid, iprot, oprot) args = read_args(iprot, TransmitData_args) result = TransmitData_result.new() result.success = @handler.TransmitData(args.params) write_result(result, oprot, 'TransmitData', seqid) end end # HELPER FUNCTIONS AND STRUCTURES class ExecPlanFragment_args include ::Thrift::Struct, ::Thrift::Struct_Union PARAMS = 1 FIELDS = { PARAMS => { :type => ::Thrift::Types::STRUCT, :name => 'params', :class => Impala::Protocol::TExecPlanFragmentParams } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class ExecPlanFragment_result include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 FIELDS = { SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::TExecPlanFragmentResult } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class ReportExecStatus_args include ::Thrift::Struct, ::Thrift::Struct_Union PARAMS = 1 FIELDS = { PARAMS => { :type => ::Thrift::Types::STRUCT, :name => 'params', :class => Impala::Protocol::TReportExecStatusParams } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class ReportExecStatus_result include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 FIELDS = { SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::TReportExecStatusResult } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class CancelPlanFragment_args include ::Thrift::Struct, ::Thrift::Struct_Union PARAMS = 1 FIELDS = { PARAMS => { :type => ::Thrift::Types::STRUCT, :name => 'params', :class => Impala::Protocol::TCancelPlanFragmentParams } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class CancelPlanFragment_result include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 FIELDS = { SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::TCancelPlanFragmentResult } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class TransmitData_args include ::Thrift::Struct, ::Thrift::Struct_Union PARAMS = 1 FIELDS = { PARAMS => { :type => ::Thrift::Types::STRUCT, :name => 'params', :class => Impala::Protocol::TTransmitDataParams } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class TransmitData_result include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 FIELDS = { SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::TTransmitDataResult } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end end end end