public static void updateProperty(Configuration conf,String prefix,String alternativePrefix,String key,Properties props,String propsKey,boolean required) throws ConfigurationParseException {
  String val=conf.get(prefix + key);
  if (val == null) {
    val=conf.get(alternativePrefix + key);
    LOG.trace("Trying alternative key {}{}",alternativePrefix,key);
  }
  if (required && val == null) {
    throw new ConfigurationParseException("Missing mandatory configuration: " + key);
  }
  if (val != null) {
    props.setProperty(propsKey,val.trim());
  }
}

public static void updateProperty ( Configuration conf , String prefix , String alternativePrefix , String key , Properties props , String propsKey , boolean required ) throws ConfigurationParseException { String val = conf . get ( prefix + key ) ; if ( val == null ) { val = conf . get ( alternativePrefix + key ) ; LOG . trace ( "Trying alternative key {}{}" , alternativePrefix , key ) ; } if ( required && val == null ) { throw new ConfigurationParseException ( "Missing mandatory configuration: " + key ) ; } if ( val != null ) { props . setProperty ( propsKey , val . trim ( ) ) ; } }
read key from core - site . xml and parse it to swift configuration
