public void bootstrap() throws IOException {
    fs.delete(path, true);
    fs.mkdirs(path);
  }
@Test
  void testBootstrap() throws Exception {
    CkpMetadata metadata = getCkpMetadata("");
    // write 4 instants to the ckp_meta
    IntStream.range(0, 4).forEach(i -> metadata.startInstant(i + ""));
    assertThat("The first instant should be removed from the instant cache",
        metadata.getInstantCache(), is(Arrays.asList("1", "2", "3")));

    // simulate the reboot of coordinator
    CkpMetadata metadata1 = getCkpMetadata("");
    metadata1.bootstrap();
    assertNull(metadata1.getInstantCache(), "The instant cache should be recovered from bootstrap");

    metadata1.startInstant("4");
    assertThat("The first instant should be removed from the instant cache",
        metadata1.getInstantCache(), is(Collections.singletonList("4")));
  }