use of org.apache.hadoop.hive.metastore.api.HeartbeatTxnRangeRequest in project hive by apache.
the class TestTxnHandler method heartbeatTxnRangeOneCommitted.
@Test
public void heartbeatTxnRangeOneCommitted() throws Exception {
long txnid = openTxn();
assertEquals(1, txnid);
txnHandler.commitTxn(new CommitTxnRequest(1));
txnid = openTxn();
txnid = openTxn();
HeartbeatTxnRangeResponse rsp = txnHandler.heartbeatTxnRange(new HeartbeatTxnRangeRequest(1, 3));
assertEquals(1, rsp.getNosuchSize());
Long txn = rsp.getNosuch().iterator().next();
assertEquals(1L, (long) txn);
assertEquals(0, rsp.getAborted().size());
}
use of org.apache.hadoop.hive.metastore.api.HeartbeatTxnRangeRequest in project hive by apache.
the class TestTxnHandler method heartbeatTxnRange.
@Test
public void heartbeatTxnRange() throws Exception {
long txnid = openTxn();
assertEquals(1, txnid);
txnid = openTxn();
txnid = openTxn();
HeartbeatTxnRangeResponse rsp = txnHandler.heartbeatTxnRange(new HeartbeatTxnRangeRequest(1, 3));
assertEquals(0, rsp.getAborted().size());
assertEquals(0, rsp.getNosuch().size());
}
use of org.apache.hadoop.hive.metastore.api.HeartbeatTxnRangeRequest in project hive by apache.
the class TestTxnHandler method heartbeatTxnRangeOneAborted.
@Test
public void heartbeatTxnRangeOneAborted() throws Exception {
long txnid = openTxn();
assertEquals(1, txnid);
txnid = openTxn();
txnid = openTxn();
txnHandler.abortTxn(new AbortTxnRequest(3));
HeartbeatTxnRangeResponse rsp = txnHandler.heartbeatTxnRange(new HeartbeatTxnRangeRequest(1, 3));
assertEquals(1, rsp.getAbortedSize());
Long txn = rsp.getAborted().iterator().next();
assertEquals(3L, (long) txn);
assertEquals(0, rsp.getNosuch().size());
}
Aggregations