incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bm...@apache.org
Subject svn commit: r1199588 - in /incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src: common/hadoop/ rpm/hadoop/SOURCES/ rpm/hadoop/SPECS/
Date Wed, 09 Nov 2011 01:30:42 GMT
Author: bmahe
Date: Wed Nov  9 01:30:42 2011
New Revision: 1199588

URL: http://svn.apache.org/viewvc?rev=1199588&view=rev
Log:
Update hadoop 0.23 packaging

Added:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/yarn.default
Modified:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/hadoop.default
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/install_hadoop.sh
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/hadoop.default
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/hadoop.default?rev=1199588&r1=1199587&r2=1199588&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/hadoop.default
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/hadoop.default
Wed Nov  9 01:30:42 2011
@@ -20,9 +20,13 @@ export HADOOP_SECONDARYNAMENODE_USER=hdf
 export HADOOP_DATANODE_USER=hdfs
 export HADOOP_JOBTRACKER_USER=mapred
 export HADOOP_TASKTRACKER_USER=mapred
-export HADOOP_IDENT_STRING=hadoop
+export HADOOP_IDENT_STRING=hdfs
 export HADOOP_PID_DIR=/var/run/hadoop
 export HADOOP_LOG_DIR=/var/log/hadoop
 export HADOOP_CONF_DIR=/etc/hadoop/conf
 export YARN_CONF_DIR=/etc/yarn/conf
 export HADOOP_CLASSPATH="${HADOOP_CLASSPATH}:${HADOOP_PREFIX}/*:${HADOOP_PREFIX}/lib/*"
+
+# Pointless definitions making yarn happy
+export HADOOP_COMMON_HOME=${HADOOP_PREFIX}
+export HADOOP_HDFS_HOME=${HADOOP_PREFIX}

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=1199588&r1=1199587&r2=1199588&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
Wed Nov  9 01:30:42 2011
@@ -144,7 +144,7 @@ export PATH="/sbin/:$PATH"
 # Make bin wrappers
 mkdir -p $BIN_DIR
 
-for bin_wrapper in hadoop ; do
+for bin_wrapper in hadoop yarn hdfs mapred; do
   wrapper=$BIN_DIR/$bin_wrapper
   cat > $wrapper <<EOF
 #!/bin/sh
