HBASE-8812 Avoid a wide line on the HMaster webUI if we have many ZooKeeper servers -- REVERT MISAPPLICATION
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1499059 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a51ed6e356
commit
4dfb79652d
|
@ -57,34 +57,6 @@ ServerManager serverManager = master.getServerManager();
|
|||
AssignmentManager assignmentManager = master.getAssignmentManager();
|
||||
</%java>
|
||||
|
||||
<%class>
|
||||
public String formatZKString() {
|
||||
StringBuilder quorums = new StringBuilder();
|
||||
String zkQuorum = master.getZooKeeperWatcher().getQuorum();
|
||||
|
||||
if (null == zkQuorum) {
|
||||
return quorums.toString();
|
||||
}
|
||||
|
||||
String[] zks = zkQuorum.split(",");
|
||||
|
||||
if (zks.length == 0) {
|
||||
return quorums.toString();
|
||||
}
|
||||
|
||||
for(int i = 0; i < zks.length; ++i) {
|
||||
quorums.append(zks[i].trim()).append(",");
|
||||
|
||||
if ((i+1) % 4 == 0 && i != (zks.length - 1)) {
|
||||
quorums.append("<br/>");
|
||||
}
|
||||
}
|
||||
|
||||
quorums.setLength(quorums.length() - 1);
|
||||
return quorums.toString();
|
||||
}
|
||||
</%class>
|
||||
|
||||
<!--[if IE]>
|
||||
<!DOCTYPE html>
|
||||
<![endif]-->
|
||||
|
@ -239,8 +211,7 @@ AssignmentManager assignmentManager = master.getAssignmentManager();
|
|||
</tr>
|
||||
<tr>
|
||||
<td>Zookeeper Quorum</td>
|
||||
<%escape #n>
|
||||
<td> <% formatZKString() %> </td>
|
||||
<td><% master.getZooKeeperWatcher().getQuorum() %></td>
|
||||
<td>Addresses of all registered ZK servers. For more, see <a href="/zk.jsp">zk dump</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue