Class: Task

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

Constant Summary collapse

TASKID =
1
TASKTYPE =
2
TASKATTRIBUTES =
3
TASKCOUNTERS =
4
OPERATORGRAPH =
5
OPERATORLIST =
6
DONE =
7
STARTED =
8
FIELDS =
{
  TASKID => {:type => ::Thrift::Types::STRING, :name => 'taskId'},
  TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => TaskType},
  TASKATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'taskAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
  TASKCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'taskCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
  OPERATORGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'operatorGraph', :class => Graph, :optional => true},
  OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => Operator}, :optional => true},
  DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
  STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



162
# File 'lib/thrift/queryplan_types.rb', line 162

def struct_fields; FIELDS; end

#validateObject



164
165
166
167
168
# File 'lib/thrift/queryplan_types.rb', line 164

def validate
  unless @taskType.nil? || TaskType::VALID_VALUES.include?(@taskType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field taskType!')
  end
end