code: public static void initializeGenericKeys(Configuration conf, String serviceKey) {                                
      if ((serviceKey == null) || serviceKey.isEmpty()) {
        return;
      }    
      NameNode.initializeGenericKeys(conf, serviceKey);
      
      DFSUtil.setGenericConf(conf, serviceKey, AVATARSERVICE_SPECIFIC_KEYS);    
      
      // adjust meta directory names for this service
      adjustMetaDirectoryNames(conf, serviceKey);
    }
docs: In federation configuration is set for a set of
  avartanodes, namenodes etc, which are
  grouped under a logical nameservice ID. The configuration keys specific
  to them have suffix set to configured nameserviceId.
  
  This method copies the value from specific key of format key.nameserviceId
  to key, to set up the generic configuration. Once this is done, only
  generic version of the configuration is read in rest of the code, for
  backward compatibility and simpler code changes.
  
  @param conf
  Configuration object to lookup specific key and to set the value
  to the key passed. Note the conf object is modified
  @see DFSUtil#setGenericConf(Configuration, String, String...)