@Override public TupleBatch nextBatch() throws BlockedException, TeiidComponentException, TeiidProcessingException { while (planIndex < plans.size()) { try { if (!open) { plans.get(planIndex).open(); } plans.get(planIndex).nextBatch(); plans.get(planIndex).close(); } catch (TeiidProcessingException e) { LogManager.logWarning(LogConstants.CTX_DQP, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31214, names.get(planIndex), table)); } catch (BlockedException e) { throw e; } //allow other exception types to bubble up open = false; planIndex++; } TupleBatch batch = new TupleBatch(1, new List<?>[0]); batch.setTerminationFlag(true); return batch; }
@Override public TupleBatch nextBatch() throws BlockedException, TeiidComponentException, TeiidProcessingException { while (planIndex < plans.size()) { try { if (!open) { plans.get(planIndex).open(); } plans.get(planIndex).nextBatch(); plans.get(planIndex).close(); } catch (TeiidProcessingException e) { LogManager.logWarning(LogConstants.CTX_DQP, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31214, names.get(planIndex), table)); } catch (BlockedException e) { throw e; } //allow other exception types to bubble up open = false; planIndex++; } TupleBatch batch = new TupleBatch(1, new List<?>[0]); batch.setTerminationFlag(true); return batch; }
@Override public TupleBatch nextBatch() throws BlockedException, TeiidComponentException, TeiidProcessingException { while (planIndex < plans.size()) { try { if (!open) { plans.get(planIndex).open(); } plans.get(planIndex).nextBatch(); plans.get(planIndex).close(); } catch (TeiidProcessingException e) { LogManager.logWarning(LogConstants.CTX_DQP, e, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31214, names.get(planIndex), table)); } catch (BlockedException e) { throw e; } //allow other exception types to bubble up open = false; planIndex++; } TupleBatch batch = new TupleBatch(1, new List<?>[0]); batch.setTerminationFlag(true); return batch; }
private void openPlan() throws TeiidComponentException, TeiidProcessingException { //reset prior to updating the context updatePlans[planIndex].reset(); if (this.contexts != null && !this.contexts.isEmpty()) { CommandContext context = updatePlans[planIndex].getContext(); VariableContext vc = context.getVariableContext(); //ensure that we're dealing with the global context //this is just a safe guard against the plan not correctly resetting the context while (vc.getParentContext() != null) { vc = vc.getParentContext(); } vc.clear(); VariableContext currentValues = this.contexts.get(planIndex); vc.putAll(currentValues); } TransactionContext tc = this.getContext().getTransactionContext(); if (startTxn[planIndex] && tc != null && tc.getTransactionType() == Scope.NONE) { this.getContext().getTransactionServer().begin(tc); this.planContexts[planIndex] = tc; } updatePlans[planIndex].open(); planOpened[planIndex] = true; }
private void openPlan() throws TeiidComponentException, TeiidProcessingException { //reset prior to updating the context updatePlans[planIndex].reset(); if (this.contexts != null && !this.contexts.isEmpty()) { CommandContext context = updatePlans[planIndex].getContext(); VariableContext vc = context.getVariableContext(); //ensure that we're dealing with the global context //this is just a safe guard against the plan not correctly resetting the context while (vc.getParentContext() != null) { vc = vc.getParentContext(); } vc.clear(); VariableContext currentValues = this.contexts.get(planIndex); vc.putAll(currentValues); } TransactionContext tc = this.getContext().getTransactionContext(); if (startTxn[planIndex] && tc != null && tc.getTransactionType() == Scope.NONE) { this.getContext().getTransactionServer().begin(tc); this.planContexts[planIndex] = tc; } updatePlans[planIndex].open(); planOpened[planIndex] = true; }
private void openPlan() throws TeiidComponentException, TeiidProcessingException { //reset prior to updating the context updatePlans[planIndex].reset(); if (this.contexts != null && !this.contexts.isEmpty()) { CommandContext context = updatePlans[planIndex].getContext(); VariableContext vc = context.getVariableContext(); //ensure that we're dealing with the global context //this is just a safe guard against the plan not correctly resetting the context while (vc.getParentContext() != null) { vc = vc.getParentContext(); } vc.clear(); VariableContext currentValues = this.contexts.get(planIndex); vc.putAll(currentValues); } TransactionContext tc = this.getContext().getTransactionContext(); if (startTxn[planIndex] && tc != null && tc.getTransactionType() == Scope.NONE) { this.getContext().getTransactionServer().begin(tc); this.planContexts[planIndex] = tc; } updatePlans[planIndex].open(); planOpened[planIndex] = true; }
public void open() throws TeiidComponentException, TeiidProcessingException { super.open(); // Initialize plan for execution CommandContext subContext = getContext().clone(); subContext.pushVariableContext(new VariableContext()); plan.initialize(subContext, getDataManager(), this.getBufferManager()); if (openPlanImmediately() && prepareNextCommand()) { needsProcessing = true; plan.open(); isOpen = true; } }
public void open() throws TeiidComponentException, TeiidProcessingException { super.open(); // Initialize plan for execution CommandContext subContext = getContext().clone(); subContext.pushVariableContext(new VariableContext()); plan.initialize(subContext, getDataManager(), this.getBufferManager()); if (openPlanImmediately() && prepareNextCommand()) { needsProcessing = true; plan.open(); isOpen = true; } }
public void open() throws TeiidComponentException, TeiidProcessingException { super.open(); // Initialize plan for execution CommandContext subContext = getContext().clone(); subContext.pushVariableContext(new VariableContext()); plan.initialize(subContext, getDataManager(), this.getBufferManager()); if (openPlanImmediately() && prepareNextCommand()) { needsProcessing = true; plan.open(); isOpen = true; } }
public void init() throws TeiidComponentException, TeiidProcessingException { if (!open) { if (continuous && context.getReuseCount() > 0) { //validate the plan prior to the next run if (this.plan != null && !this.plan.validate()) { this.plan = null; } if (this.plan == null) { this.plan = context.getQueryProcessorFactory().getPreparedPlan(query, null, context, context.getMetadata()); this.processPlan = this.plan.getPlan().clone(); this.processPlan.initialize(context, dataMgr, bufferMgr); } } // initialize if necessary if(!initialized) { reserved = this.bufferMgr.reserveBuffers(this.bufferMgr.getSchemaSize(this.getOutputElements()), BufferReserveMode.FORCE); this.processPlan.initialize(context, dataMgr, bufferMgr); initialized = true; } // Open the top node for reading processPlan.open(); open = true; } }
public void init() throws TeiidComponentException, TeiidProcessingException { if (!open) { if (continuous && context.getReuseCount() > 0) { //validate the plan prior to the next run if (this.plan != null && !this.plan.validate()) { this.plan = null; } if (this.plan == null) { this.plan = context.getQueryProcessorFactory().getPreparedPlan(query, null, context, context.getMetadata()); this.processPlan = this.plan.getPlan().clone(); this.processPlan.initialize(context, dataMgr, bufferMgr); } } // initialize if necessary if(!initialized) { reserved = this.bufferMgr.reserveBuffers(this.bufferMgr.getSchemaSize(this.getOutputElements()), BufferReserveMode.FORCE); this.processPlan.initialize(context, dataMgr, bufferMgr); initialized = true; } // Open the top node for reading processPlan.open(); open = true; } }
public void init() throws TeiidComponentException, TeiidProcessingException { if (!open) { if (continuous && context.getReuseCount() > 0) { //validate the plan prior to the next run if (this.plan != null && !this.plan.validate()) { this.plan = null; } if (this.plan == null) { this.plan = context.getQueryProcessorFactory().getPreparedPlan(query, null, context, context.getMetadata()); this.processPlan = this.plan.getPlan().clone(); this.processPlan.initialize(context, dataMgr, bufferMgr); } } // initialize if necessary if(!initialized) { reserved = this.bufferMgr.reserveBuffers(this.bufferMgr.getSchemaSize(this.getOutputElements()), BufferReserveMode.FORCE); this.processPlan.initialize(context, dataMgr, bufferMgr); initialized = true; } // Open the top node for reading processPlan.open(); open = true; } }
plan.open(); isOpen = true;
plan.open(); isOpen = true;
plan.open(); isOpen = true;