incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bm...@apache.org
Subject svn commit: r1213536 - in /incubator/bigtop/branches/hadoop-0.23: ./ bigtop-packages/src/common/hadoop/ bigtop-packages/src/deb/hadoop/
Date Tue, 13 Dec 2011 01:42:17 GMT
Author: bmahe
Date: Tue Dec 13 01:42:16 2011
New Revision: 1213536

URL: http://svn.apache.org/viewvc?rev=1213536&view=rev
Log:
Improve deb packaging for hadoop 0.23

Added:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d-yarn.tpl
      - copied, changed from r1213492, incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d.tpl
Removed:
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-sbin.dirs
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-sbin.install
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop-sbin.postinst
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/install_init_scripts.sh
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/yarn.default
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop.install
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/rules
    incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d.tpl
    incubator/bigtop/branches/hadoop-0.23/package.mk

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=1213536&r1=1213535&r2=1213536&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
Tue Dec 13 01:42:16 2011
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 export HADOOP_HOME_WARN_SUPPRESS=true
+export HADOOP_HOME=/usr/lib/hadoop
 export HADOOP_PREFIX=/usr/lib/hadoop
 export HADOOP_LIBEXEC_DIR=/usr/libexec
 export HADOOP_NAMENODE_USER=hdfs
@@ -24,7 +25,6 @@ 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

