@Override
  public boolean delete(CheckpointID id) throws IOException,
      InterruptedException {
    if (!(id instanceof FSCheckpointID)) {
      throw new IllegalArgumentException(
          "Mismatched checkpoint type: " + id.getClass());
    }
    Path tmp = ((FSCheckpointID)id).getPath();
    try {
      return fs.delete(tmp, false);
    } catch (FileNotFoundException e) {
      // IGNORE
    }
    return true;
  }
@Test
  public void testDelete() throws Exception {
    FileSystem fs = mock(FileSystem.class);
    Path chkloc = new Path("/chk/chk0");
    when(fs.delete(eq(chkloc), eq(false))).thenReturn(true);
    Path base = new Path("/otherchk");
    FSCheckpointID id = new FSCheckpointID(chkloc);
    FSCheckpointService chk = new FSCheckpointService(fs, base,
        new SimpleNamingService("chk0"), (short) 1);
    assertTrue(chk.delete(id));
    verify(fs).delete(eq(chkloc), eq(false));
  }