You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by dd...@apache.org on 2008/03/27 13:50:53 UTC
svn commit: r641798 - in /hadoop/core/trunk: CHANGES.txt
src/contrib/hod/bin/checknodes
Author: ddas
Date: Thu Mar 27 05:50:50 2008
New Revision: 641798
URL: http://svn.apache.org/viewvc?rev=641798&view=rev
Log:
HADOOP-2982. Fixes a problem in the way HOD looks for free nodes. Contributed by Hemanth Yamijala.
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/contrib/hod/bin/checknodes
Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=641798&r1=641797&r2=641798&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Mar 27 05:50:50 2008
@@ -386,6 +386,9 @@
HADOOP-3087. Fixes a problem to do with refreshing of loadHistory.jsp.
(Amareshwari Sriramadasu via ddas)
+ HADOOP-2982. Fixes a problem in the way HOD looks for free nodes.
+ (Hemanth Yamijala via ddas)
+
Release 0.16.2 - Unreleased
BUG FIXES
Modified: hadoop/core/trunk/src/contrib/hod/bin/checknodes
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hod/bin/checknodes?rev=641798&r1=641797&r2=641798&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/hod/bin/checknodes (original)
+++ hadoop/core/trunk/src/contrib/hod/bin/checknodes Thu Mar 27 05:50:50 2008
@@ -27,7 +27,5 @@
echo Usage: checknodes queue-name
exit 2
fi
-num=`$PBS_NODES_PATH :$1 2>&1 | grep "state = " | egrep -v "state = down" | grep -v "state = offline" | wc -l`
-totalused=`$PBS_NODES_PATH :$1 2>&1 | grep "jobs =" | wc -l`
-numleft=`expr $num - $totalused`
-echo $numleft
+# the number of nodes marked 'free', and which do not contain a jobs attribute from the server or from the moms.
+$PBS_NODES_PATH :$1 | awk 'BEGIN {c=0} /state = free/ {getline;getline;getline;getline; if ($0 !~ /jobs =/ && $0 !~ /jobs=[0-9].*/) c++ ; } END {print c}'