Author: rareddy
Date: 2009-08-26 12:23:28 -0400 (Wed, 26 Aug 2009)
New Revision: 1281
Modified:
trunk/build/kit-runtime/deploy.properties
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java
trunk/engine/src/main/java/com/metamatrix/common/application/DQPConfigSource.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
Log:
TEIID-802: consolidated all the proeprties to DQPEmbeddedProperties and renames some of
the process based properties
Modified: trunk/build/kit-runtime/deploy.properties
===================================================================
--- trunk/build/kit-runtime/deploy.properties 2009-08-25 23:03:38 UTC (rev 1280)
+++ trunk/build/kit-runtime/deploy.properties 2009-08-26 16:23:28 UTC (rev 1281)
@@ -5,15 +5,9 @@
# name of the process that uniquely identifies this process( if ignored one will be
assigned)
processName=localhost
-#Path to the Teiid Configuration file
-dqp.configFile=./deploy/configuration.xml
-
-# Path to the directory where the VDBs are located, or list of VDBS separated by
";"
+# Path to the directory where the VDBs are located
dqp.deploydir=./deploy/
-#Log file (optional) - will be modified to include the instance name, i.e. teiid_1.log
-dqp.logFile=./log/teiid.log
-
#Extensions directory - where the Connector Binding's classpath jar files are
loaded.
#Use of this property is an implicit declaration that each Connector Binding has its own
Class Loader.
dqp.extensions=./extensions/
@@ -32,16 +26,19 @@
#
#Process pool maximum thread count. (default 64)
-ProcessPoolMaxThreads=64
+process.maxThreads=64
#Query processor time slice, in milliseconds. (default 2000)
-ProcessorTimeslice=2000
+process.timeSliceInMilli=2000
+#Plan debug messages allowed. see option debug.
+process.optionDebugAllowed=true
+
#Maximum allowed fetch size, set via JDBC. User requested value ignored above this value.
(default 20000)
-MaxFetchSize=20000
+process.maxRowsFetchSize=20000
-#The maximum number of query plans that are cached. Note: this is a memory based cache.
(default 250)
-MaxPlanCacheSize=250
+# The max lob chunk size transferred each time when processing blobs, clobs(10KB default)
+process.lobChunkSizeInKB=10
#
# BufferManager Settings
@@ -63,23 +60,26 @@
# Cache Settings
#
+#The maximum number of query plans that are cached. Note: this is a memory based cache.
(default 250)
+PreparedPlanCache.maxCount=250
+
#Maximum number of cached lookup tables. Note: this is a memory based cache. (default
20)
-MaxCodeTables=20
+CodeTables.maxCount=20
#Maximum number of records in a single lookup table (default 10000)
-MaxCodeTableRecords=10000
+CodeTables.maxRows=10000
#Denotes whether or not result set caching is enabled. (default false)
-ResultSetCacheEnabled=false
+ResultSetCache.enabled=false
#The maximum size in MB the result set cache will be allowed to grow to before objects
are removed. 0 indicates no limit. (default 50)
-#ResultSetCacheSize=50
+#ResultSetCache.maxSizeInMB=50
#The maximum time a result set will be kept in cache before being automatically cleared.
0 indicates no limit. (default 3600000)
-#ResultSetCacheMaxAge=3600000
+#ResultSetCache.maxAgeInSeconds=3600000
#Defines whether caching is restricted to a specific session ('session') or a
specific VDB version ('vdb'). (default vdb)
-#ResultSetCacheScope=vdb
+#ResultSetCache.scope=vdb
#
# Session Service Settings
Modified:
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java
===================================================================
---
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java 2009-08-25
23:03:38 UTC (rev 1280)
+++
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java 2009-08-26
16:23:28 UTC (rev 1281)
@@ -25,11 +25,7 @@
/**
*/
public interface DQPEmbeddedProperties {
- public static final String DQP_LOGDIR = "dqp.logdir"; //$NON-NLS-1$
public static final String DQP_EXTENSIONS = "dqp.extensions";
//$NON-NLS-1$
- public static final String DQP_CONFIGFILE = "dqp.configFile";
//$NON-NLS-1$
- public static final String DQP_METADATA_SYSTEMURL =
"dqp.metadata.systemURL"; //$NON-NLS-1$
- public static final String VDB_DEFINITION = "vdb.definition";
//$NON-NLS-1$
public static final String USER_DEFINED_FUNCTIONS =
"dqp.userDefinedFunctionsFile"; //$NON-NLS-1$
public static final String COMMON_EXTENSION_CLASPATH =
"dqp.extension.CommonClasspath"; //$NON-NLS-1$
public static final String DQP_WORKDIR = "dqp.workdir"; //$NON-NLS-1$
@@ -37,7 +33,28 @@
public static final String DQP_LIBDIR = "dqp.lib"; //$NON-NLS-1$
public static final String PROCESSNAME = "processName"; //$NON-NLS-1$
public static final String CLUSTERNAME = "clusterName"; //$NON-NLS-1$
+
+ //legacy
+ public static final String VDB_DEFINITION = "vdb.definition";
//$NON-NLS-1$
+ public static final String DQP_CONFIGFILE = "dqp.configFile";
//$NON-NLS-1$
+ public static final String DQP_METADATA_SYSTEMURL =
"dqp.metadata.systemURL"; //$NON-NLS-1$
+ // cache properties
+ public static final String USE_RESULTSET_CACHE = "ResultSetCache.enabled";
//$NON-NLS-1$
+ public static final String MAX_RESULTSET_CACHE_SIZE =
"ResultSetCache.maxSizeInMB"; //$NON-NLS-1$
+ public static final String MAX_RESULTSET_CACHE_AGE =
"ResultSetCache.maxAgeInSeconds"; //$NON-NLS-1$
+ public static final String RESULTSET_CACHE_SCOPE = "ResultSetCache.scope";
//$NON-NLS-1$
+ public static final String MAX_CODE_TABLE_RECORDS = "CodeTables.maxRows";
//$NON-NLS-1$
+ public static final String MAX_CODE_TABLES = "CodeTables.maxCount";
//$NON-NLS-1$
+ public static final String MAX_PLAN_CACHE_SIZE = "PreparedPlanCache.maxCount";
//$NON-NLS-1$
+
+ // engine properties
+ public static final String STREAMING_BATCH_SIZE =
"process.lobChunkSizeInKB"; //$NON-NLS-1$
+ public static final String PROCESS_POOL_MAX_THREADS = "process.maxThreads";
//$NON-NLS-1$
+ public static final String PROCESS_TIMESLICE = "process.timeSliceInMilli";
//$NON-NLS-1$
+ public static final String PROCESSOR_DEBUG_ALLOWED =
"process.optionDebugAllowed"; //$NON-NLS-1$
+ public static final String MAX_FETCH_SIZE = "process.maxRowsFetchSize";
//$NON-NLS-1$
+
// socket specific
public static final String BIND_ADDRESS = "server.bindAddress";
//$NON-NLS-1$
public static final String SERVER_PORT = "server.portNumber";
//$NON-NLS-1$
@@ -45,55 +62,36 @@
public static final String INPUT_BUFFER_SIZE = "server.inputBufferSize";
//$NON-NLS-1$
public static final String OUTPUT_BUFFER_SIZE = "server.outputBufferSize";
//$NON-NLS-1$
- //derived properties
+ //derived properties (should make user avoid updating these)
public static final String DQP_TMPDIR = "mm.io.tmpdir"; //$NON-NLS-1$
public static final String BOOTURL = "bootURL"; //$NON-NLS-1$
public static final String ENABLE_SOCKETS = "sockets.enabled";
//$NON-NLS-1$
public static final String HOST_ADDRESS = "hostAddress"; //$NON-NLS-1$
public static final String DQP_BOOTSTRAP_FILE = "bootstrapFile";
//$NON-NLS-1$
public static final String TEIID_HOME = "teiid.home"; //$NON-NLS-1$
+
- public interface BufferService {
- /**
- * Property prefix for DQP Buffer Service properties.
- */
- public static final String BUFFER_PREFIX = "dqp.buffer"; //$NON-NLS-1$
-
- /**
- * Determines whether buffer management should be all-memory (if false)
- * or mixed memory and disk access (if true). Default value is false.
- */
- public static final String DQP_BUFFER_USEDISK = BUFFER_PREFIX +
".usedisk"; //$NON-NLS-1$
-
- /**
- * Determines amount of memory to use in-memory before buffering to
- * disk. This property is not used if DQP_BUFFER_USEDISK = true. The
- * value is in megabytes. Default value is 64.
- */
- public static final String DQP_BUFFER_MEMORY = BUFFER_PREFIX +
".memory"; //$NON-NLS-1$
+ /**
+ * Determines whether buffer management should be all-memory (if false)
+ * or mixed memory and disk access (if true). Default value is false.
+ */
+ public static final String DQP_BUFFER_USEDISK = "dqp.buffer.usedisk";
//$NON-NLS-1$
- /**
- * The maximum number of rows a processor batch should contain. Default is 2000.
- */
- public static final String DQP_PROCESSOR_BATCH_SIZE = BUFFER_PREFIX +
".processorBatchSize"; //$NON-NLS-1$
-
- /**
- * The maximum number of rows a connector batch should contain. Default is 2000.
- */
- public static final String DQP_CONNECTOR_BATCH_SIZE = BUFFER_PREFIX +
".connectorBatchSize"; //$NON-NLS-1$
- }
+ /**
+ * Determines amount of memory to use in-memory before buffering to
+ * disk. This property is not used if DQP_BUFFER_USEDISK = true. The
+ * value is in megabytes. Default value is 64.
+ */
+ public static final String DQP_BUFFER_MEMORY = "dqp.buffer.memory";
//$NON-NLS-1$
+
+ /**
+ * The maximum number of rows a processor batch should contain. Default is 2000.
+ */
+ public static final String DQP_PROCESSOR_BATCH_SIZE =
"dqp.buffer.processorBatchSize"; //$NON-NLS-1$
+
+ /**
+ * The maximum number of rows a connector batch should contain. Default is 2000.
+ */
+ public static final String DQP_CONNECTOR_BATCH_SIZE =
"dqp.buffer.connectorBatchSize"; //$NON-NLS-1$
- public interface DataService {
- /**
- * Property prefix for DQP Data Service properties.
- */
- public static final String DATA_PREFIX = "dqp.data"; //$NON-NLS-1$
- }
-
- public interface MetadataService {
- /**
- * Property prefix for DQP Metadata Service properties.
- */
- public static final String METADATA_PREFIX = "dqp.metadata";
//$NON-NLS-1$
- }
}
Modified:
trunk/engine/src/main/java/com/metamatrix/common/application/DQPConfigSource.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/common/application/DQPConfigSource.java 2009-08-25
23:03:38 UTC (rev 1280)
+++
trunk/engine/src/main/java/com/metamatrix/common/application/DQPConfigSource.java 2009-08-26
16:23:28 UTC (rev 1281)
@@ -29,24 +29,6 @@
*/
public interface DQPConfigSource {
- public static final String MAX_FETCH_SIZE = "MaxFetchSize"; //$NON-NLS-1$
- public static final String MAX_CODE_TABLE_RECORDS = "MaxCodeTableRecords";
//$NON-NLS-1$
- public static final String MAX_CODE_TABLES = "MaxCodeTables"; //$NON-NLS-1$
- public static final String MAX_RESULTSET_CACHE_SIZE = "ResultSetCacheMaxSize";
//$NON-NLS-1$
- public static final String MAX_RESULTSET_CACHE_AGE = "ResultSetCacheMaxAge";
//$NON-NLS-1$
- public static final String MAX_PLAN_CACHE_SIZE = "MaxPlanCacheSize";
//$NON-NLS-1$
- public static final String PROCESSOR_TIMESLICE = "ProcessorTimeslice";
//$NON-NLS-1$
- public static final String USE_RESULTSET_CACHE = "ResultSetCacheEnabled";
//$NON-NLS-1$
- public static final String RESULTSET_CACHE_SCOPE = "ResultSetCacheScope";
//$NON-NLS-1$
- public static final String STREAMING_BATCH_SIZE =
"metamatrix.server.streamingBatchSize"; //$NON-NLS-1$
-
- public static final String PROCESS_POOL_MAX_THREADS = "ProcessPoolMaxThreads";
//$NON-NLS-1$
- public static final String PROCESSOR_DEBUG_ALLOWED = "ProcessorDebugAllowed";
//$NON-NLS-1$
-
- /**
- * Get the DQP properties, as described in {@link DQPProperties}.
- * @return Set of properties to configure DQP
- */
public Properties getProperties();
public ApplicationService getServiceInstance(Class<? extends
ApplicationService> type);
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2009-08-25
23:03:38 UTC (rev 1280)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2009-08-26
16:23:28 UTC (rev 1281)
@@ -71,6 +71,7 @@
import com.metamatrix.dqp.client.ClientSideDQP;
import com.metamatrix.dqp.client.MetadataResult;
import com.metamatrix.dqp.client.ResultsFuture;
+import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
import com.metamatrix.dqp.internal.datamgr.ConnectorID;
import com.metamatrix.dqp.message.AtomicRequestID;
import com.metamatrix.dqp.message.AtomicRequestMessage;
@@ -121,6 +122,7 @@
//Constants
private static final int DEFAULT_MAX_CODE_TABLE_RECORDS = 10000;
private static final int DEFAULT_MAX_CODE_TABLES = 20;
+ private static final int DEFAULT_FETCH_SIZE = 2000;
private static final int DEFAULT_PROCESSOR_TIMESLICE = 2000;
private static final String PROCESS_PLAN_QUEUE_NAME =
"QueryProcessorQueue"; //$NON-NLS-1$
private static final int DEFAULT_MAX_PROCESS_WORKERS = 15;
@@ -131,7 +133,7 @@
private int maxCodeTableRecords = DEFAULT_MAX_CODE_TABLE_RECORDS;
private int maxCodeTables = DEFAULT_MAX_CODE_TABLES;
- private int maxFetchSize = 20000;
+ private int maxFetchSize = DEFAULT_FETCH_SIZE;
// Resources
private ConnectorCapabilitiesCache connectorCapabilitiesCache = new
ConnectorCapabilitiesCache();
@@ -626,20 +628,26 @@
ApplicationEnvironment env = this.getEnvironment();
PropertiesUtils.setBeanProperties(this, props, null);
+
+ this.processorTimeslice = PropertiesUtils.getIntProperty(props,
DQPEmbeddedProperties.PROCESS_TIMESLICE, DEFAULT_PROCESSOR_TIMESLICE);
+ this.maxFetchSize = PropertiesUtils.getIntProperty(props,
DQPEmbeddedProperties.MAX_FETCH_SIZE, DEFAULT_FETCH_SIZE);
+ this.processorDebugAllowed = PropertiesUtils.getBooleanProperty(props,
DQPEmbeddedProperties.PROCESSOR_DEBUG_ALLOWED, true);
+ this.maxCodeTableRecords = PropertiesUtils.getIntProperty(props,
DQPEmbeddedProperties.MAX_CODE_TABLE_RECORDS, DEFAULT_MAX_CODE_TABLE_RECORDS);
+ this.maxCodeTables = PropertiesUtils.getIntProperty(props,
DQPEmbeddedProperties.MAX_CODE_TABLES, DEFAULT_MAX_CODE_TABLES);
- this.chunkSize = PropertiesUtils.getIntProperty(props,
DQPConfigSource.STREAMING_BATCH_SIZE, 10) * 1024;
+ this.chunkSize = PropertiesUtils.getIntProperty(props,
DQPEmbeddedProperties.STREAMING_BATCH_SIZE, 10) * 1024;
//result set cache
- if(PropertiesUtils.getBooleanProperty(props, DQPConfigSource.USE_RESULTSET_CACHE,
false)){
+ if(PropertiesUtils.getBooleanProperty(props,
DQPEmbeddedProperties.USE_RESULTSET_CACHE, false)){
Properties rsCacheProps = new Properties();
- rsCacheProps.setProperty(ResultSetCache.RS_CACHE_MAX_SIZE,
props.getProperty(DQPConfigSource.MAX_RESULTSET_CACHE_SIZE,
DEFAULT_MAX_RESULTSET_CACHE_SIZE));
- rsCacheProps.setProperty(ResultSetCache.RS_CACHE_MAX_AGE,
props.getProperty(DQPConfigSource.MAX_RESULTSET_CACHE_AGE,
DEFAULT_MAX_RESULTSET_CACHE_AGE));
- rsCacheProps.setProperty(ResultSetCache.RS_CACHE_SCOPE,
props.getProperty(DQPConfigSource.RESULTSET_CACHE_SCOPE,
ResultSetCache.RS_CACHE_SCOPE_VDB));
+ rsCacheProps.setProperty(ResultSetCache.RS_CACHE_MAX_SIZE,
props.getProperty(DQPEmbeddedProperties.MAX_RESULTSET_CACHE_SIZE,
DEFAULT_MAX_RESULTSET_CACHE_SIZE));
+ rsCacheProps.setProperty(ResultSetCache.RS_CACHE_MAX_AGE,
props.getProperty(DQPEmbeddedProperties.MAX_RESULTSET_CACHE_AGE,
DEFAULT_MAX_RESULTSET_CACHE_AGE));
+ rsCacheProps.setProperty(ResultSetCache.RS_CACHE_SCOPE,
props.getProperty(DQPEmbeddedProperties.RESULTSET_CACHE_SCOPE,
ResultSetCache.RS_CACHE_SCOPE_VDB));
this.rsCache = new ResultSetCache(rsCacheProps, ResourceFinder.getCacheFactory());
}
//prepared plan cache
- int maxSizeTotal = PropertiesUtils.getIntProperty(props,
DQPConfigSource.MAX_PLAN_CACHE_SIZE, PreparedPlanCache.DEFAULT_MAX_SIZE_TOTAL);
+ int maxSizeTotal = PropertiesUtils.getIntProperty(props,
DQPEmbeddedProperties.MAX_PLAN_CACHE_SIZE, PreparedPlanCache.DEFAULT_MAX_SIZE_TOTAL);
prepPlanCache = new PreparedPlanCache(maxSizeTotal);
// Processor debug flag
@@ -654,7 +662,7 @@
metadataService = (MetadataService)
env.findService(DQPServiceNames.METADATA_SERVICE);
// Create the worker pools to tie the queues together
- processWorkerPool = WorkerPoolFactory.newWorkerPool(PROCESS_PLAN_QUEUE_NAME,
PropertiesUtils.getIntProperty(props, DQPConfigSource.PROCESS_POOL_MAX_THREADS,
DEFAULT_MAX_PROCESS_WORKERS));
+ processWorkerPool = WorkerPoolFactory.newWorkerPool(PROCESS_PLAN_QUEUE_NAME,
PropertiesUtils.getIntProperty(props, DQPEmbeddedProperties.PROCESS_POOL_MAX_THREADS,
DEFAULT_MAX_PROCESS_WORKERS));
tempTableStoresHolder = new TempTableStoresHolder(bufferManager);
@@ -663,7 +671,7 @@
(VDBService)
env.findService(DQPServiceNames.VDB_SERVICE),
(BufferService)
env.findService(DQPServiceNames.BUFFER_SERVICE),
this.maxCodeTables,
- this.maxCodeTableRecords);
+ this.maxCodeTableRecords);
}
public List getXmlSchemas(String docName) throws MetaMatrixComponentException,
@@ -760,25 +768,4 @@
MetaDataProcessor processor = new MetaDataProcessor(this.metadataService, this,
this.prepPlanCache, getEnvironment(), this.tempTableStoresHolder);
return processor.processMessage(workContext.getRequestID(requestID), workContext,
preparedSql, allowDoubleQuotedVariable);
}
-
- public void setMaxFetchSize(int maxFetchSize) {
- this.maxFetchSize = maxFetchSize;
- }
-
- public void setProcessorDebugAllowed(boolean processorDebugAllowed) {
- this.processorDebugAllowed = processorDebugAllowed;
- }
-
- public void setMaxCodeTableRecords(int maxCodeTableRecords) {
- this.maxCodeTableRecords = maxCodeTableRecords;
- }
-
- public void setMaxCodeTables(int maxCodeTables) {
- this.maxCodeTables = maxCodeTables;
- }
-
- public void setProcessorTimeslice(int processorTimeslice) {
- this.processorTimeslice = processorTimeslice;
- }
-
}
\ No newline at end of file