Class: Hadoop::API::Jobtracker::ThriftTaskID
- Inherits:
-
Object
- Object
- Hadoop::API::Jobtracker::ThriftTaskID
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/thrift/jobtracker_types.rb
Overview
Unique task id
Constant Summary collapse
- JOBID =
1
- TASKTYPE =
2
- TASKID =
3
- ASSTRING =
4
- FIELDS =
{ # ID of the job to which the task belongs JOBID => {:type => ::Thrift::Types::STRUCT, :name => 'jobID', :class => Hadoop::API::Jobtracker::ThriftJobID}, # What kind of task is this? TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => Hadoop::API::Jobtracker::ThriftTaskType}, # Unique (to job) task id TASKID => {:type => ::Thrift::Types::I32, :name => 'taskID'}, # Flattened to a unique string ASSTRING => {:type => ::Thrift::Types::STRING, :name => 'asString'} }
Instance Method Summary collapse
Instance Method Details
#struct_fields ⇒ Object
242 |
# File 'lib/thrift/jobtracker_types.rb', line 242 def struct_fields; FIELDS; end |
#validate ⇒ Object
244 245 246 247 248 |
# File 'lib/thrift/jobtracker_types.rb', line 244 def validate unless @taskType.nil? || Hadoop::API::Jobtracker::ThriftTaskType::VALID_VALUES.include?(@taskType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field taskType!') end end |