elasticity 1.5 → 2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/.rspec +2 -1
  2. data/.rvmrc +1 -1
  3. data/HISTORY.md +47 -24
  4. data/LICENSE +1 -1
  5. data/README.md +165 -317
  6. data/Rakefile +4 -3
  7. data/elasticity.gemspec +3 -5
  8. data/lib/elasticity.rb +10 -5
  9. data/lib/elasticity/aws_request.rb +81 -20
  10. data/lib/elasticity/custom_jar_step.rb +33 -0
  11. data/lib/elasticity/emr.rb +45 -117
  12. data/lib/elasticity/hadoop_bootstrap_action.rb +27 -0
  13. data/lib/elasticity/hive_step.rb +57 -0
  14. data/lib/elasticity/job_flow.rb +109 -39
  15. data/lib/elasticity/job_flow_status.rb +53 -0
  16. data/lib/elasticity/job_flow_status_step.rb +35 -0
  17. data/lib/elasticity/job_flow_step.rb +17 -25
  18. data/lib/elasticity/pig_step.rb +82 -0
  19. data/lib/elasticity/support/conditional_raise.rb +23 -0
  20. data/lib/elasticity/version.rb +1 -1
  21. data/spec/lib/elasticity/aws_request_spec.rb +159 -51
  22. data/spec/lib/elasticity/custom_jar_step_spec.rb +59 -0
  23. data/spec/lib/elasticity/emr_spec.rb +231 -762
  24. data/spec/lib/elasticity/hadoop_bootstrap_action_spec.rb +26 -0
  25. data/spec/lib/elasticity/hive_step_spec.rb +74 -0
  26. data/spec/lib/elasticity/job_flow_integration_spec.rb +197 -0
  27. data/spec/lib/elasticity/job_flow_spec.rb +369 -138
  28. data/spec/lib/elasticity/job_flow_status_spec.rb +147 -0
  29. data/spec/lib/elasticity/job_flow_status_step_spec.rb +73 -0
  30. data/spec/lib/elasticity/job_flow_step_spec.rb +26 -64
  31. data/spec/lib/elasticity/pig_step_spec.rb +104 -0
  32. data/spec/lib/elasticity/support/conditional_raise_spec.rb +35 -0
  33. data/spec/spec_helper.rb +1 -50
  34. data/spec/support/be_a_hash_including_matcher.rb +35 -0
  35. metadata +101 -119
  36. data/.autotest +0 -2
  37. data/lib/elasticity/custom_jar_job.rb +0 -38
  38. data/lib/elasticity/hive_job.rb +0 -69
  39. data/lib/elasticity/pig_job.rb +0 -109
  40. data/lib/elasticity/simple_job.rb +0 -51
  41. data/spec/fixtures/vcr_cassettes/add_instance_groups/one_group_successful.yml +0 -44
  42. data/spec/fixtures/vcr_cassettes/add_instance_groups/one_group_unsuccessful.yml +0 -41
  43. data/spec/fixtures/vcr_cassettes/add_jobflow_steps/add_multiple_steps.yml +0 -266
  44. data/spec/fixtures/vcr_cassettes/custom_jar_job/cloudburst.yml +0 -41
  45. data/spec/fixtures/vcr_cassettes/describe_jobflows/all_jobflows.yml +0 -75
  46. data/spec/fixtures/vcr_cassettes/direct/terminate_jobflow.yml +0 -38
  47. data/spec/fixtures/vcr_cassettes/hive_job/hive_ads.yml +0 -41
  48. data/spec/fixtures/vcr_cassettes/modify_instance_groups/set_instances_to_3.yml +0 -38
  49. data/spec/fixtures/vcr_cassettes/pig_job/apache_log_reports.yml +0 -41
  50. data/spec/fixtures/vcr_cassettes/pig_job/apache_log_reports_with_bootstrap.yml +0 -41
  51. data/spec/fixtures/vcr_cassettes/run_jobflow/word_count.yml +0 -41
  52. data/spec/fixtures/vcr_cassettes/set_termination_protection/nonexistent_job_flows.yml +0 -41
  53. data/spec/fixtures/vcr_cassettes/set_termination_protection/protect_multiple_job_flows.yml +0 -38
  54. data/spec/fixtures/vcr_cassettes/terminate_jobflows/one_jobflow.yml +0 -38
  55. data/spec/lib/elasticity/custom_jar_job_spec.rb +0 -118
  56. data/spec/lib/elasticity/hive_job_spec.rb +0 -90
  57. data/spec/lib/elasticity/pig_job_spec.rb +0 -226
