public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getNamespaceId(Instance instance,
String tableId,
TableOperation op,
String namespaceId) |
static Lock |
getReadLock(String tableId,
long tid) |
static long |
reserveHdfsDirectory(String directory,
long tid) |
static long |
reserveNamespace(String namespaceId,
long id,
boolean writeLock,
boolean mustExist,
TableOperation op) |
static long |
reserveTable(String tableId,
long tid,
boolean writeLock,
boolean tableMustExist,
TableOperation op) |
static void |
unreserveHdfsDirectory(String directory,
long tid) |
static void |
unreserveNamespace(String namespaceId,
long id,
boolean writeLock) |
static void |
unreserveTable(String tableId,
long tid,
boolean writeLock) |
public static long reserveTable(String tableId, long tid, boolean writeLock, boolean tableMustExist, TableOperation op) throws Exception
Exceptionpublic static void unreserveTable(String tableId, long tid, boolean writeLock) throws Exception
Exceptionpublic static void unreserveNamespace(String namespaceId, long id, boolean writeLock) throws Exception
Exceptionpublic static long reserveNamespace(String namespaceId, long id, boolean writeLock, boolean mustExist, TableOperation op) throws Exception
Exceptionpublic static String getNamespaceId(Instance instance, String tableId, TableOperation op, String namespaceId) throws Exception
Exceptionpublic static long reserveHdfsDirectory(String directory, long tid) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static void unreserveHdfsDirectory(String directory, long tid) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionCopyright © 2011–2017 The Apache Software Foundation. All rights reserved.