incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bm...@apache.org
Subject svn commit: r1325544 - /incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh
Date Thu, 12 Apr 2012 22:00:45 GMT
Author: bmahe
Date: Thu Apr 12 22:00:45 2012
New Revision: 1325544

URL: http://svn.apache.org/viewvc?rev=1325544&view=rev
Log:
BIGTOP-422. Need to start packaging fuse for Apache Hadoop. Fix fuse wrapper script

Modified:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh?rev=1325544&r1=1325543&r2=1325544&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh
Thu Apr 12 22:00:45 2012
@@ -265,22 +265,34 @@ cat > $fuse_wrapper << EOF
 
 /sbin/modprobe fuse
 
+# Autodetect JAVA_HOME if not defined
+if [ -e /usr/libexec/bigtop-detect-javahome ]; then
+. /usr/libexec/bigtop-detect-javahome
+elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
+. /usr/lib/bigtop-utils/bigtop-detect-javahome
+fi
+
 export HADOOP_HOME=\${HADOOP_HOME:-${HADOOP_DIR#${PREFIX}}}
 
 if [ -f /etc/default/hadoop-fuse ]
 then . /etc/default/hadoop-fuse
 fi
 
-export HADOOP_LIBEXEC_DIR=/${SYSTEM_LIBEXEC_DIR#${PREFIX}}
+export HADOOP_LIBEXEC_DIR=${SYSTEM_LIBEXEC_DIR#${PREFIX}}
 
 if [ "\${LD_LIBRARY_PATH}" = "" ]; then
   export LD_LIBRARY_PATH=/usr/lib
-  for f in \`find \${JAVA_HOME}/jre/lib -name client -prune -o -name libjvm.so -exec dirname
{} \;\`; do
+  for f in \`find \${JAVA_HOME} -name client -prune -o -name libjvm.so -exec dirname {} \;\`;
do
     export LD_LIBRARY_PATH=\$f:\${LD_LIBRARY_PATH}
   done
 fi
 
-env \${HADOOP_HOME}/bin/fuse_dfs \$@
+# Pulls all jars from hadoop client package
+for jar in \${HADOOP_HOME}/client/*.jar; do
+  CLASSPATH+="\$jar:"
+done
+
+env CLASSPATH="\${CLASSPATH}" \${HADOOP_HOME}/bin/fuse_dfs \$@
 EOF
 
 chmod 755 $fuse_wrapper



Mime
View raw message