@InterfaceAudience.LimitedPrivate(value="Tools") @InterfaceStability.Evolving public class LockServiceClient extends Object
Constructor and Description |
---|
LockServiceClient(org.apache.hadoop.conf.Configuration conf,
LockServiceProtos.LockService.BlockingInterface stub,
NonceGenerator ng) |
Modifier and Type | Method and Description |
---|---|
static LockServiceProtos.LockRequest |
buildLockRequest(LockServiceProtos.LockType type,
String namespace,
TableName tableName,
List<RegionInfo> regionInfos,
String description,
long nonceGroup,
long nonce) |
EntityLock |
namespaceLock(String namespace,
String description,
Abortable abort)
LocCreate a new EntityLock object to acquire exclusive lock on a namespace.
|
EntityLock |
regionLock(List<RegionInfo> regionInfos,
String description,
Abortable abort)
Create a new EntityLock object to acquire exclusive lock on multiple regions of same tables.
|
EntityLock |
tableLock(TableName tableName,
boolean exclusive,
String description,
Abortable abort)
Create a new EntityLock object to acquire an exclusive or shared lock on a table.
|
public LockServiceClient(org.apache.hadoop.conf.Configuration conf, LockServiceProtos.LockService.BlockingInterface stub, NonceGenerator ng)
public EntityLock tableLock(TableName tableName, boolean exclusive, String description, Abortable abort)
public EntityLock namespaceLock(String namespace, String description, Abortable abort)
public EntityLock regionLock(List<RegionInfo> regionInfos, String description, Abortable abort)
public static LockServiceProtos.LockRequest buildLockRequest(LockServiceProtos.LockType type, String namespace, TableName tableName, List<RegionInfo> regionInfos, String description, long nonceGroup, long nonce)
Copyright © 2007–2019 Cloudera. All rights reserved.