code: private void writeConf() throws IOException {
      for (int i = 0; i < mNumMasters; i++) {
        File confDir = new File(mWorkDir, "conf-master" + i);
        writeConfToFile(confDir, mMasterProperties.getOrDefault(i, new HashMap<>()));
      }
      for (int i = 0; i < mNumWorkers; i++) {
        File confDir = new File(mWorkDir, "conf-worker" + i);
        writeConfToFile(confDir, mWorkerProperties.getOrDefault(i, new HashMap<>()));
      }
    }
docs: Writes the contents of properties to the configuration file.