Search in sources :

Example 6 with LockRequest

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);
}
Also used : LockRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest) Test(org.junit.Test)

Example 7 with LockRequest

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);
}
Also used : LockRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest) Test(org.junit.Test)

Example 8 with LockRequest

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);
}
Also used : LockRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest) Test(org.junit.Test)

Example 9 with LockRequest

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);
}
Also used : LockRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest) Test(org.junit.Test)

Aggregations

LockRequest (org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest)9 Test (org.junit.Test)9 LockHeartbeatRequest (org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatRequest)1