protected void doClearSnapShot() {
    Segment oldSnapshot = this.snapshot;
    if (!this.snapshot.isEmpty()) {
      this.snapshot = SegmentFactory.instance().createImmutableSegment(this.comparator);
    }
    this.snapshotId = NO_SNAPSHOT_ID;
    oldSnapshot.close();
  }
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