HDDS-908: NPE in TestOzoneRpcClient.
Contributed by Ajay Kumar.
This commit is contained in:
parent
71e0b0d800
commit
5426653819
|
@ -1438,11 +1438,14 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
|
||||||
.setNodeType(HddsProtos.NodeType.DATANODE)
|
.setNodeType(HddsProtos.NodeType.DATANODE)
|
||||||
.setHostname(datanode.getHostName());
|
.setHostname(datanode.getHostName());
|
||||||
|
|
||||||
|
if(DatanodeDetails.getFromProtoBuf(datanode)
|
||||||
|
.getPort(DatanodeDetails.Port.Name.REST) != null) {
|
||||||
dnServiceInfoBuilder.addServicePort(ServicePort.newBuilder()
|
dnServiceInfoBuilder.addServicePort(ServicePort.newBuilder()
|
||||||
.setType(ServicePort.Type.HTTP)
|
.setType(ServicePort.Type.HTTP)
|
||||||
.setValue(DatanodeDetails.getFromProtoBuf(datanode)
|
.setValue(DatanodeDetails.getFromProtoBuf(datanode)
|
||||||
.getPort(DatanodeDetails.Port.Name.REST).getValue())
|
.getPort(DatanodeDetails.Port.Name.REST).getValue())
|
||||||
.build());
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
services.add(dnServiceInfoBuilder.build());
|
services.add(dnServiceInfoBuilder.build());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue