@Override public List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions, boolean fetchData) throws LockException { return getLocks(ctx.getConf(), key, parent, verifyTablePartitions, fetchData); }
@Override public List<HiveLock> getLocks(boolean verifyTablePartition, boolean fetchData) throws LockException { return getLocks(ctx.getConf(), null, parent, verifyTablePartition, fetchData); }
@Override public List<HiveLock> getLocks(boolean verifyTablePartition, boolean fetchData) throws LockException { return getLocks(ctx.getConf(), null, parent, verifyTablePartition, fetchData); }
@Override public List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions, boolean fetchData) throws LockException { return getLocks(ctx.getConf(), key, parent, verifyTablePartitions, fetchData); }
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()); } }
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()); } }
public List<HiveLock> getLocks(boolean verifyTablePartition, boolean fetchData) throws LockException { return getLocks(ctx.getConf(), null, parent, verifyTablePartition, fetchData); }
public List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions, boolean fetchData) throws LockException { return getLocks(ctx.getConf(), zooKeeper, key, parent, verifyTablePartitions, fetchData); }
public List<HiveLock> getLocks(HiveLockObject key, boolean verifyTablePartitions, boolean fetchData) throws LockException { return getLocks(ctx.getConf(), key, parent, verifyTablePartitions, fetchData); }
public List<HiveLock> getLocks(boolean verifyTablePartition, boolean fetchData) throws LockException { return getLocks(ctx.getConf(), zooKeeper, null, parent, verifyTablePartition, fetchData); }
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()); } }
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()); } }