Class: Impala::Protocol::TUpdateStateRequest

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

Constant Summary collapse

PROTOCOLVERSION =
1
SERVICE_MEMBERSHIPS =
2
UPDATED_OBJECTS =
3
DELETED_OBJECT_KEYS =
4
FIELDS =
{
PROTOCOLVERSION => { :type => ::Thrift::Types::I32, :name => 'protocolVersion', :default =>             0, :enum_class => Impala::Protocol::StateStoreSubscriberServiceVersion },
SERVICE_MEMBERSHIPS => { :type => ::Thrift::Types::LIST, :name => 'service_memberships', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TServiceMembership }, :optional => true },
UPDATED_OBJECTS => { :type => ::Thrift::Types::LIST, :name => 'updated_objects', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TVersionedObject }, :optional => true },
DELETED_OBJECT_KEYS => { :type => ::Thrift::Types::LIST, :name => 'deleted_object_keys', :element => { :type => ::Thrift::Types::STRING }, :optional => true }
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



34
# File 'lib/impala/protocol/state_store_subscriber_service_types.rb', line 34

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


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

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