HDFS-4932. Merging change r1497141 from trunk to branch-2.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1497143 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cb74ad6ba0
commit
b7e4aae320
|
@ -198,6 +198,9 @@ Release 2.1.0-beta - 2013-07-02
|
||||||
|
|
||||||
HDFS-4772. Add number of children in HdfsFileStatus. (brandonli)
|
HDFS-4772. Add number of children in HdfsFileStatus. (brandonli)
|
||||||
|
|
||||||
|
HDFS-4932. Avoid a wide line on the name node webUI if we have more Journal
|
||||||
|
nodes. (Fengdong Yu via cnauroth)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -249,9 +249,30 @@ class NamenodeJspHelper {
|
||||||
+ "<thead><tr><td><b>Journal Manager</b></td><td><b>State</b></td></tr></thead>");
|
+ "<thead><tr><td><b>Journal Manager</b></td><td><b>State</b></td></tr></thead>");
|
||||||
for (JournalAndStream jas : log.getJournals()) {
|
for (JournalAndStream jas : log.getJournals()) {
|
||||||
out.print("<tr>");
|
out.print("<tr>");
|
||||||
out.print("<td>" + jas.getManager());
|
out.print("<td>");
|
||||||
if (jas.isRequired()) {
|
|
||||||
out.print(" [required]");
|
/**
|
||||||
|
* Insert a line break every 3 journal nodes to avoid a very wide line.
|
||||||
|
*/
|
||||||
|
JournalManager manager = jas.getManager();
|
||||||
|
if (null != manager) {
|
||||||
|
String[] managers = manager.toString().split(",");
|
||||||
|
|
||||||
|
for (int i = 0; i < managers.length; ++i) {
|
||||||
|
out.print(managers[i]);
|
||||||
|
|
||||||
|
if (i < managers.length - 1) {
|
||||||
|
out.print(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((i+1) % 3 == 0) {
|
||||||
|
out.print("<br/>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (jas.isRequired()) {
|
||||||
|
out.print(" [required]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
out.print("</td><td>");
|
out.print("</td><td>");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue