lib/impala/protocol/impala_service.rb in impala-0.1.6 vs lib/impala/protocol/impala_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'
@@ -9,11 +9,11 @@
require 'impala_service_types'
module Impala
module Protocol
module ImpalaService
- class Client < Impala::Protocol::Beeswax::BeeswaxService::Client
+ class Client < ::Impala::Protocol::Beeswax::BeeswaxService::Client
include ::Thrift::Client
def Cancel(query_id)
send_Cancel(query_id)
return recv_Cancel()
@@ -43,10 +43,41 @@
result = receive_message(ResetCatalog_result)
return result.success unless result.success.nil?
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ResetCatalog failed: unknown result')
end
+ def ResetTable(request)
+ send_ResetTable(request)
+ return recv_ResetTable()
+ end
+
+ def send_ResetTable(request)
+ send_message('ResetTable', ResetTable_args, :request => request)
+ end
+
+ def recv_ResetTable()
+ result = receive_message(ResetTable_result)
+ return result.success unless result.success.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ResetTable failed: unknown result')
+ end
+
+ def GetRuntimeProfile(query_id)
+ send_GetRuntimeProfile(query_id)
+ return recv_GetRuntimeProfile()
+ end
+
+ def send_GetRuntimeProfile(query_id)
+ send_message('GetRuntimeProfile', GetRuntimeProfile_args, :query_id => query_id)
+ end
+
+ def recv_GetRuntimeProfile()
+ result = receive_message(GetRuntimeProfile_result)
+ return result.success unless result.success.nil?
+ raise result.error unless result.error.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetRuntimeProfile failed: unknown result')
+ end
+
def CloseInsert(handle)
send_CloseInsert(handle)
return recv_CloseInsert()
end
@@ -62,33 +93,34 @@
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'CloseInsert failed: unknown result')
end
def PingImpalaService()
send_PingImpalaService()
- recv_PingImpalaService()
+ return recv_PingImpalaService()
end
def send_PingImpalaService()
send_message('PingImpalaService', PingImpalaService_args)
end
def recv_PingImpalaService()
result = receive_message(PingImpalaService_result)
- return
+ return result.success unless result.success.nil?
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'PingImpalaService failed: unknown result')
end
end
- class Processor < Impala::Protocol::Beeswax::BeeswaxService::Processor
+ class Processor < ::Impala::Protocol::Beeswax::BeeswaxService::Processor
include ::Thrift::Processor
def process_Cancel(seqid, iprot, oprot)
args = read_args(iprot, Cancel_args)
result = Cancel_result.new()
begin
result.success = @handler.Cancel(args.query_id)
- rescue Impala::Protocol::Beeswax::BeeswaxException => error
+ rescue ::Impala::Protocol::Beeswax::BeeswaxException => error
result.error = error
end
write_result(result, oprot, 'Cancel', seqid)
end
@@ -97,27 +129,45 @@
result = ResetCatalog_result.new()
result.success = @handler.ResetCatalog()
write_result(result, oprot, 'ResetCatalog', seqid)
end
+ def process_ResetTable(seqid, iprot, oprot)
+ args = read_args(iprot, ResetTable_args)
+ result = ResetTable_result.new()
+ result.success = @handler.ResetTable(args.request)
+ write_result(result, oprot, 'ResetTable', seqid)
+ end
+
+ def process_GetRuntimeProfile(seqid, iprot, oprot)
+ args = read_args(iprot, GetRuntimeProfile_args)
+ result = GetRuntimeProfile_result.new()
+ begin
+ result.success = @handler.GetRuntimeProfile(args.query_id)
+ rescue ::Impala::Protocol::Beeswax::BeeswaxException => error
+ result.error = error
+ end
+ write_result(result, oprot, 'GetRuntimeProfile', seqid)
+ end
+
def process_CloseInsert(seqid, iprot, oprot)
args = read_args(iprot, CloseInsert_args)
result = CloseInsert_result.new()
begin
result.success = @handler.CloseInsert(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, 'CloseInsert', seqid)
end
def process_PingImpalaService(seqid, iprot, oprot)
args = read_args(iprot, PingImpalaService_args)
result = PingImpalaService_result.new()
- @handler.PingImpalaService()
+ result.success = @handler.PingImpalaService()
write_result(result, oprot, 'PingImpalaService', seqid)
end
end
@@ -126,11 +176,11 @@
class Cancel_args
include ::Thrift::Struct, ::Thrift::Struct_Union
QUERY_ID = 1
FIELDS = {
- QUERY_ID => { :type => ::Thrift::Types::STRUCT, :name => 'query_id', :class => Impala::Protocol::Beeswax::QueryHandle }
+ QUERY_ID => {:type => ::Thrift::Types::STRUCT, :name => 'query_id', :class => ::Impala::Protocol::Beeswax::QueryHandle}
}
def struct_fields; FIELDS; end
def validate
@@ -143,12 +193,12 @@
include ::Thrift::Struct, ::Thrift::Struct_Union
SUCCESS = 0
ERROR = 1
FIELDS = {
- SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::TStatus },
- ERROR => { :type => ::Thrift::Types::STRUCT, :name => 'error', :class => Impala::Protocol::Beeswax::BeeswaxException }
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::TStatus},
+ ERROR => {:type => ::Thrift::Types::STRUCT, :name => 'error', :class => ::Impala::Protocol::Beeswax::BeeswaxException}
}
def struct_fields; FIELDS; end
def validate
@@ -175,27 +225,93 @@
class ResetCatalog_result
include ::Thrift::Struct, ::Thrift::Struct_Union
SUCCESS = 0
FIELDS = {
- SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::TStatus }
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::TStatus}
}
def struct_fields; FIELDS; end
def validate
end
::Thrift::Struct.generate_accessors self
end
+ class ResetTable_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ REQUEST = 1
+
+ FIELDS = {
+ REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'request', :class => ::Impala::Protocol::TResetTableReq}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class ResetTable_result
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
+
+ FIELDS = {
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::TStatus}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class GetRuntimeProfile_args
+ include ::Thrift::Struct, ::Thrift::Struct_Union
+ QUERY_ID = 1
+
+ FIELDS = {
+ QUERY_ID => {:type => ::Thrift::Types::STRUCT, :name => 'query_id', :class => ::Impala::Protocol::Beeswax::QueryHandle}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
+ class GetRuntimeProfile_result
+ 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::BeeswaxException}
+ }
+
+ def struct_fields; FIELDS; end
+
+ def validate
+ end
+
+ ::Thrift::Struct.generate_accessors self
+ end
+
class CloseInsert_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
@@ -209,13 +325,13 @@
SUCCESS = 0
ERROR = 1
ERROR2 = 2
FIELDS = {
- SUCCESS => { :type => ::Thrift::Types::STRUCT, :name => 'success', :class => Impala::Protocol::TInsertResult },
- 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::TInsertResult},
+ 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
@@ -239,12 +355,13 @@
::Thrift::Struct.generate_accessors self
end
class PingImpalaService_result
include ::Thrift::Struct, ::Thrift::Struct_Union
+ SUCCESS = 0
FIELDS = {
-
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Impala::Protocol::TPingImpalaServiceResp}
}
def struct_fields; FIELDS; end
def validate