Class: Hive::Thrift::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 => ::Hive::Thrift::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 => ::Hive::Thrift::Graph, :optional => true},
  OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Hive::Thrift::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



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

def struct_fields; FIELDS; end

#validateObject



170
171
172
173
174
# File 'lib/thrift/queryplan_types.rb', line 170

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