@Override
  public void clearSnapshot(long id) throws UnexpectedStateException {
    if (this.snapshotId == -1) return; // already cleared
    if (this.snapshotId != id) {
      throw new UnexpectedStateException(
        "Current snapshot id is " + this.snapshotId + ",passed " + id);
    }
    // OK. Passed in snapshot is same as current snapshot. If not-empty,
    // create a new snapshot and let the old one go.
    doClearSnapShot();
  }
This method is protected under {@link HStore#lock} write lock,<br/>
and this method is used by {@link HStore#updateStorefiles} after flushing is completed.<br/>
The passed snapshot was successfully persisted; it can be let go.
@param id Id of the snapshot to clean out.
@see MemStore#snapshot()
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java