public static String [ ] setGenericConf ( String [ ] argv , Configuration conf ) { String [ ] serviceId = new String [ 1 ] ; serviceId [ 0 ] = "" ; String [ ] filteredArgv = getServiceName ( argv , serviceId ) ; if ( ! serviceId [ 0 ] . equals ( "" ) ) { if ( ! NameNode . validateServiceName ( conf , serviceId [ 0 ] ) ) { throw new IllegalArgumentException ( "Service Id doesn't match the config" ) ; } setGenericConf ( conf , serviceId [ 0 ] , NameNode . NAMESERVICE_SPECIFIC_KEYS ) ; NameNode . setupDefaultURI ( conf ) ; } return filteredArgv ; }
Set the configuration based on the service id given in the argv