private static String getPassword(Configuration conf, HiveConf.ConfVars var) {
    try {
      final char[] password = conf.getPassword(var.varname);
      return password == null ? null : String.valueOf(password);
    } catch (IOException e) {
      // Reading password from configuration for backwards compatibility.
      LOG.warn("Unable to retrieve password from credential providers. Trying to read it from config..", e);
      return conf.get(var.varname);
    }
  }
This function checks the load status of Druid segments by polling druid coordinator.
@param segments List of druid segments to check for
druid-handler/src/java/org/apache/hadoop/hive/druid/DruidStorageHandler.java