Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Incorporating patch from pcting to support Hadoop version 0.20. Fixes…
Browse files Browse the repository at this point in the history
… issue 381.
  • Loading branch information
Mitch.Garnaat authored and Mitch.Garnaat committed Jun 4, 2010
1 parent e047545 commit d28b6fa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions boto/emr/connection.py
Expand Up @@ -142,6 +142,7 @@ def run_jobflow(self, name, log_uri, ec2_keyname=None, availability_zone=None,
slave_instance_type='m1.small', num_instances=1,
action_on_failure='TERMINATE_JOB_FLOW', keep_alive=False,
enable_debugging=False,
hadoop_version='0.18',
steps=[]):
"""
Runs a job flow
Expand Down Expand Up @@ -181,7 +182,7 @@ def run_jobflow(self, name, log_uri, ec2_keyname=None, availability_zone=None,
# Instance args
instance_params = self._build_instance_args(ec2_keyname, availability_zone,
master_instance_type, slave_instance_type,
num_instances, keep_alive)
num_instances, keep_alive, hadoop_version)
params.update(instance_params)

# Debugging step from EMR API docs
Expand Down Expand Up @@ -228,12 +229,13 @@ def _build_step_list(self, steps):
return params

def _build_instance_args(self, ec2_keyname, availability_zone, master_instance_type,
slave_instance_type, num_instances, keep_alive):
slave_instance_type, num_instances, keep_alive, hadoop_version):
params = {
'Instances.MasterInstanceType' : master_instance_type,
'Instances.SlaveInstanceType' : slave_instance_type,
'Instances.InstanceCount' : num_instances,
'Instances.KeepJobFlowAliveWhenNoSteps' : str(keep_alive).lower()
'Instances.KeepJobFlowAliveWhenNoSteps' : str(keep_alive).lower(),
'Instances.HadoopVersion' : hadoop_version
}

if ec2_keyname:
Expand Down

0 comments on commit d28b6fa

Please sign in to comment.