@Override
      public final boolean equals(final Object other) {
        if(other instanceof Component) {
          Component comp = (Component) other;
          return Objects.equals(comp.role, role) && Objects.equals(comp.hostName, hostName);
        }

        return false;
      }
Two components are equal if their component name and host name are the same
@param other
@return
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java