@Test
  public void testNumCompactionThreadsOnlineChange() {
    assertNotNull(rs1.getCompactSplitThread());
    int newNumSmallThreads = rs1.getCompactSplitThread().getSmallCompactionThreadNum() + 1;
    int newNumLargeThreads = rs1.getCompactSplitThread().getLargeCompactionThreadNum() + 1;

    conf.setInt("hbase.regionserver.thread.compaction.small", newNumSmallThreads);
    conf.setInt("hbase.regionserver.thread.compaction.large", newNumLargeThreads);
    rs1.getConfigurationManager().notifyAllObservers(conf);

    assertEquals(newNumSmallThreads, rs1.getCompactSplitThread().getSmallCompactionThreadNum());
    assertEquals(newNumLargeThreads, rs1.getCompactSplitThread().getLargeCompactionThreadNum());
  }
Check if the number of compaction threads changes online
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerOnlineConfigChange.java