protected void initialize() throws IOException {
    Path basedir = new Path(DIR);
    String logName = "logs";
    Path logdir = new Path(DIR, logName);
    ColumnFamilyDescriptor familyDescriptor =
      ColumnFamilyDescriptorBuilder.of(Bytes.toBytes("family"));
    FileSystem fs = FileSystem.get(conf);

    fs.delete(logdir, true);

    TableDescriptor tableDescriptor =
      TableDescriptorBuilder.newBuilder(TableName.valueOf(Bytes.toBytes("table")))
        .setColumnFamily(familyDescriptor).build();
    RegionInfo info = RegionInfoBuilder.newBuilder(tableDescriptor.getTableName()).build();

    hlog = new FSHLog(fs, basedir, logName, conf);
    hlog.init();
    ChunkCreator.initialize(MemStoreLAB.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null,
      MemStoreLAB.INDEX_CHUNK_SIZE_PERCENTAGE_DEFAULT);
    region = HRegion.createHRegion(info, basedir, conf, tableDescriptor, hlog);
    region.close();
    Path tableDir = CommonFSUtils.getTableDir(basedir, tableDescriptor.getTableName());
    region = new HRegion(tableDir, hlog, fs, conf, info, tableDescriptor, null);

    store = new HStore(region, familyDescriptor, conf, false);

    TEST_FILE = region.getRegionFileSystem().createTempName();
    fs.createNewFile(TEST_FILE);
  }
Setting up a Store
@throws IOException with error
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionPolicy.java