Search in sources :

Example 1 with Transaction

use of com.airbnb.spinaltap.mysql.Transaction in project SpinalTap by airbnb.

the class XidMapper method map.

public List<MysqlMutation> map(XidEvent event) {
    endTransaction.set(new Transaction(event.getTimestamp(), event.getOffset(), event.getBinlogFilePos()));
    metrics.transactionReceived();
    return Collections.emptyList();
}
Also used : Transaction(com.airbnb.spinaltap.mysql.Transaction)

Example 2 with Transaction

use of com.airbnb.spinaltap.mysql.Transaction in project SpinalTap by airbnb.

the class MysqlMutationMapperTest method setUp.

@Before
public void setUp() throws Exception {
    lastTransaction.set(new Transaction(12L, 30L, new BinlogFilePos("test.txt", 14, 100)));
    beginTransaction.set(new Transaction(15L, 31L, new BinlogFilePos("test.txt", 14, 120)));
    when(tableCache.get(TABLE_ID)).thenReturn(TEST_TABLE);
}
Also used : Transaction(com.airbnb.spinaltap.mysql.Transaction) BinlogFilePos(com.airbnb.spinaltap.mysql.BinlogFilePos) Before(org.junit.Before)

Aggregations

Transaction (com.airbnb.spinaltap.mysql.Transaction)2 BinlogFilePos (com.airbnb.spinaltap.mysql.BinlogFilePos)1 Before (org.junit.Before)1