- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager.getLocks()
方法的一些代码示例,展示了ZooKeeperHiveLockManager.getLocks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperHiveLockManager.getLocks()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager
类名称:ZooKeeperHiveLockManager
方法名:getLocks
暂无
代码示例来源:origin: apache/hive
@Override
public List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions,
boolean fetchData) throws LockException {
return getLocks(ctx.getConf(), key, parent, verifyTablePartitions, fetchData);
}
代码示例来源:origin: apache/hive
@Override
public List<HiveLock> getLocks(boolean verifyTablePartition, boolean fetchData)
throws LockException {
return getLocks(ctx.getConf(), null, parent, verifyTablePartition, fetchData);
}
代码示例来源:origin: apache/drill
@Override
public List<HiveLock> getLocks(boolean verifyTablePartition, boolean fetchData)
throws LockException {
return getLocks(ctx.getConf(), null, parent, verifyTablePartition, fetchData);
}
代码示例来源:origin: apache/drill
@Override
public List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions,
boolean fetchData) throws LockException {
return getLocks(ctx.getConf(), key, parent, verifyTablePartitions, fetchData);
}
代码示例来源:origin: apache/hive
public static void releaseAllLocks(HiveConf conf) throws Exception {
try {
String parent = conf.getVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_NAMESPACE);
List<HiveLock> locks = getLocks(conf, null, parent, false, false);
Exception lastExceptionGot = null;
if (locks != null) {
for (HiveLock lock : locks) {
try {
unlockPrimitive(lock, parent, curatorFramework);
} catch (Exception e) {
lastExceptionGot = e;
}
}
}
// if we got exception during doing the unlock, rethrow it here
if(lastExceptionGot != null) {
throw lastExceptionGot;
}
} catch (Exception e) {
LOG.error("Failed to release all locks: ", e);
throw new Exception(ErrorMsg.ZOOKEEPER_CLIENT_COULD_NOT_BE_INITIALIZED.getMsg());
}
}
代码示例来源:origin: apache/drill
public static void releaseAllLocks(HiveConf conf) throws Exception {
try {
String parent = conf.getVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_NAMESPACE);
List<HiveLock> locks = getLocks(conf, null, parent, false, false);
Exception lastExceptionGot = null;
if (locks != null) {
for (HiveLock lock : locks) {
try {
unlockPrimitive(lock, parent, curatorFramework);
} catch (Exception e) {
lastExceptionGot = e;
}
}
}
// if we got exception during doing the unlock, rethrow it here
if(lastExceptionGot != null) {
throw lastExceptionGot;
}
} catch (Exception e) {
LOG.error("Failed to release all locks: ", e);
throw new Exception(ErrorMsg.ZOOKEEPER_CLIENT_COULD_NOT_BE_INITIALIZED.getMsg());
}
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
public List<HiveLock> getLocks(boolean verifyTablePartition, boolean fetchData)
throws LockException {
return getLocks(ctx.getConf(), null, parent, verifyTablePartition, fetchData);
}
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
public List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions,
boolean fetchData) throws LockException {
return getLocks(ctx.getConf(), zooKeeper, key, parent, verifyTablePartitions, fetchData);
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
public List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions,
boolean fetchData) throws LockException {
return getLocks(ctx.getConf(), key, parent, verifyTablePartitions, fetchData);
}
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
public List<HiveLock> getLocks(boolean verifyTablePartition, boolean fetchData)
throws LockException {
return getLocks(ctx.getConf(), zooKeeper, null, parent, verifyTablePartition, fetchData);
}
代码示例来源:origin: org.apache.hadoop.hive/hive-exec
public static void releaseAllLocks(HiveConf conf) throws Exception {
try {
int sessionTimeout = conf.getIntVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_SESSION_TIMEOUT);
String quorumServers = getQuorumServers(conf);
ZooKeeper zkpClient = new ZooKeeper(quorumServers, sessionTimeout, new DummyWatcher());
String parent = conf.getVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_NAMESPACE);
List<HiveLock> locks = getLocks(conf, zkpClient, null, parent, false, false);
if (locks != null) {
for (HiveLock lock : locks) {
unlock(conf, zkpClient, lock, parent);
}
}
zkpClient.close();
zkpClient = null;
} catch (Exception e) {
LOG.error("Failed to release all locks: " + e.getMessage());
throw new Exception(ErrorMsg.ZOOKEEPER_CLIENT_COULD_NOT_BE_INITIALIZED.getMsg());
}
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
public static void releaseAllLocks(HiveConf conf) throws Exception {
try {
String parent = conf.getVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_NAMESPACE);
List<HiveLock> locks = getLocks(conf, null, parent, false, false);
Exception lastExceptionGot = null;
if (locks != null) {
for (HiveLock lock : locks) {
try {
unlockPrimitive(lock, parent, curatorFramework);
} catch (Exception e) {
lastExceptionGot = e;
}
}
}
// if we got exception during doing the unlock, rethrow it here
if(lastExceptionGot != null) {
throw lastExceptionGot;
}
} catch (Exception e) {
LOG.error("Failed to release all locks: ", e);
throw new Exception(ErrorMsg.ZOOKEEPER_CLIENT_COULD_NOT_BE_INITIALIZED.getMsg());
}
}
Redisson的 getLock() 方法是否适合分布式用例,它与 getRedLock() 相比如何? Redisson(3.11.x)有几种实例化锁的方法: RedissonClient.get
本文整理了Java中org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager.getLocks()方法的一些代码示例,展
我是一名优秀的程序员,十分优秀!