public static void appendInsertUnion(WarehouseInstance primary, String primaryDbName, String primaryDbNameExtra,
                                 String tableName, String tableNameMM,
                                 List<String> selectStmtList, List<String[]> expectedValues) throws Throwable {
    String tableNameUnion = tableName +"_UNION";
    String tableNameUnionMM = tableName +"_UNIONMM";
    String[] resultArrayUnion = new String[]{"1", "1", "2", "2", "3", "3", "4", "4", "5", "5"};

    insertRecords(primary, primaryDbName, primaryDbNameExtra,
            tableName, tableNameUnion, false, OperationType.REPL_TEST_ACID_INSERT_UNION);
    selectStmtList.add( "select key from " + tableNameUnion + " order by key");
    expectedValues.add(resultArrayUnion);
    selectStmtList.add("select key from " + tableNameUnion + "_nopart" + " order by key");
    expectedValues.add(resultArrayUnion);

    insertRecords(primary, primaryDbName, primaryDbNameExtra,
            tableNameMM, tableNameUnionMM, true, OperationType.REPL_TEST_ACID_INSERT_UNION);
    selectStmtList.add( "select key from " + tableNameUnionMM + " order by key");
    expectedValues.add(resultArrayUnion);
    selectStmtList.add("select key from " + tableNameUnionMM + "_nopart" + " order by key");
    expectedValues.add(resultArrayUnion);
  }
ReplicationTestUtils - static helper functions for replication test
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/ReplicationTestUtils.java