public void runStressTest() throws InterruptedException, IOException {

    try {

      Thread writeData = new Thread(new WriteData(count));
      writeData.start();

      Thread majorcompact = new Thread(new MajorCompaction());
      majorcompact.start();

      Thread cleaner = new Thread(new CleanMobAndArchive());
      cleaner.start();

      while (run) {
        Thread.sleep(1000);
      }

      getNumberOfMobFiles(conf, table.getName(), new String(fam));
      LOG.info("Waiting for write thread to finish ...");
      writeData.join();
      // Cleanup again
      MobFileCleanupUtil.cleanupObsoleteMobFiles(conf, table.getName(), admin);
      getNumberOfMobFiles(conf, table.getName(), new String(fam));

      if (HTU != null) {
        LOG.info("Archive cleaner started ...");
        // Call archive cleaner again
        HTU.getMiniHBaseCluster().getMaster().getHFileCleaner().choreForTesting();
        LOG.info("Archive cleaner finished");
      }

      scanTable();

    } finally {

      admin.disableTable(tableDescriptor.getTableName());
      admin.deleteTable(tableDescriptor.getTableName());
    }
    LOG.info("MOB Stress Test finished OK");
    printStats(count);

  }
Reproduction for MOB data loss 1. Settings: Region Size 200 MB, Flush threshold 800 KB. 2. Insert
10 Million records 3. MOB Compaction and Archiver a) Trigger MOB Compaction (every 2 minutes) b)
Trigger major compaction (every 2 minutes) c) Trigger archive cleaner (every 3 minutes) 4.
Validate MOB data after complete data load. This class is used by MobStressTool only. This is not
a unit test
hbase-server/src/test/java/org/apache/hadoop/hbase/mob/MobStressToolRunner.java