@Test
  public void testSplitStoreFile() throws IOException {
    Path dir = util.getDataTestDirOnTestFS("testSplitHFile");
    FileSystem fs = util.getTestFileSystem();
    Path testIn = new Path(dir, "testhfile");
    ColumnFamilyDescriptor familyDesc = ColumnFamilyDescriptorBuilder.of(FAMILY);
    String tableName = tn.getMethodName();
    util.createTable(TableName.valueOf(tableName), familyDesc.getNameAsString());
    HFileTestUtil.createHFile(util.getConfiguration(), fs, testIn, FAMILY, QUALIFIER,
      Bytes.toBytes("aaa"), Bytes.toBytes("zzz"), 1000);

    Path bottomOut = new Path(dir, "bottom.out");
    Path topOut = new Path(dir, "top.out");

    BulkLoadHFilesTool.splitStoreFile(
      util.getAsyncConnection().getRegionLocator(TableName.valueOf(tableName)),
      util.getConfiguration(), testIn, familyDesc, Bytes.toBytes("ggg"), bottomOut, topOut);

    int rowCount = verifyHFile(bottomOut);
    rowCount += verifyHFile(topOut);
    assertEquals(1000, rowCount);
  }
Write a random data file and a non-file in a dir with a valid family name but not part of the
table families. we should we able to bulkload without getting the unmatched family exception.
HBASE-13037/HBASE-13227
hbase-server/src/test/java/org/apache/hadoop/hbase/tool/TestBulkLoadHFiles.java