Class: Hive::Thrift::Stage

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

Constant Summary collapse

STAGEID =
1
STAGETYPE =
2
STAGEATTRIBUTES =
3
STAGECOUNTERS =
4
TASKLIST =
5
DONE =
6
STARTED =
7
FIELDS =
{
  STAGEID => {:type => ::Thrift::Types::STRING, :name => 'stageId'},
  STAGETYPE => {:type => ::Thrift::Types::I32, :name => 'stageType', :enum_class => ::Hive::Thrift::StageType},
  STAGEATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'stageAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
  STAGECOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'stageCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
  TASKLIST => {:type => ::Thrift::Types::LIST, :name => 'taskList', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Hive::Thrift::Task}},
  DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
  STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



201
202
203
204
205
# File 'lib/thrift/queryplan_types.rb', line 201

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