Class: Storm::TopologySummary

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

Constant Summary collapse

ID =
1
NAME =
2
NUM_TASKS =
3
NUM_EXECUTORS =
4
NUM_WORKERS =
5
UPTIME_SECS =
6
STATUS =
7
FIELDS =
{
  ID => {:type => ::Thrift::Types::STRING, :name => 'id'},
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
  NUM_TASKS => {:type => ::Thrift::Types::I32, :name => 'num_tasks'},
  NUM_EXECUTORS => {:type => ::Thrift::Types::I32, :name => 'num_executors'},
  NUM_WORKERS => {:type => ::Thrift::Types::I32, :name => 'num_workers'},
  UPTIME_SECS => {:type => ::Thrift::Types::I32, :name => 'uptime_secs'},
  STATUS => {:type => ::Thrift::Types::STRING, :name => 'status'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


457
458
459
460
461
462
463
464
465
# File 'lib/storm/thrift/storm_types.rb', line 457

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_tasks is unset!') unless @num_tasks
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_executors is unset!') unless @num_executors
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field num_workers is unset!') unless @num_workers
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field uptime_secs is unset!') unless @uptime_secs
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field status is unset!') unless @status
end