@@ -1,41 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: !ruby/regexp /^https/
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- Content-Length:
20
- - "297"
21
- Date:
22
- - Fri, 09 Dec 2011 23:01:29 GMT
23
- Content-Type:
24
- - text/xml
25
- X-Amzn-Requestid:
26
- - ba9e82df-22b9-11e1-beee-7d8a92482267
27
- body:
28
- encoding: US-ASCII
29
- string: |
30
- <RunJobFlowResponse xmlns="http://elasticmapreduce.amazonaws.com/doc/2009-03-31">
31
- <RunJobFlowResult>
32
- <JobFlowId>j-1IU6NM8OUPS9I</JobFlowId>
33
- </RunJobFlowResult>
34
- <ResponseMetadata>
35
- <RequestId>ba9e82df-22b9-11e1-beee-7d8a92482267</RequestId>
36
- </ResponseMetadata>
37
- </RunJobFlowResponse>
38
-
39
- http_version: "1.1"
40
- recorded_at: Sat, 03 Mar 2012 22:59:53 GMT
41
- recorded_with: VCR 2.0.0
@@ -1,75 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: !ruby/regexp /^https/
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- Date:
20
- - Sun, 10 Apr 2011 19:56:17 GMT
21
- Content-Type:
22
- - text/xml
23
- Content-Encoding:
24
- - gzip
25
- X-Amzn-Requestid:
26
- - 994deb7a-63ac-11e0-bc41-ababd98a870b
27
- Vary:
28
- - Accept-Encoding
29
- Transfer-Encoding:
30
- - chunked
31
- body:
32
- encoding: ASCII-8BIT
33
- string: !binary |
34
- H4sIAAAAAAAAAO1bW3PaOhB+769gztM5c0bYEld7XGZIgIQQIAXnMnnJyLYC
35
- 7vGttpw2/fVHtmOwjQkQIKUpM0wSS7urlfTp0+6aSC3iqa6ukAtb6Rj2d29E
36
- PMe2PFL4YRqW9/mvKaWOyHHEwB7VVRM7LtF8lRSxiX/aFv7uFVXb5DRb5RDP
37
- C4AvgRL8q/GpUJByLPsGDbpYZ9wYPbIGk5gKceNH1t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HAClY0oY7rNV4JKCeWDwdctJrrRCjT+PQ/yLkKP9E2AAA=
72
-
73
- http_version: "1.1"
74
- recorded_at: Sat, 03 Mar 2012 22:59:59 GMT
75
- recorded_with: VCR 2.0.0
@@ -1,38 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: !ruby/regexp /^https/
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- Content-Length:
20
- - "225"
21
- Date:
22
- - Mon, 11 Apr 2011 01:37:58 GMT
23
- Content-Type:
24
- - text/xml
25
- X-Amzn-Requestid:
26
- - 54a92156-63dc-11e0-a11b-4b625b21bf04
27
- body:
28
- encoding: US-ASCII
29
- string: |
30
- <TerminateJobFlowsResponse xmlns="http://elasticmapreduce.amazonaws.com/doc/2009-03-31">
31
- <ResponseMetadata>
32
- <RequestId>54a92156-63dc-11e0-a11b-4b625b21bf04</RequestId>
33
- </ResponseMetadata>
34
- </TerminateJobFlowsResponse>
35
-
36
- http_version: "1.1"
37
- recorded_at: Sat, 03 Mar 2012 23:00:04 GMT
38
- recorded_with: VCR 2.0.0
@@ -1,41 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: !ruby/regexp /^https/
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- Content-Length:
20
- - "297"
21
- Date:
22
- - Wed, 29 Feb 2012 22:00:49 GMT
23
- Content-Type:
24
- - text/xml
25
- X-Amzn-Requestid:
26
- - d73ae5f8-6320-11e1-aa97-9959c72600a0
27
- body:
28
- encoding: US-ASCII
29
- string: |
30
- <RunJobFlowResponse xmlns="http://elasticmapreduce.amazonaws.com/doc/2009-03-31">
31
- <RunJobFlowResult>
32
- <JobFlowId>j-2I4HV6S3SDGD9</JobFlowId>
33
- </RunJobFlowResult>
34
- <ResponseMetadata>
35
- <RequestId>d73ae5f8-6320-11e1-aa97-9959c72600a0</RequestId>
36
- </ResponseMetadata>
37
- </RunJobFlowResponse>
38
-
39
- http_version: "1.1"
40
- recorded_at: Thu, 01 Mar 2012 09:47:52 GMT
41
- recorded_with: VCR 2.0.0
@@ -1,38 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: !ruby/regexp /^https/
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- Content-Length:
20
- - "231"
21
- Date:
22
- - Wed, 13 Apr 2011 07:04:43 GMT
23
- Content-Type:
24
- - text/xml
25
- X-Amzn-Requestid:
26
- - 4ef75373-659c-11e0-bdf6-e3d62a364c28
27
- body:
28
- encoding: US-ASCII
29
- string: |
30
- <ModifyInstanceGroupsResponse xmlns="http://elasticmapreduce.amazonaws.com/doc/2009-03-31">
31
- <ResponseMetadata>
32
- <RequestId>4ef75373-659c-11e0-bdf6-e3d62a364c28</RequestId>
33
- </ResponseMetadata>
34
- </ModifyInstanceGroupsResponse>
35
-
36
- http_version: "1.1"
37
- recorded_at: Sat, 03 Mar 2012 23:00:12 GMT
38
- recorded_with: VCR 2.0.0
@@ -1,41 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: !ruby/regexp /^https/
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- Content-Length:
20
- - "297"
21
- Date:
22
- - Sun, 08 May 2011 05:40:58 GMT
23
- Content-Type:
24
- - text/xml
25
- X-Amzn-Requestid:
26
- - c00d285d-7935-11e0-a51d-7bf947dae271
27
- body:
28
- encoding: US-ASCII
29
- string: |
30
- <RunJobFlowResponse xmlns="http://elasticmapreduce.amazonaws.com/doc/2009-03-31">
31
- <RunJobFlowResult>
32
- <JobFlowId>j-1HB7A3TBRT3VS</JobFlowId>
33
- </RunJobFlowResult>
34
- <ResponseMetadata>
35
- <RequestId>c00d285d-7935-11e0-a51d-7bf947dae271</RequestId>
36
- </ResponseMetadata>
37
- </RunJobFlowResponse>
38
-
39
- http_version: "1.1"
40
- recorded_at: Sat, 03 Mar 2012 23:00:18 GMT
41
- recorded_with: VCR 2.0.0
@@ -1,41 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: !ruby/regexp /^https/
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- Content-Length:
20
- - "297"
21
- Date:
22
- - Tue, 10 May 2011 07:28:12 GMT
23
- Content-Type:
24
- - text/xml
25
- X-Amzn-Requestid:
26
- - 10533247-7ad7-11e0-86ad-3b6ddfd3d4b9
27
- body:
28
- encoding: US-ASCII
29
- string: |
30
- <RunJobFlowResponse xmlns="http://elasticmapreduce.amazonaws.com/doc/2009-03-31">
31
- <RunJobFlowResult>
32
- <JobFlowId>j-1UK43AWRT3QHD</JobFlowId>
33
- </RunJobFlowResult>
34
- <ResponseMetadata>
35
- <RequestId>10533247-7ad7-11e0-86ad-3b6ddfd3d4b9</RequestId>
36
- </ResponseMetadata>
37
- </RunJobFlowResponse>
38
-
39
- http_version: "1.1"
40
- recorded_at: Sat, 03 Mar 2012 23:00:22 GMT
41
- recorded_with: VCR 2.0.0
@@ -1,41 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: !ruby/regexp /^https/
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- Content-Length:
20
- - "296"
21
- Date:
22
- - Tue, 19 Apr 2011 06:10:16 GMT
23
- Content-Type:
24
- - text/xml
25
- X-Amzn-Requestid:
26
- - b22f4aea-6a4b-11e0-9ddc-a168e244afdb
27
- body:
28
- encoding: US-ASCII
29
- string: |
30
- <RunJobFlowResponse xmlns="http://elasticmapreduce.amazonaws.com/doc/2009-03-31">
31
- <RunJobFlowResult>
32
- <JobFlowId>j-G6N5HA528AD4</JobFlowId>
33
- </RunJobFlowResult>
34
- <ResponseMetadata>
35
- <RequestId>b22f4aea-6a4b-11e0-9ddc-a168e244afdb</RequestId>
36
- </ResponseMetadata>
37
- </RunJobFlowResponse>
38
-
39
- http_version: "1.1"
40
- recorded_at: Sat, 03 Mar 2012 23:00:27 GMT
41
- recorded_with: VCR 2.0.0
@@ -1,41 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: !ruby/regexp /^https/
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- response:
15
- status:
16
- code: 400
17
- message: Bad Request
18
- headers:
19
- Content-Length:
20
- - "289"
21
- Date:
22
- - Sun, 17 Apr 2011 18:52:35 GMT
23
- Content-Type:
24
- - text/xml
25
- X-Amzn-Requestid:
26
- - dc0ce847-6923-11e0-9da4-8d278034dea6
27
- body:
28
- encoding: US-ASCII
29
- string: |
30
- <ErrorResponse xmlns="http://elasticmapreduce.amazonaws.com/doc/2009-03-31">
31
- <Error>
32
- <Type>Sender</Type>
33
- <Code>ValidationError</Code>
34
- <Message>Specified job flow ID not valid</Message>
35
- </Error>
36
- <RequestId>dc0ce847-6923-11e0-9da4-8d278034dea6</RequestId>
37
- </ErrorResponse>
38
-
39
- http_version: "1.1"
40
- recorded_at: Sat, 03 Mar 2012 23:00:34 GMT
41
- recorded_with: VCR 2.0.0
@@ -1,38 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: !ruby/regexp /^https/
6
- body:
7
- encoding: US-ASCII
8
- string: ""
9
- headers:
10
- Accept:
11
- - "*/*; q=0.5, application/xml"
12
- Accept-Encoding:
13
- - gzip, deflate
14
- response:
15
- status:
16
- code: 200
17
- message: OK
18
- headers:
19
- Content-Length:
20
- - "239"
21
- Date:
22
- - Sun, 17 Apr 2011 18:49:43 GMT
23
- Content-Type:
24
- - text/xml
25
- X-Amzn-Requestid:
26
- - 755ebe8a-6923-11e0-a9c2-c126f1bb4493
27
- body:
28
- encoding: US-ASCII
29
- string: |
30
- <SetTerminationProtectionResponse xmlns="http://elasticmapreduce.amazonaws.com/doc/2009-03-31">
31
- <ResponseMetadata>
32
- <RequestId>755ebe8a-6923-11e0-a9c2-c126f1bb4493</RequestId>
33
- </ResponseMetadata>
34
- </SetTerminationProtectionResponse>
35
-
36
- http_version: "1.1"
37
- recorded_at: Sat, 03 Mar 2012 23:00:38 GMT
38
- recorded_with: VCR 2.0.0