public String createHFileLink(final TableName linkedTable, final String linkedRegion,
    final String hfileName, final boolean createBackRef) throws IOException {
    String name = HFileLink.createHFileLinkName(linkedTable, linkedRegion, hfileName);
    String refName = HFileLink.createBackReferenceName(ctx.getTableName().toString(),
      ctx.getRegionInfo().getEncodedName());

    FileSystem fs = ctx.getRegionFileSystem().getFileSystem();
    // Make sure the destination directory exists
    fs.mkdirs(ctx.getFamilyStoreDirectoryPath());

    // Make sure the FileLink reference directory exists
    Path archiveStoreDir = HFileArchiveUtil.getStoreArchivePath(conf, linkedTable, linkedRegion,
      ctx.getFamily().getNameAsString());
    Path backRefPath = null;
    if (createBackRef) {
      Path backRefssDir = HFileLink.getBackReferencesDir(archiveStoreDir, hfileName);
      fs.mkdirs(backRefssDir);

      // Create the reference for the link
      backRefPath = new Path(backRefssDir, refName);
      fs.createNewFile(backRefPath);
    }
    try {
      // Create the link
      if (fs.createNewFile(new Path(ctx.getFamilyStoreDirectoryPath(), name))) {
        return name;
      }
    } catch (IOException e) {
      LOG.error("couldn't create the link=" + name + " for " + ctx.getFamilyStoreDirectoryPath(),
        e);
      // Revert the reference if the link creation failed
      if (createBackRef) {
        fs.delete(backRefPath, false);
      }
      throw e;
    }
    throw new IOException("File link=" + name + " already exists under "
      + ctx.getFamilyStoreDirectoryPath() + " folder.");

  }
Returns true if the specified family has reference files
@param familyName Column Family Name
@return true if family contains reference files
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/StoreFileTrackerBase.java