|
@@ -77,18 +77,6 @@ public class DatanodeJspHelper {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Internal convenience method for canonicalizing host name.
|
|
|
- * @param addr name:port or name
|
|
|
- * @return canonicalized host name
|
|
|
- */
|
|
|
- private static String canonicalize(String addr) {
|
|
|
- // default port 1 is supplied to allow addr without port.
|
|
|
- // the port will be ignored.
|
|
|
- return NetUtils.createSocketAddr(addr, 1).getAddress()
|
|
|
- .getCanonicalHostName();
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Get the default chunk size.
|
|
|
* @param conf the configuration
|
|
@@ -228,7 +216,7 @@ public class DatanodeJspHelper {
|
|
|
}
|
|
|
}
|
|
|
out.print("<br><a href=\"///"
|
|
|
- + canonicalize(nnAddr) + ":"
|
|
|
+ + JspHelper.canonicalize(nnAddr) + ":"
|
|
|
+ namenodeInfoPort + "/dfshealth.jsp\">Go back to DFS home</a>");
|
|
|
dfs.close();
|
|
|
}
|
|
@@ -359,7 +347,7 @@ public class DatanodeJspHelper {
|
|
|
// generate a table and dump the info
|
|
|
out.println("\n<table>");
|
|
|
|
|
|
- String nnCanonicalName = canonicalize(nnAddr);
|
|
|
+ String nnCanonicalName = JspHelper.canonicalize(nnAddr);
|
|
|
for (LocatedBlock cur : blocks) {
|
|
|
out.print("<tr>");
|
|
|
final String blockidstring = Long.toString(cur.getBlock().getBlockId());
|