public static void appendTruncate(WarehouseInstance primary, String primaryDbName, String primaryDbNameExtra,
                              List<String> selectStmtList, List<String[]> expectedValues) throws Throwable {
    String tableName = "testTruncate";
    String tableNameMM = tableName + "_MM";

    insertRecords(primary, primaryDbName, primaryDbNameExtra,
            tableName, null, false, OperationType.REPL_TEST_ACID_INSERT);
    truncateTable(primary, primaryDbName, tableName);
    selectStmtList.add("select count(*) from " + tableName);
    expectedValues.add(new String[] {"0"});
    selectStmtList.add("select count(*) from " + tableName + "_nopart");
    expectedValues.add(new String[] {"0"});

    insertRecords(primary, primaryDbName, primaryDbNameExtra,
            tableNameMM, null, true, OperationType.REPL_TEST_ACID_INSERT);
    truncateTable(primary, primaryDbName, tableNameMM);
    selectStmtList.add("select count(*) from " + tableNameMM);
    expectedValues.add(new String[] {"0"});
    selectStmtList.add("select count(*) from " + tableNameMM + "_nopart");
    expectedValues.add(new String[] {"0"});
  }
ReplicationTestUtils - static helper functions for replication test
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/ReplicationTestUtils.java