Class: Storm::SpoutStats

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

Constant Summary collapse

ACKED =
1
FAILED =
2
COMPLETE_MS_AVG =
3
FIELDS =
{
  ACKED => {:type => ::Thrift::Types::MAP, :name => 'acked', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}},
  FAILED => {:type => ::Thrift::Types::MAP, :name => 'failed', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}},
  COMPLETE_MS_AVG => {:type => ::Thrift::Types::MAP, :name => 'complete_ms_avg', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::DOUBLE}}}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


576
577
578
579
580
# File 'lib/storm/thrift/storm_types.rb', line 576

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