فهرست منبع

HADOOP-5839. Fix EC2 scripts to allow remote job submission. Contributed by Joydeep Sen Sarma.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@777129 13f79535-47bb-0310-9956-ffa450edef68
Thomas White 16 سال پیش
والد
کامیت
75cac347bb
3فایلهای تغییر یافته به همراه15 افزوده شده و 2 حذف شده
  1. 3 0
      CHANGES.txt
  2. 9 1
      src/contrib/ec2/bin/hadoop-ec2-init-remote.sh
  3. 3 1
      src/contrib/ec2/bin/launch-hadoop-slaves

+ 3 - 0
CHANGES.txt

@@ -377,6 +377,9 @@ Trunk (unreleased changes)
     HADOOP-5572. Improves the progress reporting for the sort phase for both
     maps and reduces. (Ravi Gummadi via ddas)
 
+    HADOOP-5839. Fix EC2 scripts to allow remote job submission.
+    (Joydeep Sen Sarma via tomwhite)
+
   OPTIMIZATIONS
 
     HADOOP-5595. NameNode does not need to run a replicator to choose a

+ 9 - 1
src/contrib/ec2/bin/hadoop-ec2-init-remote.sh

@@ -17,7 +17,9 @@ MASTER_HOST=%MASTER_HOST% # Interpolated before being sent to EC2 node
 SECURITY_GROUPS=`wget -q -O - http://169.254.169.254/latest/meta-data/security-groups`
 IS_MASTER=`echo $SECURITY_GROUPS | awk '{ a = match ($0, "-master$"); if (a) print "true"; else print "false"; }'`
 if [ "$IS_MASTER" == "true" ]; then
- MASTER_HOST=`wget -q -O - http://169.254.169.254/latest/meta-data/local-hostname`
+ # use public hostnames for master. private hostnames can be used by substituting:
+ # MASTER_HOST=`wget -q -O - http://169.254.169.254/latest/meta-data/local-hostname`
+ MASTER_HOST=`wget -q -O - 'http://169.254.169.254/latest/meta-data/public-hostname'`
 fi
 
 HADOOP_HOME=`ls -d /usr/local/hadoop-*`
@@ -78,6 +80,12 @@ cat > $HADOOP_HOME/conf/hadoop-site.xml <<EOF
   <value>3</value>
 </property>
 
+<property>
+  <name>hadoop.rpc.socket.factory.class.default</name>
+  <value>org.apache.hadoop.net.StandardSocketFactory</value>
+  <final>true</final>
+</property>
+
 </configuration>
 EOF
 

+ 3 - 1
src/contrib/ec2/bin/launch-hadoop-slaves

@@ -42,7 +42,9 @@ fi
 
 # Finding Hadoop image
 AMI_IMAGE=`ec2-describe-images -a | grep $S3_BUCKET | grep $HADOOP_VERSION | grep $ARCH |grep available | awk '{print $2}'`
-MASTER_HOST=`cat $MASTER_PRIVATE_IP_PATH`
+# to use private master hostname, substitute below with:
+# MASTER_HOST=`cat $MASTER_PRIVATE_IP_PATH`
+MASTER_HOST=`cat $MASTER_IP_PATH`
 MASTER_ZONE=`cat $MASTER_ZONE_PATH`
 
 # Substituting master hostname