public static void createHFileWithTags(Configuration configuration, FileSystem fs, Path path,
    byte[] family, byte[] qualifier, byte[] startKey, byte[] endKey, int numRows)
    throws IOException {
    createHFile(configuration, fs, path, DataBlockEncoding.NONE, family, qualifier, startKey,
      endKey, numRows, true);
  }
Create an HFile with the given number of rows between a given start key and end key @
family:qualifier. The value will be the key value. This cells will also have a tag whose value
is the key.
hbase-server/src/test/java/org/apache/hadoop/hbase/util/HFileTestUtil.java