lib/impala/protocol/beeswax_service.rb in impala-0.1.6 vs lib/impala/protocol/beeswax_service.rb in impala-0.2.0

- old
+ new

@@ -1,7 +1,7 @@ # -# Autogenerated by Thrift Compiler (0.8.0) +# Autogenerated by Thrift Compiler (0.9.1) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # require 'thrift' @@ -210,68 +210,68 @@ def process_query(seqid, iprot, oprot) args = read_args(iprot, Query_args) result = Query_result.new() begin result.success = @handler.query(args.query) - rescue Impala::Protocol::Beeswax::BeeswaxException => error + rescue ::Impala::Protocol::Beeswax::BeeswaxException => error result.error = error end write_result(result, oprot, 'query', seqid) end def process_executeAndWait(seqid, iprot, oprot) args = read_args(iprot, ExecuteAndWait_args) result = ExecuteAndWait_result.new() begin result.success = @handler.executeAndWait(args.query, args.clientCtx) - rescue Impala::Protocol::Beeswax::BeeswaxException => error + rescue ::Impala::Protocol::Beeswax::BeeswaxException => error result.error = error end write_result(result, oprot, 'executeAndWait', seqid) end def process_explain(seqid, iprot, oprot) args = read_args(iprot, Explain_args) result = Explain_result.new() begin result.success = @handler.explain(args.query) - rescue Impala::Protocol::Beeswax::BeeswaxException => error + rescue ::Impala::Protocol::Beeswax::BeeswaxException => error result.error = error end write_result(result, oprot, 'explain', seqid) end def process_fetch(seqid, iprot, oprot) args = read_args(iprot, Fetch_args) result = Fetch_result.new() begin result.success = @handler.fetch(args.query_id, args.start_over, args.fetch_size) - rescue Impala::Protocol::Beeswax::QueryNotFoundException => error + rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error result.error = error - rescue Impala::Protocol::Beeswax::BeeswaxException => error2 + rescue ::Impala::Protocol::Beeswax::BeeswaxException => error2 result.error2 = error2 end write_result(result, oprot, 'fetch', seqid) end def process_get_state(seqid, iprot, oprot) args = read_args(iprot, Get_state_args) result = Get_state_result.new() begin result.success = @handler.get_state(args.handle) - rescue Impala::Protocol::Beeswax::QueryNotFoundException => error + rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error result.error = error end write_result(result, oprot, 'get_state', seqid) end def process_get_results_metadata(seqid, iprot, oprot) args = read_args(iprot, Get_results_metadata_args) result = Get_results_metadata_result.new() begin result.success = @handler.get_results_metadata(args.handle) - rescue Impala::Protocol::Beeswax::QueryNotFoundException => error + rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error result.error = error end write_result(result, oprot, 'get_results_metadata', seqid) end @@ -292,11 +292,11 @@ def process_get_log(seqid, iprot, oprot) args = read_args(iprot, Get_log_args) result = Get_log_result.new() begin result.success = @handler.get_log(args.context) - rescue Impala::Protocol::Beeswax::QueryNotFoundException => error + rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error result.error = error end write_result(result, oprot, 'get_log', seqid) end @@ -310,13 +310,13 @@ def process_close(seqid, iprot, oprot) args = read_args(iprot, Close_args) result = Close_result.new() begin @handler.close(args.handle) - rescue Impala::Protocol::Beeswax::QueryNotFoundException => error + rescue ::Impala::Protocol::Beeswax::QueryNotFoundException => error result.error = error - rescue Impala::Protocol::Beeswax::BeeswaxException => error2 + rescue ::Impala::Protocol::Beeswax::BeeswaxException => error2 result.error2 = error2 end write_result(result, oprot, 'close', seqid) end @@ -334,11 +334,11 @@ class Query_args include ::Thrift::Struct, ::Thrift::Struct_Union QUERY = 1 FIELDS = { - QUERY => { :type => ::Thrift::Types::STRUCT, :name => 'query', :class => Impala::Protocol::Beeswax::Query } + QUERY => {:type => ::Thrift::Types::STRUCT, :name => 'query', :class => ::Impala::Protocol::Beeswax::Query} } def struct_fields; FIELDS; end def validate @@ -351,12 +351,12 @@ include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 ERROR = 1 FIELDS = { - SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::Beeswax::QueryHandle }, - ERROR => { :type => ::Thrift::Types::STRUCT, :name => 'error', :class => Impala::Protocol::Beeswax::BeeswaxException } + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Beeswax::QueryHandle}, + ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::BeeswaxException} } def struct_fields; FIELDS; end def validate @@ -369,12 +369,12 @@ include ::Thrift::Struct, ::Thrift::Struct_Union QUERY = 1 CLIENTCTX = 2 FIELDS = { - QUERY => { :type => ::Thrift::Types::STRUCT, :name => 'query', :class => Impala::Protocol::Beeswax::Query }, - CLIENTCTX => { :type => ::Thrift::Types::STRING, :name => 'clientCtx' } + QUERY => {:type => ::Thrift::Types::STRUCT, :name => 'query', :class => ::Impala::Protocol::Beeswax::Query}, + CLIENTCTX => {:type => ::Thrift::Types::STRING, :name => 'clientCtx'} } def struct_fields; FIELDS; end def validate @@ -387,12 +387,12 @@ include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 ERROR = 1 FIELDS = { - SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::Beeswax::QueryHandle }, - ERROR => { :type => ::Thrift::Types::STRUCT, :name => 'error', :class => Impala::Protocol::Beeswax::BeeswaxException } + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Beeswax::QueryHandle}, + ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::BeeswaxException} } def struct_fields; FIELDS; end def validate @@ -404,11 +404,11 @@ class Explain_args include ::Thrift::Struct, ::Thrift::Struct_Union QUERY = 1 FIELDS = { - QUERY => { :type => ::Thrift::Types::STRUCT, :name => 'query', :class => Impala::Protocol::Beeswax::Query } + QUERY => {:type => ::Thrift::Types::STRUCT, :name => 'query', :class => ::Impala::Protocol::Beeswax::Query} } def struct_fields; FIELDS; end def validate @@ -421,12 +421,12 @@ include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 ERROR = 1 FIELDS = { - SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::Beeswax::QueryExplanation }, - ERROR => { :type => ::Thrift::Types::STRUCT, :name => 'error', :class => Impala::Protocol::Beeswax::BeeswaxException } + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Beeswax::QueryExplanation}, + ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::BeeswaxException} } def struct_fields; FIELDS; end def validate @@ -440,13 +440,13 @@ QUERY_ID = 1 START_OVER = 2 FETCH_SIZE = 3 FIELDS = { - QUERY_ID => { :type => ::Thrift::Types::STRUCT, :name => 'query_id', :class => Impala::Protocol::Beeswax::QueryHandle }, - START_OVER => { :type => ::Thrift::Types::BOOL, :name => 'start_over' }, - FETCH_SIZE => { :type => ::Thrift::Types::I32, :name => 'fetch_size', :default => -1 } + QUERY_ID => {:type => ::Thrift::Types::STRUCT, :name => 'query_id', :class => ::Impala::Protocol::Beeswax::QueryHandle}, + START_OVER => {:type => ::Thrift::Types::BOOL, :name => 'start_over'}, + FETCH_SIZE => {:type => ::Thrift::Types::I32, :name => 'fetch_size', :default => -1} } def struct_fields; FIELDS; end def validate @@ -460,13 +460,13 @@ SUCCESS = 0 ERROR = 1 ERROR2 = 2 FIELDS = { - SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::Beeswax::Results }, - ERROR => { :type => ::Thrift::Types::STRUCT, :name => 'error', :class => Impala::Protocol::Beeswax::QueryNotFoundException }, - ERROR2 => { :type => ::Thrift::Types::STRUCT, :name => 'error2', :class => Impala::Protocol::Beeswax::BeeswaxException } + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Beeswax::Results}, + ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException}, + ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Impala::Protocol::Beeswax::BeeswaxException} } def struct_fields; FIELDS; end def validate @@ -478,11 +478,11 @@ class Get_state_args include ::Thrift::Struct, ::Thrift::Struct_Union HANDLE = 1 FIELDS = { - HANDLE => { :type => ::Thrift::Types::STRUCT, :name => 'handle', :class => Impala::Protocol::Beeswax::QueryHandle } + HANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'handle', :class => ::Impala::Protocol::Beeswax::QueryHandle} } def struct_fields; FIELDS; end def validate @@ -495,18 +495,18 @@ include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 ERROR = 1 FIELDS = { - SUCCESS => { :type => ::Thrift::Types::I32, :name => 'success', :enum_class => Impala::Protocol::Beeswax::QueryState }, - ERROR => { :type => ::Thrift::Types::STRUCT, :name => 'error', :class => Impala::Protocol::Beeswax::QueryNotFoundException } + SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success', :enum_class => ::Impala::Protocol::Beeswax::QueryState}, + ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException} } def struct_fields; FIELDS; end def validate - unless @success.nil? || Impala::Protocol::Beeswax::QueryState::VALID_VALUES.include?(@success) + unless @success.nil? || ::Impala::Protocol::Beeswax::QueryState::VALID_VALUES.include?(@success) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field success!') end end ::Thrift::Struct.generate_accessors self @@ -515,11 +515,11 @@ class Get_results_metadata_args include ::Thrift::Struct, ::Thrift::Struct_Union HANDLE = 1 FIELDS = { - HANDLE => { :type => ::Thrift::Types::STRUCT, :name => 'handle', :class => Impala::Protocol::Beeswax::QueryHandle } + HANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'handle', :class => ::Impala::Protocol::Beeswax::QueryHandle} } def struct_fields; FIELDS; end def validate @@ -532,12 +532,12 @@ include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 ERROR = 1 FIELDS = { - SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::Beeswax::ResultsMetadata }, - ERROR => { :type => ::Thrift::Types::STRUCT, :name => 'error', :class => Impala::Protocol::Beeswax::QueryNotFoundException } + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::Beeswax::ResultsMetadata}, + ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException} } def struct_fields; FIELDS; end def validate @@ -549,11 +549,11 @@ class Echo_args include ::Thrift::Struct, ::Thrift::Struct_Union S = 1 FIELDS = { - S => { :type => ::Thrift::Types::STRING, :name => 's' } + S => {:type => ::Thrift::Types::STRING, :name => 's'} } def struct_fields; FIELDS; end def validate @@ -565,11 +565,11 @@ class Echo_result include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 FIELDS = { - SUCCESS => { :type => ::Thrift::Types::STRING, :name => 'success' } + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'} } def struct_fields; FIELDS; end def validate @@ -596,11 +596,11 @@ class Dump_config_result include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 FIELDS = { - SUCCESS => { :type => ::Thrift::Types::STRING, :name => 'success' } + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'} } def struct_fields; FIELDS; end def validate @@ -612,11 +612,11 @@ class Get_log_args include ::Thrift::Struct, ::Thrift::Struct_Union CONTEXT = 1 FIELDS = { - CONTEXT => { :type => ::Thrift::Types::STRING, :name => 'context' } + CONTEXT => {:type => ::Thrift::Types::STRING, :name => 'context'} } def struct_fields; FIELDS; end def validate @@ -629,12 +629,12 @@ include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 ERROR = 1 FIELDS = { - SUCCESS => { :type => ::Thrift::Types::STRING, :name => 'success' }, - ERROR => { :type => ::Thrift::Types::STRUCT, :name => 'error', :class => Impala::Protocol::Beeswax::QueryNotFoundException } + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, + ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException} } def struct_fields; FIELDS; end def validate @@ -646,11 +646,11 @@ class Get_default_configuration_args include ::Thrift::Struct, ::Thrift::Struct_Union INCLUDE_HADOOP = 1 FIELDS = { - INCLUDE_HADOOP => { :type => ::Thrift::Types::BOOL, :name => 'include_hadoop' } + INCLUDE_HADOOP => {:type => ::Thrift::Types::BOOL, :name => 'include_hadoop'} } def struct_fields; FIELDS; end def validate @@ -662,11 +662,11 @@ class Get_default_configuration_result include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 FIELDS = { - SUCCESS => { :type => ::Thrift::Types::LIST, :name => 'success', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::Beeswax::ConfigVariable } } + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Impala::Protocol::Beeswax::ConfigVariable}} } def struct_fields; FIELDS; end def validate @@ -678,11 +678,11 @@ class Close_args include ::Thrift::Struct, ::Thrift::Struct_Union HANDLE = 1 FIELDS = { - HANDLE => { :type => ::Thrift::Types::STRUCT, :name => 'handle', :class => Impala::Protocol::Beeswax::QueryHandle } + HANDLE => {:type => ::Thrift::Types::STRUCT, :name => 'handle', :class => ::Impala::Protocol::Beeswax::QueryHandle} } def struct_fields; FIELDS; end def validate @@ -695,12 +695,12 @@ include ::Thrift::Struct, ::Thrift::Struct_Union ERROR = 1 ERROR2 = 2 FIELDS = { - ERROR => { :type => ::Thrift::Types::STRUCT, :name => 'error', :class => Impala::Protocol::Beeswax::QueryNotFoundException }, - ERROR2 => { :type => ::Thrift::Types::STRUCT, :name => 'error2', :class => Impala::Protocol::Beeswax::BeeswaxException } + ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::QueryNotFoundException}, + ERROR2 => {:type => ::Thrift::Types::STRUCT, :name => 'error2', :class => ::Impala::Protocol::Beeswax::BeeswaxException} } def struct_fields; FIELDS; end def validate @@ -712,10 +712,10 @@ class Clean_args include ::Thrift::Struct, ::Thrift::Struct_Union LOG_CONTEXT = 1 FIELDS = { - LOG_CONTEXT => { :type => ::Thrift::Types::STRING, :name => 'log_context' } + LOG_CONTEXT => {:type => ::Thrift::Types::STRING, :name => 'log_context'} } def struct_fields; FIELDS; end def validate