Modified: 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=1213536&r1=1213535&r2=1213536&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/yarn.default (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/common/hadoop/yarn.default Tue
Dec 13 01:42:16 2011
@@ -16,5 +16,5 @@ 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_CONF_DIR=/etc/hadoop/conf
 export YARN_CLASSPATH="${YARN_CLASSPATH}:${YARN_HOME}/*:${YARN_HOME}/lib/*"

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop.install
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop.install?rev=1213536&r1=1213535&r2=1213536&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop.install (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/hadoop.install Tue
Dec 13 01:42:16 2011
@@ -3,6 +3,7 @@
 /usr/lib/hadoop
 /etc/hadoop/conf.empty
 /etc/default/hadoop
+/etc/default/yarn
 /etc/security/limits.d/hadoop.nofiles.conf
 #/usr/share/doc/hadoop
 /usr/lib/hadoop/lib/native

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/rules
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/rules?rev=1213536&r1=1213535&r2=1213536&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/rules (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/rules Tue Dec 13
01:42:16 2011
@@ -78,13 +78,21 @@ datanode_user=hdfs
 resourcemanager_user=yarn
 nodemanager_user=yarn
 
-namenode secondarynamenode datanode resourcemanager nodemanager: debian/service-init.d.tpl
+namenode secondarynamenode datanode: debian/service-init.d.tpl
 	sed -e "s|@HADOOP_DAEMON@|$@|" \
             -e "s|@HADOOP_MAJOR_VERSION@|$hadoop_version|" \
 	    -e "s|@DAEMON_USER@|$($@_user)|" $< > debian/hadoop-$@.init
 	# FIXME: workaround for BIGTOP-105
 	sed -e "s|@HADOOP_DAEMON@|$@|" < debian/hadoop.daemon.postinst.tpl > debian/hadoop-$@.postinst
 
+resourcemanager nodemanager: debian/service-init.d-yarn.tpl
+	sed -e "s|@HADOOP_DAEMON@|$@|" \
+            -e "s|@HADOOP_MAJOR_VERSION@|$hadoop_version|" \
+	    -e "s|@DAEMON_USER@|$($@_user)|" $< > debian/hadoop-$@.init
+	# FIXME: workaround for BIGTOP-105
+	sed -e "s|@HADOOP_DAEMON@|$@|" < debian/hadoop.daemon.postinst.tpl > debian/hadoop-$@.postinst
+
+
 install-indep: namenode secondarynamenode datanode resourcemanager nodemanager
 	mkdir -p debian/tmp/etc/default
 	cp debian/hadoop.default debian/tmp/etc/default/hadoop
@@ -93,7 +101,6 @@ install-indep: namenode secondarynamenod
 	dh_install --sourcedir=debian/tmp -i
 
 	rm -Rf debian/hadoop/usr/lib/hadoop/lib/native
-	rm -Rf debian/hadoop/usr/lib/hadoop/sbin
 
 	rm -Rf debian/hadoop/usr/lib/hadoop/bin/fuse_dfs 
 #	rm -Rf debian/hadoop/usr/bin/hadoop-fuse-dfs

Copied: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d-yarn.tpl
(from r1213492, incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d.tpl)
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d-yarn.tpl?p2=incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d-yarn.tpl&p1=incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d.tpl&r1=1213492&r2=1213536&rev=1213536&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d.tpl
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d-yarn.tpl
Tue Dec 13 01:42:16 2011
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -42,9 +42,9 @@
 ### END INIT INFO
 
 # Support ephemeral /var/run. We need to create this directory before
-# hadoop-config.sh is sourced below since it sets HADOOP_PID_DIR if
+# hadoop-config.sh is sourced below since it sets YARN_PID_DIR if
 # this directory exists.
-install -d -m 0775 -o root -g hadoop /var/run/hadoop
+install -d -m 0775 -o root -g hadoop /var/run/yarn
 
 . /etc/default/hadoop
 . /etc/default/yarn
@@ -65,10 +65,10 @@ fi
 
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON_SCRIPT=$HADOOP_HOME/bin/hadoop-daemon.sh
+DAEMON_SCRIPT=$HADOOP_HOME/bin/yarn-daemon.sh
 NAME=hadoop-@HADOOP_DAEMON@
 DESC="Hadoop @HADOOP_DAEMON@ daemon"
-PID_FILE=$HADOOP_PID_DIR/hadoop-$HADOOP_IDENT_STRING-@HADOOP_DAEMON@.pid
+PID_FILE=$YARN_PID_DIR/hadoop-$YARN_IDENT_STRING-@HADOOP_DAEMON@.pid
 SLEEP_TIME=5
 
 test -x $DAEMON_SCRIPT || exit 1
@@ -153,35 +153,15 @@ hadoop_stop_pidfile() {
 }
 
 start() {
-    TARGET_USER_NAME="HADOOP_`echo @HADOOP_DAEMON@ | tr a-z A-Z`_USER"
+    TARGET_USER_NAME="YARN_`echo @HADOOP_DAEMON@ | tr a-z A-Z`_USER"
     TARGET_USER=$(eval "echo \$$TARGET_USER_NAME")
-    
-    if [ "@HADOOP_DAEMON@" = "datanode" ]; then
-      # The following needs to be removed once HDFS-1943 gets finally put to rest.
-      # The logic of this ugly hack is this: IFF we do NOT have jsvc installed it is
-      # guaranteed that we can NOT be running in a secure mode and thus we need to
-      # workaround HDFS-1943 (start as non-root). As soon as jsvc gets installed
-      # we are assuming a secure installation and starting a data node as root.
-      # This leaves 2 corner cases:
-      #    1. HADOOP_DATANODE_USER being set to root
-      #    2. jsvc is installed but Hadoop is configures to run in an unsecure mode
-      # Both will currently fail
-      if [ -f $HADOOP_HOME/libexec/jsvc.amd64 -o -f $HADOOP_HOME/libexec/jsvc.i386 ] &&
[ -n "$HADOOP_SECURE_DN_USER" ]; then
-         TARGET_USER=root
-      fi
-    fi
-    su -s /bin/bash $TARGET_USER -c "$HADOOP_HOME/bin/hadoop-daemon.sh start @HADOOP_DAEMON@
$DAEMON_FLAGS"
+    su -s /bin/bash $TARGET_USER -c "$HADOOP_HOME/bin/yarn-daemon.sh start @HADOOP_DAEMON@
$DAEMON_FLAGS"
 
     # Some processes are slow to start
     sleep $SLEEP_TIME
 }
 stop() {
-    $HADOOP_HOME/bin/hadoop-daemon.sh stop @HADOOP_DAEMON@
-
-    if [ "@HADOOP_DAEMON@" = "datanode" ]; then
-      # Some processes are slow to stop
-      sleep $SLEEP_TIME
-    fi
+    $HADOOP_HOME/bin/yarn-daemon.sh stop @HADOOP_DAEMON@
 }
 
 check_for_root() {
@@ -253,18 +233,8 @@ hadoop_service() {
             ;;
         *)
             N=/etc/init.d/$NAME
-            if [ "@HADOOP_DAEMON@" = "namenode" ]; then
-              if [ "$1" = "upgrade" -o "$1" = "rollback" ]; then
-                DAEMON_FLAGS=-$1 $0 start
-                exit $?
-              else
-                echo "Usage: $N {start|stop|restart|force-reload|status|force-stop|upgrade|rollback}"
>&2
-                exit 1
-              fi
-            else
-              echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
-              exit 1
-            fi
+			  	echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
+			  	exit 1
             ;;
     esac
 }

Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d.tpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d.tpl?rev=1213536&r1=1213535&r2=1213536&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d.tpl
(original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-packages/src/deb/hadoop/service-init.d.tpl
Tue Dec 13 01:42:16 2011
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -65,7 +65,7 @@ fi
 
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON_SCRIPT=$HADOOP_HOME/bin/hadoop-daemon.sh
+DAEMON_SCRIPT=$HADOOP_HOME/sbin/hadoop-daemon.sh
 NAME=hadoop-@HADOOP_DAEMON@
 DESC="Hadoop @HADOOP_DAEMON@ daemon"
 PID_FILE=$HADOOP_PID_DIR/hadoop-$HADOOP_IDENT_STRING-@HADOOP_DAEMON@.pid
@@ -170,13 +170,13 @@ start() {
          TARGET_USER=root
       fi
     fi
-    su -s /bin/bash $TARGET_USER -c "$HADOOP_HOME/bin/hadoop-daemon.sh start @HADOOP_DAEMON@
$DAEMON_FLAGS"
+    su -s /bin/bash $TARGET_USER -c "$HADOOP_HOME/sbin/hadoop-daemon.sh start @HADOOP_DAEMON@
$DAEMON_FLAGS"
 
     # Some processes are slow to start
     sleep $SLEEP_TIME
 }
 stop() {
-    $HADOOP_HOME/bin/hadoop-daemon.sh stop @HADOOP_DAEMON@
+    $HADOOP_HOME/sbin/hadoop-daemon.sh stop @HADOOP_DAEMON@
 
     if [ "@HADOOP_DAEMON@" = "datanode" ]; then
       # Some processes are slow to stop

Modified: incubator/bigtop/branches/hadoop-0.23/package.mk
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/package.mk?rev=1213536&r1=1213535&r2=1213536&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/package.mk (original)
+++ incubator/bigtop/branches/hadoop-0.23/package.mk Tue Dec 13 01:42:16 2011
@@ -124,6 +124,7 @@ $(BUILD_DIR)/%/.deb:
 				--preserve-envvar JAVA5_HOME \
 				--preserve-envvar FORREST_HOME \
 				--preserve-envvar MAVEN3_HOME \
+				--preserve-envvar MAVEN_OPTS \
 				--preserve-envvar JAVA_HOME \
 				--set-envvar=$(PKG)_BASE_VERSION=$($(PKG)_BASE_VERSION) \
 				--set-envvar=$(PKG)_VERSION=$($(PKG)_PKG_VERSION)$(BIGTOP_BUILD_STAMP) \



Mime
View raw message