@Override
  public int getHttp2Port() {
    if (hasHttp2Port()) {
      return ports.get(PortType.HTTP2).getPort();
    }
    throw new IllegalArgumentException("No HTTP2 port exists for the datanode " + hostname + ":" + portNum);
  }
This datanode will always return an HTTP/2 port in {@link #getPortToConnectTo()} if enableHttp2Replication
is set to true.
@param enable http2 replication if it's true.
ambry-test-utils/src/main/java/com/github/ambry/clustermap/MockDataNodeId.java