@Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    DataNode dataNode = (DataNode) o;

    if (portNum != dataNode.portNum) {
      return false;
    }
    return hostname.equals(dataNode.hostname);
  }
Returns the {@link Port} of this node to connect to. A {@link Port} will be automatically selected based on if
there is a need of establishing an SSL connection.

@return {@link Port} to which the caller can connect to.
@throws IllegalStateException Thrown if an SSL connection is needed but no SSL port exists.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/DataNode.java