Class: Storm::StormTopology

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/storm/thrift/storm_types.rb

Constant Summary collapse

SPOUTS =
1
BOLTS =
2
STATE_SPOUTS =
3
FIELDS =
{
  SPOUTS => {:type => ::Thrift::Types::MAP, :name => 'spouts', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => SpoutSpec}},
  BOLTS => {:type => ::Thrift::Types::MAP, :name => 'bolts', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => Bolt}},
  STATE_SPOUTS => {:type => ::Thrift::Types::MAP, :name => 'state_spouts', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => StateSpoutSpec}}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



352
# File 'lib/storm/thrift/storm_types.rb', line 352

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


354
355
356
357
358
# File 'lib/storm/thrift/storm_types.rb', line 354

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field spouts is unset!') unless @spouts
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field bolts is unset!') unless @bolts
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field state_spouts is unset!') unless @state_spouts
end