Author: tomwhite
Date: Tue Jun 22 23:57:43 2010
New Revision: 957085
URL: http://svn.apache.org/viewvc?rev=957085&view=rev
Log:
Merge -r 957081:957082 from trunk to branch-0.21. Fixes: HDFS-1255.
Modified:
hadoop/hdfs/branches/branch-0.21/CHANGES.txt
hadoop/hdfs/branches/branch-0.21/src/c++/libhdfs/tests/test-libhdfs.sh
Modified: hadoop/hdfs/branches/branch-0.21/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/hdfs/branches/branch-0.21/CHANGES.txt?rev=957085&r1=957084&r2=957085&view=diff
==============================================================================
--- hadoop/hdfs/branches/branch-0.21/CHANGES.txt (original)
+++ hadoop/hdfs/branches/branch-0.21/CHANGES.txt Tue Jun 22 23:57:43 2010
@@ -890,6 +890,8 @@ Release 0.21.0 - Unreleased
HDFS-609. Create a file with the append flag does not work in HDFS.
(tomwhite)
+ HDFS-1255. Fix failing test-libhdfs.sh test. (tomwhite)
+
Release 0.20.3 - Unreleased
IMPROVEMENTS
Modified: hadoop/hdfs/branches/branch-0.21/src/c++/libhdfs/tests/test-libhdfs.sh
URL:
http://svn.apache.org/viewvc/hadoop/hdfs/branches/branch-0.21/src/c%2B%2B/libhdfs/tests/test-libhdfs.sh?rev=957085&r1=957084&r2=957085&view=diff
==============================================================================
--- hadoop/hdfs/branches/branch-0.21/src/c++/libhdfs/tests/test-libhdfs.sh
(original)
+++ hadoop/hdfs/branches/branch-0.21/src/c++/libhdfs/tests/test-libhdfs.sh Tue
Jun 22 23:57:43 2010
@@ -34,7 +34,7 @@ HADOOP_LIB_DIR=$HADOOP_HOME/lib
HADOOP_BIN_DIR=$HADOOP_HOME/bin
COMMON_BUILD_DIR=$HADOOP_HOME/build/ivy/lib/Hadoop-Hdfs/common
-COMMON_JAR=$COMMON_BUILD_DIR/hadoop-core-0.21.0-SNAPSHOT.jar
+COMMON_JAR=$COMMON_BUILD_DIR/hadoop-common-0.21.0-SNAPSHOT.jar
cat > $HADOOP_CONF_DIR/core-site.xml <<EOF
<?xml version="1.0"?>
@@ -74,18 +74,18 @@ cat > $HADOOP_CONF_DIR/slaves <<EOF
localhost
EOF
-# If we are running from the hdfs repo we need to create HADOOP_BIN_DIR.
-# If the bin directory does not and we've got a core jar extract it's
+# If we are running from the hdfs repo we need to make sure
+# HADOOP_BIN_DIR contains the common scripts.
+# If the bin directory does not and we've got a common jar extract its
# bin directory to HADOOP_HOME/bin. The bin scripts hdfs-config.sh and
# hadoop-config.sh assume the bin directory is named "bin" and that it
# is located in HADOOP_HOME.
-created_bin_dir=0
-if [ ! -d $HADOOP_BIN_DIR ]; then
+unpacked_common_bin_dir=0
+if [ ! -f $HADOOP_BIN_DIR/hadoop-config.sh ]; then
if [ -f $COMMON_JAR ]; then
- mkdir $HADOOP_BIN_DIR
jar xf $COMMON_JAR bin.tgz
tar xfz bin.tgz -C $HADOOP_BIN_DIR
- created_bin_dir=1
+ unpacked_common_bin_dir=1
fi
fi
@@ -188,8 +188,8 @@ sleep 3
$HADOOP_BIN_DIR/hadoop-daemon.sh --script $HADOOP_BIN_DIR/hdfs stop datanode
&& sleep 2
$HADOOP_BIN_DIR/hadoop-daemon.sh --script $HADOOP_BIN_DIR/hdfs stop namenode
&& sleep 2
-if [ $created_bin_dir -eq 1 ]; then
- rm -rf bin.tgz $HADOOP_BIN_DIR
+if [ $unpacked_common_bin_dir -eq 1 ]; then
+ rm -rf bin.tgz
fi
echo exiting with $BUILD_STATUS