incubator-bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bm...@apache.org
Subject svn commit: r1341673 - /incubator/bigtop/trunk/bigtop-packages/src/common/hadoop/
Date Tue, 22 May 2012 22:59:17 GMT
Author: bmahe
Date: Tue May 22 22:59:16 2012
New Revision: 1341673

URL: http://svn.apache.org/viewvc?rev=1341673&view=rev
Log:
BIGTOP-599. /var/lock/subsys may not exist on some distributions and this create some issues
in Apache Hadoop

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

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=1341673&r1=1341672&r2=1341673&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 Tue
May 22 22:59:16 2012
@@ -20,7 +20,8 @@ SVC_USER="hdfs"
 DAEMON_FLAGS="$HADOOP_NAME"
 CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-hdfs/hadoop-$SVC_USER-$HADOOP_NAME.pid"
-LOCKFILE="/var/lock/subsys/hadoop-$HADOOP_NAME"
+LOCKDIR="/var/lock/subsys"
+LOCKFILE="hadoop-$HADOOP_NAME"
 
 CHKCONFIG="2345 85 15"
 INIT_DEFAULT_START="3 4 5"

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=1341673&r1=1341672&r2=1341673&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 Tue
May 22 22:59:16 2012
@@ -20,7 +20,8 @@ SVC_USER="hdfs"
 DAEMON_FLAGS="$HADOOP_NAME"
 CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-hdfs/hadoop-$SVC_USER-$HADOOP_NAME.pid"
-LOCKFILE="/var/lock/subsys/hadoop-$HADOOP_NAME"
+LOCKDIR="/var/lock/subsys"
+LOCKFILE="hadoop-$HADOOP_NAME"
 
 CHKCONFIG="2345 85 15"
 INIT_DEFAULT_START="3 4 5"

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=1341673&r1=1341672&r2=1341673&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
Tue May 22 22:59:16 2012
@@ -20,7 +20,8 @@ SVC_USER="hdfs"
 DAEMON_FLAGS="$HADOOP_NAME"
 CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-hdfs/hadoop-$SVC_USER-$HADOOP_NAME.pid"
-LOCKFILE="/var/lock/subsys/hadoop-$HADOOP_NAME"
+LOCKDIR="/var/lock/subsys"
+LOCKFILE="hadoop-$HADOOP_NAME"
 
 CHKCONFIG="2345 85 15"
 INIT_DEFAULT_START="3 4 5"

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=1341673&r1=1341672&r2=1341673&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 Tue May
22 22:59:16 2012
@@ -20,7 +20,8 @@ SVC_USER="hdfs"
 DAEMON_FLAGS="$HADOOP_NAME"
 CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-hdfs/hadoop-$SVC_USER-$HADOOP_NAME.pid"
-LOCKFILE="/var/lock/subsys/hadoop-$HADOOP_NAME"
+LOCKDIR="/var/lock/subsys"
+LOCKFILE="hadoop-$HADOOP_NAME"
 
 CHKCONFIG="2345 85 15"
 INIT_DEFAULT_START="3 4 5"

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=1341673&r1=1341672&r2=1341673&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 Tue May 22
22:59:16 2012
@@ -20,7 +20,8 @@ SVC_USER="$HADOOP_NAME"
 DAEMON_FLAGS="$HADOOP_NAME"
 CONF_DIR="/etc/$DAEMON/conf"
 PIDFILE="/var/run/$DAEMON/hadoop-$SVC_USER-$HADOOP_NAME.pid"
-LOCKFILE="/var/lock/subsys/$DAEMON"
+LOCKDIR="/var/lock/subsys"
+LOCKFILE="hadoop-$HADOOP_NAME"
 
 CHKCONFIG="345 90 10"
 INIT_DEFAULT_START="3 4 5"

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=1341673&r1=1341672&r2=1341673&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
Tue May 22 22:59:16 2012
@@ -20,7 +20,8 @@ SVC_USER="mapred"
 DAEMON_FLAGS="$HADOOP_NAME"
 CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-mapreduce/yarn-$SVC_USER-$HADOOP_NAME.pid"
-LOCKFILE="/var/lock/subsys/hadoop-$HADOOP_NAME"
+LOCKDIR="/var/lock/subsys"
+LOCKFILE="hadoop-$HADOOP_NAME"
 
 CHKCONFIG="345 85 15"
 INIT_DEFAULT_START="3 4 5"

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=1341673&r1=1341672&r2=1341673&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 Tue
May 22 22:59:16 2012
@@ -20,7 +20,8 @@ SVC_USER="yarn"
 DAEMON_FLAGS="$HADOOP_NAME"
 CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-yarn/yarn-$SVC_USER-$HADOOP_NAME.pid"
-LOCKFILE="/var/lock/subsys/hadoop-$HADOOP_NAME"
+LOCKDIR="/var/lock/subsys"
+LOCKFILE="hadoop-$HADOOP_NAME"
 
 CHKCONFIG="345 85 15"
 INIT_DEFAULT_START="3 4 5"

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=1341673&r1=1341672&r2=1341673&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 Tue
May 22 22:59:16 2012
@@ -20,7 +20,8 @@ SVC_USER="yarn"
 DAEMON_FLAGS="$HADOOP_NAME"
 CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-yarn/yarn-$SVC_USER-$HADOOP_NAME.pid"
-LOCKFILE="/var/lock/subsys/hadoop-$HADOOP_NAME"
+LOCKDIR="/var/lock/subsys"
+LOCKFILE="hadoop-$HADOOP_NAME"
 
 CHKCONFIG="345 85 15"
 INIT_DEFAULT_START="3 4 5"

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=1341673&r1=1341672&r2=1341673&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
Tue May 22 22:59:16 2012
@@ -20,7 +20,8 @@ SVC_USER="yarn"
 DAEMON_FLAGS="$HADOOP_NAME"
 CONF_DIR="/etc/hadoop/conf"
 PIDFILE="/var/run/hadoop-yarn/yarn-$SVC_USER-$HADOOP_NAME.pid"
-LOCKFILE="/var/lock/subsys/hadoop-$HADOOP_NAME"
+LOCKDIR="/var/lock/subsys"
+LOCKFILE="hadoop-$HADOOP_NAME"
 
 CHKCONFIG="345 85 15"
 INIT_DEFAULT_START="3 4 5"

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=1341673&r1=1341672&r2=1341673&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 Tue May 22 22:59:16
2012
@@ -183,9 +183,11 @@ SVC_USER="$SVC_USER"
 DAEMON_FLAGS="$DAEMON_FLAGS"
 CONF_DIR="$CONF_DIR"
 PIDFILE="$PIDFILE"
-LOCKFILE="$LOCKFILE"
+LOCKDIR="$LOCKDIR"
+LOCKFILE="\$LOCKDIR/$LOCKFILE"
 
 install -d -m 0755 -o $SVC_USER -g $SVC_USER $(dirname $PIDFILE) 1>/dev/null 2>&1
|| :
+[ -d "\$LOCKDIR" ] || install -d -m 0755 \$LOCKDIR 1>/dev/null 2>&1 || :
 __EOT__
 
 generate_start



Mime
View raw message