Browse Source

Merge -r 558545:558546 from trunk to 0.13 branch. Fixes: HADOOP-1638.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/branches/branch-0.13@558548 13f79535-47bb-0310-9956-ffa450edef68
Thomas White 18 years ago
parent
commit
4808ee47cc
2 changed files with 9 additions and 1 deletions
  1. 3 0
      CHANGES.txt
  2. 6 1
      src/contrib/ec2/bin/start-hadoop

+ 3 - 0
CHANGES.txt

@@ -13,6 +13,9 @@ Branch 0.13 (unreleased changes)
  3. HADOOP-1635.  Remove hardcoded keypair name and fix launch-hadoop-cluster
     to support later versions of ec2-api-tools.  (Stu Hood via tomwhite)
 
+ 4. HADOOP-1638.  Fix contrib EC2 scripts to support NAT addressing.
+    (Stu Hood via tomwhite) 
+
 
 Release 0.13.0 - 2007-06-08
 

+ 6 - 1
src/contrib/ec2/bin/start-hadoop

@@ -12,8 +12,13 @@ if ! ssh $SSH_OPTS "root@$MASTER_HOST" echo "hello" ; then
   exit 1
 fi
 
+# Datanodes that are started separately from the rest of the cluster will
+# still use the $MASTER_HOST address to access the master
+echo "Adjusting master hadoop-site.xml to minimize DNS lookups"
+ssh $SSH_OPTS "root@$MASTER_HOST" "sed -i -e \"s/$MASTER_HOST/\$(hostname)/g\" /usr/local/hadoop-$HADOOP_VERSION/conf/hadoop-site.xml"
+
 echo "Creating slaves file and copying to master"
-ec2-describe-instances | grep INSTANCE | grep running | awk '{if ($7 != 0) print $4}' > slaves
+ec2-describe-instances | grep INSTANCE | grep running | awk '{if ($7 != 0 && $8 != 0) print $4}' > slaves
 scp $SSH_OPTS slaves "root@$MASTER_HOST:/usr/local/hadoop-$HADOOP_VERSION/conf/slaves"
 
 echo "Copying private key to master"