@Override public TupleSource registerRequest(CommandContext context, Command command, String modelName, RegisterRequestParameter parameterObject) throws TeiidComponentException, TeiidProcessingException { //programs will be empty for parameter evaluation TupleSource ts = parentDataMrg.registerRequest(context, command, modelName, parameterObject); if (blockContext != null && ts instanceof DataTierTupleSource) { txnTupleSources.add(new WeakReference<DataTierTupleSource>((DataTierTupleSource)ts)); } return ts; }
@Override public TupleSource registerRequest(CommandContext context, Command command, String modelName, RegisterRequestParameter parameterObject) throws TeiidComponentException, TeiidProcessingException { //programs will be empty for parameter evaluation TupleSource ts = parentDataMrg.registerRequest(context, command, modelName, parameterObject); if (blockContext != null && ts instanceof DataTierTupleSource) { txnTupleSources.add(new WeakReference<DataTierTupleSource>((DataTierTupleSource)ts)); } return ts; }
@Override public TupleSource registerRequest(CommandContext context, Command command, String modelName, RegisterRequestParameter parameterObject) throws TeiidComponentException, TeiidProcessingException { //programs will be empty for parameter evaluation TupleSource ts = parentDataMrg.registerRequest(context, command, modelName, parameterObject); if (blockContext != null && ts instanceof DataTierTupleSource) { txnTupleSources.add(new WeakReference<DataTierTupleSource>((DataTierTupleSource)ts)); } return ts; }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { RegisterRequestParameter parameterObject = new RegisterRequestParameter(); ts = dataMgr.registerRequest(getContext(), command, schema, parameterObject); }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { RegisterRequestParameter parameterObject = new RegisterRequestParameter(); ts = dataMgr.registerRequest(getContext(), command, schema, parameterObject); }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { RegisterRequestParameter parameterObject = new RegisterRequestParameter(); ts = dataMgr.registerRequest(getContext(), command, schema, parameterObject); }
public TupleSource getSharedTupleSource(CommandContext context, Command command, String modelName, RegisterRequestParameter parameterObject, BufferManager bufferMgr, ProcessorDataManager pdm) throws TeiidComponentException, TeiidProcessingException { if (sharedStates == null) { sharedStates = new HashMap<Integer, SharedState>(); } SharedState state = sharedStates.get(parameterObject.info.id); if (state == null) { state = new SharedState(); state.expectedReaders = parameterObject.info.sharingCount; RegisterRequestParameter param = new RegisterRequestParameter(parameterObject.connectorBindingId, parameterObject.nodeID, -1); param.fetchSize = parameterObject.fetchSize; param.copyStreamingLobs = true; state.ts = pdm.registerRequest(context, command, modelName, param); if (param.doNotCache) { return state.ts; } state.tb = bufferMgr.createTupleBuffer(command.getProjectedSymbols(), context.getConnectionId(), TupleSourceType.PROCESSOR); state.id = parameterObject.info.id; sharedStates.put(parameterObject.info.id, state); } return new SharedTupleSource(state); }
public TupleSource getSharedTupleSource(CommandContext context, Command command, String modelName, RegisterRequestParameter parameterObject, BufferManager bufferMgr, ProcessorDataManager pdm) throws TeiidComponentException, TeiidProcessingException { if (sharedStates == null) { sharedStates = new HashMap<Integer, SharedState>(); } SharedState state = sharedStates.get(parameterObject.info.id); if (state == null) { state = new SharedState(); state.expectedReaders = parameterObject.info.sharingCount; RegisterRequestParameter param = new RegisterRequestParameter(parameterObject.connectorBindingId, parameterObject.nodeID, -1); param.fetchSize = parameterObject.fetchSize; state.ts = pdm.registerRequest(context, command, modelName, param); if (param.doNotCache) { return state.ts; } state.tb = bufferMgr.createTupleBuffer(command.getProjectedSymbols(), context.getConnectionId(), TupleSourceType.PROCESSOR); state.id = parameterObject.info.id; sharedStates.put(parameterObject.info.id, state); } return new SharedTupleSource(state); }
public TupleSource registerRequest( CommandContext context, Command command, String modelName, RegisterRequestParameter parameterObject) throws TeiidComponentException, TeiidProcessingException { if (parameterObject.info != null) { TupleSourceCache tsc = context.getTupleSourceCache(); if (tsc != null) { return tsc.getSharedTupleSource(context, command, modelName, parameterObject, bufferManager, this); } } TempTableStore tempTableStore = context.getTempTableStore(); if(tempTableStore != null) { try { TupleSource result = registerRequest(context, modelName, command); if (result != null) { return result; } } catch (BlockedException e) { throw new AssertionError("blocked is not expected"); //$NON-NLS-1$ } } return this.processorDataManager.registerRequest(context, command, modelName, parameterObject); }
public TupleSource registerRequest( CommandContext context, Command command, String modelName, RegisterRequestParameter parameterObject) throws TeiidComponentException, TeiidProcessingException { if (parameterObject.info != null) { TupleSourceCache tsc = context.getTupleSourceCache(); if (tsc != null) { return tsc.getSharedTupleSource(context, command, modelName, parameterObject, bufferManager, this); } } TempTableStore tempTableStore = context.getTempTableStore(); if(tempTableStore != null) { try { TupleSource result = registerRequest(context, modelName, command); if (result != null) { return result; } } catch (BlockedException e) { throw new AssertionError("blocked is not expected"); //$NON-NLS-1$ } } return this.processorDataManager.registerRequest(context, command, modelName, parameterObject); }
public TupleSource getSharedTupleSource(CommandContext context, Command command, String modelName, RegisterRequestParameter parameterObject, BufferManager bufferMgr, ProcessorDataManager pdm) throws TeiidComponentException, TeiidProcessingException { if (sharedStates == null) { sharedStates = new HashMap<Integer, SharedState>(); } SharedState state = sharedStates.get(parameterObject.info.id); if (state == null) { state = new SharedState(); state.expectedReaders = parameterObject.info.sharingCount; RegisterRequestParameter param = new RegisterRequestParameter(parameterObject.connectorBindingId, parameterObject.nodeID, -1); param.fetchSize = parameterObject.fetchSize; param.copyStreamingLobs = true; state.ts = pdm.registerRequest(context, command, modelName, param); if (param.doNotCache) { return state.ts; } state.tb = bufferMgr.createTupleBuffer(command.getProjectedSymbols(), context.getConnectionId(), TupleSourceType.PROCESSOR); state.id = parameterObject.info.id; sharedStates.put(parameterObject.info.id, state); } return new SharedTupleSource(state); }
private void registerRequest(Command command) throws TeiidComponentException, TeiidProcessingException { tupleSource = getDataManager().registerRequest(getContext(), command, this.modelName, new RegisterRequestParameter(null, getID(), -1)); }
private void registerRequest(Command command) throws TeiidComponentException, TeiidProcessingException { tupleSource = getDataManager().registerRequest(getContext(), command, this.modelName, new RegisterRequestParameter(null, getID(), -1)); }
private void registerRequest(Command command) throws TeiidComponentException, TeiidProcessingException { tupleSource = getDataManager().registerRequest(getContext(), command, this.modelName, new RegisterRequestParameter(null, getID(), -1)); }
public TupleSource registerRequest( CommandContext context, Command command, String modelName, RegisterRequestParameter parameterObject) throws TeiidComponentException, TeiidProcessingException { if (parameterObject.info != null) { TupleSourceCache tsc = context.getTupleSourceCache(); if (tsc != null) { return tsc.getSharedTupleSource(context, command, modelName, parameterObject, bufferManager, this); } } TempTableStore tempTableStore = context.getTempTableStore(); if(tempTableStore != null) { try { TupleSource result = registerRequest(context, modelName, command); if (result != null) { return result; } } catch (BlockedException e) { throw new AssertionError("blocked is not expected"); //$NON-NLS-1$ } } return this.processorDataManager.registerRequest(context, command, modelName, parameterObject); }
private void registerRequest(Command atomicCommand) throws TeiidComponentException, TeiidProcessingException { if (shouldEvaluate) { projection = null; minimizeProject(atomicCommand); } int limit = -1; if (getParent() instanceof LimitNode) { LimitNode parent = (LimitNode)getParent(); if (parent.getLimit() > 0) { limit = parent.getLimit() + parent.getOffset(); } } RegisterRequestParameter param = new RegisterRequestParameter(connectorBindingId, getID(), limit); param.info = info; param.fetchSize = this.getBatchSize(); RowBasedSecurityHelper.checkConstraints(atomicCommand, getEvaluator(Collections.emptyMap())); tupleSources.add(getDataManager().registerRequest(getContext(), atomicCommand, modelName, param)); if (tupleSources.size() > 1) { reserved += getBufferManager().reserveBuffers(schemaSize, BufferReserveMode.FORCE); } }
private void registerRequest(Command atomicCommand) throws TeiidComponentException, TeiidProcessingException { if (shouldEvaluate) { projection = null; minimizeProject(atomicCommand); } int limit = -1; if (getParent() instanceof LimitNode) { LimitNode parent = (LimitNode)getParent(); if (parent.getLimit() > 0) { limit = parent.getLimit() + parent.getOffset(); } } RegisterRequestParameter param = new RegisterRequestParameter(connectorBindingId, getID(), limit); param.info = info; param.fetchSize = this.getBatchSize(); RowBasedSecurityHelper.checkConstraints(atomicCommand, getEvaluator(Collections.emptyMap())); tupleSources.add(getDataManager().registerRequest(getContext(), atomicCommand, modelName, param)); if (tupleSources.size() > 1) { reserved += getBufferManager().reserveBuffers(schemaSize, BufferReserveMode.FORCE); } }
private void registerRequest(Command atomicCommand) throws TeiidComponentException, TeiidProcessingException { if (shouldEvaluate) { projection = null; minimizeProject(atomicCommand); } int limit = -1; if (getParent() instanceof LimitNode) { LimitNode parent = (LimitNode)getParent(); if (parent.getLimit() > 0) { limit = parent.getLimit() + parent.getOffset(); } } RegisterRequestParameter param = new RegisterRequestParameter(connectorBindingId, getID(), limit); param.info = info; param.fetchSize = this.getBatchSize(); RowBasedSecurityHelper.checkConstraints(atomicCommand, getEvaluator(Collections.emptyMap())); tupleSources.add(getDataManager().registerRequest(getContext(), atomicCommand, modelName, param)); if (tupleSources.size() > 1) { reserved += getBufferManager().reserveBuffers(schemaSize, BufferReserveMode.FORCE); } }
/** * Close the executor and release all the resources. */ public void close() throws TeiidComponentException { this.internalProcessor.closeProcessing(); if (this.tupleSource != null) { this.tupleSource.closeSource(); } String rsTempTable = this.resultInfo.getTempTable(); if (rsTempTable != null) { LogManager.logDetail(LogConstants.CTX_XML_PLAN, "Unloading result set temp table", rsTempTable); //$NON-NLS-1$ internalProcessor.closeProcessing(); try { this.tupleSource = this.dataManager.registerRequest(this.internalProcessor.getContext(), this.resultInfo.getTempDrop(), TempMetadataAdapter.TEMP_MODEL.getName(), new RegisterRequestParameter()); } catch (TeiidProcessingException e) { LogManager.logDetail(org.teiid.logging.LogConstants.CTX_XML_PLAN, e, "Error dropping result set temp table", rsTempTable); //$NON-NLS-1$ } } LogManager.logTrace(org.teiid.logging.LogConstants.CTX_XML_PLAN, new Object[]{"closed executor", resultInfo.getResultSetName()}); //$NON-NLS-1$ }
/** * @see org.teiid.query.processor.xml.ProcessorInstruction#process(org.teiid.query.processor.xml.XMLProcessorEnvironment, org.teiid.query.processor.xml.XMLContext) */ public XMLContext process(XMLProcessorEnvironment env, XMLContext context) throws BlockedException, TeiidComponentException, TeiidProcessingException { if (!env.isStagingTableLoaded(this.resultSetName)) { super.execute(env, context); env.markStagingTableAsLoaded(this.resultSetName); if (!info.isAutoStaged() && info.getTempTable() == null && info.getCommand() instanceof Insert) { //TODO: should consolidate with the other temp logic in RelationalPlanExecutor AlterTempTable att = new AlterTempTable(XMLQueryPlanner.getTempTableName(this.resultSetName)); att.setIndexColumns(this.info.getFkColumns()); //mark the temp table as non-updatable env.getDataManager().registerRequest(env.getProcessorContext(), att, TempMetadataAdapter.TEMP_MODEL.getName(), new RegisterRequestParameter()); } // now that we done executing the plan; remove the plan from context context.removeResultExecutor(resultSetName); } env.incrementCurrentProgramCounter(); return context; }