public void delete() throws IOException {
    Path next = files[nextFile];
    // delete next file first, and then the current file, so when failing to delete, we can still
    // read the correct data
    if (fs.exists(next) && !fs.delete(next, false)) {
      throw new IOException("Can not delete " + next);
    }
    Path current = files[1 - nextFile];
    if (fs.exists(current) && !fs.delete(current, false)) {
      throw new IOException("Can not delete " + current);
    }
  }
Deletes the two files used for rotating data. If any of the files cannot be deleted, an
IOException is thrown.
@throws IOException if there is an error deleting either file
hbase-client/src/main/java/org/apache/hadoop/hbase/util/RotateFile.java