HDFS-13301. Ozone: Remove containerPort, ratisPort and ozoneRestPort from DatanodeID and DatanodeIDProto. Contributed by Shashikant Banerjee.

This commit is contained in:
Nanda kumar 2018-04-07 01:39:08 +05:30 committed by Owen O'Malley
parent 82eb5da2b6
commit 0ec88ea42b
2 changed files with 4 additions and 13 deletions

View File

@ -336,9 +336,7 @@ public static DatanodeIDProto convert(DatanodeID dn) {
dn.getDatanodeUuid() : "")
.setInfoPort(dn.getInfoPort())
.setInfoSecurePort(dn.getInfoSecurePort())
.setIpcPort(dn.getIpcPort())
.setOzoneRestPort(dn.getOzoneRestPort())
.build();
.setIpcPort(dn.getIpcPort()).build();
}
public static DatanodeInfoProto.AdminState convert(
@ -788,13 +786,9 @@ public static Token<BlockTokenIdentifier> convert(
// DatanodeId
public static DatanodeID convert(DatanodeIDProto dn) {
DatanodeID datanodeID =
new DatanodeID(dn.getIpAddr(), dn.getHostName(), dn.getDatanodeUuid(),
dn.getXferPort(), dn.getInfoPort(),
dn.hasInfoSecurePort() ? dn.getInfoSecurePort() : 0,
dn.getIpcPort());
datanodeID.setOzoneRestPort(dn.getOzoneRestPort());
return datanodeID;
return new DatanodeID(dn.getIpAddr(), dn.getHostName(),
dn.getDatanodeUuid(), dn.getXferPort(), dn.getInfoPort(),
dn.hasInfoSecurePort() ? dn.getInfoSecurePort() : 0, dn.getIpcPort());
}
public static AdminStates convert(AdminState adminState) {

View File

@ -73,9 +73,6 @@ message DatanodeIDProto {
required uint32 infoPort = 5; // datanode http port
required uint32 ipcPort = 6; // ipc server port
optional uint32 infoSecurePort = 7 [default = 0]; // datanode https port
optional uint32 containerPort = 8 [default = 0]; // Ozone stand_alone protocol
optional uint32 ratisPort = 9 [default = 0]; //Ozone ratis port
optional uint32 ozoneRestPort = 10 [default = 0];
}
/**