hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1130694 - in /hadoop/hdfs/branches/branch-0.22: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java src/webapps/hdfs/dfshealth.jsp
Date Thu, 02 Jun 2011 17:55:06 GMT
Author: todd
Date: Thu Jun  2 17:55:06 2011
New Revision: 1130694

URL: http://svn.apache.org/viewvc?rev=1130694&view=rev
Log:
Revert HDFS-1954 since there is some discussion on the JIRA.

Modified:
    hadoop/hdfs/branches/branch-0.22/CHANGES.txt
    hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
    hadoop/hdfs/branches/branch-0.22/src/webapps/hdfs/dfshealth.jsp

Modified: hadoop/hdfs/branches/branch-0.22/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/branch-0.22/CHANGES.txt?rev=1130694&r1=1130693&r2=1130694&view=diff
==============================================================================
--- hadoop/hdfs/branches/branch-0.22/CHANGES.txt (original)
+++ hadoop/hdfs/branches/branch-0.22/CHANGES.txt Thu Jun  2 17:55:06 2011
@@ -249,9 +249,6 @@ Release 0.22.0 - Unreleased
 
     HDFS-1957. Add documentation for HFTP. (Ari Rabkin via todd)
 
-    HDFS-1954. Improve corrupt files warning message on NameNode web UI.
-    (Patrick Hunt via todd)
-
   OPTIMIZATIONS
 
     HDFS-1140. Speedup INode.getPathComponents. (Dmytro Molkov via shv)

Modified: hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java?rev=1130694&r1=1130693&r2=1130694&view=diff
==============================================================================
--- hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
(original)
+++ hadoop/hdfs/branches/branch-0.22/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
Thu Jun  2 17:55:06 2011
@@ -34,7 +34,6 @@ import javax.servlet.http.HttpServletRes
 import javax.servlet.jsp.JspWriter;
 
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.protocol.Block;
 import org.apache.hadoop.hdfs.protocol.DatanodeID;
 import org.apache.hadoop.hdfs.protocol.FSConstants.UpgradeAction;
@@ -134,30 +133,12 @@ class NamenodeJspHelper {
         + getUpgradeStatusText(fsn) + "\n</table></div>";
   }
 
-  /**
-   * Generate warning text if there are corrupt files.
-   * @return a warning (incl. link to detail page) if files are corrupt,
-   * otherwise return an empty string.
-   */
-  static String getCorruptFilesWarning(FSNamesystem fsn) {
+  static String getWarningText(FSNamesystem fsn) {
     // Ideally this should be displayed in RED
     long missingBlocks = fsn.getMissingBlocksCount();
     if (missingBlocks > 0) {
-      StringBuilder result = new StringBuilder();
-
-      // Warning class is typically displayed in RED
-      result.append("<br/><a class=\"warning\" href=\"/corrupt_files.jsp\" title=\"List
corrupt files\">\n");
-      result.append("<b>WARNING : There are " + missingBlocks
-          + " missing blocks. Please check the log or run fsck.</b>");
-      result.append("</a>");
-
-      result.append("<br/><div class=\"small\">Hint: A common mis-configuration
is not ");
-      result.append("overriding \"" + DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY
-          + "\" on all datanodes");
-      result.append("(the default is typically /tmp which is not persistent)</div>");
-      result.append("<br/><br/>\n");
-
-      return result.toString();
+      return "<br> WARNING :" + " There are about " + missingBlocks
+          + " missing blocks. Please check the log or run fsck. <br><br>";
     }
     return "";
   }

Modified: hadoop/hdfs/branches/branch-0.22/src/webapps/hdfs/dfshealth.jsp
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/branch-0.22/src/webapps/hdfs/dfshealth.jsp?rev=1130694&r1=1130693&r2=1130694&view=diff
==============================================================================
--- hadoop/hdfs/branches/branch-0.22/src/webapps/hdfs/dfshealth.jsp (original)
+++ hadoop/hdfs/branches/branch-0.22/src/webapps/hdfs/dfshealth.jsp Thu Jun  2 17:55:06 2011
@@ -50,7 +50,9 @@
 <b> <%= NamenodeJspHelper.getSecurityModeText()%> </b>
 <b> <%= NamenodeJspHelper.getSafeModeText(fsn)%> </b>
 <b> <%= NamenodeJspHelper.getInodeLimitText(fsn)%> </b>
-<%= NamenodeJspHelper.getCorruptFilesWarning(fsn)%>
+<a class="warning" href="/corrupt_files.jsp" title="List corrupt files">
+  <%= NamenodeJspHelper.getWarningText(fsn)%>
+</a>
 
 <% healthjsp.generateHealthReport(out, nn, request); %>
 <hr>



Mime
View raw message