public int getMaxRowsFetchSize() { return this.config.getMaxRowsFetchSize(); }
public int getMaxSourceRows() { return this.config.getMaxSourceRows(); }
public TeiidExecutor getTeiidExecutor() { return new ThreadReuseExecutor(DQPConfiguration.PROCESS_PLAN_QUEUE_NAME, getMaxThreads()) { Tracer tracer = GlobalTracerInjector.getTracer(); @Override public void execute(Runnable command) { super.execute(tracer.activeSpan() == null ? command : new TracedRunnable(command, tracer)); } }; }
public void start(DQPConfiguration theConfig) { this.config = theConfig; this.authorizationValidator = config.getAuthorizationValidator(); this.chunkSize = config.getLobChunkSizeInKB() * 1024; this.processWorkerPool = config.getTeiidExecutor(); this.maxActivePlans = config.getMaxActivePlans(); if (this.maxActivePlans > config.getMaxThreads()) { LogManager.logWarning(LogConstants.CTX_DQP, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30006, this.maxActivePlans, config.getMaxThreads())); this.maxActivePlans = config.getMaxThreads(); options.setProperties(config.getProperties()); PropertiesUtils.setBeanProperties(options, options.getProperties(), "org.teiid", true); //$NON-NLS-1$ this.userRequestSourceConcurrency = config.getUserRequestSourceConcurrency(); if (this.userRequestSourceConcurrency < 1) { this.userRequestSourceConcurrency = Math.min(config.getMaxThreads(), 2*config.getMaxThreads()/this.maxActivePlans); DataTierManagerImpl processorDataManager = new DataTierManagerImpl(this, this.bufferManager, this.config.isDetectingChangeEvents()); processorDataManager.setEventDistributor(eventDistributor); dataTierMgr = new TempTableDataManager(processorDataManager, this.bufferManager, this.rsCache); LogManager.logDetail(LogConstants.CTX_DQP, "DQPCore started maxThreads", this.config.getMaxThreads(), "maxActivePlans", this.maxActivePlans, "source concurrency", this.userRequestSourceConcurrency); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
checkActive(workContext); RequestID requestID = workContext.getRequestID(reqID); requestMsg.setFetchSize(Math.min(requestMsg.getFetchSize(), this.config.getMaxRowsFetchSize())); Request request = null; if ( requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || requestMsg.getRequestOptions().isContinuous()) { final PreParser preparser = workContext.getVDB().getAttachment(PreParser.class); if (preparser != null) { if (this.config.getPreParser() != null) { request.setPreParser(this.config.getPreParser()); addRequest(requestID, workItem, state); long timeout = workContext.getVDB().getQueryTimeout(); timeout = Math.min(timeout>0?timeout:Long.MAX_VALUE, config.getQueryTimeout()>0?config.getQueryTimeout():Long.MAX_VALUE); if (queryTimeout != null && queryTimeout > 0) { timeout = Math.min(timeout>0?timeout:Long.MAX_VALUE, queryTimeout);
@Override public String preParse(String command, org.teiid.CommandContext context) { String preParse = config.getPreParser().preParse(command, context); return preparser.preParse(preParse, context); } });
public List<RequestMetadata> getLongRunningRequests(){ return buildRequestInfos(requests.keySet(), System.currentTimeMillis() - this.config.getQueryThresholdInMilli() ); }
public void start(DQPConfiguration theConfig) { this.config = theConfig; this.authorizationValidator = config.getAuthorizationValidator(); this.chunkSize = config.getLobChunkSizeInKB() * 1024; this.processWorkerPool = config.getTeiidExecutor(); this.maxActivePlans = config.getMaxActivePlans(); if (this.maxActivePlans > config.getMaxThreads()) { LogManager.logWarning(LogConstants.CTX_DQP, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30006, this.maxActivePlans, config.getMaxThreads())); this.maxActivePlans = config.getMaxThreads(); options.setProperties(config.getProperties()); PropertiesUtils.setBeanProperties(options, options.getProperties(), "org.teiid", true); //$NON-NLS-1$ this.userRequestSourceConcurrency = config.getUserRequestSourceConcurrency(); if (this.userRequestSourceConcurrency < 1) { this.userRequestSourceConcurrency = Math.min(config.getMaxThreads(), 2*config.getMaxThreads()/this.maxActivePlans); DataTierManagerImpl processorDataManager = new DataTierManagerImpl(this, this.bufferManager, this.config.isDetectingChangeEvents()); processorDataManager.setEventDistributor(eventDistributor); dataTierMgr = new TempTableDataManager(processorDataManager, this.bufferManager, this.rsCache); LogManager.logDetail(LogConstants.CTX_DQP, "DQPCore started maxThreads", this.config.getMaxThreads(), "maxActivePlans", this.maxActivePlans, "source concurrency", this.userRequestSourceConcurrency); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
checkActive(workContext); RequestID requestID = workContext.getRequestID(reqID); requestMsg.setFetchSize(Math.min(requestMsg.getFetchSize(), this.config.getMaxRowsFetchSize())); Request request = null; if ( requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || requestMsg.getRequestOptions().isContinuous()) { final PreParser preparser = workContext.getVDB().getAttachment(PreParser.class); if (preparser != null) { if (this.config.getPreParser() != null) { request.setPreParser(this.config.getPreParser()); addRequest(requestID, workItem, state); long timeout = workContext.getVDB().getQueryTimeout(); timeout = Math.min(timeout>0?timeout:Long.MAX_VALUE, config.getQueryTimeout()>0?config.getQueryTimeout():Long.MAX_VALUE); if (queryTimeout != null && queryTimeout > 0) { timeout = Math.min(timeout>0?timeout:Long.MAX_VALUE, queryTimeout);
@Override public String preParse(String command, org.teiid.CommandContext context) { String preParse = config.getPreParser().preParse(command, context); return preparser.preParse(preParse, context); } });
public List<RequestMetadata> getLongRunningRequests(){ return buildRequestInfos(requests.keySet(), System.currentTimeMillis() - this.config.getQueryThresholdInMilli() ); }
public void start(DQPConfiguration theConfig) { this.config = theConfig; this.authorizationValidator = config.getAuthorizationValidator(); this.chunkSize = config.getLobChunkSizeInKB() * 1024; this.processWorkerPool = config.getTeiidExecutor(); this.maxActivePlans = config.getMaxActivePlans(); if (this.maxActivePlans > config.getMaxThreads()) { LogManager.logWarning(LogConstants.CTX_DQP, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30006, this.maxActivePlans, config.getMaxThreads())); this.maxActivePlans = config.getMaxThreads(); options.setProperties(config.getProperties()); PropertiesUtils.setBeanProperties(options, options.getProperties(), "org.teiid", true); //$NON-NLS-1$ this.userRequestSourceConcurrency = config.getUserRequestSourceConcurrency(); if (this.userRequestSourceConcurrency < 1) { this.userRequestSourceConcurrency = Math.min(config.getMaxThreads(), 2*config.getMaxThreads()/this.maxActivePlans); DataTierManagerImpl processorDataManager = new DataTierManagerImpl(this, this.bufferManager, this.config.isDetectingChangeEvents()); processorDataManager.setEventDistributor(eventDistributor); dataTierMgr = new TempTableDataManager(processorDataManager, this.bufferManager, this.rsCache); LogManager.logDetail(LogConstants.CTX_DQP, "DQPCore started maxThreads", this.config.getMaxThreads(), "maxActivePlans", this.maxActivePlans, "source concurrency", this.userRequestSourceConcurrency); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
checkActive(workContext); RequestID requestID = workContext.getRequestID(reqID); requestMsg.setFetchSize(Math.min(requestMsg.getFetchSize(), this.config.getMaxRowsFetchSize())); Request request = null; if ( requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || requestMsg.getRequestOptions().isContinuous()) { final PreParser preparser = workContext.getVDB().getAttachment(PreParser.class); if (preparser != null) { if (this.config.getPreParser() != null) { request.setPreParser(this.config.getPreParser()); addRequest(requestID, workItem, state); long timeout = workContext.getVDB().getQueryTimeout(); timeout = Math.min(timeout>0?timeout:Long.MAX_VALUE, config.getQueryTimeout()>0?config.getQueryTimeout():Long.MAX_VALUE); if (queryTimeout != null && queryTimeout > 0) { timeout = Math.min(timeout>0?timeout:Long.MAX_VALUE, queryTimeout);
public int getMaxRowsFetchSize() { return this.config.getMaxRowsFetchSize(); }
@Override public String preParse(String command, org.teiid.CommandContext context) { String preParse = config.getPreParser().preParse(command, context); return preparser.preParse(preParse, context); } });
public TeiidExecutor getTeiidExecutor() { return new ThreadReuseExecutor(DQPConfiguration.PROCESS_PLAN_QUEUE_NAME, getMaxThreads()) { Tracer tracer = GlobalTracerInjector.getTracer(); @Override public void execute(Runnable command) { super.execute(tracer.activeSpan() == null ? command : new TracedRunnable(command, tracer)); } }; }
public List<RequestMetadata> getLongRunningRequests(){ return buildRequestInfos(requests.keySet(), System.currentTimeMillis() - this.config.getQueryThresholdInMilli() ); }
public int getMaxSourceRows() { return this.config.getMaxSourceRows(); }
public int getMaxRowsFetchSize() { return this.config.getMaxRowsFetchSize(); }
public TeiidExecutor getTeiidExecutor() { return new ThreadReuseExecutor(DQPConfiguration.PROCESS_PLAN_QUEUE_NAME, getMaxThreads()); }