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

    KafkaSupervisorSpec that = (KafkaSupervisorSpec) o;

    if (dataSchema != null ? !dataSchema.equals(that.dataSchema) : that.dataSchema != null) {
      return false;
    }
    if (tuningConfig != null ? !tuningConfig.equals(that.tuningConfig) : that.tuningConfig != null) {
      return false;
    }
    if (ioConfig != null ? !ioConfig.equals(that.ioConfig) : that.ioConfig != null) {
      return false;
    }
    return context != null ? context.equals(that.context) : that.context == null;
  }
This class is copied from druid source code
in order to avoid adding additional dependencies on druid-indexing-service.
druid-handler/src/java/org/apache/hadoop/hive/druid/json/KafkaSupervisorSpec.java