use of org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest in project hbase by apache.
the class TestLockProcedure method testRemoteTableLockRecovery.
@Test
public void testRemoteTableLockRecovery() throws Exception {
LockRequest lock = getTableExclusiveLock(tableName1, testMethodName);
testRemoteLockRecovery(lock);
}
use of org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest in project hbase by apache.
the class TestLockProcedure method testUpdateHeartbeatAndUnlockForNamespace.
@Test
public void testUpdateHeartbeatAndUnlockForNamespace() throws Exception {
LockRequest lock = getNamespaceLock(namespace, testMethodName);
final long procId = queueLock(lock);
assertTrue(awaitForLocked(procId, 2000));
Thread.sleep(HEARTBEAT_TIMEOUT / 2);
sendHeartbeatAndCheckLocked(procId, true);
Thread.sleep(HEARTBEAT_TIMEOUT / 2);
sendHeartbeatAndCheckLocked(procId, true);
Thread.sleep(HEARTBEAT_TIMEOUT / 2);
sendHeartbeatAndCheckLocked(procId, true);
releaseLock(procId);
sendHeartbeatAndCheckLocked(procId, false);
ProcedureTestingUtility.waitProcedure(procExec, procId);
ProcedureTestingUtility.assertProcNotFailed(procExec, procId);
}
use of org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest in project hbase by apache.
the class TestLockProcedure method testRemoteRegionLockRecovery.
@Test
public void testRemoteRegionLockRecovery() throws Exception {
LockRequest lock = getRegionLock(tableRegions1, testMethodName);
testRemoteLockRecovery(lock);
}
use of org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest in project hbase by apache.
the class TestLockProcedure method testUpdateHeartbeatAndUnlockForTable.
@Test
public void testUpdateHeartbeatAndUnlockForTable() throws Exception {
LockRequest lock = getTableExclusiveLock(tableName1, testMethodName);
final long procId = queueLock(lock);
assertTrue(awaitForLocked(procId, 2000));
Thread.sleep(HEARTBEAT_TIMEOUT / 2);
sendHeartbeatAndCheckLocked(procId, true);
Thread.sleep(HEARTBEAT_TIMEOUT / 2);
sendHeartbeatAndCheckLocked(procId, true);
Thread.sleep(HEARTBEAT_TIMEOUT / 2);
sendHeartbeatAndCheckLocked(procId, true);
releaseLock(procId);
sendHeartbeatAndCheckLocked(procId, false);
ProcedureTestingUtility.waitProcedure(procExec, procId);
ProcedureTestingUtility.assertProcNotFailed(procExec, procId);
}
Aggregations