public void run() {
          try {
            while (running.get()) {
              // flush or compact
              if (random.nextBoolean()) {
                TestRegionServerNoMaster.flushRegion(HTU, hriPrimary);
              } else {
                HTU.compact(table.getName(), random.nextBoolean());
              }
            }
          } catch (Exception ex) {
            LOG.warn(ex.toString(), ex);
            exceptions[1].compareAndSet(null, ex);
          }
        }
Tests that the meta location is saved for secondary regions
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionReplicas.java