Class: Impala::Protocol::TStatus
- Inherits:
-
Object
- Object
- Impala::Protocol::TStatus
- 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_fields ⇒ Object
31 |
# File 'lib/impala/protocol/status_types.rb', line 31 def struct_fields; FIELDS; end |
#validate ⇒ Object
33 34 35 36 37 38 |
# File 'lib/impala/protocol/status_types.rb', line 33 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 |