private TranslatorException handleError(Throwable t) { if (t instanceof DataNotAvailableException) { throw (DataNotAvailableException)t; } if (t instanceof RuntimeException && t.getCause() != null) { t = t.getCause(); } String msg = QueryPlugin.Util.getString("ConnectorWorker.process_failed", this.id); //$NON-NLS-1$ if (isCancelled.get()) { LogManager.logDetail(LogConstants.CTX_CONNECTOR, msg); } else { manager.logSRCCommand(this.requestMsg, this.securityContext, Event.ERROR, null, null); Throwable toLog = t; if (this.requestMsg.getCommandContext().getOptions().isSanitizeMessages() && !LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) { toLog = ExceptionUtil.sanitize(toLog, true); } if (toLog instanceof TranslatorException || toLog instanceof TeiidProcessingException) { LogManager.logWarning(LogConstants.CTX_CONNECTOR, toLog, msg); } else { LogManager.logError(LogConstants.CTX_CONNECTOR, toLog, msg); } } if (t instanceof TranslatorException) { return (TranslatorException)t; } return new TranslatorException(t); }
void receiveResults(AtomicResultsMessage response, boolean partial) { this.arm = response; this.scope = response.getScope(); if (this.scope != null) { this.aqr.getCommandContext().setDeterminismLevel(CachingTupleSource.getDeterminismLevel(this.scope)); } explicitClose |= !arm.supportsImplicitClose(); rowsProcessed += response.getResults().length; index = 0; if (response.getWarnings() != null) { for (Exception warning : response.getWarnings()) { SourceWarning sourceFailure = new SourceWarning(this.aqr.getModelName(), aqr.getConnectorName(), warning, partial); this.aqr.getCommandContext().addWarning(sourceFailure); } } if (response.getFinalRow() >= 0) { done = true; } }
private TranslatorException handleError(Throwable t) { if (t instanceof DataNotAvailableException) { throw (DataNotAvailableException)t; } if (t instanceof RuntimeException && t.getCause() != null) { t = t.getCause(); } String msg = QueryPlugin.Util.getString("ConnectorWorker.process_failed", this.id); //$NON-NLS-1$ if (isCancelled.get()) { LogManager.logDetail(LogConstants.CTX_CONNECTOR, msg); } else { manager.logSRCCommand(this, this.requestMsg, this.securityContext, Event.ERROR, null, null); Throwable toLog = t; if (this.requestMsg.getCommandContext().getOptions().isSanitizeMessages() && !LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) { toLog = ExceptionUtil.sanitize(toLog, true); } if (toLog instanceof TranslatorException || toLog instanceof TeiidProcessingException) { LogManager.logWarning(LogConstants.CTX_CONNECTOR, toLog, msg); } else { LogManager.logError(LogConstants.CTX_CONNECTOR, toLog, msg); } } if (t instanceof TranslatorException) { return (TranslatorException)t; } return new TranslatorException(t); }
private TranslatorException handleError(Throwable t) { if (t instanceof DataNotAvailableException) { throw (DataNotAvailableException)t; } if (t instanceof RuntimeException && t.getCause() != null) { t = t.getCause(); } String msg = QueryPlugin.Util.getString("ConnectorWorker.process_failed", this.id); //$NON-NLS-1$ if (isCancelled.get()) { LogManager.logDetail(LogConstants.CTX_CONNECTOR, msg); } else { manager.logSRCCommand(this, this.requestMsg, this.securityContext, Event.ERROR, null, null); Throwable toLog = t; if (this.requestMsg.getCommandContext().getOptions().isSanitizeMessages() && !LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) { toLog = ExceptionUtil.sanitize(toLog, true); } if (toLog instanceof TranslatorException || toLog instanceof TeiidProcessingException) { LogManager.logWarning(LogConstants.CTX_CONNECTOR, toLog, msg); } else { LogManager.logError(LogConstants.CTX_CONNECTOR, toLog, msg); } } if (t instanceof TranslatorException) { return (TranslatorException)t; } return new TranslatorException(t); }
void receiveResults(AtomicResultsMessage response, boolean partial) { this.arm = response; this.scope = response.getScope(); if (this.scope != null) { this.aqr.getCommandContext().setDeterminismLevel(CachingTupleSource.getDeterminismLevel(this.scope)); } explicitClose |= !arm.supportsImplicitClose(); rowsProcessed += response.getResults().length; index = 0; if (response.getWarnings() != null) { for (Exception warning : response.getWarnings()) { SourceWarning sourceFailure = new SourceWarning(this.aqr.getModelName(), aqr.getConnectorName(), warning, partial); this.aqr.getCommandContext().addWarning(sourceFailure); } } if (response.getFinalRow() >= 0) { done = true; } }
Object result = convertToRuntimeType(requestMsg.getBufferManager(), value, this.schema[i], this.requestMsg.getCommandContext()); if (value == result && !DataTypeManager.DefaultDataClasses.OBJECT.equals(this.schema[i])) { convertToRuntimeType[i] = false;
void receiveResults(AtomicResultsMessage response, boolean partial) { this.arm = response; this.scope = response.getScope(); if (this.scope != null) { this.aqr.getCommandContext().setDeterminismLevel(CachingTupleSource.getDeterminismLevel(this.scope)); } explicitClose |= !arm.supportsImplicitClose(); rowsProcessed += response.getResults().length; index = 0; if (response.getWarnings() != null) { for (Exception warning : response.getWarnings()) { SourceWarning sourceFailure = new SourceWarning(this.aqr.getModelName(), aqr.getConnectorName(), warning, partial); this.aqr.getCommandContext().addWarning(sourceFailure); } } if (response.getFinalRow() >= 0) { done = true; } }
Object result = convertToRuntimeType(requestMsg.getBufferManager(), value, this.schema[i], this.requestMsg.getCommandContext()); if (value == result && !DataTypeManager.DefaultDataClasses.OBJECT.equals(this.schema[i])) { convertToRuntimeType[i] = false;
Object result = convertToRuntimeType(requestMsg.getBufferManager(), value, this.schema[i], this.requestMsg.getCommandContext()); if (value == result && !DataTypeManager.DefaultDataClasses.OBJECT.equals(this.schema[i])) { convertToRuntimeType[i] = false;
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Closed execution"}); //$NON-NLS-1$ if (execution instanceof ReusableExecution<?>) { this.requestMsg.getCommandContext().putReusableExecution(this.manager.getId(), (ReusableExecution<?>) execution);
this.manager = manager; AtomicRequestID requestID = this.requestMsg.getAtomicRequestID(); this.securityContext = new ExecutionContextImpl(message.getCommandContext(), requestMsg.getConnectorName(), Integer.toString(requestID.getNodeID()), this.securityContext.setTransactional(requestMsg.isTransactional()); LanguageBridgeFactory factory = new LanguageBridgeFactory(this.queryMetadata); CommandContext context = requestMsg.getCommandContext(); try { SourceCapabilities capabilities = manager.getCapabilities();
this.manager = manager; AtomicRequestID requestID = this.requestMsg.getAtomicRequestID(); this.securityContext = new ExecutionContextImpl(message.getCommandContext(), requestMsg.getConnectorName(), Integer.toString(requestID.getNodeID()), this.securityContext.setTransactional(requestMsg.isTransactional()); LanguageBridgeFactory factory = new LanguageBridgeFactory(this.queryMetadata); CommandContext context = requestMsg.getCommandContext(); try { SourceCapabilities capabilities = manager.getCapabilities();
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Closed execution"}); //$NON-NLS-1$ if (execution instanceof ReusableExecution<?>) { this.requestMsg.getCommandContext().putReusableExecution(this.manager.getId(), (ReusableExecution<?>) execution);
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {this.id, "Closed execution"}); //$NON-NLS-1$ if (execution instanceof ReusableExecution<?>) { this.requestMsg.getCommandContext().putReusableExecution(this.manager.getId(), (ReusableExecution<?>) execution);
this.manager = manager; AtomicRequestID requestID = this.requestMsg.getAtomicRequestID(); this.securityContext = new ExecutionContextImpl(message.getCommandContext(), requestMsg.getConnectorName(), Integer.toString(requestID.getNodeID()), factory.setCommandContext(requestMsg.getCommandContext()); factory.setExcludeWithName((String) capabilities.getSourceProperty(Capability.EXCLUDE_COMMON_TABLE_EXPRESSION_NAME)); } catch (TranslatorException e) {
Execution exec = this.requestMsg.getCommandContext().getReusableExecution(this.manager.getId()); if (exec != null) { ((ReusableExecution)exec).reset(translatedCommand, this.securityContext, connection);
Execution exec = this.requestMsg.getCommandContext().getReusableExecution(this.manager.getId()); if (exec != null) { ((ReusableExecution)exec).reset(translatedCommand, this.securityContext, connection);
Execution exec = this.requestMsg.getCommandContext().getReusableExecution(this.manager.getId()); if (exec != null) { ((ReusableExecution)exec).reset(translatedCommand, this.securityContext, connection);
TupleBuffer tb = null; if (cid != null) { tb = getBufferManager().createTupleBuffer(aqr.getCommand().getProjectedSymbols(), aqr.getCommandContext().getConnectionId(), TupleSourceType.PROCESSOR); result = new CachingTupleSource(this, tb, (DataTierTupleSource)result, cid, parameterObject, cd, accessedGroups, workItem);
TupleBuffer tb = null; if (cid != null) { tb = getBufferManager().createTupleBuffer(aqr.getCommand().getProjectedSymbols(), aqr.getCommandContext().getConnectionId(), TupleSourceType.PROCESSOR); result = new CachingTupleSource(this, tb, (DataTierTupleSource)result, cid, parameterObject, cd, accessedGroups, workItem);