public static int getFileLayer(String fileName) {
    try {
      Matcher fileMatcher = ARCHIVE_FILE_PATTERN.matcher(fileName);
      if (fileMatcher.matches()) {
        return Integer.parseInt(fileMatcher.group(3));
      }
    } catch (NumberFormatException e) {
      // log and ignore any format warnings
      LOG.warn("error getting file layout for archived file: " + fileName);
    }

    // return default value in case of any errors
    return 0;
  }
@Test
  void testParseFileLayer() {
    String fileName = "001_002_0.parquet";
    int layer = LSMTimeline.getFileLayer(fileName);
    assertThat(layer, is(0));
    assertThat("for invalid file name, returns 0", LSMTimeline.getFileLayer("invalid_file_name.parquet"), is(0));
  }