private void replaceFormalFile() throws IOException {
    if (!tmpFile.exists()) {
      throw new FileNotFoundException(
          "Tmp system properties file must exist when call replaceFormalFile");
    }
    if (formalFile.exists() && !formalFile.delete()) {
      String msg =
          String.format(
              "Delete formal system properties file fail: %s", formalFile.getAbsoluteFile());
      throw new IOException(msg);
    }
    try {
      FileUtils.move(tmpFile.toPath(), formalFile.toPath());
    } catch (IOException e) {
      String msg =
          String.format(
              "Failed to replace formal system properties file, you may manually rename it: %s -> %s",
              tmpFile.getAbsolutePath(), formalFile.getAbsolutePath());
      throw new IOException(msg, e);
    }
  }
Put key and value into properties

@param keyOrValue [key0, value0, key1, value1, ... ]
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/file/SystemPropertiesHandler.java