elasticity 4.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MmZlODg3MzM2NmYzOGQyZjdiYjcyZjZkNTA2MThmMWZlZTQzYmM5Mw==
4
+ ODg5Y2I0ODUyNGUyYmViNDA4Y2NiM2ZiYmMzNGI5OTM4YzFhNGFlZQ==
5
5
  data.tar.gz: !binary |-
6
- ODA1ZWJiMDM5YzQ5YTBjY2Y3MzY0NGFmY2Y5MTA3MWFjNjAxNTUzNA==
6
+ MzE3ZTQ1Y2M0ZWM5NzE3NjEyNzE3NDNkNGNkZjQ4ZTUwOGRiYmI0Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGRjMjY3Y2M3MWQxNTRjNmJiNDM1NGI3YTAyNDc5NTUxYmY2MjNkYzk0YmJj
10
- ZjcxMDExYWNlMzY1M2MxODVkMWUyMmM5NmFhYzJjZTdlNmU5YmJmYzU4MWFj
11
- YWIzM2ZkN2U3ZTZhMmZmYjc1NWYyODYzZjY1OTgyYjAxZTM4M2E=
9
+ YjgxOGQ4ZGU4ZTQ5ODlmMTk3NGI4MTFiMjEyNDUzMWQ1NWE5N2I5OTFhMjZj
10
+ NWE3M2I3MmM4NzhhNzNjNzRkNGQyMzgzYjczMjkyZDBkNDNhMzljNTQzYmIx
11
+ YWRiNzQyYjBkNjZhN2JlOWZmMDI1MzU2ZjIyNDg5ZDk0NGM0NGY=
12
12
  data.tar.gz: !binary |-
