public class TestEntityLocks extends Object
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.hbase.client.locking.LockServiceClient |
admin |
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.conf.Configuration |
conf |
private static org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatResponse |
LOCKED_RESPONSE |
private org.mockito.ArgumentCaptor<org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatRequest> |
lockHeartbeatReqArgCaptor |
private org.mockito.ArgumentCaptor<org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest> |
lockReqArgCaptor |
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockService.BlockingInterface |
master |
private long |
procId |
private static org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatResponse |
UNLOCKED_RESPONSE |
Constructor and Description |
---|
TestEntityLocks() |
Modifier and Type | Method and Description |
---|---|
(package private) org.apache.hadoop.hbase.client.locking.LockServiceClient |
getAdmin() |
void |
setUp() |
void |
testEntityLock()
Test basic lock function - requestLock, await, unlock.
|
void |
testEntityLockTimeout()
Test that abort is called when lock times out.
|
void |
testHeartbeatException()
Test that abort is called when lockHeartbeat fails with IOException.
|
private boolean |
waitLockTimeOut(org.apache.hadoop.hbase.client.locking.EntityLock lock,
long maxWaitTimeMillis) |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private final org.apache.hadoop.conf.Configuration conf
private final org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockService.BlockingInterface master
private org.apache.hadoop.hbase.client.locking.LockServiceClient admin
private org.mockito.ArgumentCaptor<org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockRequest> lockReqArgCaptor
private org.mockito.ArgumentCaptor<org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatRequest> lockHeartbeatReqArgCaptor
private static final org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatResponse UNLOCKED_RESPONSE
private static final org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockHeartbeatResponse LOCKED_RESPONSE
private long procId
public TestEntityLocks()
org.apache.hadoop.hbase.client.locking.LockServiceClient getAdmin() throws Exception
Exception
private boolean waitLockTimeOut(org.apache.hadoop.hbase.client.locking.EntityLock lock, long maxWaitTimeMillis)
public void testEntityLock() throws Exception
Exception
public void testEntityLockTimeout() throws Exception
Exception
public void testHeartbeatException() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.