private void resetKafkaIngestion(String overlordAddress, String dataSourceName) {
    try {
      StringFullResponseHolder
          response =
          RetryUtils.retry(() -> DruidStorageHandlerUtils.getResponseFromCurrentLeader(getHttpClient(),
              new Request(HttpMethod.POST, new URL(
                  String.format("http://%s/druid/indexer/v1/supervisor/%s/reset", overlordAddress, dataSourceName))),
              new StringFullResponseHandler(Charset.forName("UTF-8"))), input -> input instanceof IOException,
              getMaxRetryCount());
      if (response.getStatus().equals(HttpResponseStatus.OK)) {
        CONSOLE.printInfo("Druid Kafka Ingestion Reset successful.");
      } else {
        throw new IOException(String.format("Unable to reset Kafka Ingestion Druid status [%d] full response [%s]",
            response.getStatus().getCode(),
            response.getContent()));
      }
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
Druid config for determining the host name
druid-handler/src/java/org/apache/hadoop/hive/druid/DruidStorageHandler.java