@@ -194,7 +194,6 @@ chmod 644 ${HADOOP_DIR}/*.jar
 # native libs
 install -d -m 0755 ${SYSTEM_LIB_DIR}
 install -d -m 0755 ${HADOOP_NATIVE_LIB_DIR}
-cp ${BUILD_DIR}/lib/*.a ${SYSTEM_LIB_DIR}/
 for library in libhdfs.so.0.0.0; do
   cp ${BUILD_DIR}/lib/${library} ${SYSTEM_LIB_DIR}/
   ldconfig -vlN ${SYSTEM_LIB_DIR}/${library}
@@ -202,6 +201,7 @@ done
 install -d -m 0755 ${SYSTEM_INCLUDE_DIR}
 cp ${BUILD_DIR}/../hadoop-hdfs-project/hadoop-hdfs/src/main/native/hdfs.h ${SYSTEM_INCLUDE_DIR}/
 
+cp ${BUILD_DIR}/lib/*.a ${HADOOP_NATIVE_LIB_DIR}/
 for library in libhadoop.so.1.0.0; do
   cp ${BUILD_DIR}/lib/${library} ${HADOOP_NATIVE_LIB_DIR}/
   ldconfig -vlN ${HADOOP_NATIVE_LIB_DIR}/${library}
@@ -237,4 +237,10 @@ mkdir -p $MAN_DIR/man1
 gzip -c < $DISTRO_DIR/hadoop.1 > $MAN_DIR/man1/hadoop.1.gz
 chmod 644 $MAN_DIR/man1/hadoop.1.gz
 
+# Make the pseudo-distributed config
+for conf in conf.pseudo ; do
+  install -d -m 0755 $HADOOP_ETC_DIR/$conf
+  # Overlay the -site files
+  (cd $DISTRO_DIR/$conf && tar -cf - .) | (cd $HADOOP_ETC_DIR/$conf && tar
-xf -)
+done
 

Added: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/yarn.default
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/yarn.default?rev=1199588&view=auto
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/yarn.default (added)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/yarn.default Wed
Nov  9 01:30:42 2011
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+export YARN_HOME=/usr/lib/hadoop
+export YARN_IDENT_STRING=yarn
+export YARN_PID_DIR=/var/run/yarn
+export YARN_LOG_DIR=/var/log/yarn
+export YARN_CONF_DIR=/etc/yarn/conf
+export YARN_CLASSPATH="${HADOOP_CLASSPATH}:${HADOOP_PREFIX}/*:${HADOOP_PREFIX}/lib/*"

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl?rev=1199588&r1=1199587&r2=1199588&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl
Wed Nov  9 01:30:42 2011
@@ -30,7 +30,7 @@ elif [ -e /usr/lib/bigtop-utils/bigtop-d
   . /usr/lib/bigtop-utils/bigtop-detect-javahome
 fi
 
-. @HADOOP_COMMON_ROOT@/bin/hadoop-config.sh
+. /usr/libexec/hadoop-config.sh
 # FIXME: this needs to be removed once hadoop-config.sh stop clobbering HADOOP_HOME
 . /etc/default/hadoop
 
@@ -68,7 +68,9 @@ start() {
       TARGET_USER=root
     fi
   fi
-  su -s /bin/bash $TARGET_USER -c "@HADOOP_COMMON_ROOT@/bin/hadoop-daemon.sh --config '@HADOOP_CONF_DIR@'
start @HADOOP_DAEMON@ $DAEMON_FLAGS"
+
+  export HADOOP_IDENT_STRING=$TARGET_USER
+  su -s /bin/bash $TARGET_USER -c "@HADOOP_COMMON_ROOT@/sbin/hadoop-daemon.sh --config '@HADOOP_CONF_DIR@'
start @HADOOP_DAEMON@ $DAEMON_FLAGS"
 
   # Some processes are slow to start
   sleep $SLEEP_TIME
@@ -81,7 +83,7 @@ start() {
 
 stop() {
   echo -n $"Stopping $desc (hadoop-@HADOOP_DAEMON@): "
-  daemon @HADOOP_COMMON_ROOT@/bin/hadoop-daemon.sh --config "@HADOOP_CONF_DIR@" stop @HADOOP_DAEMON@
+  daemon @HADOOP_COMMON_ROOT@/sbin/hadoop-daemon.sh --config "@HADOOP_CONF_DIR@" stop @HADOOP_DAEMON@
   RETVAL=$?
 
   [ $RETVAL -eq $RETVAL_SUCCESS ] && rm -f $LOCKFILE $PIDFILE

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse?rev=1199588&r1=1199587&r2=1199588&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SOURCES/hadoop-init.tmpl.suse
Wed Nov  9 01:30:42 2011
@@ -41,7 +41,7 @@ elif [ -e /usr/lib/bigtop-utils/bigtop-d
   . /usr/lib/bigtop-utils/bigtop-detect-javahome
 fi
 
-. @HADOOP_COMMON_ROOT@/bin/hadoop-config.sh 
+. /usr/libexec/hadoop-config.sh 
 
 # FIXME: this needs to be removed once hadoop-config.sh stop clobbering HADOOP_HOME
 . /etc/default/hadoop
@@ -60,7 +60,7 @@ ERROR_PROGRAM_NOT_CONFIGURED=6
 
 
 RETVAL=0
-EXEC_PATH=@HADOOP_COMMON_ROOT@/bin/hadoop-daemon.sh
+EXEC_PATH=@HADOOP_COMMON_ROOT@/sbin/hadoop-daemon.sh
 CONFIG_PATH="@HADOOP_CONF_DIR@"
 HADOOP_PID_DIR=${HADOOP_PID_DIR:-/var/run/hadoop}
 PIDFILE="$HADOOP_PID_DIR/hadoop-$HADOOP_IDENT_STRING-@HADOOP_DAEMON@.pid"
@@ -90,6 +90,8 @@ start() {
       TARGET_USER=root
     fi
   fi
+
+  export HADOOP_IDENT_STRING=$TARGET_USER
   su -s /bin/bash $TARGET_USER -c "$EXEC_PATH --config '$CONFIG_PATH' start @HADOOP_DAEMON@
$DAEMON_FLAGS"
 
   # Some processes are slow to start

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec?rev=1199588&r1=1199587&r2=1199588&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
Wed Nov  9 01:30:42 2011
@@ -232,14 +232,14 @@ assigns MapReduce work to the tasktracke
 with an available work slot.
 
 
-#%package conf-pseudo
-#Summary: Hadoop installation in pseudo-distributed mode
-#Group: System/Daemons
-#Requires: %{name} = %{version}-%{release}, %{name}-namenode = %{version}-%{release}, %{name}-datanode
= %{version}-%{release}, %{name}-secondarynamenode = %{version}-%{release}, %{name}-tasktracker
= %{version}-%{release}, %{name}-jobtracker = %{version}-%{release}
-#
-#%description conf-pseudo
-#Installation of this RPM will setup your machine to run in pseudo-distributed mode
-#where each Hadoop daemon runs in a separate Java process.
+%package conf-pseudo
+Summary: Hadoop installation in pseudo-distributed mode
+Group: System/Daemons
+Requires: %{name} = %{version}-%{release}, %{name}-namenode = %{version}-%{release}, %{name}-datanode
= %{version}-%{release}, %{name}-secondarynamenode = %{version}-%{release}, %{name}-tasktracker
= %{version}-%{release}, %{name}-jobtracker = %{version}-%{release}
+
+%description conf-pseudo
+Installation of this RPM will setup your machine to run in pseudo-distributed mode
+where each Hadoop daemon runs in a separate Java process.
 
 %package doc
 Summary: Hadoop Documentation
@@ -407,12 +407,14 @@ fi
 %config(noreplace) /etc/default/hadoop
 %config(noreplace) /etc/security/limits.d/hadoop.nofiles.conf
 %{lib_hadoop}
-%{_libdir}/libhadoop*
 %{libexecdir}/hadoop-config.sh
 %{libexecdir}/hdfs-config.sh
 %{libexecdir}/mapred-config.sh
 %{libexecdir}/yarn-config.sh
 %{bin_hadoop}/%{name}
+%{bin_hadoop}/yarn
+%{bin_hadoop}/hdfs
+%{bin_hadoop}/mapred
 %attr(0775,root,hadoop) /var/run/%{name}
 %attr(0775,root,hadoop) %{log_hadoop}
 %{man_hadoop}/man1/hadoop.1.*
@@ -431,7 +433,6 @@ fi
 %{initd_dir}/%{name}-%1 \
 %post %1 \
 chkconfig --add %{name}-%1 \
-%2 \
 \
 %preun %1 \
 if [ $1 = 0 ]; then \
@@ -450,20 +451,20 @@ fi
 %service_macro tasktracker
 
 # Pseudo-distributed Hadoop installation
-#%post conf-pseudo
-#%{alternatives_cmd} --install %{config_hadoop} %{name}-conf %{etc_hadoop}/conf.pseudo 30
+%post conf-pseudo
+%{alternatives_cmd} --install %{config_hadoop} %{name}-conf %{etc_hadoop}/conf.pseudo 30
+
+%files conf-pseudo
+%defattr(-,root,root)
+%config(noreplace) %attr(755,root,root) %{etc_hadoop}/conf.pseudo
+%dir %attr(0755,root,hadoop) /var/lib/%{name}
+%dir %attr(1777,root,hadoop) /var/lib/%{name}/cache
 
-#%files conf-pseudo
-#%defattr(-,root,root)
-#%config(noreplace) %attr(755,root,root) %{etc_hadoop}/conf.pseudo
-#%dir %attr(0755,root,hadoop) /var/lib/%{name}
-#%dir %attr(1777,root,hadoop) /var/lib/%{name}/cache
-
-#%preun conf-pseudo
-#if [ "$1" = 0 ]; then
-#        %{alternatives_cmd} --remove %{name}-conf %{etc_hadoop}/conf.pseudo
-#        rm -f %{etc_hadoop}/conf
-#fi
+%preun conf-pseudo
+if [ "$1" = 0 ]; then
+        %{alternatives_cmd} --remove %{name}-conf %{etc_hadoop}/conf.pseudo
+        rm -f %{etc_hadoop}/conf
+fi
 
 %files libhdfs
 %defattr(-,root,root)



Mime
View raw message