public void releaseLocksAndCommitOrRollback(boolean commit) throws LockException { releaseLocksAndCommitOrRollback(commit, queryTxnMgr); }
private CommandProcessorResponse rollback(CommandProcessorResponse cpr) throws CommandProcessorResponse { //console.printError(cpr.toString()); try { releaseLocksAndCommitOrRollback(false); } catch (LockException e) { LOG.error("rollback() FAILED: " + cpr);//make sure not to loose handleHiveException(e, 12, "Additional info in hive.log at \"rollback() FAILED\""); } return cpr; }
@Override public void run() { try { releaseLocksAndCommitOrRollback(false, txnMgr); } catch (LockException e) { LOG.warn("Exception when releasing locks in ShutdownHook for Driver: " + e.getMessage()); } } };
private CommandProcessorResponse rollback(CommandProcessorResponse cpr) { //console.printError(cpr.toString()); try { releaseLocksAndCommitOrRollback(false, null); } catch (LockException e) { LOG.error("rollback() FAILED: " + cpr);//make sure not to loose handleHiveException(e, 12, "Additional info in hive.log at \"rollback() FAILED\""); } return cpr; } private CommandProcessorResponse handleHiveException(HiveException e, int ret) {
@Override public void close() throws IOException { try { LOG.info("DriverCleanup for LLAP splits: {}", applicationId); driver.releaseLocksAndCommitOrRollback(true); driver.close(); driver.destroy(); txnManager.closeTxnManager(); } catch (Exception err) { LOG.error("Error closing driver resources", err); throw new IOException(err); } }
@Override public void destroy() { lDrvState.stateLock.lock(); try { // in the cancel case where the driver state is INTERRUPTED, destroy will be deferred to // the query process if (lDrvState.driverState == DriverState.DESTROYED) { return; } else { lDrvState.driverState = DriverState.DESTROYED; } } finally { lDrvState.stateLock.unlock(); } if (!hiveLocks.isEmpty()) { try { releaseLocksAndCommitOrRollback(false); } catch (LockException e) { LOG.warn("Exception when releasing locking in destroy: " + e.getMessage()); } } ShutdownHookManager.removeShutdownHook(shutdownRunner); }
public void destroy() { lDrvState.stateLock.lock(); try { // in the cancel case where the driver state is INTERRUPTED, destroy will be deferred to // the query process if (lDrvState.driverState == DriverState.DESTROYED || lDrvState.driverState == DriverState.INTERRUPT) { return; } else { lDrvState.driverState = DriverState.DESTROYED; } } finally { lDrvState.stateLock.unlock(); } if (!hiveLocks.isEmpty()) { try { releaseLocksAndCommitOrRollback(false, null); } catch (LockException e) { LOG.warn("Exception when releasing locking in destroy: " + e.getMessage()); } } ShutdownHookManager.removeShutdownHook(shutdownRunner); }
private int closeInProcess(boolean destroyed) { releaseDriverContext(); releasePlan(); releaseCachedResult(); releaseFetchTask(); releaseResStream(); releaseContext(); if(destroyed) { if (!hiveLocks.isEmpty()) { try { releaseLocksAndCommitOrRollback(false); } catch (LockException e) { LOG.warn("Exception when releasing locking in destroy: " + e.getMessage()); } } ShutdownHookManager.removeShutdownHook(shutdownRunner); } return 0; }
private int closeInProcess(boolean destroyed) { releaseDriverContext(); releasePlan(); releaseFetchTask(); releaseResStream(); releaseContext(); if (SessionState.get() != null) { SessionState.get().getLineageState().clear(); } if(destroyed) { if (!hiveLocks.isEmpty()) { try { releaseLocksAndCommitOrRollback(false, null); } catch (LockException e) { LOG.warn("Exception when releasing locking in destroy: " + e.getMessage()); } } ShutdownHookManager.removeShutdownHook(shutdownRunner); } return 0; }
releaseLocksAndCommitOrRollback(false, null); } catch (LockException e) { LOG.warn("Exception in releasing locks. "
} catch (CommandProcessorResponse cpr) { try { releaseLocksAndCommitOrRollback(false); } catch (LockException e) { LOG.warn("Exception in releasing locks. " + org.apache.hadoop.util.StringUtils.stringifyException(e));
releaseLocksAndCommitOrRollback(true); releaseLocksAndCommitOrRollback(false); } else if (!queryTxnMgr.isTxnOpen() && queryState.getHiveOperation() == HiveOperation.REPLLOAD) { releaseLocksAndCommitOrRollback(false); } else {
String ctas = "create temporary table " + tableName + " " + storageFormatString + " as " + query; LOG.info("Materializing the query for LLAPIF; CTAS: " + ctas); driver.releaseLocksAndCommitOrRollback(false); driver.releaseResources(); HiveConf.setVar(conf, ConfVars.HIVE_EXECUTION_MODE, originalMode);
checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "T8", null, locks); checkLock(LockType.SHARED_WRITE, LockState.WAITING, "default", "T8", null, locks); driver.releaseLocksAndCommitOrRollback(false, txnMgr); ((DbLockManager)txnMgr2.getLockManager()).checkLock(locks.get(2).getLockid()); locks = getLocks(); checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "T8", null, locks); checkLock(LockType.SHARED_WRITE, LockState.ACQUIRED, "default", "T8", null, locks); driver.releaseLocksAndCommitOrRollback(true, txnMgr2); swapTxnManager(txnMgr); cpr = driver.run("drop table if exists T6");
releaseLocksAndCommitOrRollback(true, null); txnManager.setAutoCommit(true); releaseLocksAndCommitOrRollback(true, null); releaseLocksAndCommitOrRollback(false, null);
public void destroy() { if (destroyed) { return; } destroyed = true; if (ctx != null) { try { releaseLocksAndCommitOrRollback(ctx.getHiveLocks(), false); } catch (LockException e) { LOG.warn("Exception when releasing locking in destroy: " + e.getMessage()); } } }
private int compileInternal(String command) { int ret; synchronized (compileMonitor) { ret = compile(command); } if (ret != 0) { try { releaseLocksAndCommitOrRollback(ctx.getHiveLocks(), false); } catch (LockException e) { LOG.warn("Exception in releasing locks. " + org.apache.hadoop.util.StringUtils.stringifyException(e)); } } return ret; }
if (ret != 0) { try { releaseLocksAndCommitOrRollback(ctx.getHiveLocks(), false); } catch (LockException e) { releaseLocksAndCommitOrRollback(ctx.getHiveLocks(), false); } catch (LockException e) { releaseLocksAndCommitOrRollback(ctx.getHiveLocks(), true); } catch (LockException e) { errorMessage = "FAILED: Hive Internal Error: " + Utilities.getNameMessage(e);