Class: Impala::Protocol::TStatus

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/impala/protocol/status_types.rb

Constant Summary collapse

STATUS_CODE =
1
ERROR_MSGS =
2
FIELDS =
{
  STATUS_CODE => {:type => ::Thrift::Types::I32, :name => 'status_code', :enum_class => ::Impala::Protocol::TStatusCode},
  ERROR_MSGS => {:type => ::Thrift::Types::LIST, :name => 'error_msgs', :element => {:type => ::Thrift::Types::STRING}}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



33
# File 'lib/impala/protocol/status_types.rb', line 33

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


35
36
37
38
39
40
# File 'lib/impala/protocol/status_types.rb', line 35

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status_code is unset!') unless @status_code
  unless @status_code.nil? || ::Impala::Protocol::TStatusCode::VALID_VALUES.include?(@status_code)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field status_code!')
  end
end