public void createPropertiesFile(String pathToFile, boolean overwrite) throws IOException {
        final File file = new File(pathToFile);
        if (file.exists()) {
            if (overwrite) {
                file.delete();
            } else {
                throw new RuntimeException(
                        "File " + pathToFile + " exists and overwriting is not allowed");
            }
        }
        final Properties defaultProps = new Properties();
        defaultProps.putAll(this.defaultData);
        try (final OutputStream out = new FileOutputStream(file)) {
            defaultProps.store(out,
                    "Default file created by Flink's ParameterUtil.createPropertiesFile()");
        }
    }
Create a properties file with all the known parameters (call after the last get*() call). Set
the default value, if overwrite is true.

@param pathToFile Location of the default properties file.
@param overwrite Boolean flag indicating whether or not to overwrite the file
@throws IOException If overwrite is not allowed and the file exists
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/util/ParameterTool.java