Class TestEntityLocks
java.lang.Object
org.apache.hadoop.hbase.client.locking.TestEntityLocks
-
Field Summary
Modifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.client.locking.LockServiceClient
static final HBaseClassTestRule
private final org.apache.hadoop.conf.Configuration
private static final org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatResponse
private org.mockito.ArgumentCaptor<org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatRequest>
private org.mockito.ArgumentCaptor<org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest>
private static final org.slf4j.Logger
private final org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockService.BlockingInterface
private long
private static final org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatResponse
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) org.apache.hadoop.hbase.client.locking.LockServiceClient
getAdmin()
void
setUp()
void
Test basic lock function - requestLock, await, unlock.void
Test that abort is called when lock times out.void
Test that abort is called when lockHeartbeat fails with IOException.private boolean
waitLockTimeOut
(org.apache.hadoop.hbase.client.locking.EntityLock lock, long maxWaitTimeMillis)
-
Field Details
-
CLASS_RULE
-
LOG
-
conf
-
master
private final org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockService.BlockingInterface master -
admin
-
lockReqArgCaptor
private org.mockito.ArgumentCaptor<org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest> lockReqArgCaptor -
lockHeartbeatReqArgCaptor
private org.mockito.ArgumentCaptor<org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatRequest> lockHeartbeatReqArgCaptor -
UNLOCKED_RESPONSE
private static final org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatResponse UNLOCKED_RESPONSE -
LOCKED_RESPONSE
private static final org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatResponse LOCKED_RESPONSE -
procId
-
-
Constructor Details
-
TestEntityLocks
public TestEntityLocks()
-
-
Method Details
-
getAdmin
- Throws:
Exception
-
setUp
- Throws:
Exception
-
waitLockTimeOut
private boolean waitLockTimeOut(org.apache.hadoop.hbase.client.locking.EntityLock lock, long maxWaitTimeMillis) -
testEntityLock
Test basic lock function - requestLock, await, unlock.- Throws:
Exception
-
testEntityLockTimeout
Test that abort is called when lock times out.- Throws:
Exception
-
testHeartbeatException
Test that abort is called when lockHeartbeat fails with IOException.- Throws:
Exception
-