13
- OWNjMjg3ZTI5NzJhNWVhZmQ2NDg0ZDViZmRhMDEwYWQ1ZTI4YWJjNTEwODE1
14
- YmFjNzRlYWFjZTM4YjNhOTE2ZjhjNjQxOTE3MDI3ZDUyMTFjNGJkOTUwOGY5
15
- NzlkZTQ4NjE1Nzk5MzE5M2VmOWMyMGEyM2RhYjM0ZGY4M2FmYWU=
13
+ YjNlZTMwYTA2ZTBkYmIxMDBhYmFhNDQ1OTNlOTJjOTM0Y2M1ZmE0MmFkZjM2
14
+ ZDhjYmEwZjkyNDA0MWZlM2YxZjE1NmNjMmU0Mjc3ZjNkNjNlOTZhYWZiZTQ4
15
+ NDY3NmYzZDZjNGI1OWJiMWU5Nzc1NWU5ZGI5ZWQxNzY2NTY4NzQ=
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 4.0.1 - September 4, 2014
2
+
3
+ - Now tracking the Master Instance ID and Created At timestamp for job flows and steps, via @AuraBorea (Thanks!) [#73](https://github.com/rslifka/elasticity/issues/73).
4
+
1
5
  ## 4.0 - May 21, 2014
2
6
 
3
7
  - Fix for issue [#69](https://github.com/rslifka/elasticity/issues/69). The AWS region was previously being derived from the placement. With the advent of VPC/subnet IDs being set, placement is not always relevant (as the VPC subnet ID implicitly defines a placement). Since region cannot be derived it is now available directly on `JobFlow`.
@@ -13,6 +13,7 @@ module Elasticity
13
13
  attr_accessor :duration
14
14
  attr_accessor :instance_count
15
15
  attr_accessor :master_instance_type
16
+ attr_accessor :master_instance_id
16
17
  attr_accessor :slave_instance_type
17
18
  attr_accessor :last_state_change_reason
18
19
  attr_accessor :installed_steps
@@ -58,6 +59,8 @@ module Elasticity
58
59
 
59
60
  jobflow_status.instance_count = xml_element.xpath('./Instances/InstanceCount').text.strip
60
61
  jobflow_status.master_instance_type = xml_element.xpath('./Instances/MasterInstanceType').text.strip
62
+ master_instance_id = xml_element.xpath('./Instances/MasterInstanceId').text.strip
63
+ jobflow_status.master_instance_id = (master_instance_id == '') ? (nil) : (master_instance_id)
61
64
  jobflow_status.slave_instance_type = xml_element.xpath('./Instances/SlaveInstanceType').text.strip
62
65
 
63
66
  master_public_dns_name = xml_element.xpath('./Instances/MasterPublicDnsName').text.strip
@@ -4,6 +4,7 @@ module Elasticity
4
4
 
5
5
  attr_accessor :name
6
6
  attr_accessor :state
7
+ attr_accessor :created_at
7
8
  attr_accessor :started_at
8
9
  attr_accessor :ended_at
9
10
 
@@ -13,10 +14,12 @@ module Elasticity
13
14
  job_flow_step = JobFlowStatusStep.new
14
15
  job_flow_step.name = xml_element.xpath('./StepConfig/Name').text.strip
15
16
  job_flow_step.state = xml_element.xpath('./ExecutionStatusDetail/State').text.strip
17
+ created_at = xml_element.xpath('./ExecutionStatusDetail/CreationDateTime').text.strip
18
+ job_flow_step.created_at = (created_at == '') ? (nil) : (Time.parse(created_at))
16
19
  started_at = xml_element.xpath('./ExecutionStatusDetail/StartDateTime').text.strip
17
20
  job_flow_step.started_at = (started_at == '') ? (nil) : (Time.parse(started_at))
18
21
  ended_at = xml_element.xpath('./ExecutionStatusDetail/EndDateTime').text.strip
19
- job_flow_step.ended_at = (ended_at == "") ? (nil) : (Time.parse(ended_at))
22
+ job_flow_step.ended_at = (ended_at == '') ? (nil) : (Time.parse(ended_at))
20
23
  job_flow_step
21
24
  end
22
25
 
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = '4.0'
2
+ VERSION = '4.0.1'
3
3
  end
@@ -88,6 +88,9 @@ describe Elasticity::JobFlowStatus do
88
88
  <SlaveInstanceType>
89
89
  m1.small
90
90
  </SlaveInstanceType>
91
+ <MasterInstanceId>
92
+ i-15a4417c
93
+ </MasterInstanceId>
91
94
  <MasterInstanceType>
92
95
  m1.small
93
96
  </MasterInstanceType>
@@ -164,6 +167,7 @@ describe Elasticity::JobFlowStatus do
164
167
  single_jobflow_status.ready_at.should == Time.parse('2011-10-04T21:49:18Z')
165
168
  single_jobflow_status.ended_at.should == Time.parse('2011-10-05T21:49:18Z')
166
169
  single_jobflow_status.duration.should == 1440
170
+ single_jobflow_status.master_instance_id.should == 'i-15a4417c'
167
171
  single_jobflow_status.master_instance_type.should == 'm1.small'
168
172
  single_jobflow_status.slave_instance_type.should == 'm1.small'
169
173
  single_jobflow_status.instance_count.should == '4'
@@ -191,6 +195,7 @@ describe Elasticity::JobFlowStatus do
191
195
  multiple_jobflow_statuses.map(&:ready_at).should == [Time.parse('2011-10-04T21:49:18Z'), nil]
192
196
  multiple_jobflow_statuses.map(&:ended_at).should == [Time.parse('2011-10-05T21:49:18Z'), nil]
193
197
  multiple_jobflow_statuses.map(&:duration).should == [1440, nil]
198
+ multiple_jobflow_statuses.map(&:master_instance_id).should == ['i-15a4417c', nil]
194
199
  multiple_jobflow_statuses.map(&:master_instance_type).should == %w(m1.small c1.medium)
195
200
  multiple_jobflow_statuses.map(&:slave_instance_type).should == %w(m1.small c1.medium)
196
201
  multiple_jobflow_statuses.map(&:instance_count).should == %w(4 2)
@@ -18,6 +18,9 @@ describe Elasticity::JobFlowStatusStep do
18
18
  </StepConfig>
19
19
  <ExecutionStatusDetail>
20
20
  <State>FAILED</State>
21
+ <CreationDateTime>
22
+ 2011-10-04T21:46:16Z
23
+ </CreationDateTime>
21
24
  <StartDateTime>
22
25
  2011-10-04T21:49:16Z
23
26
  </StartDateTime>
@@ -32,6 +35,8 @@ describe Elasticity::JobFlowStatusStep do
32
35
  </StepConfig>
33
36
  <ExecutionStatusDetail>
34
37
  <State>PENDING</State>
38
+ <CreationDateTime>
39
+ </CreationDateTime>
35
40
  <StartDateTime>
36
41
  </StartDateTime>
37
42
  <EndDateTime>
@@ -54,6 +59,7 @@ describe Elasticity::JobFlowStatusStep do
54
59
  jobflow_step = Elasticity::JobFlowStatusStep.from_member_element(@members_nodeset[0])
55
60
  jobflow_step.name.should == "Setup Hive"
56
61
  jobflow_step.state.should == "FAILED"
62
+ jobflow_step.created_at.should == Time.parse("2011-10-04T21:46:16Z")
57
63
  jobflow_step.started_at.should == Time.parse("2011-10-04T21:49:16Z")
58
64
  jobflow_step.ended_at.should == Time.parse("2011-10-04T21:51:16Z")
59
65
  end
@@ -64,6 +70,7 @@ describe Elasticity::JobFlowStatusStep do
64
70
  jobflow_steps = Elasticity::JobFlowStatusStep.from_members_nodeset(@members_nodeset)
65
71
  jobflow_steps.map(&:name).should == ["Setup Hive", "Run Hive Script"]
66
72
  jobflow_steps.map(&:state).should == ["FAILED", "PENDING"]
73
+ jobflow_steps.map(&:created_at).should == [Time.parse("2011-10-04T21:46:16Z"), nil]
67
74
  jobflow_steps.map(&:started_at).should == [Time.parse("2011-10-04T21:49:16Z"), nil]
68
75
  jobflow_steps.map(&:ended_at).should == [Time.parse("2011-10-04T21:51:16Z"), nil]
69
76
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticity
3
3
  version: !ruby/object:Gem::Version
4
- version: '4.0'
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Slifka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-21 00:00:00.000000000 Z
11
+ date: 2014-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client