code: public static void dumpYaml(Map conf, String file) {
          Yaml yaml = new Yaml();
          try {
              Writer writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
              yaml.dump(conf, writer);
          } catch (Exception ex) {
              LOG.error("Error:", ex);
          }
      }
docs: dumps a conf map into a file, note that the output yaml file uses a compact format
  e.g., for a list, it uses key: [xx, xx] instead of multiple lines.