public Path mergeStoreFile(RegionInfo mergingRegion, String familyName, HStoreFile f,
    StoreFileTracker tracker) throws IOException {
    Path referenceDir = new Path(getMergesDir(regionInfoForFs), familyName);
    // A whole reference to the store file.
    Reference r = Reference.createTopReference(mergingRegion.getStartKey());
    // Add the referred-to regions name as a dot separated suffix.
    // See REF_NAME_REGEX regex above. The referred-to regions name is
    // up in the path of the passed in <code>f</code> -- parentdir is family,
    // then the directory above is the region name.
    String mergingRegionName = mergingRegion.getEncodedName();
    // Write reference with same file id only with the other region name as
    // suffix and into the new region location (under same family).
    Path p = new Path(referenceDir, f.getPath().getName() + "." + mergingRegionName);
    tracker.createReference(r, p);
    return p;
  }
Write out a merge reference under the given merges directory.
@param mergingRegion {@link RegionInfo} for one of the regions being merged.
@param familyName    Column Family Name
@param f             File to create reference.
@return Path to created reference.
@throws IOException if the merge write fails.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java