hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1161329 - in /hadoop/common/trunk/hadoop-hdfs/src/main/bin: distribute-exclude.sh hdfs hdfs-config.sh refresh-namenodes.sh start-balancer.sh start-dfs.sh start-secure-dns.sh stop-balancer.sh stop-dfs.sh stop-secure-dns.sh
Date Thu, 25 Aug 2011 00:06:54 GMT
Author: acmurthy
Date: Thu Aug 25 00:06:53 2011
New Revision: 1161329

URL: http://svn.apache.org/viewvc?rev=1161329&view=rev
Log:
HADOOP-7563. Setup HADOOP_HDFS_HOME, HADOOP_MAPRED_HOME and classpath correction. Contributed
by Eric Yang. 

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

Modified: hadoop/common/trunk/hadoop-hdfs/src/main/bin/distribute-exclude.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs/src/main/bin/distribute-exclude.sh?rev=1161329&r1=1161328&r2=1161329&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs/src/main/bin/distribute-exclude.sh (original)
+++ hadoop/common/trunk/hadoop-hdfs/src/main/bin/distribute-exclude.sh Thu Aug 25 00:06:53
2011
@@ -36,11 +36,7 @@
 bin=`dirname "$0"`
 bin=`cd "$bin"; pwd`
 
-if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
-  . "$bin/../libexec/hdfs-config.sh"
-else
-  . "$bin/hdfs-config.sh" 
-fi
+. "$bin/../libexec/hdfs-config.sh"
 
 if [ "$1" = '' ] ; then
   "Error: please specify local exclude file as a first argument"

Modified: hadoop/common/trunk/hadoop-hdfs/src/main/bin/hdfs
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs/src/main/bin/hdfs?rev=1161329&r1=1161328&r2=1161329&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs/src/main/bin/hdfs (original)
+++ hadoop/common/trunk/hadoop-hdfs/src/main/bin/hdfs Thu Aug 25 00:06:53 2011
@@ -19,11 +19,7 @@ bin=`which $0`
 bin=`dirname ${bin}`
 bin=`cd "$bin"; pwd`
 
