Class: Storm::ComponentCommon

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

Constant Summary collapse

INPUTS =
1
STREAMS =
2
PARALLELISM_HINT =
3
JSON_CONF =
4
FIELDS =
{
  INPUTS => {:type => ::Thrift::Types::MAP, :name => 'inputs', :key => {:type => ::Thrift::Types::STRUCT, :class => GlobalStreamId}, :value => {:type => ::Thrift::Types::STRUCT, :class => Grouping}},
  STREAMS => {:type => ::Thrift::Types::MAP, :name => 'streams', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => StreamInfo}},
  PARALLELISM_HINT => {:type => ::Thrift::Types::I32, :name => 'parallelism_hint', :optional => true},
  JSON_CONF => {:type => ::Thrift::Types::STRING, :name => 'json_conf', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


272
273
274
275
# File 'lib/storm/thrift/storm_types.rb', line 272

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