hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1130843 - in /hadoop/hdfs/trunk: ./ bin/
Date Thu, 02 Jun 2011 22:05:33 GMT
Author: suresh
Date: Thu Jun  2 22:05:33 2011
New Revision: 1130843

URL: http://svn.apache.org/viewvc?rev=1130843&view=rev
Log:
HDFS-2014. Change HDFS scripts to work in developer enviroment post RPM packaging changes.
Contributed by Eric Yang.


Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/bin/distribute-exclude.sh
    hadoop/hdfs/trunk/bin/hdfs
    hadoop/hdfs/trunk/bin/hdfs-config.sh
    hadoop/hdfs/trunk/bin/refresh-namenodes.sh
    hadoop/hdfs/trunk/bin/start-balancer.sh
    hadoop/hdfs/trunk/bin/start-dfs.sh
    hadoop/hdfs/trunk/bin/start-secure-dns.sh
    hadoop/hdfs/trunk/bin/stop-balancer.sh
    hadoop/hdfs/trunk/bin/stop-dfs.sh
    hadoop/hdfs/trunk/bin/stop-secure-dns.sh

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Thu Jun  2 22:05:33 2011
@@ -669,6 +669,9 @@ Trunk (unreleased changes)
 
     HDFS-2022. ant binary should build libhdfs. (Eric Yang via eli)
 
+    HDFS-2014. Change HDFS scripts to work in developer enviroment post
+    RPM packaging changes. (Eric Yang via suresh)
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hdfs/trunk/bin/distribute-exclude.sh
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/bin/distribute-exclude.sh?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/bin/distribute-exclude.sh (original)
+++ hadoop/hdfs/trunk/bin/distribute-exclude.sh Thu Jun  2 22:05:33 2011
@@ -36,7 +36,11 @@
 bin=`dirname "$0"`
 bin=`cd "$bin"; pwd`
 
-. "$bin/../libexec/hdfs-config.sh"
+if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
+  . "$bin/../libexec/hdfs-config.sh"
+else
+  . "$bin/hdfs-config.sh" 
+fi
 
 if [ "$1" = '' ] ; then
   "Error: please specify local exclude file as a first argument"

Modified: hadoop/hdfs/trunk/bin/hdfs
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/bin/hdfs?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/bin/hdfs (original)
+++ hadoop/hdfs/trunk/bin/hdfs Thu Jun  2 22:05:33 2011
@@ -19,7 +19,11 @@ bin=`which $0`
 bin=`dirname ${bin}`
 bin=`cd "$bin"; pwd`
 
-. "$bin"/../libexec/hdfs-config.sh
+if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
+  . "$bin"/../libexec/hdfs-config.sh
+else
+  . "$bin/hdfs-config.sh"
+fi
 
 function print_usage(){
   echo "Usage: hdfs [--config confdir] COMMAND"
@@ -108,17 +112,17 @@ else
 fi
 
 # for developers, add hdfs classes to CLASSPATH
-if [ -d "$HADOOP_PREFIX/build/classes" ]; then
-  CLASSPATH=${CLASSPATH}:$HADOOP_PREFIX/build/classes
+if [ -d "$HADOOP_HDFS_HOME/build/classes" ]; then
+  CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/classes
 fi
-if [ -d "$HADOOP_PREFIX/build/webapps" ]; then
-  CLASSPATH=${CLASSPATH}:$HADOOP_PREFIX/build
+if [ -d "$HADOOP_HDFS_HOME/build/webapps" ]; then
+  CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build
 fi
-if [ -d "$HADOOP_PREFIX/build/test/classes" ]; then
-  CLASSPATH=${CLASSPATH}:$HADOOP_PREFIX/build/test/classes
+if [ -d "$HADOOP_HDFS_HOME/build/test/classes" ]; then
+  CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/test/classes
 fi
-if [ -d "$HADOOP_PREFIX/build/tools" ]; then
-  CLASSPATH=${CLASSPATH}:$HADOOP_PREFIX/build/tools
+if [ -d "$HADOOP_HDFS_HOME/build/tools" ]; then
+  CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/tools
 fi
 
 # for releases, add core hdfs jar & webapps to CLASSPATH

Modified: hadoop/hdfs/trunk/bin/hdfs-config.sh
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/bin/hdfs-config.sh?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/bin/hdfs-config.sh (original)
+++ hadoop/hdfs/trunk/bin/hdfs-config.sh Thu Jun  2 22:05:33 2011
@@ -24,9 +24,13 @@ bin=`cd "$bin"; pwd`
 
 export HADOOP_PREFIX="${HADOOP_PREFIX:-$bin/..}"
 
-if [ -d "$bin" ]; then
+if [ -e "$bin/../libexec/hadoop-config.sh" ]; then
   . $bin/../libexec/hadoop-config.sh
-elif [ -e "${HADOOP_HDFS_HOME}"/bin/hadoop-config.sh ]; then
+elif [ -e "${HADOOP_COMMON_HOME}/bin/hadoop-config.sh" ]; then
+  . "$HADOOP_COMMON_HOME"/bin/hadoop-config.sh
+elif [ -e "${HADOOP_HOME}/bin/hadoop-config.sh" ]; then
+  . "$HADOOP_HOME"/bin/hadoop-config.sh
+elif [ -e "${HADOOP_HDFS_HOME}/bin/hadoop-config.sh" ]; then
   . "$HADOOP_HDFS_HOME"/bin/hadoop-config.sh
 else
   echo "Hadoop common not found."

Modified: hadoop/hdfs/trunk/bin/refresh-namenodes.sh
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/bin/refresh-namenodes.sh?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/bin/refresh-namenodes.sh (original)
+++ hadoop/hdfs/trunk/bin/refresh-namenodes.sh Thu Jun  2 22:05:33 2011
@@ -23,7 +23,11 @@
 bin=`dirname "$0"`
 bin=`cd "$bin"; pwd`
 
-. "$bin/../libexec/hdfs-config.sh"
+if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
+  . "$bin/../libexec/hdfs-config.sh"
+else
+  . "$bin/hdfs-config.sh"
+fi
 
 namenodes=$("$HADOOP_PREFIX/bin/hdfs" getconf -namenodes)
 

Modified: hadoop/hdfs/trunk/bin/start-balancer.sh
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/bin/start-balancer.sh?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/bin/start-balancer.sh (original)
+++ hadoop/hdfs/trunk/bin/start-balancer.sh Thu Jun  2 22:05:33 2011
@@ -18,7 +18,11 @@
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-. "$bin"/../libexec/hdfs-config.sh
+if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
+  . "$bin"/../libexec/hdfs-config.sh
+else
+  . "$bin/hdfs-config.sh"
+fi
 
 # Start balancer daemon.
 

Modified: hadoop/hdfs/trunk/bin/start-dfs.sh
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/bin/start-dfs.sh?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/bin/start-dfs.sh (original)
+++ hadoop/hdfs/trunk/bin/start-dfs.sh Thu Jun  2 22:05:33 2011
@@ -25,7 +25,11 @@ usage="Usage: start-dfs.sh [-upgrade|-ro
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-. "$bin"/../libexec/hdfs-config.sh
+if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
+  . "$bin"/../libexec/hdfs-config.sh
+else
+  . "$bin/hdfs-config.sh"
+fi
 
 # get arguments
 if [ $# -ge 1 ]; then

Modified: hadoop/hdfs/trunk/bin/start-secure-dns.sh
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/bin/start-secure-dns.sh?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/bin/start-secure-dns.sh (original)
+++ hadoop/hdfs/trunk/bin/start-secure-dns.sh Thu Jun  2 22:05:33 2011
@@ -22,7 +22,12 @@ usage="Usage (run as root in order to st
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-. "$bin"/../libexec/hdfs-config.sh
+if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
+  . "$bin"/../libexec/hdfs-config.sh
+else
+  . "$bin/hdfs-config.sh"
+fi
+
 
 if [ "$EUID" -eq 0 ] && [ -n "$HADOOP_SECURE_DN_USER" ]; then
   "$HADOOP_PREFIX"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs start
datanode $dataStartOpt

Modified: hadoop/hdfs/trunk/bin/stop-balancer.sh
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/bin/stop-balancer.sh?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/bin/stop-balancer.sh (original)
+++ hadoop/hdfs/trunk/bin/stop-balancer.sh Thu Jun  2 22:05:33 2011
@@ -18,7 +18,12 @@
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-. "$bin"/../libexec/hdfs-config.sh
+if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
+  . "$bin"/../libexec/hdfs-config.sh
+else
+  . "$bin/hdfs-config.sh"
+fi
+
 
 # Stop balancer daemon.
 # Run this on the machine where the balancer is running

Modified: hadoop/hdfs/trunk/bin/stop-dfs.sh
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/bin/stop-dfs.sh?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/bin/stop-dfs.sh (original)
+++ hadoop/hdfs/trunk/bin/stop-dfs.sh Thu Jun  2 22:05:33 2011
@@ -18,7 +18,11 @@
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-. "$bin"/../libexec/hdfs-config.sh
+if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
+  . "$bin"/../libexec/hdfs-config.sh
+else
+  . "$bin/hdfs-config.sh"
+fi
 
 #---------------------------------------------------------
 # namenodes

Modified: hadoop/hdfs/trunk/bin/stop-secure-dns.sh
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/bin/stop-secure-dns.sh?rev=1130843&r1=1130842&r2=1130843&view=diff
==============================================================================
--- hadoop/hdfs/trunk/bin/stop-secure-dns.sh (original)
+++ hadoop/hdfs/trunk/bin/stop-secure-dns.sh Thu Jun  2 22:05:33 2011
@@ -22,7 +22,11 @@ usage="Usage (run as root in order to st
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-. "$bin"/../libexec/hdfs-config.sh
+if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
+  . "$bin"/../libexec/hdfs-config.sh
+else
+  . "$bin/hdfs-config.sh"
+fi
 
 if [ "$EUID" -eq 0 ] && [ -n "$HADOOP_SECURE_DN_USER" ]; then
   "$HADOOP_PREFIX"/bin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs stop
datanode



Mime
View raw message