@Test
  public void testNonPartitionedTable() throws Exception {
    String acidTblMsck = "acidtblmsck";
    runStatementOnDriver("drop table if exists " + acidTblMsck);

    // Insert few rows
    runStatementOnDriver("insert into " + Table.ACIDTBL + " values(1,1),(2,2),(3,3)");
    runStatementOnDriver("insert into " + Table.ACIDTBL + " values(4,4)");

    //run Compaction
    runStatementOnDriver("alter table " + Table.ACIDTBL + " compact 'minor'");
    runWorker(hiveConf);

    List<String> r = runStatementOnDriver("select a, b from " + Table.ACIDTBL + " order by a, b");
    int[][] expected = { { 1, 1 }, { 2, 2 }, { 3, 3 }, { 4, 4 } };
    Assert.assertEquals(stringifyValues(expected), r);
    // Create target table

    runStatementOnDriver("create table " + acidTblMsck
        + " (a int, b int) clustered by (a) into 2 buckets"
        + " stored as orc TBLPROPERTIES ('transactional'='true')");

    // copy files on fs
    FileSystem fs = FileSystem.get(hiveConf);
    for (FileStatus status : fs.listStatus(new Path(getWarehouseDir(), Table.ACIDTBL.toString().toLowerCase()))) {
      FileUtil.copy(fs, status.getPath(), fs,
          new Path(getWarehouseDir(), acidTblMsck), false, hiveConf);
    }

    FileStatus[] fileStatuses = fs.listStatus(new Path(getWarehouseDir(), acidTblMsck));
    // two + one delta
    Assert.assertEquals(3, fileStatuses.length);

    // call msk repair
    runStatementOnDriver("msck repair table " + acidTblMsck);

    r = runStatementOnDriver("select a, b from " + acidTblMsck + " order by a, b");
    Assert.assertEquals(stringifyValues(expected), r);

    runStatementOnDriver("drop table if exists " + acidTblMsck);
  }
For non partitioned acid table the writeId and visibility txnId repair should work the same.
@throws Exception ex
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestMSCKRepairOnAcid.java