private static void deleteAllFilesInOneDirBySuffix(String dirPath, String suffix)
      throws IOException {
    File dir = new File(dirPath);
    if (!dir.isDirectory()) {
      return;
    }
    if (!dir.exists()) {
      return;
    }
    for (File f : FSFactoryProducer.getFSFactory().listFilesBySuffix(dirPath, suffix)) {
      FileUtils.delete(f);
    }
    File[] tmpFiles = dir.listFiles();
    if (tmpFiles != null) {
      for (File f : tmpFiles) {
        if (f.isDirectory()) {
          deleteAllFilesInOneDirBySuffix(f.getAbsolutePath(), suffix);
        }
      }
    }
  }
Clear all generated and merged files in the test directory
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/utils/CompactionClearUtils.java