Class: Hadoop::API::Jobtracker::ThriftClusterStatus

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

Overview

Status of the cluster as viewed by the jobtracker

Constant Summary collapse

NUMACTIVETRACKERS =
1
ACTIVETRACKERNAMES =
2
BLACKLISTEDTRACKERNAMES =
3
NUMBLACKLISTEDTRACKERS =
4
NUMEXCLUDEDNODES =
5
TASKTRACKEREXPIRYINTERVAL =
6
MAPTASKS =
7
REDUCETASKS =
8
MAXMAPTASKS =
9
MAXREDUCETASKS =
10
STATE =
11
USEDMEMORY =
12
MAXMEMORY =
13
TOTALSUBMISSIONS =
14
HASRESTARTED =
15
HASRECOVERED =
16
STARTTIME =
17
HOSTNAME =
18
IDENTIFIER =
19
HTTPPORT =
20
FIELDS =
{
  NUMACTIVETRACKERS => {:type => ::Thrift::Types::I32, :name => 'numActiveTrackers'},
  ACTIVETRACKERNAMES => {:type => ::Thrift::Types::LIST, :name => 'activeTrackerNames', :element => {:type => ::Thrift::Types::STRING}},
  BLACKLISTEDTRACKERNAMES => {:type => ::Thrift::Types::LIST, :name => 'blacklistedTrackerNames', :element => {:type => ::Thrift::Types::STRING}},
  NUMBLACKLISTEDTRACKERS => {:type => ::Thrift::Types::I32, :name => 'numBlacklistedTrackers'},
  NUMEXCLUDEDNODES => {:type => ::Thrift::Types::I32, :name => 'numExcludedNodes'},
  TASKTRACKEREXPIRYINTERVAL => {:type => ::Thrift::Types::I64, :name => 'taskTrackerExpiryInterval'},
  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 => Hadoop::API::Jobtracker::JobTrackerState},
  # Used and max memory for the cluster, in bytes
  USEDMEMORY => {:type => ::Thrift::Types::I64, :name => 'usedMemory'},
  MAXMEMORY => {:type => ::Thrift::Types::I64, :name => 'maxMemory'},
  TOTALSUBMISSIONS => {:type => ::Thrift::Types::I32, :name => 'totalSubmissions'},
  HASRESTARTED => {:type => ::Thrift::Types::BOOL, :name => 'hasRestarted'},
  HASRECOVERED => {:type => ::Thrift::Types::BOOL, :name => 'hasRecovered'},
  STARTTIME => {:type => ::Thrift::Types::I64, :name => 'startTime'},
  HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostname'},
  IDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'identifier'},
  HTTPPORT => {:type => ::Thrift::Types::I32, :name => 'httpPort'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



658
# File 'lib/thrift/jobtracker_types.rb', line 658

def struct_fields; FIELDS; end

#validateObject



660
661
662
663
664
# File 'lib/thrift/jobtracker_types.rb', line 660

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