Class: AWS::EMR

Inherits:
Object
  • Object
show all
Includes:
Core::ServiceInterface
Defined in:
lib/aws/emr.rb,
lib/aws/emr/client.rb,
lib/aws/emr/errors.rb,
lib/aws/emr/request.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.

# 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

#initialize, #inspect

Instance Attribute Details

#clientClient (readonly)

Returns the low-level EMR client object.

Returns:

  • (Client)

    the low-level EMR client object



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

class EMR

  AWS.register_autoloads(self) do
    autoload :Client, 'client'
    autoload :Errors, 'errors'
    autoload :InstanceGroup, 'instance_group'
    autoload :InstanceGroupCollection, 'instance_group_collection'
    autoload :JobFlow, 'job_flow'
    autoload :JobFlowCollection, 'job_flow_collection'
    autoload :Request, 'request'
  end

  include Core::ServiceInterface

  # @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:



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

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