public static void appendCreateAsSelect(WarehouseInstance primary, String primaryDbName, String primaryDbNameExtra,
                                    String tableName, String tableNameMM,
                                    List<String> selectStmtList, List<String[]> expectedValues) throws Throwable {
    String tableNameCTAS = tableName + "_CTAS";
    String tableNameCTASMM = tableName + "_CTASMM";

    insertRecords(primary, primaryDbName, primaryDbNameExtra,
            tableName, tableNameCTAS, false, OperationType.REPL_TEST_ACID_CTAS);
    selectStmtList.add("select key from " + tableNameCTAS + " order by key");
    expectedValues.add(new String[]{"1", "2", "3", "4", "5"});

    insertRecords(primary, primaryDbName, primaryDbNameExtra,
            tableNameMM, tableNameCTASMM, true, OperationType.REPL_TEST_ACID_CTAS);
    selectStmtList.add("select key from " + tableNameCTASMM + " order by key");
    expectedValues.add(new String[]{"1", "2", "3", "4", "5"});
  }
ReplicationTestUtils - static helper functions for replication test
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/ReplicationTestUtils.java