Class: Hodor::Oozie::Coordinator
- Defined in:
- lib/hodor/api/oozie/coordinator.rb
Instance Attribute Summary collapse
-
#acl ⇒ Object
readonly
Returns the value of attribute acl.
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#concurrency ⇒ Object
readonly
Returns the value of attribute concurrency.
-
#conf ⇒ Object
readonly
Returns the value of attribute conf.
-
#console_url ⇒ Object
readonly
Returns the value of attribute console_url.
-
#end_time ⇒ Object
readonly
Returns the value of attribute end_time.
-
#execution_policy ⇒ Object
readonly
Returns the value of attribute execution_policy.
-
#external_id ⇒ Object
readonly
Returns the value of attribute external_id.
-
#frequency ⇒ Object
readonly
Returns the value of attribute frequency.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#json ⇒ Object
readonly
Returns the value of attribute json.
-
#last_action ⇒ Object
readonly
Returns the value of attribute last_action.
-
#mat_throttling ⇒ Object
readonly
Returns the value of attribute mat_throttling.
-
#materializations ⇒ Object
readonly
Returns the value of attribute materializations.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#next_materialized_time ⇒ Object
readonly
Returns the value of attribute next_materialized_time.
-
#parent_id ⇒ Object
readonly
Returns the value of attribute parent_id.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#time_unit ⇒ Object
readonly
Returns the value of attribute time_unit.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Attributes inherited from Job
#columns, #index, #rest_call, #skip_to
Class Method Summary collapse
Instance Method Summary collapse
- #expand ⇒ Object
-
#initialize(json) ⇒ Coordinator
constructor
A new instance of Coordinator.
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) ⇒ Coordinator
Returns a new instance of Coordinator.
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 41 42 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 15 def initialize(json) super() @json = json @name = json["coordJobName"] @path = json["coordJobPath"] @timezone = json["timeZone"] @frequency = json["frequency"] @conf = json["conf"] @end_time = parse_time(json["endTime"]) @execution_policy = json["executionPolicy"] @start_time = parse_time(json["startTime"]) @time_unit = json["timeUnit"] @concurrency = json["concurrency"] @id = json["coordJobId"] @last_action = parse_time(json["lastAction"]) @acl = json["acl"] @mat_throttling = json["mat_throttling"] @timeout = json["timeOut"] @next_materialized_time = parse_time(json["nextMaterializedTime"]) @parent_id = @bundle_id = json["bundleId"] @external_id = json["coordExternalId"] @group = json["group"] @user = json["user"] @console_url = json["consoleUrl"] @actions = json["actions"] @acl = json["acl"] @status = json["status"] end |
Instance Attribute Details
#acl ⇒ Object (readonly)
Returns the value of attribute acl.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def acl @acl end |
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def actions @actions end |
#concurrency ⇒ Object (readonly)
Returns the value of attribute concurrency.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def concurrency @concurrency end |
#conf ⇒ Object (readonly)
Returns the value of attribute conf.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def conf @conf end |
#console_url ⇒ Object (readonly)
Returns the value of attribute console_url.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def console_url @console_url end |
#end_time ⇒ Object (readonly)
Returns the value of attribute end_time.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def end_time @end_time end |
#execution_policy ⇒ Object (readonly)
Returns the value of attribute execution_policy.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def execution_policy @execution_policy end |
#external_id ⇒ Object (readonly)
Returns the value of attribute external_id.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def external_id @external_id end |
#frequency ⇒ Object (readonly)
Returns the value of attribute frequency.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def frequency @frequency end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def group @group end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def id @id end |
#json ⇒ Object (readonly)
Returns the value of attribute json.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def json @json end |
#last_action ⇒ Object (readonly)
Returns the value of attribute last_action.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def last_action @last_action end |
#mat_throttling ⇒ Object (readonly)
Returns the value of attribute mat_throttling.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def mat_throttling @mat_throttling end |
#materializations ⇒ Object (readonly)
Returns the value of attribute materializations.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def materializations @materializations end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def name @name end |
#next_materialized_time ⇒ Object (readonly)
Returns the value of attribute next_materialized_time.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def next_materialized_time @next_materialized_time end |
#parent_id ⇒ Object (readonly)
Returns the value of attribute parent_id.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def parent_id @parent_id end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def path @path end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.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/coordinator.rb', line 5 def status @status end |
#time_unit ⇒ Object (readonly)
Returns the value of attribute time_unit.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def time_unit @time_unit end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def timeout @timeout end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def timezone @timezone end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 5 def user @user end |
Class Method Details
.default_columns ⇒ Object
10 11 12 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 10 def default_columns [:index, :id, :name, :status, :start_time, :time_unit, :external_id] end |
Instance Method Details
#expand ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/hodor/api/oozie/coordinator.rb', line 44 def # Expand immediate children @materializations = json["actions"].map do |item| Materialization.new(item) end.compact.reverse @materializations end |