Source:
<code>public static void classLevelSetup() throws Exception { Map<String, String> overrides = new HashMap<>(); overrides.put(MetastoreConf.ConfVars.EVENT_MESSAGE_FACTORY.getHiveName(), GzipJSONMessageEncoder.class.getCanonicalName()); HashMap<String, String> replicaConfigs = new HashMap<String, String>() {{ put("hive.support.concurrency", "true"); put("hive.txn.manager", "org.apache.hadoop.hive.ql.lockmgr.DbTxnManager"); put("hive.metastore.client.capability.check", "false"); put("hive.repl.bootstrap.dump.open.txn.timeout", "1s"); put("hive.exec.dynamic.partition.mode", "nonstrict"); put("hive.strict.checks.bucketing", "false"); put("hive.mapred.mode", "nonstrict"); put("mapred.input.dir.recursive", "true"); put("hive.metastore.disallow.incompatible.col.type.changes", "false"); put("hive.strict.managed.tables", "true"); }}; replicaConfigs.putAll(overrides); HashMap<String, String> primaryConfigs = new HashMap<String, String>() {{ put("hive.metastore.client.capability.check", "false"); put("hive.repl.bootstrap.dump.open.txn.timeout", "1s"); put("hive.exec.dynamic.partition.mode", "nonstrict"); put("hive.strict.checks.bucketing", "false"); put("hive.mapred.mode", "nonstrict"); put("mapred.input.dir.recursive", "true"); put("hive.metastore.disallow.incompatible.col.type.changes", "false"); put("hive.support.concurrency", "false"); <START> put("hive.txn.manager", "org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager"); <END> put("hive.strict.managed.tables", "false"); }}; primaryConfigs.putAll(overrides); internalBeforeClassSetup(primaryConfigs, replicaConfigs, TestStatsReplicationScenariosMigration.class, true,false); }</code><technical_language>In migration case, validate if stats correct writeId. I think, in tests, pointing allocated writeId</technical_language>

Target:
public static void classLevelSetup() throws Exception { Map<String, String> overrides = new HashMap<>(); overrides.put(MetastoreConf.ConfVars.EVENT_MESSAGE_FACTORY.getHiveName(), GzipJSONMessageEncoder.class.getCanonicalName()); Map<String, String> replicaConfigs = new HashMap<String, String>() {{ put("hive.support.concurrency", "true"); put("hive.txn.manager", "org.apache.hadoop.hive.ql.lockmgr.DbTxnManager"); put("hive.metastore.client.capability.check", "false"); put("hive.repl.bootstrap.dump.open.txn.timeout", "1s"); put("hive.exec.dynamic.partition.mode", "nonstrict"); put("hive.strict.checks.bucketing", "false"); put("hive.mapred.mode", "nonstrict"); put("mapred.input.dir.recursive", "true"); put("hive.metastore.disallow.incompatible.col.type.changes", "false"); put("hive.strict.managed.tables", "true"); }}; replicaConfigs.putAll(overrides); Map<String, String> primaryConfigs = new HashMap<String, String>() {{ put("hive.metastore.client.capability.check", "false"); put("hive.repl.bootstrap.dump.open.txn.timeout", "1s"); put("hive.exec.dynamic.partition.mode", "nonstrict"); put("hive.strict.checks.bucketing", "false"); put("hive.mapred.mode", "nonstrict"); put("mapred.input.dir.recursive", "true"); put("hive.metastore.disallow.incompatible.col.type.changes", "false"); put("hive.support.concurrency", "false"); put("hive.txn.manager", "org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager"); put("hive.strict.managed.tables", "false"); }}; primaryConfigs.putAll(overrides); internalBeforeClassSetup(primaryConfigs, replicaConfigs, TestStatsReplicationScenariosMigration.class, true, null); }