code: public static void updateProperty(Configuration conf, String prefix, String[] altPrefix,
        String key, Properties props, String propsKey,
        boolean required) throws ConfigurationParseException {
      String val = conf.get(prefix + key);
      String altKey = prefix + key;
      if (val == null) {
        // try alternative key
        for (String alternativePrefix : altPrefix) {
          altKey = alternativePrefix + key;
          val = conf.get(altKey);
        }
      }
      if (required && val == null) {
        throw new ConfigurationParseException("Missing mandatory configuration: " + key);
      }
      if (val != null) {
        LOG.trace("Found alternative key {} value {}", altKey, val);
        props.setProperty(propsKey, val.trim());
      }
    }
docs: Read key from core-site.xml and parse it to connector configuration
  
  @param conf source configuration
  @param prefix configuration key prefix
  @param altPrefix alternative prefix list. The last on the list wins
  @param key key in the configuration file
  @param props destination property set
  @param propsKey key in the property set
  @param required if the key is mandatory
  @throws ConfigurationParseException if there was no match for the key