private Flow preCheckAndTryRestoreSFT(MasterProcedureEnv env) throws IOException {
    // Checks whether the table exists
    if (!env.getMasterServices().getTableDescriptors().exists(getTableName())) {
      throw new TableNotFoundException(getTableName());
    }
    if (!isTableEnabled(env)) {
      throw new TableNotEnabledException(tableName);
    }
    TableDescriptor current = env.getMasterServices().getTableDescriptors().get(tableName);
    preCheck(current);
    Configuration conf = createConf(env.getMasterConfiguration(), current);
    StoreFileTrackerState state = checkState(conf, dstSFT);
    switch (state) {
      case NEED_FINISH_PREVIOUS_MIGRATION_FIRST:
        TableDescriptor td = createRestoreTableDescriptor(current, getRestoreSFT(conf));
        addChildProcedure(new ModifyTableProcedure(env, td));
        setNextState(
          ModifyStoreFileTrackerState.MODIFY_STORE_FILE_TRACKER_FINISH_PREVIOUS_MIGRATION);
        return Flow.HAS_MORE_STATE;
      case NEED_START_MIGRATION:
        setNextState(ModifyStoreFileTrackerState.MODIFY_STORE_FILE_TRACKER_START_MIGRATION);
        return Flow.HAS_MORE_STATE;
      case NEED_FINISH_MIGRATION:
        setNextState(ModifyStoreFileTrackerState.MODIFY_STORE_FILE_TRACKER_FINISH_MIGRATION);
        return Flow.HAS_MORE_STATE;
      case ALREADY_FINISHED:
        return Flow.NO_MORE_STATE;
      default:
        throw new UnsupportedOperationException("unhandled state=" + state);
    }
  }
This procedure is used to change the store file tracker implementation.
<p/>
Typically we need to schedule two {@link ModifyTableProcedure} (or three if the table is already
in {@code MIGRATION} but the {@code dstSFT} is not what we expected) to do this, so we introduce
this procedure to simplify the work of our users.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/ModifyStoreFileTrackerProcedure.java