Skip to content

Commit

Permalink
WHIRR-107. Test failing due to not matching Amazon Linux AMI on EC2.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/incubator/whirr/trunk@1004330 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
tomwhite committed Oct 4, 2010
1 parent 67f0195 commit 8af7366
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ Trunk (unreleased changes)

WHIRR-101. Hadoop on EC2 does not use the /mnt partition. (tomwhite)

WHIRR-107. Test failing due to not matching Amazon Linux AMI on EC2.
(tomwhite)

Release 0.1.0 - 2010-09-02

INCOMPATIBLE CHANGES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.apache.whirr.service.ClusterSpec;
import org.apache.whirr.service.jclouds.TemplateBuilderStrategy;
import org.jclouds.aws.ec2.compute.domain.EC2Hardware;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.TemplateBuilder;

public class HadoopTemplateBuilderStrategy extends TemplateBuilderStrategy {
Expand All @@ -29,6 +30,10 @@ public void configureTemplateBuilder(ClusterSpec clusterSpec,
TemplateBuilder templateBuilder) {
super.configureTemplateBuilder(clusterSpec, templateBuilder);

if ("ec2".equals(clusterSpec.getProvider())
&& clusterSpec.getImageId() == null) {
templateBuilder.osFamily(OsFamily.AMZN_LINUX);
}
if ("ec2".equals(clusterSpec.getProvider())
&& clusterSpec.getHardwareId() == null) {
// micro is too small for Hadoop (even for testing)
Expand Down

0 comments on commit 8af7366

Please sign in to comment.