Map<byte[], List<Path>> generateFileToLoad(TableName tn, int numFiles, int numRowsPerFile)
    throws Exception {
    FileSystem fs = testUtil.getTestFileSystem();
    Path baseDir = new Path(fs.getHomeDirectory(), testName.getMethodName() + "_files");
    fs.mkdirs(baseDir);
    List<Path> hfiles = new ArrayList<>();
    for (int i = 1; i <= numFiles; i++) {
      Path hfile = new Path(baseDir, "file" + i);
      TestHRegionServerBulkLoad.createHFile(fs, hfile, Bytes.toBytes(SpaceQuotaHelperForTests.F1),
        Bytes.toBytes("my"), Bytes.toBytes("file"), numRowsPerFile);
      hfiles.add(hfile);
    }
    Map<byte[], List<Path>> family2Files = new TreeMap<>(Bytes.BYTES_COMPARATOR);
    family2Files.put(Bytes.toBytes(SpaceQuotaHelperForTests.F1), hfiles);
    return family2Files;
  }
Bulk-loads a number of files with a number of rows to the given table.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/SpaceQuotaHelperForTests.java