hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r556696 - in /lucene/hadoop/trunk: CHANGES.txt src/webapps/dfs/dfshealth.jsp
Date Mon, 16 Jul 2007 18:56:51 GMT
Author: cutting
Date: Mon Jul 16 11:56:49 2007
New Revision: 556696

URL: http://svn.apache.org/viewvc?view=rev&rev=556696
Log:
HADOOP-1613.  Fix DFS Health page to display correct time of last contact.  Contributed by
Dhruba.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/webapps/dfs/dfshealth.jsp

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=556696&r1=556695&r2=556696
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Jul 16 11:56:49 2007
@@ -359,6 +359,9 @@
 112. HADOOP-1562.  Add JVM metrics, including GC and logging stats.
      (David Bowen via cutting)
 
+113. HADOOP-1613.  Fix "DFS Health" page to display correct time of
+     last contact.  (Dhruba Borthakur via cutting)
+
 
 Release 0.13.0 - 2007-06-08
 

Modified: lucene/hadoop/trunk/src/webapps/dfs/dfshealth.jsp
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/webapps/dfs/dfshealth.jsp?view=diff&rev=556696&r1=556695&r2=556696
==============================================================================
--- lucene/hadoop/trunk/src/webapps/dfs/dfshealth.jsp (original)
+++ lucene/hadoop/trunk/src/webapps/dfs/dfshealth.jsp Mon Jul 16 11:56:49 2007
@@ -14,7 +14,6 @@
 <%!
   FSNamesystem fsn = FSNamesystem.getFSNamesystem();
   String namenodeLabel = fsn.getDFSNameNodeMachine() + ":" + fsn.getDFSNameNodePort();
-  long currentTime;
   JspHelper jspHelper = new JspHelper();
 
   int rowNum = 0;
@@ -97,8 +96,10 @@
                          (d.isDecommissionInProgress() ? "Decommission In Progress":
                           "In Service"));
     
+    long timestamp = d.getLastUpdate();
+    long currentTime = System.currentTimeMillis();
     out.print("<td class=\"lastcontact\"> " +
-              ((currentTime - d.getLastUpdate())/1000) +
+              ((currentTime - timestamp)/1000) +
 	      "<td class=\"adminstate\">" +
               adminState +
 	      "<td class=\"size\">" +
@@ -165,7 +166,6 @@
     }
     else {
         
-        currentTime = System.currentTimeMillis();
 	out.print( "<div id=\"dfsnodetable\"> "+
                    "<a name=\"LiveNodes\" id=\"title\">" +
                    "Live Datanodes : " + live.size() + "</a>" +



Mime
View raw message