hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yhema...@apache.org
Subject svn commit: r750780 - in /hadoop/core/trunk: CHANGES.txt bin/hadoop bin/hadoop-daemon.sh bin/start-balancer.sh bin/start-dfs.sh bin/start-mapred.sh bin/stop-balancer.sh bin/stop-dfs.sh bin/stop-mapred.sh
Date Fri, 06 Mar 2009 06:32:15 GMT
Author: yhemanth
Date: Fri Mar  6 06:32:15 2009
New Revision: 750780

URL: http://svn.apache.org/viewvc?rev=750780&view=rev
Log:
HADOOP-5341. Make hadoop-daemon scripts backwards compatible with the changes in HADOOP-4868.
Contributed by Sharad Agarwal.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/bin/hadoop
    hadoop/core/trunk/bin/hadoop-daemon.sh
    hadoop/core/trunk/bin/start-balancer.sh
    hadoop/core/trunk/bin/start-dfs.sh
    hadoop/core/trunk/bin/start-mapred.sh
    hadoop/core/trunk/bin/stop-balancer.sh
    hadoop/core/trunk/bin/stop-dfs.sh
    hadoop/core/trunk/bin/stop-mapred.sh

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=750780&r1=750779&r2=750780&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri Mar  6 06:32:15 2009
@@ -274,6 +274,9 @@
 
     HADOOP-5347. Create a job output directory for the bbp examples.  (szetszwo)
 
+    HADOOP-5341. Make hadoop-daemon scripts backwards compatible with the
+    changes in HADOOP-4868. (Sharad Agarwal via yhemanth)
+
 Release 0.20.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/bin/hadoop
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/bin/hadoop?rev=750780&r1=750779&r2=750780&view=diff
==============================================================================
--- hadoop/core/trunk/bin/hadoop (original)
+++ hadoop/core/trunk/bin/hadoop Fri Mar  6 06:32:15 2009
@@ -51,7 +51,7 @@
     echo ""
     #try to locate hdfs and if present, delegate to it.  
     if [ -f "${HADOOP_HDFS_HOME}"/bin/hdfs ]; then
-      "${HADOOP_HDFS_HOME}"/bin/hdfs $*  
+      exec "${HADOOP_HDFS_HOME}"/bin/hdfs $*  
     else
       echo "HDFS not found."
       exit
@@ -65,7 +65,7 @@
     echo ""
     #try to locate mapred and if present, delegate to it.
     if [ -f "${HADOOP_MAPRED_HOME}"/bin/mapred ]; then
-      "${HADOOP_MAPRED_HOME}"/bin/mapred $*  
+      exec "${HADOOP_MAPRED_HOME}"/bin/mapred $*  
     else
       echo "MAPRED not found."
       exit

Modified: hadoop/core/trunk/bin/hadoop-daemon.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/bin/hadoop-daemon.sh?rev=750780&r1=750779&r2=750780&view=diff
==============================================================================
--- hadoop/core/trunk/bin/hadoop-daemon.sh (original)
+++ hadoop/core/trunk/bin/hadoop-daemon.sh Fri Mar  6 06:32:15 2009
@@ -28,7 +28,7 @@
 #   HADOOP_NICENESS The scheduling priority for daemons. Defaults to 0.
 ##
 
