You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: AWS::EMR

Inherits:
Object
  • Object
show all
Includes:
Core::ServiceInterface
Defined in:
lib/aws/emr.rb,
lib/aws/emr/errors.rb,
lib/aws/emr/client.rb,
lib/aws/emr/job_flow.rb,
lib/aws/emr/instance_group.rb,
lib/aws/emr/job_flow_collection.rb,
lib/aws/emr/instance_group_collection.rb

Overview

Provides an expressive, object-oriented interface to Amazon Elastic MapReduce.

To use Amazon Elastic MapReduce you must first sign up here

For more information about Amazon Elastic MapReduce, see:

Credentials

You can setup default credentials for all AWS services via AWS.config:

AWS.config(
  :access_key_id => 'YOUR_ACCESS_KEY_ID',
  :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')

Or you can set them directly on the EMR interface:

emr = AWS::EMR.new(
  :access_key_id => 'YOUR_ACCESS_KEY_ID',
  :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')

Job Flows

The #job_flows method returns a collection you use to interact with your job flows.

emr = AWS::EMR.new

# creating a job flow
job_flow = emr.job_flows.create(...)

# enumerating job flows
emr.job_flows.each do |job_flow|
  puts job_flow.id
end

See JobFlowCollection and JobFlow for more information on working with job flows.

Defined Under Namespace

Modules: Errors Classes: Client, InstanceGroup, InstanceGroupCollection, JobFlow, JobFlowCollection

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::ServiceInterface

included, #initialize, #inspect

Instance Attribute Details

#clientClient (readonly)

Returns the low-level EMR client object

Returns:

  • (Client)

    the low-level EMR client object



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/aws/emr.rb', line 66

class EMR

  autoload :Client, 'aws/emr/client'
  autoload :Errors, 'aws/emr/errors'
  autoload :InstanceGroup, 'aws/emr/instance_group'
  autoload :InstanceGroupCollection, 'aws/emr/instance_group_collection'
  autoload :JobFlow, 'aws/emr/job_flow'
  autoload :JobFlowCollection, 'aws/emr/job_flow_collection'

  include Core::ServiceInterface

  endpoint_prefix 'elasticmapreduce'

  # @return [JobFlowCollection] Returns a collection that represents all
  #   job flows.
  def job_flows
    JobFlowCollection.new(:config => config)
  end
  alias_method :jobs, :job_flows

end

Instance Method Details

#job_flowsJobFlowCollection Also known as: jobs

Returns a collection that represents all job flows.

Returns:



81
82
83
# File 'lib/aws/emr.rb', line 81

def job_flows
  JobFlowCollection.new(:config => config)
end