code: private void writeConfToFile(File dir, Map<PropertyKey, String> properties) throws IOException {
      // Generates the full set of properties to write
      Map<PropertyKey, String> map = new HashMap<>(mProperties);
      for (Map.Entry<PropertyKey, String> entry : properties.entrySet()) {
        map.put(entry.getKey(), entry.getValue());
      }
  
      StringBuilder sb = new StringBuilder();
      for (Entry<PropertyKey, String> entry : map.entrySet()) {
        sb.append(String.format("%s=%s%n", entry.getKey(), entry.getValue()));
      }
  
      dir.mkdirs();
      try (FileOutputStream fos
          = new FileOutputStream(new File(dir, "alluxio-site.properties"))) {
        fos.write(sb.toString().getBytes(Charsets.UTF_8));
      }
    }
docs: Creates the conf directory and file.
  Writes the properties to the generated file.
  
  @param dir the conf directory to create
  @param properties the specific properties of the current node