hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r434077 - in /lucene/hadoop/trunk: CHANGES.txt bin/hadoop-daemon.sh conf/hadoop-env.sh.template
Date Wed, 23 Aug 2006 16:50:28 GMT
Author: cutting
Date: Wed Aug 23 09:50:27 2006
New Revision: 434077

URL: http://svn.apache.org/viewvc?rev=434077&view=rev
Log:
HADOOP-468.  Add HADOOP_NICENESS environment variable to set the scheduling priority for daemons.
 Contributed by Vetle Roeim.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/bin/hadoop-daemon.sh
    lucene/hadoop/trunk/conf/hadoop-env.sh.template

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=434077&r1=434076&r2=434077&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Aug 23 09:50:27 2006
@@ -65,6 +65,9 @@
     /bin/sh scripts since HADOOP-352.
     (Jean-Baptiste Quenot via cutting)
 
+16. HADOOP-468.  Add HADOOP_NICENESS environment variable to set
+    scheduling priority for daemons.  (Vetle Roeim via cutting)
+
 
 Release 0.5.0 - 2006-08-04
 

Modified: lucene/hadoop/trunk/bin/hadoop-daemon.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/hadoop-daemon.sh?rev=434077&r1=434076&r2=434077&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/hadoop-daemon.sh (original)
+++ lucene/hadoop/trunk/bin/hadoop-daemon.sh Wed Aug 23 09:50:27 2006
@@ -9,6 +9,7 @@
 #   HADOOP_MASTER    host:path where hadoop code should be rsync'd from
 #   HADOOP_PID_DIR   The pid files are stored. /tmp by default.
 #   HADOOP_IDENT_STRING   A string representing this instance of hadoop. $USER by default
+#   HADOOP_NICENESS The scheduling priority for daemons. Defaults to 0.
 ##
 
 usage="Usage: hadoop-daemon.sh [--config <conf-dir>] (start|stop) <hadoop-command>
<args...>"
@@ -54,6 +55,11 @@
 log=$HADOOP_LOG_DIR/hadoop-$HADOOP_IDENT_STRING-$command-`hostname`.out
 pid=$HADOOP_PID_DIR/hadoop-$HADOOP_IDENT_STRING-$command.pid
 
+# Set default scheduling priority
+if [ "$HADOOP_NICENESS" == "" ]; then
+    export HADOOP_NICENESS=0
+fi
+
 case $startStop in
 
   (start)
@@ -71,7 +77,7 @@
     fi
 
     echo starting $command, logging to $log
-    nohup "$HADOOP_HOME"/bin/hadoop --config $HADOOP_CONF_DIR $command "$@" > "$log" 2>&1
< /dev/null &
+    nohup nice -n $HADOOP_NICENESS "$HADOOP_HOME"/bin/hadoop --config $HADOOP_CONF_DIR $command
"$@" > "$log" 2>&1 < /dev/null &
     echo $! > $pid
     sleep 1; head "$log"
     ;;

Modified: lucene/hadoop/trunk/conf/hadoop-env.sh.template
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/conf/hadoop-env.sh.template?rev=434077&r1=434076&r2=434077&view=diff
==============================================================================
--- lucene/hadoop/trunk/conf/hadoop-env.sh.template (original)
+++ lucene/hadoop/trunk/conf/hadoop-env.sh.template Wed Aug 23 09:50:27 2006
@@ -36,3 +36,6 @@
 
 # A string representing this instance of hadoop. $USER by default.
 # export HADOOP_IDENT_STRING=$USER
+
+# The scheduling priority for daemon processes.  See 'man nice'.
+# export HADOOP_NICENESS=10



Mime
View raw message