incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1342037 - in /incubator/bigtop/trunk/bigtop-packages/src: common/hadoop/ rpm/hadoop/SPECS/
Date Wed, 23 May 2012 20:37:35 GMT
Author: rvs
Date: Wed May 23 20:37:35 2012
New Revision: 1342037

URL: http://svn.apache.org/viewvc?rev=1342037&view=rev
Log:
BIGTOP-416. run levels for init.d scripts need to be harmonized

Modified:
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-datanode.svc
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-secondarynamenode.svc
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-zkfc.svc
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-httpfs.svc
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-mapreduce-historyserver.svc
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-nodemanager.svc
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-proxyserver.svc
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-resourcemanager.svc
    incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/init.d.tmpl
    incubator/bigtop/trunk/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-datanode.svc
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-datanode.svc?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-datanode.svc (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-datanode.svc Wed
May 23 20:37:35 2012
@@ -23,10 +23,6 @@ PIDFILE="/var/run/hadoop-hdfs/hadoop-$SV
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="hadoop-$HADOOP_NAME"
 
-CHKCONFIG="2345 85 15"
-INIT_DEFAULT_START="3 4 5"
-INIT_DEFAULT_STOP="0 1 2 6"
-
 generate_start() {
 
 cat <<'__EOT__'

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc Wed
May 23 20:37:35 2012
@@ -23,10 +23,6 @@ PIDFILE="/var/run/hadoop-hdfs/hadoop-$SV
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="hadoop-$HADOOP_NAME"
 
-CHKCONFIG="2345 85 15"
-INIT_DEFAULT_START="3 4 5"
-INIT_DEFAULT_STOP="0 1 2 6"
-
 generate_extra_commands() {
 
 cat <<'__EOT__'

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-secondarynamenode.svc
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-secondarynamenode.svc?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-secondarynamenode.svc
(original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-secondarynamenode.svc
Wed May 23 20:37:35 2012
@@ -22,7 +22,3 @@ CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-hdfs/hadoop-$SVC_USER-$HADOOP_NAME.pid"
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="hadoop-$HADOOP_NAME"
-
-CHKCONFIG="2345 85 15"
-INIT_DEFAULT_START="3 4 5"
-INIT_DEFAULT_STOP="0 1 2 6"

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-zkfc.svc
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-zkfc.svc?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-zkfc.svc (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-hdfs-zkfc.svc Wed May
23 20:37:35 2012
@@ -22,7 +22,3 @@ CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-hdfs/hadoop-$SVC_USER-$HADOOP_NAME.pid"
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="hadoop-$HADOOP_NAME"
-
-CHKCONFIG="2345 85 15"
-INIT_DEFAULT_START="3 4 5"
-INIT_DEFAULT_STOP="0 1 2 6"

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-httpfs.svc
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-httpfs.svc?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-httpfs.svc (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-httpfs.svc Wed May 23
20:37:35 2012
@@ -23,9 +23,8 @@ PIDFILE="/var/run/$DAEMON/hadoop-$SVC_US
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="hadoop-$HADOOP_NAME"
 
-CHKCONFIG="345 90 10"
-INIT_DEFAULT_START="3 4 5"
-INIT_DEFAULT_STOP="0 1 2 6"
+CHKCONFIG=${CHKCONFIG:-"2345 90 10"}
+CHKCONFIG="${CHKCONFIG%% *} 90 10"
 
 generate_start() {
 

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-mapreduce-historyserver.svc
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-mapreduce-historyserver.svc?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-mapreduce-historyserver.svc
(original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-mapreduce-historyserver.svc
Wed May 23 20:37:35 2012
@@ -22,7 +22,3 @@ CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-mapreduce/yarn-$SVC_USER-$HADOOP_NAME.pid"
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="hadoop-$HADOOP_NAME"
-
-CHKCONFIG="345 85 15"
-INIT_DEFAULT_START="3 4 5"
-INIT_DEFAULT_STOP="0 1 2 6"

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-nodemanager.svc
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-nodemanager.svc?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-nodemanager.svc (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-nodemanager.svc Wed
May 23 20:37:35 2012
@@ -22,7 +22,3 @@ CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-yarn/yarn-$SVC_USER-$HADOOP_NAME.pid"
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="hadoop-$HADOOP_NAME"
-
-CHKCONFIG="345 85 15"
-INIT_DEFAULT_START="3 4 5"
-INIT_DEFAULT_STOP="0 1 2 6"

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-proxyserver.svc
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-proxyserver.svc?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-proxyserver.svc (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-proxyserver.svc Wed
May 23 20:37:35 2012
@@ -22,7 +22,3 @@ CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-yarn/yarn-$SVC_USER-$HADOOP_NAME.pid"
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="hadoop-$HADOOP_NAME"
-
-CHKCONFIG="345 85 15"
-INIT_DEFAULT_START="3 4 5"
-INIT_DEFAULT_STOP="0 1 2 6"

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-resourcemanager.svc
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-resourcemanager.svc?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-resourcemanager.svc
(original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/hadoop-yarn-resourcemanager.svc
Wed May 23 20:37:35 2012
@@ -22,7 +22,3 @@ CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-yarn/yarn-$SVC_USER-$HADOOP_NAME.pid"
 LOCKDIR="/var/lock/subsys"
 LOCKFILE="hadoop-$HADOOP_NAME"
-
-CHKCONFIG="345 85 15"
-INIT_DEFAULT_START="3 4 5"
-INIT_DEFAULT_STOP="0 1 2 6"

Modified: incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/init.d.tmpl
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/init.d.tmpl?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/init.d.tmpl (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/init.d.tmpl Wed May 23 20:37:35
2012
@@ -104,6 +104,14 @@ __EOT__
 }
 
 ###################################################################
+# Some reasonable defaults for the run-level settings, these are
+# tweaked on a per-OS basis from the SPEC/rules files that call us
+# and can be further tweaked inside of individual .svc templates
+CHKCONFIG=${CHKCONFIG:-"2345 85 15"}
+INIT_DEFAULT_START=${INIT_DEFAULT_START:-"2 3 4 5"}
+INIT_DEFAULT_STOP=${INIT_DEFAULT_STOP:-"0 1 6"}
+
+###################################################################
 # NOTE how we are sourcing the argument here so that a user-defined
 # settings have a chance to override the default values for 
 # generate_start, generate_stop and generate_extra_commands. If you

Modified: incubator/bigtop/trunk/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec?rev=1342037&r1=1342036&r2=1342037&view=diff
==============================================================================
--- incubator/bigtop/trunk/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec (original)
+++ incubator/bigtop/trunk/bigtop-packages/src/rpm/hadoop/SPECS/hadoop.spec Wed May 23 20:37:35
2012
@@ -471,7 +471,11 @@ echo 'export JSVC_HOME=%{libexecdir}/big
 for service in %{hadoop_services}
 do
        init_file=$RPM_BUILD_ROOT/%{initd_dir}/%{name}-${service}
-       bash $RPM_SOURCE_DIR/init.d.tmpl $RPM_SOURCE_DIR/%{name}-${service}.svc > $init_file
+       # On RedHat, SuSE and Mageia run-level 2 is networkless, hence excluding it
+       /bin/env CHKCONFIG="345 85 15"       \
+                INIT_DEFAULT_START="3 4 5"  \
+                INIT_DEFAULT_STOP="0 1 2 6" \
+         bash $RPM_SOURCE_DIR/init.d.tmpl $RPM_SOURCE_DIR/%{name}-${service}.svc > $init_file
        chmod 755 $init_file
        cp $RPM_SOURCE_DIR/${service/-*/}.default $RPM_BUILD_ROOT/etc/default/%{name}-${service}
        chmod 644 $RPM_BUILD_ROOT/etc/default/%{name}-${service}



Mime
View raw message