Class: Impala::Protocol::Hive::TOpenSessionReq

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

Constant Summary collapse

CLIENT_PROTOCOL =
1
USERNAME =
2
PASSWORD =
3
CONFIGURATION =
4
FIELDS =
{
  CLIENT_PROTOCOL => {:type => ::Thrift::Types::I32, :name => 'client_protocol', :default =>           0, :enum_class => ::Impala::Protocol::Hive::TProtocolVersion},
  USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
  PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password', :optional => true},
  CONFIGURATION => {:type => ::Thrift::Types::MAP, :name => 'configuration', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



734
# File 'lib/impala/protocol/cli_service_types.rb', line 734

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


736
737
738
739
740
741
# File 'lib/impala/protocol/cli_service_types.rb', line 736

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