-if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
-  . "$bin"/../libexec/hdfs-config.sh
-else
-  . "$bin/hdfs-config.sh"
-fi
+. "$bin"/../libexec/hdfs-config.sh
 
 function print_usage(){
   echo "Usage: hdfs [--config confdir] COMMAND"
@@ -109,45 +105,6 @@ else
   CLASS="$COMMAND"
 fi
 
-# for developers, add hdfs classes to CLASSPATH
-if [ -d "$HADOOP_HDFS_HOME/build/classes" ]; then
-  CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/classes
-fi
-if [ -d "$HADOOP_HDFS_HOME/build/web/webapps" ]; then
-  CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/web
-fi
-if [ -d "$HADOOP_HDFS_HOME/build/test/classes" ]; then
-  CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/test/classes
-fi
-if [ -d "$HADOOP_HDFS_HOME/build/tools" ]; then
-  CLASSPATH=${CLASSPATH}:$HADOOP_HDFS_HOME/build/tools
-fi
-
-if [ -d "$HADOOP_HDFS_HOME/build/ivy/lib/hadoop-hdfs/common" ]; then
-  for f in $HADOOP_HDFS_HOME/build/ivy/lib/hadoop-hdfs/common/*.jar; do
-    CLASSPATH=${CLASSPATH}:$f;
-  done
-fi
-
-if [ -d "$HADOOP_HDFS_HOME/build/ivy/lib/hadoop-hdfs/hdfs" ]; then
-  for f in $HADOOP_HDFS_HOME/build/ivy/lib/hadoop-hdfs/hdfs/*.jar; do
-    CLASSPATH=${CLASSPATH}:$f;
-  done
-fi
-
-# for releases, add core hdfs jar & webapps to CLASSPATH
-if [ -d "$HADOOP_PREFIX/share/hadoop/hdfs/webapps" ]; then
-  CLASSPATH=${CLASSPATH}:$HADOOP_PREFIX/share/hadoop/hdfs
-fi
-for f in $HADOOP_PREFIX/share/hadoop-hdfs/*.jar; do
-  CLASSPATH=${CLASSPATH}:$f;
-done
-
-# add libs to CLASSPATH
-for f in $HADOOP_PREFIX/lib/*.jar; do
-  CLASSPATH=${CLASSPATH}:$f;
-done
-
 if $cygwin; then
   CLASSPATH=`cygpath -p -w "$CLASSPATH"`
 fi
@@ -161,7 +118,7 @@ if [ "$starting_secure_dn" = "true" ]; t
    HADOOP_SECURE_DN_PID="$HADOOP_PID_DIR/hadoop_secure_dn.pid"
   fi
 
-  exec "$HADOOP_PREFIX/bin/jsvc" \
+  exec "$HADOOP_HDFS_HOME/bin/jsvc" \
            -Dproc_$COMMAND -outfile "$HADOOP_LOG_DIR/jsvc.out" \
            -errfile "$HADOOP_LOG_DIR/jsvc.err" \
            -pidfile "$HADOOP_SECURE_DN_PID" \

Modified: hadoop/common/trunk/hadoop-hdfs/src/main/bin/hdfs-config.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs/src/main/bin/hdfs-config.sh?rev=1161329&r1=1161328&r2=1161329&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs/src/main/bin/hdfs-config.sh (original)
+++ hadoop/common/trunk/hadoop-hdfs/src/main/bin/hdfs-config.sh Thu Aug 25 00:06:53 2011
@@ -26,12 +26,10 @@ export HADOOP_PREFIX="${HADOOP_PREFIX:-$
 
 if [ -e "$bin/../libexec/hadoop-config.sh" ]; then
   . $bin/../libexec/hadoop-config.sh
-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
+elif [ -e "${HADOOP_COMMON_HOME}/libexec/hadoop-config.sh" ]; then
+  . "$HADOOP_COMMON_HOME"/libexec/hadoop-config.sh
+elif [ -e "${HADOOP_HOME}/libexec/hadoop-config.sh" ]; then
+  . "$HADOOP_HOME"/libexec/hadoop-config.sh
 else
   echo "Hadoop common not found."
   exit

Modified: hadoop/common/trunk/hadoop-hdfs/src/main/bin/refresh-namenodes.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs/src/main/bin/refresh-namenodes.sh?rev=1161329&r1=1161328&r2=1161329&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs/src/main/bin/refresh-namenodes.sh (original)
+++ hadoop/common/trunk/hadoop-hdfs/src/main/bin/refresh-namenodes.sh Thu Aug 25 00:06:53
2011
@@ -23,11 +23,7 @@
 bin=`dirname "$0"`
 bin=`cd "$bin"; pwd`
 
-if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
-  . "$bin/../libexec/hdfs-config.sh"
-else
-  . "$bin/hdfs-config.sh"
-fi
+. "$bin/../libexec/hdfs-config.sh"
 
 namenodes=$("$HADOOP_PREFIX/bin/hdfs" getconf -nnRpcAddresses)
 if [ "$?" != '0' ] ; then errorFlag='1' ; 

Modified: hadoop/common/trunk/hadoop-hdfs/src/main/bin/start-balancer.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs/src/main/bin/start-balancer.sh?rev=1161329&r1=1161328&r2=1161329&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs/src/main/bin/start-balancer.sh (original)
+++ hadoop/common/trunk/hadoop-hdfs/src/main/bin/start-balancer.sh Thu Aug 25 00:06:53 2011
@@ -18,11 +18,7 @@
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
-  . "$bin"/../libexec/hdfs-config.sh
-else
-  . "$bin/hdfs-config.sh"
-fi
+. "$bin"/../libexec/hdfs-config.sh
 
 # Start balancer daemon.
 

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

Modified: hadoop/common/trunk/hadoop-hdfs/src/main/bin/start-secure-dns.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs/src/main/bin/start-secure-dns.sh?rev=1161329&r1=1161328&r2=1161329&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs/src/main/bin/start-secure-dns.sh (original)
+++ hadoop/common/trunk/hadoop-hdfs/src/main/bin/start-secure-dns.sh Thu Aug 25 00:06:53 2011
@@ -22,12 +22,7 @@ usage="Usage (run as root in order to st
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
-  . "$bin"/../libexec/hdfs-config.sh
-else
-  . "$bin/hdfs-config.sh"
-fi
-
+. "$bin"/../libexec/hdfs-config.sh
 
 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/common/trunk/hadoop-hdfs/src/main/bin/stop-balancer.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-balancer.sh?rev=1161329&r1=1161328&r2=1161329&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-balancer.sh (original)
+++ hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-balancer.sh Thu Aug 25 00:06:53 2011
@@ -18,12 +18,7 @@
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
-  . "$bin"/../libexec/hdfs-config.sh
-else
-  . "$bin/hdfs-config.sh"
-fi
-
+. "$bin"/../libexec/hdfs-config.sh
 
 # Stop balancer daemon.
 # Run this on the machine where the balancer is running

Modified: hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-dfs.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-dfs.sh?rev=1161329&r1=1161328&r2=1161329&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-dfs.sh (original)
+++ hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-dfs.sh Thu Aug 25 00:06:53 2011
@@ -18,11 +18,7 @@
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
-  . "$bin"/../libexec/hdfs-config.sh
-else
-  . "$bin/hdfs-config.sh"
-fi
+. "$bin"/../libexec/hdfs-config.sh
 
 #---------------------------------------------------------
 # namenodes

Modified: hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-secure-dns.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-secure-dns.sh?rev=1161329&r1=1161328&r2=1161329&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-secure-dns.sh (original)
+++ hadoop/common/trunk/hadoop-hdfs/src/main/bin/stop-secure-dns.sh Thu Aug 25 00:06:53 2011
@@ -22,11 +22,7 @@ usage="Usage (run as root in order to st
 bin=`dirname "${BASH_SOURCE-$0}"`
 bin=`cd "$bin"; pwd`
 
-if [ -e "$bin/../libexec/hdfs-config.sh" ]; then
-  . "$bin"/../libexec/hdfs-config.sh
-else
-  . "$bin/hdfs-config.sh"
-fi
+. "$bin"/../libexec/hdfs-config.sh
 
 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