code: 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;
    }
docs: Set the configuration based on the service id given in the argv
  @param argv argument list
  @param conf configuration
  @return argument list without service name argument