Class: Hive::Thrift::HiveClusterStatus

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

Constant Summary collapse

TASKTRACKERS =
1
MAPTASKS =
2
REDUCETASKS =
3
MAXMAPTASKS =
4
MAXREDUCETASKS =
5
STATE =
6
FIELDS =
{
  TASKTRACKERS => {:type => ::Thrift::Types::I32, :name => 'taskTrackers'},
  MAPTASKS => {:type => ::Thrift::Types::I32, :name => 'mapTasks'},
  REDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'reduceTasks'},
  MAXMAPTASKS => {:type => ::Thrift::Types::I32, :name => 'maxMapTasks'},
  MAXREDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'maxReduceTasks'},
  STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::Hive::Thrift::JobTrackerState}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject


40
# File 'lib/thrift/hive_service_types.rb', line 40

def struct_fields; FIELDS; end

#validateObject


42
43
44
45
46
# File 'lib/thrift/hive_service_types.rb', line 42

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