Selaa lähdekoodia

Merge -r 558533:558534 from trunk to 0.13 branch. Fixes: HADOOP-1635.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/branches/branch-0.13@558536 13f79535-47bb-0310-9956-ffa450edef68
Thomas White 18 vuotta sitten
vanhempi
commit
c3c4cc7abb

+ 3 - 0
CHANGES.txt

@@ -10,6 +10,9 @@ Branch 0.13 (unreleased changes)
     default replication is sometimes reset to one on restart.
     (Raghu Angadi via cutting)
 
+ 3. HADOOP-1635.  Remove hardcoded keypair name and fix launch-hadoop-cluster
+    to support later versions of ec2-api-tools.  (Stu Hood via tomwhite)
+
 
 Release 0.13.0 - 2007-06-08
 

+ 1 - 1
src/contrib/ec2/bin/create-hadoop-image

@@ -11,7 +11,7 @@ bin=`cd "$bin"; pwd`
 AMI_IMAGE=`ec2-describe-images -a | grep fedora-core4-base | awk '{print $2}'`
 
 echo "Starting a fedora core base AMI with ID $AMI_IMAGE."
-OUTPUT=`ec2-run-instances $AMI_IMAGE -k gsg-keypair`
+OUTPUT=`ec2-run-instances $AMI_IMAGE -k $KEY_NAME`
 BOOTING_INSTANCE=`echo $OUTPUT | awk '{print $6}'`
 
 echo "Instance is $BOOTING_INSTANCE."

+ 2 - 2
src/contrib/ec2/bin/launch-hadoop-cluster

@@ -21,7 +21,7 @@ AMI_IMAGE=`ec2-describe-images -a | grep $S3_BUCKET | grep $HADOOP_VERSION | gre
 
 # Start a cluster
 echo "Starting cluster with AMI $AMI_IMAGE"
-RUN_INSTANCES_OUTPUT=`ec2-run-instances $AMI_IMAGE -n $NO_INSTANCES -g $GROUP -k gsg-keypair -d "$NO_INSTANCES,$MASTER_HOST" | grep INSTANCE | awk '{print $2}'`
+RUN_INSTANCES_OUTPUT=`ec2-run-instances $AMI_IMAGE -n $NO_INSTANCES -g $GROUP -k $KEY_NAME -d "$NO_INSTANCES,$MASTER_HOST" | grep INSTANCE | awk '{print $2}'`
 for instance in $RUN_INSTANCES_OUTPUT; do
   echo "Waiting for instance $instance to start"
   while true; do
@@ -36,6 +36,6 @@ for instance in $RUN_INSTANCES_OUTPUT; do
 done
 
 echo "Appointing master"
-MASTER_EC2_HOST=`ec2-describe-instances | grep INSTANCE | grep running | awk '{if ($7 == 0) print $4}'`
+MASTER_EC2_HOST=`ec2-describe-instances | grep INSTANCE | grep running | awk '{if ($8 == 0 || $7 == 0) print $4}'`
 MASTER_IP=`dig +short $MASTER_EC2_HOST`
 echo "Master is $MASTER_EC2_HOST. Please set up DNS so $MASTER_HOST points to $MASTER_IP."