HDFS-17011. Fix the metric of "HttpPort" at DataNodeInfo (#5657). Contributed by Zhaohui Wang.
Reviewed-by: Inigo Goiri <inigoiri@apache.org> Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
parent
5ddaf2e133
commit
03163f9de2
|
@ -3558,7 +3558,7 @@ public class DataNode extends ReconfigurableBase
|
|||
|
||||
@Override // DataNodeMXBean
|
||||
public String getHttpPort(){
|
||||
return this.getConf().get("dfs.datanode.info.port");
|
||||
return String.valueOf(infoPort);
|
||||
}
|
||||
|
||||
@Override // DataNodeMXBean
|
||||
|
|
|
@ -92,6 +92,7 @@ public class TestDataNodeMXBean extends SaslDataTransferTestCase {
|
|||
Assert.assertEquals(datanode.getRpcPort(),rpcPort);
|
||||
// get attribute "HttpPort"
|
||||
String httpPort = (String)mbs.getAttribute(mxbeanName, "HttpPort");
|
||||
Assert.assertNotNull(httpPort);
|
||||
Assert.assertEquals(datanode.getHttpPort(),httpPort);
|
||||
// get attribute "NamenodeAddresses"
|
||||
String namenodeAddresses = (String)mbs.getAttribute(mxbeanName,
|
||||
|
|
Loading…
Reference in New Issue