-usage="Usage: hadoop-daemon.sh [--config <conf-dir>] [--hosts hostlistfile] <hadoop-script>
(start|stop) <hadoop-command> <args...>"
+usage="Usage: hadoop-daemon.sh [--config <conf-dir>] [--hosts hostlistfile] [--script
script] (start|stop) <hadoop-command> <args...>"
 
 # if no args specified, show usage
 if [ $# -le 1 ]; then
@@ -42,8 +42,15 @@
 . "$bin"/hadoop-config.sh
 
 # get arguments
-hadoopScript=$1
-shift
+
+#default value
+hadoopScript="$HADOOP_HOME"/bin/hadoop
+if [ "--script" = "$1" ]
+  then
+    shift
+    hadoopScript=$1
+    shift
+fi
 startStop=$1
 shift
 command=$1

Modified: hadoop/core/trunk/bin/start-balancer.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/bin/start-balancer.sh?rev=750780&r1=750779&r2=750780&view=diff
==============================================================================
--- hadoop/core/trunk/bin/start-balancer.sh (original)
+++ hadoop/core/trunk/bin/start-balancer.sh Fri Mar  6 06:32:15 2009
@@ -22,4 +22,4 @@
 
 # Start balancer daemon.
 
-"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR "$bin"/hdfs start balancer
$@
+"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs start
balancer $@

Modified: hadoop/core/trunk/bin/start-dfs.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/bin/start-dfs.sh?rev=750780&r1=750779&r2=750780&view=diff
==============================================================================
--- hadoop/core/trunk/bin/start-dfs.sh (original)
+++ hadoop/core/trunk/bin/start-dfs.sh Fri Mar  6 06:32:15 2009
@@ -47,6 +47,6 @@
 # start dfs daemons
 # start namenode after datanodes, to minimize time namenode is up w/o data
 # note: datanodes will log connection errors until namenode starts
-"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR "$bin"/hdfs start namenode
$nameStartOpt
-"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR "$bin"/hdfs start datanode
$dataStartOpt
-"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --hosts masters "$bin"/hdfs
start secondarynamenode
+"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs start
namenode $nameStartOpt
+"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs
start datanode $dataStartOpt
+"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --hosts masters --script
"$bin"/hdfs start secondarynamenode

Modified: hadoop/core/trunk/bin/start-mapred.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/bin/start-mapred.sh?rev=750780&r1=750779&r2=750780&view=diff
==============================================================================
--- hadoop/core/trunk/bin/start-mapred.sh (original)
+++ hadoop/core/trunk/bin/start-mapred.sh Fri Mar  6 06:32:15 2009
@@ -25,5 +25,5 @@
 
 # start mapred daemons
 # start jobtracker first to minimize connection errors at startup
-"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR "$bin"/mapred start jobtracker
-"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR "$bin"/mapred start tasktracker
\ No newline at end of file
+"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR --script "$bin"/mapred
start jobtracker
+"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script "$bin"/mapred
start tasktracker
\ No newline at end of file

Modified: hadoop/core/trunk/bin/stop-balancer.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/bin/stop-balancer.sh?rev=750780&r1=750779&r2=750780&view=diff
==============================================================================
--- hadoop/core/trunk/bin/stop-balancer.sh (original)
+++ hadoop/core/trunk/bin/stop-balancer.sh Fri Mar  6 06:32:15 2009
@@ -23,4 +23,4 @@
 # Stop balancer daemon.
 # Run this on the machine where the balancer is running
 
-"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR "$bin"/hdfs stop balancer
+"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs stop
balancer

Modified: hadoop/core/trunk/bin/stop-dfs.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/bin/stop-dfs.sh?rev=750780&r1=750779&r2=750780&view=diff
==============================================================================
--- hadoop/core/trunk/bin/stop-dfs.sh (original)
+++ hadoop/core/trunk/bin/stop-dfs.sh Fri Mar  6 06:32:15 2009
@@ -23,6 +23,6 @@
 
 . "$bin"/hdfs-config.sh
 
-"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR "$bin"/hdfs stop namenode
-"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR "$bin"/hdfs stop datanode
-"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --hosts masters "$bin"/hdfs
stop secondarynamenode
\ No newline at end of file
+"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs stop
namenode
+"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs
stop datanode
+"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --hosts masters --script
"$bin"/hdfs stop secondarynamenode
\ No newline at end of file

Modified: hadoop/core/trunk/bin/stop-mapred.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/bin/stop-mapred.sh?rev=750780&r1=750779&r2=750780&view=diff
==============================================================================
--- hadoop/core/trunk/bin/stop-mapred.sh (original)
+++ hadoop/core/trunk/bin/stop-mapred.sh Fri Mar  6 06:32:15 2009
@@ -23,5 +23,5 @@
 
 . $bin/mapred-config.sh
 
-"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR "$bin"/mapred stop jobtracker
-"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR "$bin"/mapred stop tasktracker
\ No newline at end of file
+"$HADOOP_CORE_HOME"/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR --script "$bin"/mapred
stop jobtracker
+"$HADOOP_CORE_HOME"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script "$bin"/mapred
stop tasktracker
\ No newline at end of file



Mime
View raw message