@Before
  public void setUp() throws Exception {
    UTIL.getConfiguration().setClass(WALFactory.WAL_PROVIDER, walProvider, WALProvider.class);
    UTIL.getConfiguration().setInt(HConstants.ZK_SESSION_TIMEOUT, 2000);
    UTIL.getConfiguration().setClass(HConstants.REGION_SERVER_IMPL, IgnoreYouAreDeadRS.class,
      HRegionServer.class);
    UTIL.startMiniCluster(2);
    Table table = UTIL.createTable(TABLE_NAME, CF);
    for (int i = 0; i < 10; i++) {
      table.put(new Put(Bytes.toBytes(i)).addColumn(CF, CQ, Bytes.toBytes(i)));
    }
    UTIL.getAdmin().flush(TABLE_NAME);
    for (int i = 10; i < 20; i++) {
      table.put(new Put(Bytes.toBytes(i)).addColumn(CF, CQ, Bytes.toBytes(i)));
    }
    UTIL.getAdmin().flush(TABLE_NAME);
  }
This testcase is used to ensure that the compaction marker will fail a compaction if the RS is
already dead. It can not eliminate FNFE when scanning but it does reduce the possibility a lot.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactionInDeadRegionServer.java