private static String getConfValue ( String defaultValue , String keySuffix , Configuration conf , String ... keys ) { String value = null ; for ( String key : keys ) { if ( keySuffix != null ) { key += "." + keySuffix ; } value = conf . get ( key ) ; if ( value != null ) { break ; } } if ( value == null ) { value = defaultValue ; } return value ; }
Given a list of keys in the order of preference returns a value for the key in the given order from the configuration .