Class: Hodor::Oozie::Action
Instance Attribute Summary collapse
-
#console_url ⇒ Object
readonly
Returns the value of attribute console_url.
-
#cred ⇒ Object
readonly
Returns the value of attribute cred.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#end_time ⇒ Object
readonly
Returns the value of attribute end_time.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#external_child_ids ⇒ Object
readonly
Returns the value of attribute external_child_ids.
-
#external_id ⇒ Object
readonly
Returns the value of attribute external_id.
-
#external_status ⇒ Object
readonly
Returns the value of attribute external_status.
-
#json ⇒ Object
readonly
Returns the value of attribute json.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent_id ⇒ Object
readonly
Returns the value of attribute parent_id.
-
#retries ⇒ Object
readonly
Returns the value of attribute retries.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#to_string ⇒ Object
readonly
Returns the value of attribute to_string.
-
#tracker_url ⇒ Object
readonly
Returns the value of attribute tracker_url.
-
#transition ⇒ Object
readonly
Returns the value of attribute transition.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Job
#columns, #conf, #id, #index, #rest_call, #skip_to
Class Method Summary collapse
Instance Method Summary collapse
- #expand ⇒ Object
-
#initialize(json) ⇒ Action
constructor
A new instance of Action.
Methods inherited from Job
#child_columns, #children, #children_title, #conf_map, #definition, #display_as_array, #display_as_time, #display_children, #display_properties, #indexed_job_id, #log, #oozie, #parse_time, #sanitize, #session, #set_index, #title
Constructor Details
#initialize(json) ⇒ Action
Returns a new instance of Action.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/hodor/api/oozie/action.rb', line 15 def initialize(json) super() @json = json = json["errorMessage"] @status = json["status"] @stats = json["stats"] @data = json["data"] @transition = json["transition"] @external_status = json["externalStatus"] @cred = json["cred"] @conf = json["conf"] @type = json["type"] @end_time = parse_time json["endTime"] @external_id = json["externalId"] @id = json["id"] @start_time = parse_time json["startTime"] @external_child_ids = json["externalChildIDs"] @name = json["name"] @error_code = json["errorCode"] @tracker_url = json["trackerUri"] @retries = json["retries"] @to_string = json["toString"] @console_url = json["consoleUrl"] @parent_id = @id[0..@id.index('@')-1] end |
Instance Attribute Details
#console_url ⇒ Object (readonly)
Returns the value of attribute console_url.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def console_url @console_url end |
#cred ⇒ Object (readonly)
Returns the value of attribute cred.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def cred @cred end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def data @data end |
#end_time ⇒ Object (readonly)
Returns the value of attribute end_time.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def end_time @end_time end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def error_code @error_code end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def end |
#external_child_ids ⇒ Object (readonly)
Returns the value of attribute external_child_ids.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def external_child_ids @external_child_ids end |
#external_id ⇒ Object (readonly)
Returns the value of attribute external_id.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def external_id @external_id end |
#external_status ⇒ Object (readonly)
Returns the value of attribute external_status.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def external_status @external_status end |
#json ⇒ Object (readonly)
Returns the value of attribute json.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def json @json end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def name @name end |
#parent_id ⇒ Object (readonly)
Returns the value of attribute parent_id.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def parent_id @parent_id end |
#retries ⇒ Object (readonly)
Returns the value of attribute retries.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def retries @retries end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def start_time @start_time end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def status @status end |
#to_string ⇒ Object (readonly)
Returns the value of attribute to_string.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def to_string @to_string end |
#tracker_url ⇒ Object (readonly)
Returns the value of attribute tracker_url.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def tracker_url @tracker_url end |
#transition ⇒ Object (readonly)
Returns the value of attribute transition.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def transition @transition end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/hodor/api/oozie/action.rb', line 5 def type @type end |
Class Method Details
.default_columns ⇒ Object
10 11 12 |
# File 'lib/hodor/api/oozie/action.rb', line 10 def default_columns [:index, :id, :name, :status, :created_at, :nominal_time] end |
Instance Method Details
#expand ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/hodor/api/oozie/action.rb', line 42 def if @external_id && !@external_id.eql?('-') [ oozie.job_by_id(@external_id) ] else nil end end |