private void createMissingCFsInMetaDuringUpgrade(TableDescriptor metaDescriptor)
    throws IOException {
    TableDescriptor newMetaDesc = TableDescriptorBuilder.newBuilder(metaDescriptor)
      .setColumnFamily(FSTableDescriptors.getTableFamilyDescForMeta(conf))
      .setColumnFamily(FSTableDescriptors.getReplBarrierFamilyDescForMeta()).build();
    long pid = this.modifyTable(TableName.META_TABLE_NAME, () -> newMetaDesc, 0, 0, false);
    int tries = 30;
    while (
      !(getMasterProcedureExecutor().isFinished(pid)) && getMasterProcedureExecutor().isRunning()
        && tries > 0
    ) {
      try {
        Thread.sleep(1000);
      } catch (InterruptedException e) {
        throw new IOException("Wait interrupted", e);
      }
      tries--;
    }
    if (tries <= 0) {
      throw new HBaseIOException(
        "Failed to add table and rep_barrier CFs to meta in a given time.");
    } else {
      Procedure<?> result = getMasterProcedureExecutor().getResult(pid);
      if (result != null && result.isFailed()) {
        throw new IOException("Failed to add table and rep_barrier CFs to meta. "
          + MasterProcedureUtil.unwrapRemoteIOException(result));
      }
    }
  }
Used for testing only to set Mock objects.
@param catalogJanitorChore catalogJanitorChore
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java