public boolean cancelRequest(String sessionId, long executionId) throws TeiidComponentException { RequestID requestID = new RequestID(sessionId, executionId); return cancelRequest(requestID, "by an admin operation"); //$NON-NLS-1$ }
public boolean cancelRequest(String sessionId, long executionId) throws TeiidComponentException { RequestID requestID = new RequestID(sessionId, executionId); return cancelRequest(requestID, "by an admin operation"); //$NON-NLS-1$ }
@Override public void cancelRequest(String sessionId, long executionId) throws AdminException { try { this.dqp.cancelRequest(sessionId, executionId); } catch (TeiidComponentException e) { throw new AdminProcessingException(e); } }
public boolean cancelRequest(String sessionId, long executionId) throws TeiidComponentException { RequestID requestID = new RequestID(sessionId, executionId); return cancelRequest(requestID); }
@Override public boolean cancelRequest(long requestID) throws TeiidProcessingException, TeiidComponentException { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); return this.cancelRequest(workContext.getRequestID(requestID), "by the client"); //$NON-NLS-1$ }
@Override public boolean cancelRequest(long requestID) throws TeiidProcessingException, TeiidComponentException { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); return this.cancelRequest(workContext.getRequestID(requestID)); }
@Override public boolean cancelRequest(long requestID) throws TeiidProcessingException, TeiidComponentException { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); return this.cancelRequest(workContext.getRequestID(requestID), "by the client"); //$NON-NLS-1$ }
@Override public void cancelRequest(String sessionId, long executionId)throws AdminException { try { this.embeddedServer.dqp.cancelRequest(sessionId, executionId); } catch (TeiidComponentException e) { throw new AdminProcessingException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40141, sessionId, executionId, e)); } }
/** * perform a full shutdown and wait for 10 seconds for all threads to finish */ public void stop() { shutdown = true; for (RequestID request : requests.keySet()) { try { cancelRequest(request); } catch (TeiidComponentException e) { } } processWorkerPool.shutdownNow(); try { processWorkerPool.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { } this.timeoutExecutor.shutdownNow(); try { timeoutExecutor.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { } // TODO: Should we be doing more cleanup here?? LogManager.logDetail(LogConstants.CTX_DQP, "Stopping the DQP"); //$NON-NLS-1$ }
/** * perform a full shutdown and wait for 10 seconds for all threads to finish */ public void stop() { shutdown = true; for (RequestID request : requests.keySet()) { try { cancelRequest(request, "server shutdown"); //$NON-NLS-1$ } catch (TeiidComponentException e) { } } processWorkerPool.shutdownNow(); try { processWorkerPool.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { } this.timeoutExecutor.shutdownNow(); try { timeoutExecutor.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { } // TODO: Should we be doing more cleanup here?? LogManager.logDetail(LogConstants.CTX_DQP, "Stopping the DQP"); //$NON-NLS-1$ }
/** * perform a full shutdown and wait for 10 seconds for all threads to finish */ public void stop() { shutdown = true; for (RequestID request : requests.keySet()) { try { cancelRequest(request, "server shutdown"); //$NON-NLS-1$ } catch (TeiidComponentException e) { } } processWorkerPool.shutdownNow(); try { processWorkerPool.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { } this.timeoutExecutor.shutdownNow(); try { timeoutExecutor.awaitTermination(10, TimeUnit.SECONDS); } catch (InterruptedException e) { } // TODO: Should we be doing more cleanup here?? LogManager.logDetail(LogConstants.CTX_DQP, "Stopping the DQP"); //$NON-NLS-1$ }
@Test public void testCancel() throws Exception { assertFalse(this.core.cancelRequest(1L)); }
public void terminateSession(String sessionId) { // sometimes there will not be any atomic requests pending, in that // situation we still need to clear the master request from our map ClientState state = this.clientState.remove(sessionId); if (state != null) { for (RequestID reqId : state.getRequests()) { try { cancelRequest(reqId, "session terminated"); //$NON-NLS-1$ } catch (TeiidComponentException err) { LogManager.logWarning(LogConstants.CTX_DQP, err, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30026,reqId)); } } } try { transactionService.cancelTransactions(sessionId, false); } catch (XATransactionException err) { LogManager.logWarning(LogConstants.CTX_DQP, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30005,sessionId)); } if (state != null && state.sessionTables != null) { try { state.sessionTables.removeTempTables(); } catch (TeiidComponentException e) { LogManager.logWarning(LogConstants.CTX_DQP, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31277,sessionId)); } } }
public void terminateSession(String sessionId) { // sometimes there will not be any atomic requests pending, in that // situation we still need to clear the master request from our map ClientState state = this.clientState.remove(sessionId); if (state != null) { for (RequestID reqId : state.getRequests()) { try { cancelRequest(reqId, "session terminated"); //$NON-NLS-1$ } catch (TeiidComponentException err) { LogManager.logWarning(LogConstants.CTX_DQP, err, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30026,reqId)); } } } try { transactionService.cancelTransactions(sessionId, false); } catch (XATransactionException err) { LogManager.logWarning(LogConstants.CTX_DQP, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30005,sessionId)); } if (state != null && state.sessionTables != null) { try { state.sessionTables.removeTempTables(); } catch (TeiidComponentException e) { LogManager.logWarning(LogConstants.CTX_DQP, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31277,sessionId)); } } }
for (RequestID reqId : state.getRequests()) { try { cancelRequest(reqId); } catch (TeiidComponentException err) { LogManager.logWarning(LogConstants.CTX_DQP, err, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30026,reqId));