Class: Hodor::Oozie::HadoopJob
- Defined in:
- lib/hodor/api/oozie/hadoop_job.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#parent_id ⇒ Object
readonly
Returns the value of attribute parent_id.
-
#rest_call ⇒ Object
readonly
Returns the value of attribute rest_call.
Attributes inherited from Job
#columns, #conf, #index, #skip_to
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(parent_id, job_id) ⇒ HadoopJob
constructor
A new instance of HadoopJob.
- #log ⇒ Object
Methods inherited from Job
#child_columns, #children, #children_title, #conf_map, #definition, #display_as_array, #display_as_time, #display_children, #display_properties, #expand, #indexed_job_id, #oozie, #parse_time, #sanitize, #session, #set_index, #title
Constructor Details
#initialize(parent_id, job_id) ⇒ HadoopJob
Returns a new instance of HadoopJob.
13 14 15 16 17 18 |
# File 'lib/hodor/api/oozie/hadoop_job.rb', line 13 def initialize(parent_id, job_id) super() @id = job_id @parent_id = parent_id session.verbose = true # force verbosity for hadoop jobs end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/hodor/api/oozie/hadoop_job.rb', line 5 def id @id end |
#parent_id ⇒ Object (readonly)
Returns the value of attribute parent_id.
5 6 7 |
# File 'lib/hodor/api/oozie/hadoop_job.rb', line 5 def parent_id @parent_id end |
#rest_call ⇒ Object (readonly)
Returns the value of attribute rest_call.
5 6 7 |
# File 'lib/hodor/api/oozie/hadoop_job.rb', line 5 def rest_call @rest_call end |
Class Method Details
.default_columns ⇒ Object
8 9 10 |
# File 'lib/hodor/api/oozie/hadoop_job.rb', line 8 def default_columns [:index, :id] end |
Instance Method Details
#log ⇒ Object
20 21 22 23 24 25 |
# File 'lib/hodor/api/oozie/hadoop_job.rb', line 20 def log hadoop_id = @id.sub('job_','') trash = hadoop_id.index(/[^0-9_]/) hadoop_id = hadoop_id[0..trash-1] if trash session.env.ssh "mapred job -logs job_#{hadoop_id} attempt_#{hadoop_id}_m_000000_0" end |