gpt4 book ai didi

org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager.getLocks()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 18:55:31 26 4
gpt4 key购买 nike

本文整理了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

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());
 }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com