teiid SVN: r3587 - in trunk: adminshell and 37 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-26 16:01:54 -0400 (Wed, 26 Oct 2011)
New Revision: 3587
Modified:
trunk/adminshell/pom.xml
trunk/api/pom.xml
trunk/build/pom.xml
trunk/cache-jbosscache/pom.xml
trunk/client-jdk15/pom.xml
trunk/client/pom.xml
trunk/common-core/pom.xml
trunk/connectors/connector-file/pom.xml
trunk/connectors/connector-ldap/pom.xml
trunk/connectors/connector-salesforce/pom.xml
trunk/connectors/connector-ws/pom.xml
trunk/connectors/pom.xml
trunk/connectors/salesforce-api/pom.xml
trunk/connectors/sandbox/pom.xml
trunk/connectors/sandbox/translator-yahoo/pom.xml
trunk/connectors/translator-file/pom.xml
trunk/connectors/translator-jdbc/pom.xml
trunk/connectors/translator-ldap/pom.xml
trunk/connectors/translator-loopback/pom.xml
trunk/connectors/translator-olap/pom.xml
trunk/connectors/translator-salesforce/pom.xml
trunk/connectors/translator-ws/pom.xml
trunk/console/pom.xml
trunk/documentation/admin-guide/pom.xml
trunk/documentation/caching-guide/pom.xml
trunk/documentation/client-developers-guide/pom.xml
trunk/documentation/developer-guide/pom.xml
trunk/documentation/pom.xml
trunk/documentation/quick-start-example/pom.xml
trunk/documentation/reference/pom.xml
trunk/engine/pom.xml
trunk/hibernate-dialect/pom.xml
trunk/jboss-integration/pom.xml
trunk/metadata/pom.xml
trunk/pom.xml
trunk/runtime/pom.xml
trunk/test-integration/common/pom.xml
trunk/test-integration/db/pom.xml
trunk/test-integration/pom.xml
Log:
[maven-release-plugin] prepare release teiid-parent-7.6.0.Beta1
Modified: trunk/adminshell/pom.xml
===================================================================
--- trunk/adminshell/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/adminshell/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-adminshell</artifactId>
Modified: trunk/api/pom.xml
===================================================================
--- trunk/api/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/api/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-api</artifactId>
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/build/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid</artifactId>
Modified: trunk/cache-jbosscache/pom.xml
===================================================================
--- trunk/cache-jbosscache/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/cache-jbosscache/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-cache-jbosscache</artifactId>
Modified: trunk/client/pom.xml
===================================================================
--- trunk/client/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/client/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-client</artifactId>
Modified: trunk/client-jdk15/pom.xml
===================================================================
--- trunk/client-jdk15/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/client-jdk15/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-client-jdk15</artifactId>
Modified: trunk/common-core/pom.xml
===================================================================
--- trunk/common-core/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/common-core/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-common-core</artifactId>
Modified: trunk/connectors/connector-file/pom.xml
===================================================================
--- trunk/connectors/connector-file/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/connector-file/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-file</artifactId>
Modified: trunk/connectors/connector-ldap/pom.xml
===================================================================
--- trunk/connectors/connector-ldap/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/connector-ldap/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-ldap</artifactId>
Modified: trunk/connectors/connector-salesforce/pom.xml
===================================================================
--- trunk/connectors/connector-salesforce/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/connector-salesforce/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-salesforce</artifactId>
Modified: trunk/connectors/connector-ws/pom.xml
===================================================================
--- trunk/connectors/connector-ws/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/connector-ws/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>connector-ws</artifactId>
Modified: trunk/connectors/pom.xml
===================================================================
--- trunk/connectors/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/connectors/salesforce-api/pom.xml
===================================================================
--- trunk/connectors/salesforce-api/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/salesforce-api/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>salesforce-api</artifactId>
Modified: trunk/connectors/sandbox/pom.xml
===================================================================
--- trunk/connectors/sandbox/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/sandbox/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid.connectors</groupId>
Modified: trunk/connectors/sandbox/translator-yahoo/pom.xml
===================================================================
--- trunk/connectors/sandbox/translator-yahoo/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/sandbox/translator-yahoo/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>org.jboss.teiid.connectors</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-yahoo</artifactId>
Modified: trunk/connectors/translator-file/pom.xml
===================================================================
--- trunk/connectors/translator-file/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/translator-file/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-file</artifactId>
Modified: trunk/connectors/translator-jdbc/pom.xml
===================================================================
--- trunk/connectors/translator-jdbc/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/translator-jdbc/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-jdbc</artifactId>
Modified: trunk/connectors/translator-ldap/pom.xml
===================================================================
--- trunk/connectors/translator-ldap/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/translator-ldap/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ldap</artifactId>
Modified: trunk/connectors/translator-loopback/pom.xml
===================================================================
--- trunk/connectors/translator-loopback/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/translator-loopback/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-loopback</artifactId>
Modified: trunk/connectors/translator-olap/pom.xml
===================================================================
--- trunk/connectors/translator-olap/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/translator-olap/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-olap</artifactId>
Modified: trunk/connectors/translator-salesforce/pom.xml
===================================================================
--- trunk/connectors/translator-salesforce/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/translator-salesforce/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-salesforce</artifactId>
Modified: trunk/connectors/translator-ws/pom.xml
===================================================================
--- trunk/connectors/translator-ws/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/connectors/translator-ws/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>connectors</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>translator-ws</artifactId>
Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/console/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: trunk/documentation/admin-guide/pom.xml
===================================================================
--- trunk/documentation/admin-guide/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/documentation/admin-guide/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>admin-guide</artifactId>
Modified: trunk/documentation/caching-guide/pom.xml
===================================================================
--- trunk/documentation/caching-guide/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/documentation/caching-guide/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>caching-guide</artifactId>
Modified: trunk/documentation/client-developers-guide/pom.xml
===================================================================
--- trunk/documentation/client-developers-guide/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/documentation/client-developers-guide/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>client-developers-guide</artifactId>
Modified: trunk/documentation/developer-guide/pom.xml
===================================================================
--- trunk/documentation/developer-guide/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/documentation/developer-guide/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>developer-guide</artifactId>
Modified: trunk/documentation/pom.xml
===================================================================
--- trunk/documentation/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/documentation/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/documentation/quick-start-example/pom.xml
===================================================================
--- trunk/documentation/quick-start-example/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/documentation/quick-start-example/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>quick-start-example</artifactId>
Modified: trunk/documentation/reference/pom.xml
===================================================================
--- trunk/documentation/reference/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/documentation/reference/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.jboss.teiid</groupId>
<artifactId>documentation</artifactId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>reference</artifactId>
Modified: trunk/engine/pom.xml
===================================================================
--- trunk/engine/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/engine/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-engine</artifactId>
Modified: trunk/hibernate-dialect/pom.xml
===================================================================
--- trunk/hibernate-dialect/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/hibernate-dialect/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-hibernate-dialect</artifactId>
Modified: trunk/jboss-integration/pom.xml
===================================================================
--- trunk/jboss-integration/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/jboss-integration/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -2,7 +2,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/metadata/pom.xml
===================================================================
--- trunk/metadata/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/metadata/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-metadata</artifactId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -5,7 +5,7 @@
<artifactId>teiid-parent</artifactId>
<packaging>pom</packaging>
<name>Teiid</name>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
<description>Federated SQL and XML query engine.</description>
<properties>
<ant.version>1.7.0</ant.version>
@@ -125,6 +125,15 @@
</plugins>
</pluginManagement>
<plugins>
+ <!-- workaround for build errors with javadoc:aggregate-jar -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.2.1</version>
+ <configuration>
+ <preparationGoals>clean install</preparationGoals>
+ </configuration>
+ </plugin>
<!-- Specify the compiler options and settings -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: trunk/runtime/pom.xml
===================================================================
--- trunk/runtime/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/runtime/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/test-integration/common/pom.xml
===================================================================
--- trunk/test-integration/common/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/test-integration/common/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-test-integration</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>test-integration-common</artifactId>
Modified: trunk/test-integration/db/pom.xml
===================================================================
--- trunk/test-integration/db/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/test-integration/db/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -9,7 +9,7 @@
<parent>
<artifactId>teiid-test-integration</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: trunk/test-integration/pom.xml
===================================================================
--- trunk/test-integration/pom.xml 2011-10-26 18:08:36 UTC (rev 3586)
+++ trunk/test-integration/pom.xml 2011-10-26 20:01:54 UTC (rev 3587)
@@ -3,7 +3,7 @@
<parent>
<artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
- <version>7.6.0.Alpha2-SNAPSHOT</version>
+ <version>7.6.0.Beta1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>teiid-test-integration</artifactId>
13 years, 2 months
teiid SVN: r3586 - in trunk: console/src/main/java/org/teiid/rhq/admin and 7 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-26 14:08:36 -0400 (Wed, 26 Oct 2011)
New Revision: 3586
Modified:
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
trunk/console/src/main/resources/META-INF/rhq-plugin.xml
trunk/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
trunk/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java
trunk/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java
Log:
forward merge from 7.4.1
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2011-10-26 18:08:36 UTC (rev 3586)
@@ -31,7 +31,7 @@
<LI><B>TEXTTABLE Enhancements</B> - TEXTTABLE can now parse fixed width files that do not use a row delimiter and can optionally produce fixed values that haven't been trimmed.
<LI><B>Temp table transactions</B> - Internal materialized views and temp table usage from a session and within procedures can take advantage of greater transaction support.
<LI><B>Buffering Improvements</B> - Added the ability to inline memory based or small lobs and added tracking of the memory held by soft references. Also switched to a concurrent LFRU algorithm that significantly reduces writes and read misses with temporary tables. Added a memory buffer to better handle file storage.
- The memory buffer may be optional configured as off-heap for better large memory performance.
+ The memory buffer may be optional be configured as off-heap for better large memory performance - see the Admin Guide for more. Overhead is now tracked to help prevent memory errors when dealing with 10s of millions or more of batches/pages. Serialization and disk utilization were also improved.
<LI><B>GSSAPI</B> - both the Teiid JDBC client/server and the ODBC pg backend can now support GSSAPI for single sign-on.
<LI><B>Server-side Query Timeouts</B> - default query timeouts can be configured at both the VDB (via the query-timeout VDB property) and entire server (via the teiid-jboss-beans.xml queryTimeout property).
</UL>
Modified: trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java 2011-10-26 18:08:36 UTC (rev 3586)
@@ -211,8 +211,8 @@
getTransactionCollectionValue(transactionMetaValue,transactionsCollection);
operationResult.setContent(createReportResultList(fieldNameList, resultObject.iterator()));
} else if (operationName.equals(Platform.Operations.KILL_TRANSACTION)) {
- String sessionID = (String) valueMap.get(Operation.Value.TRANSACTION_ID);
- MetaValue[] args = new MetaValue[] { SimpleValueSupport.wrap(sessionID) };
+ String transactionID = (String) valueMap.get(Operation.Value.TRANSACTION_ID);
+ MetaValue[] args = new MetaValue[] { SimpleValueSupport.wrap(transactionID) };
try {
executeManagedOperation(connection, getRuntimeEngineDeployer(connection, mc), Platform.Operations.KILL_TRANSACTION, args);
} catch (Exception e) {
@@ -232,8 +232,8 @@
Long requestID = (Long) valueMap.get(Operation.Value.REQUEST_ID);
String sessionID = (String) valueMap.get(Operation.Value.SESSION_ID);
MetaValue[] args = new MetaValue[] {
- SimpleValueSupport.wrap(requestID),
- SimpleValueSupport.wrap(sessionID) };
+ SimpleValueSupport.wrap(sessionID),
+ SimpleValueSupport.wrap(requestID) };
try {
executeManagedOperation(connection, getRuntimeEngineDeployer(connection, mc), Platform.Operations.KILL_REQUEST, args);
} catch (Exception e) {
@@ -876,7 +876,7 @@
request.setSourceRequest((Boolean) ProfileServiceUtil.booleanValue(compositeValue.get(SOURCE_REQUEST)));
request.setNodeId((Integer) ProfileServiceUtil.integerValue(compositeValue.get(NODE_ID)));
request.setTransactionId((String) ProfileServiceUtil.stringValue(compositeValue.get(TRANSACTION_ID)));
- request.setState((ProcessingState) ProfileServiceUtil.getSimpleValue(compositeValue.get(STATE), ProcessingState.class));
+ request.setState((ProcessingState.valueOf(ProfileServiceUtil.getSimpleValue(compositeValue.get(STATE), String.class))));
return request;
}
throw new IllegalStateException("Unable to unwrap RequestMetadata " + metaValue); //$NON-NLS-1$
Modified: trunk/console/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- trunk/console/src/main/resources/META-INF/rhq-plugin.xml 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/console/src/main/resources/META-INF/rhq-plugin.xml 2011-10-26 18:08:36 UTC (rev 3586)
@@ -73,7 +73,7 @@
<plugin name="TeiidPlugin" displayName="Teiid Plugin" package="org.teiid.rhq.plugin"
- version="2.0.0" description="Supports management and monitoring of JBoss Teiid"
+ version="2.0.1" description="Supports management and monitoring of JBoss Teiid"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration">
@@ -93,23 +93,18 @@
<results>
<c:list-property name="list">
<c:map-property name="map">
+ <c:simple-property displayName="Request ID"
+ name="getExecutionId" type="string" description="The id for the request" />
<c:simple-property displayName="Session ID"
name="getSessionId" type="string"
- description="The name of the resource whose availability is being reported" />
- <c:simple-property displayName="Request ID"
- name="getRequestId" type="string" description="The id for the request" />
+ description="The session id the request is using" />
<c:simple-property displayName="SQL String"
name="getCommand" type="string" description="The SQL string for this query" />
<c:simple-property displayName="Source Request"
name="sourceRequest" type="string"
description="If false,this is the top level query. If true, this a physical source query." />
- <c:simple-property displayName="Execution ID"
- name="getExecutionId" type="string"
- description="The execution id for this request (if this is a physical source query)" />
<c:simple-property displayName="Start Time"
- name="getCreatedTime" type="string" description="The time this query began" />
- <c:simple-property displayName="Start Time"
- name="getProcessingTime" type="string" description="Processing time for this request" />
+ name="getStartTime" type="string" description="The time this query began" />
<c:simple-property displayName="Transaction ID"
name="getTransactionId" type="string"
description="The transaction XID if there is a transaction involved" />
@@ -187,15 +182,11 @@
required="false">
<c:map-property name="map">
<c:simple-property displayName="Request ID"
- name="getRequestId" type="string" description="The request identifier" />
+ name="getExecutionId" type="string" description="The request identifier" />
<c:simple-property displayName="Session ID"
name="getSessionId" type="string" description="Session identifier" />
- <c:simple-property displayName="Execution ID"
- name="getExecutionId" type="string" description="Unique Identifier for Request" />
- <c:simple-property displayName="Created Time"
- name="getCreatedTime" type="string" description="Time when request submitted" />
- <c:simple-property displayName="Processing Time"
- name="getProcessingTime" type="string" description="Processing time for the request" />
+ <c:simple-property displayName="Start Time"
+ name="getStartTime" type="string" description="Time when request submitted" />
<c:simple-property displayName="Last ping time"
name="getCommand" type="string" description="SQL Command" />
<c:simple-property displayName="Connector level request?"
@@ -203,7 +194,7 @@
description="True if this is a connector level request" />
<c:simple-property displayName="Node ID" name="getNodeId"
type="string" description="The node identifier" />
- <c:simple-property displayName="Tansaction identifier"
+ <c:simple-property displayName="Transaction identifier"
name="getTransactionId" type="string"
description="Transaction XID if a transaction is involved" />
</c:map-property>
@@ -484,8 +475,8 @@
name="getSessionId" type="string" description="Session identifier" />
<c:simple-property displayName="Execution ID"
name="getExecutionId" type="string" description="Unique Identifier for Request" />
- <c:simple-property displayName="Created Time"
- name="getCreatedTime" type="string" description="Time when request submitted" />
+ <c:simple-property displayName="Start Time"
+ name="getStartTime" type="string" description="Time when request submitted" />
<c:simple-property displayName="Processing Time"
name="getProcessingTime" type="string" description="Processing time for the request" />
<c:simple-property displayName="Last ping time"
@@ -495,7 +486,7 @@
description="True if this is a connector level request" />
<c:simple-property displayName="Node ID" name="getNodeId"
type="string" description="The node identifier" />
- <c:simple-property displayName="Tansaction identifier"
+ <c:simple-property displayName="Transaction identifier"
name="getTransactionId" type="string"
description="Transaction XID if a transaction is involved" />
</c:map-property>
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2011-10-26 18:08:36 UTC (rev 3586)
@@ -284,7 +284,6 @@
Map<String, LanguageObject> nameToSymbolMap = new LinkedHashMap<String, LanguageObject>();
for (LanguageObject symbol : symbols) {
try {
- String fullName = null;
Object metadataID = null;
if(symbol instanceof ElementSymbol) {
metadataID = ((ElementSymbol)symbol).getMetadataID();
@@ -294,20 +293,18 @@
} else if(symbol instanceof GroupSymbol) {
GroupSymbol group = (GroupSymbol)symbol;
metadataID = group.getMetadataID();
- if (metadataID instanceof TempMetadataID && !group.isProcedure()) {
- if (group.isTempTable()) {
+ if (metadataID instanceof TempMetadataID) {
+ if (group.isProcedure()) {
+ Map<String, LanguageObject> procMap = new LinkedHashMap<String, LanguageObject>();
+ addToNameMap(((TempMetadataID)metadataID).getOriginalMetadataID(), symbol, procMap);
+ validateEntitlements(PermissionType.EXECUTE, auditContext, procMap);
+ } else if (group.isTempTable()) {
validateTemp(actionCode, group, auditContext);
}
continue;
}
}
- fullName = getMetadata().getFullName(metadataID);
- Object modelId = getMetadata().getModelID(metadataID);
- String modelName = getMetadata().getFullName(modelId);
- if (isSystemSchema(modelName)) {
- continue;
- }
- nameToSymbolMap.put(fullName, symbol);
+ addToNameMap(metadataID, symbol, nameToSymbolMap);
} catch(QueryMetadataException e) {
handleException(e);
} catch(TeiidComponentException e) {
@@ -317,6 +314,15 @@
validateEntitlements(actionCode, auditContext, nameToSymbolMap);
}
+
+ private void addToNameMap(Object metadataID, LanguageObject symbol, Map<String, LanguageObject> nameToSymbolMap) throws QueryMetadataException, TeiidComponentException {
+ String fullName = getMetadata().getFullName(metadataID);
+ Object modelId = getMetadata().getModelID(metadataID);
+ String modelName = getMetadata().getFullName(modelId);
+ if (!isSystemSchema(modelName)) {
+ nameToSymbolMap.put(fullName, symbol);
+ }
+ }
private boolean isSystemSchema(String modelName) {
return CoreConstants.SYSTEM_MODEL.equalsIgnoreCase(modelName) || CoreConstants.ODBC_MODEL.equalsIgnoreCase(modelName);
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-10-26 18:08:36 UTC (rev 3586)
@@ -33,7 +33,7 @@
static final int DEFAULT_FETCH_SIZE = RequestMessage.DEFAULT_FETCH_SIZE * 10;
static final int DEFAULT_PROCESSOR_TIMESLICE = 2000;
static final int DEFAULT_MAX_RESULTSET_CACHE_ENTRIES = 1024;
- static final int DEFAULT_QUERY_THRESHOLD = 600;
+ static final int DEFAULT_QUERY_THRESHOLD = 600000;
static final String PROCESS_PLAN_QUEUE_NAME = "QueryProcessorQueue"; //$NON-NLS-1$
public static final int DEFAULT_MAX_PROCESS_WORKERS = 64;
public static final int DEFAULT_MAX_SOURCE_ROWS = -1;
@@ -44,7 +44,7 @@
private int timeSliceInMilli = DEFAULT_PROCESSOR_TIMESLICE;
private int maxRowsFetchSize = DEFAULT_FETCH_SIZE;
private int lobChunkSizeInKB = 100;
- private int queryThresholdInSecs = DEFAULT_QUERY_THRESHOLD;
+ private long queryThresholdInMilli = DEFAULT_QUERY_THRESHOLD;
private boolean exceptionOnMaxSourceRows = true;
private int maxSourceRows = -1;
private int maxActivePlans = DEFAULT_MAX_ACTIVE_PLANS;
@@ -144,11 +144,19 @@
@ManagementProperty(description="Long running query threshold, after which a alert can be generated by tooling if configured")
public int getQueryThresholdInSecs() {
- return queryThresholdInSecs;
+ return (int)queryThresholdInMilli/1000;
}
+
+ public long getQueryThresholdInMilli() {
+ return queryThresholdInMilli;
+ }
+
+ public void setQueryThresholdInMilli(long queryThreshold) {
+ this.queryThresholdInMilli = queryThreshold;
+ }
public void setQueryThresholdInSecs(int queryThresholdInSecs) {
- this.queryThresholdInSecs = queryThresholdInSecs;
+ this.queryThresholdInMilli = queryThresholdInSecs * 1000;
}
@ManagementProperty(description="Teiid runtime version", readOnly=true)
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 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-10-26 18:08:36 UTC (rev 3586)
@@ -259,16 +259,16 @@
}
public List<RequestMetadata> getLongRunningRequests(){
- return buildRequestInfos(requests.keySet(), this.config.getQueryThresholdInSecs());
+ return buildRequestInfos(requests.keySet(), System.currentTimeMillis() - this.config.getQueryThresholdInMilli() );
}
- private List<RequestMetadata> buildRequestInfos(Collection<RequestID> ids, int longRunningQueryThreshold) {
+ private List<RequestMetadata> buildRequestInfos(Collection<RequestID> ids, long longRunningQueryThreshold) {
List<RequestMetadata> results = new ArrayList<RequestMetadata>();
for (RequestID requestID : ids) {
RequestWorkItem holder = requests.get(requestID);
- if(holder != null && !holder.isCanceled()) {
+ if(holder != null && !holder.isCanceled() && (longRunningQueryThreshold == -1 || holder.getProcessingTimestamp() < longRunningQueryThreshold)) {
RequestMetadata req = new RequestMetadata();
req.setExecutionId(holder.requestID.getExecutionID());
@@ -319,11 +319,7 @@
results.add(info);
}
- // check if only need long running queries.
- long elapsedTime = System.currentTimeMillis() - req.getStartTime();
- if (longRunningQueryThreshold == -1 || elapsedTime > longRunningQueryThreshold) {
- results.add(req);
- }
+ results.add(req);
}
}
return results;
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java 2011-10-26 18:08:36 UTC (rev 3586)
@@ -250,7 +250,7 @@
HashSet<PlanNode> criteria = new HashSet<PlanNode>(this.criteriaNodes);
HashSet<GroupSymbol> groups = new HashSet<GroupSymbol>(this.joinSourceNodes.size());
-
+ boolean hasUnknown = false;
for (int i = 0; i < joinOrder.length; i++) {
Integer source = (Integer)joinOrder[i];
@@ -286,6 +286,7 @@
if (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE) {
sourceCost = UNKNOWN_TUPLE_EST;
+ hasUnknown = true;
if (applicableCriteria != null && !applicableCriteria.isEmpty()) {
CompoundCriteria cc = new CompoundCriteria();
for (PlanNode planNode : applicableCriteria) {
@@ -322,6 +323,10 @@
sourceCost = depJoinCost;
}
}
+
+ if (i > 0 && (applicableCriteria == null || applicableCriteria.isEmpty()) && hasUnknown) {
+ sourceCost *= 10; //cross join penalty
+ }
cost *= sourceCost;
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java 2011-10-26 18:08:36 UTC (rev 3586)
@@ -299,8 +299,8 @@
List<SetState> source = sources.get(i);
- if (i == currentIndex++) {
-
+ if (i == currentIndex) {
+ currentIndex++;
int doneCount = 0;
while (doneCount < source.size()) {
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2011-10-26 18:08:36 UTC (rev 3586)
@@ -116,7 +116,8 @@
svc.addPermission(addResource(DataPolicy.PermissionType.UPDATE, "pm1.g1.e3")); //$NON-NLS-1$
svc.addPermission(addResource(DataPolicy.PermissionType.UPDATE, "pm1.g1.e4")); //$NON-NLS-1$
-
+ svc.addPermission(addResource(PermissionType.EXECUTE, "pm1.sp1"));
+
// pm1.g2
svc.addPermission(addResource(DataPolicy.PermissionType.CREATE, "pm1.g2")); //$NON-NLS-1$
svc.addPermission(addResource(DataPolicy.PermissionType.CREATE, false, "pm1.g2.e1")); //$NON-NLS-1$
@@ -206,6 +207,12 @@
}
}
+ @Test public void testProcRelational() throws Exception {
+ helpTest("select * from sp1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
+ helpTest("select * from pm1.sp1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
+ helpTest("select * from sp1", RealMetadataFactory.example1Cached(), new String[] {"sp1"}, RealMetadataFactory.example1VDB(), exampleAuthSvc2()); //$NON-NLS-1$
+ }
+
@Test public void testTemp() throws Exception {
//allowed by default
helpTest("create local temporary table x (y string)", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-10-26 18:08:36 UTC (rev 3586)
@@ -576,6 +576,17 @@
assertNotNull(rm.getException());
}
+ @Test public void testLongRunningQuery() throws Exception {
+ RequestMessage reqMsg = exampleRequestMessage("select * FROM BQT1.SmallA");
+ execute("A", 1, reqMsg);
+ this.config.setQueryThresholdInMilli(5000);
+ assertEquals(1, this.core.getRequests().size());
+ assertEquals(0, this.core.getLongRunningRequests().size());
+ this.config.setQueryThresholdInMilli(10);
+ Thread.sleep(20);
+ assertEquals(1, this.core.getLongRunningRequests().size());
+ }
+
public void helpTestVisibilityFails(String sql) throws Exception {
RequestMessage reqMsg = exampleRequestMessage(sql);
reqMsg.setTxnAutoWrapMode(RequestMessage.TXN_WRAP_OFF);
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java 2011-10-26 18:08:36 UTC (rev 3586)
@@ -39,6 +39,7 @@
import org.teiid.query.metadata.TransformationMetadata;
import org.teiid.query.optimizer.TestOptimizer.ComparisonMode;
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
+import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.FakeCapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.SourceCapabilities.Capability;
import org.teiid.query.optimizer.relational.rules.JoinUtil;
@@ -1026,5 +1027,25 @@
0 // UnionAll
});
}
+
+ @Test public void testCrossJoinAvoidance() throws Exception {
+
+ CapabilitiesFinder capFinder = TestOptimizer.getGenericFinder();
+
+ QueryMetadataInterface metadata = RealMetadataFactory.exampleBQT();
+ RealMetadataFactory.setCardinality("bqt1.smallb", 1800, metadata); //$NON-NLS-1$
+ RealMetadataFactory.setCardinality("bqt1.smalla", 0, metadata); //$NON-NLS-1$
+ RealMetadataFactory.setCardinality("bqt2.smallb", 15662, metadata); //$NON-NLS-1$
+
+ TestOptimizer.helpPlan(
+ "SELECT BQT1.SmallA.IntKey FROM BQT1.SmallB, BQT1.Smalla, bqt2.smallb where bqt2.smallb.intkey = bqt1.smallb.intkey and bqt2.smallb.intkey = bqt1.smalla.intkey", //$NON-NLS-1$
+ metadata,
+ null, capFinder,
+ new String[] {"SELECT g_0.intkey AS c_0 FROM BQT1.Smalla AS g_0 ORDER BY c_0",
+ "SELECT g_0.intkey AS c_0 FROM BQT1.SmallB AS g_0 ORDER BY c_0",
+ "SELECT g_0.intkey AS c_0 FROM bqt2.smallb AS g_0 ORDER BY c_0"}, //$NON-NLS-1$ //$NON-NLS-2$
+ ComparisonMode.EXACT_COMMAND_STRING );
+
+ }
}
Property changes on: trunk/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java:3149-3217,3535-3555
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java:3149-3217,3535-3555,3558-3585
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java 2011-10-26 17:38:18 UTC (rev 3585)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java 2011-10-26 18:08:36 UTC (rev 3586)
@@ -638,6 +638,44 @@
helpTestLargeSetInDepAccessMultiJoinCriteria(1, 10, 2, 2);
}
+ @Test public void testLargeSetMultipleDependentSources() throws Exception {
+ String sql = "SELECT pm1.g1.e1 FROM pm1.g1, pm2.g1 makedep, /*+ makeind */ pm1.g2 where pm1.g1.e1=pm2.g1.e1 AND pm1.g2.e2=pm2.g1.e2 order by e1"; //$NON-NLS-1$
+
+ // Plan query
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities depcaps = new BasicSourceCapabilities();
+ depcaps.setCapabilitySupport(Capability.CRITERIA_IN, true);
+ depcaps.setSourceProperty(Capability.MAX_IN_CRITERIA_SIZE, 1);
+ depcaps.setSourceProperty(Capability.MAX_DEPENDENT_PREDICATES, 3);
+
+ BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
+
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", depcaps); //$NON-NLS-1$
+
+ List[] expected = new List[] {
+ Arrays.asList("a"), //$NON-NLS-1$
+ Arrays.asList("a"), //$NON-NLS-1$
+ };
+
+ Command command = TestProcessor.helpParse(sql);
+ ProcessorPlan plan = TestProcessor.helpGetPlan(command, RealMetadataFactory.example1Cached(), capFinder);
+ TestOptimizer.checkAtomicQueries(new String[] {
+ "SELECT pm1.g2.e2 FROM pm1.g2",
+ "SELECT pm2.g1.e1, pm2.g1.e2 FROM pm2.g1 WHERE (pm2.g1.e1 IN (<dependent values>)) AND (pm2.g1.e2 IN (<dependent values>))",
+ "SELECT pm1.g1.e1 FROM pm1.g1"
+ }, plan);
+
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.addData("SELECT pm1.g1.e1 FROM pm1.g1", new List<?>[] {Arrays.asList("a")});
+ dataManager.addData("SELECT pm1.g2.e2 FROM pm1.g2", new List<?>[] {Arrays.asList(1), Arrays.asList(2), Arrays.asList(3)});
+ dataManager.addData("SELECT pm2.g1.e1, pm2.g1.e2 FROM pm2.g1 WHERE (pm2.g1.e1 = 'a') AND ((pm2.g1.e2 = 1) OR (pm2.g1.e2 = 2))", new List<?>[] {Arrays.asList("a", 1)});
+ dataManager.addData("SELECT pm2.g1.e1, pm2.g1.e2 FROM pm2.g1 WHERE (pm2.g1.e1 = 'a') AND (pm2.g1.e2 = 3)", new List<?>[] {Arrays.asList("a", 3)});
+ CommandContext cc = TestProcessor.createCommandContext();
+ TestProcessor.helpProcess(plan, cc, dataManager, expected);
+ }
+
/**
* concurrentOpen will be minimum of 2 to gather the pm1 results.
*/
@@ -648,10 +686,6 @@
FakeDataManager dataManager = new FakeDataManager();
TestProcessor.sampleData1(dataManager);
- // Slightly modify metadata to set max set size to just a few rows - this
- // will allow us to test the dependent overflow case
- QueryMetadataInterface fakeMetadata = RealMetadataFactory.example1Cached();
-
// Plan query
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities depcaps = new BasicSourceCapabilities();
@@ -679,7 +713,7 @@
};
Command command = TestProcessor.helpParse(sql);
- ProcessorPlan plan = TestProcessor.helpGetPlan(command, fakeMetadata, capFinder);
+ ProcessorPlan plan = TestProcessor.helpGetPlan(command, RealMetadataFactory.example1Cached(), capFinder);
TestOptimizer.checkAtomicQueries(new String[] {
"SELECT pm1.g2.e4 FROM pm1.g2",
"SELECT pm2.g1.e1, pm2.g1.e2, pm2.g1.e4 FROM pm2.g1 WHERE (pm2.g1.e1 IN (<dependent values>)) AND (pm2.g1.e2 IN (<dependent values>)) AND (pm2.g1.e4 IN (<dependent values>))",
Property changes on: trunk/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java:3149-3217,3535-3555
+ /branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java:3149-3217,3535-3555,3558-3585
13 years, 2 months
teiid SVN: r3585 - in trunk/engine/src: main/java/org/teiid/common/buffer/impl and 1 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-26 13:38:18 -0400 (Wed, 26 Oct 2011)
New Revision: 3585
Modified:
trunk/engine/src/main/java/org/teiid/common/buffer/CacheKey.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java
trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java
Log:
TEIID-1750 correcting memorystoragemanager and switching to a lower cost crf function
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/CacheKey.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/CacheKey.java 2011-10-25 21:41:08 UTC (rev 3584)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/CacheKey.java 2011-10-26 17:38:18 UTC (rev 3585)
@@ -26,9 +26,9 @@
private Long id;
protected long lastAccess;
- protected double orderingValue;
+ protected long orderingValue;
- public CacheKey(Long id, long lastAccess, double orderingValue) {
+ public CacheKey(Long id, long lastAccess, long orderingValue) {
this.id = id;
this.lastAccess = lastAccess;
this.orderingValue = orderingValue;
@@ -63,7 +63,7 @@
return lastAccess;
}
- public double getOrderingValue() {
+ public long getOrderingValue() {
return orderingValue;
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-10-25 21:41:08 UTC (rev 3584)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-10-26 17:38:18 UTC (rev 3585)
@@ -139,7 +139,7 @@
/**
* This estimate is based upon adding the value to 2/3 maps and having CacheEntry/PhysicalInfo keys
*/
- private static final int BATCH_OVERHEAD = 128;
+ private static final long BATCH_OVERHEAD = 128;
final class BatchManagerImpl implements BatchManager, Serializer<List<? extends List<?>>> {
final Long id;
@@ -200,9 +200,6 @@
throws TeiidComponentException {
int sizeEstimate = getSizeEstimate(batch);
Long oid = batchAdded.getAndIncrement();
- if (oid.longValue() == 56) {
- this.toString();
- }
CacheEntry old = null;
if (previous != null) {
if (removeOld) {
@@ -875,7 +872,7 @@
void removeCacheGroup(Long id, boolean prefersMemory) {
cleanSoftReferences();
Collection<Long> vals = cache.removeCacheGroup(id);
- int overhead = vals.size() * BATCH_OVERHEAD;
+ long overhead = vals.size() * BATCH_OVERHEAD;
maxReserveBytes.addAndGet(overhead);
reserveBatchBytes.addAndGet(overhead);
for (Long val : vals) {
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java 2011-10-25 21:41:08 UTC (rev 3584)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java 2011-10-26 17:38:18 UTC (rev 3585)
@@ -44,17 +44,12 @@
//just with more CPU overhead vs. wait time.
protected NavigableMap<CacheKey, V> evictionQueue = new ConcurrentSkipListMap<CacheKey, V>();
protected AtomicLong clock;
- //combined recency/frequency lamda value between 0 and 1 lower -> LFU, higher -> LRU
- //TODO: adaptively adjust this value. more hits should move closer to lru
- protected double crfLamda;
- protected double inverseCrfLamda = 1 - crfLamda;
- protected int maxInterval; //don't consider the old ordering value after the maxInterval
- protected int minInterval; //cap the frequency gain under this interval (we can make some values too hot otherwise)
- private float minVal;
+ protected long maxInterval;
+ protected long halfLife;
public LrfuEvictionQueue(AtomicLong clock) {
this.clock = clock;
- setCrfLamda(.00005); //smaller values tend to work better since we're using interval bounds
+ setHalfLife(1<<17);
}
public boolean remove(V value) {
@@ -95,41 +90,38 @@
CacheKey key = value.getKey();
long lastAccess = key.getLastAccess();
long currentClock = clock.get();
- double orderingValue = key.getOrderingValue();
+ long orderingValue = key.getOrderingValue();
orderingValue = computeNextOrderingValue(currentClock, lastAccess,
orderingValue);
- value.setKey(new CacheKey(key.getId(), (int)currentClock, orderingValue));
+ value.setKey(new CacheKey(key.getId(), currentClock, orderingValue));
}
-
- double computeNextOrderingValue(long currentTime,
- long lastAccess, double orderingValue) {
- long delta = currentTime - lastAccess;
- orderingValue =
- (delta<maxInterval?(delta<minInterval?minVal:Math.pow(inverseCrfLamda, delta)):0)*orderingValue
- //recency component
- + Math.pow(currentTime, crfLamda);
- return orderingValue;
- }
- public double getCrfLamda() {
- return crfLamda;
- }
-
- public void setCrfLamda(double crfLamda) {
- this.crfLamda = crfLamda;
- this.inverseCrfLamda = 1 - crfLamda;
- int i = 0;
- for (; i < 30; i++) {
- float val = (float)Math.pow(inverseCrfLamda, 1<<i);
- if (val == 0) {
- break;
+ long computeNextOrderingValue(long currentTime,
+ long lastAccess, long orderingValue) {
+ long delta = currentTime - lastAccess;
+ if (delta > maxInterval) {
+ return currentTime;
+ }
+ long increase = Math.min(orderingValue, currentTime);
+
+ //scale the increase based upon how hot we previously were
+ increase>>=1;
+ increase *= orderingValue/(double)lastAccess;
+
+ if (delta > halfLife) {
+ while ((delta-=halfLife) > halfLife && (increase>>=1) > 0) {
}
- if (val > .8) {
- minInterval = 1<<i;
- this.minVal = val;
- }
}
- this.maxInterval = 1<<(i-1);
+ if (delta > 0 && increase > 0) {
+ //linear interpolate the rest of the delta (between 1 and 1/2)
+ increase = (long) (increase*(halfLife/((double)halfLife + delta)));
+ }
+ return currentTime + increase;
}
+ public void setHalfLife(long halfLife) {
+ this.halfLife = halfLife;
+ this.maxInterval = 62*this.halfLife;
+ }
+
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java 2011-10-25 21:41:08 UTC (rev 3584)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java 2011-10-26 17:38:18 UTC (rev 3585)
@@ -158,7 +158,11 @@
public boolean remove(Long gid, Long id) {
Map<Long, CacheEntry> group = groups.get(gid);
if (group != null) {
- return group.remove(id) != null;
+ synchronized (group) {
+ int size = group.size();
+ group.remove(id);
+ return group.size() != size;
+ }
}
return false;
}
Modified: trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java 2011-10-25 21:41:08 UTC (rev 3584)
+++ trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java 2011-10-26 17:38:18 UTC (rev 3585)
@@ -33,9 +33,9 @@
@Test public void testPrecision() {
LrfuEvictionQueue<?> q = new LrfuEvictionQueue<BaseCacheEntry>(new AtomicLong());
- double value = 0;
+ long value = 0;
for (long i = Integer.MAX_VALUE; i < 10l + Integer.MAX_VALUE; i++) {
- double valueNext = q.computeNextOrderingValue(i, i-1, value);
+ long valueNext = q.computeNextOrderingValue(i, i-1, value);
assertTrue(valueNext > value);
value = valueNext;
}
13 years, 2 months
teiid SVN: r3584 - in trunk: engine/src/main/java/org/teiid/common/buffer/impl and 4 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-25 17:41:08 -0400 (Tue, 25 Oct 2011)
New Revision: 3584
Modified:
trunk/engine/src/main/java/org/teiid/common/buffer/BufferManager.java
trunk/engine/src/main/java/org/teiid/common/buffer/Cache.java
trunk/engine/src/main/java/org/teiid/common/buffer/CacheKey.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/EnhancedSortMergeJoinStrategy.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/SortUtility.java
trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java
trunk/engine/src/test/java/org/teiid/query/processor/relational/TestSortNode.java
trunk/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java
Log:
TEIID-1750 switching back to using 64 bit CacheKey info and switching buffermanager to internally account in bytes rather than KB and to track batch overhead
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/BufferManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/BufferManager.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/BufferManager.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -88,11 +88,11 @@
throws TeiidComponentException;
/**
- * Return the maximum KB that can be temporarily held potentially
+ * Return the max that can be temporarily held potentially
* across even a blocked exception.
* @return
*/
- int getMaxProcessingKB();
+ int getMaxProcessingSize();
/**
* Creates a new {@link FileStore}. See {@link FileStore#setCleanupReference(Object)} to
@@ -117,7 +117,7 @@
void releaseBuffers(int count);
/**
- * Get the size estimate in KB for the given schema.
+ * Get the size estimate for the given schema.
*/
int getSchemaSize(List<? extends Expression> elements);
@@ -128,7 +128,7 @@
TupleBuffer getTupleBuffer(String id);
/**
- * Set the maxActivePlans as a hint at determining the maxProcessingKB
+ * Set the maxActivePlans as a hint at determining the maxProcessing
* @param maxActivePlans
*/
void setMaxActivePlans(int maxActivePlans);
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/Cache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/Cache.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/Cache.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -90,6 +90,6 @@
* @param gid
* @param id
*/
- void remove(Long gid, Long id);
+ boolean remove(Long gid, Long id);
}
\ No newline at end of file
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/CacheKey.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/CacheKey.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/CacheKey.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -25,10 +25,10 @@
public class CacheKey implements Comparable<CacheKey> {
private Long id;
- protected int lastAccess;
- protected float orderingValue;
+ protected long lastAccess;
+ protected double orderingValue;
- public CacheKey(Long id, int lastAccess, float orderingValue) {
+ public CacheKey(Long id, long lastAccess, double orderingValue) {
this.id = id;
this.lastAccess = lastAccess;
this.orderingValue = orderingValue;
@@ -59,11 +59,11 @@
return this.id.equals(((CacheKey)obj).getId());
}
- public int getLastAccess() {
+ public long getLastAccess() {
return lastAccess;
}
- public float getOrderingValue() {
+ public double getOrderingValue() {
return orderingValue;
}
@@ -71,7 +71,7 @@
public int compareTo(CacheKey o) {
int result = (int) Math.signum(orderingValue - o.orderingValue);
if (result == 0) {
- result = (int)Math.signum((lastAccess&0xffffffffl) - (o.lastAccess&0xffffffffl));
+ result = (int)Math.signum(lastAccess - o.lastAccess);
if (result == 0) {
return Long.signum(id - o.id);
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -109,6 +109,7 @@
static final int LOG_INODE_SIZE = 6;
static final int DIRECT_POINTERS = 14;
static final int EMPTY_ADDRESS = -1;
+ static final int FREED = -2;
//TODO allow the block size to be configurable. 8k is a reasonable default up to a gig, but we could be more efficient with larger blocks from there.
//the rationale for a smaller block size is to reduce internal fragmentation, which is critical when maintaining a relatively small buffer < 256MB
@@ -290,16 +291,16 @@
}
inodesInuse.clear(inode);
if (!freedAll || indirectIndexBlock == EMPTY_ADDRESS) {
- return acquire?dataBlockToAcquire:EMPTY_ADDRESS;
+ return acquire?dataBlockToAcquire:FREED;
}
freedAll = freeIndirectBlock(indirectIndexBlock);
if (!freedAll || doublyIndirectIndexBlock == EMPTY_ADDRESS) {
- return acquire?dataBlockToAcquire:EMPTY_ADDRESS;
+ return acquire?dataBlockToAcquire:FREED;
}
bb = blockByteBuffer.getByteBuffer(doublyIndirectIndexBlock).slice();
freeBlock(0, bb, ADDRESSES_PER_BLOCK, false);
freeDataBlock(doublyIndirectIndexBlock);
- return acquire?dataBlockToAcquire:EMPTY_ADDRESS;
+ return acquire?dataBlockToAcquire:FREED;
}
private boolean freeIndirectBlock(int indirectIndexBlock) {
@@ -787,7 +788,7 @@
private boolean shouldPlaceInMemoryBuffer(long currentTime, PhysicalInfo info) {
PhysicalInfo lowest = memoryBufferEntries.firstEntry(false);
CacheKey key = info.getKey();
- return (blocksInuse.getTotalBits() - blocksInuse.getBitsSet()) > (criticalCleaningThreshold + info.memoryBlockCount)
+ return (blocksInuse.getTotalBits() - blocksInuse.getBitsSet()) > (cleaningThreshold + info.memoryBlockCount)
|| (lowest != null && lowest.block != EMPTY_ADDRESS
&& lowest.getKey().getOrderingValue() < (currentTime>0?memoryBufferEntries.computeNextOrderingValue(currentTime, key.getLastAccess(), key.getOrderingValue()):key.getOrderingValue()));
}
@@ -816,13 +817,20 @@
}
@Override
- public void remove(Long gid, Long id) {
+ public boolean remove(Long gid, Long id) {
Map<Long, PhysicalInfo> map = physicalMapping.get(gid);
if (map == null) {
- return;
+ return false;
}
- PhysicalInfo info = map.remove(id);
+ PhysicalInfo info = null;
+ boolean result = false;
+ synchronized (map) {
+ int size = map.size();
+ info = map.remove(id);
+ result = size != map.size();
+ }
free(info, false, false);
+ return result;
}
@Override
@@ -850,7 +858,7 @@
return EMPTY_ADDRESS;
}
Long oid = info.getId();
- int result = EMPTY_ADDRESS;
+ int result = FREED;
BlockManager bm = null;
int block = EMPTY_ADDRESS;
int memoryBlockCount;
@@ -948,7 +956,7 @@
*/
int evictFromMemoryBuffer(boolean acquire) {
boolean writeLocked = false;
- int next = -1;
+ int next = EMPTY_ADDRESS;
try {
for (int i = 0; i < EVICTION_SCANS && next == EMPTY_ADDRESS; i++) {
//doing a cleanup may trigger the purging of resources
@@ -981,13 +989,10 @@
info.evicting = true;
}
next = free(info, true, acquire);
- if (!acquire) {
- next = 0; //let the cleaner know that we made progress
- }
break;
}
}
- if (acquire && next == -1) {
+ if (acquire && next == EMPTY_ADDRESS) {
throw new AssertionError("Could not free space for pending write"); //$NON-NLS-1$
}
} finally {
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -91,6 +91,7 @@
* little is reserved.
*/
private static final class Cleaner extends TimerTask {
+ private static final int MAX_READ_AGE = 1<<28;
WeakReference<BufferManagerImpl> bufferRef;
public Cleaner(BufferManagerImpl bufferManagerImpl) {
@@ -106,25 +107,22 @@
return;
}
boolean agingOut = false;
- if (impl.reserveBatchKB.get() < impl.maxReserveKB.get()*.9 || impl.activeBatchKB.get() < impl.maxReserveKB.get()*.7) {
+ if (impl.reserveBatchBytes.get() < impl.maxReserveBytes.get()*.9 || impl.activeBatchBytes.get() < impl.maxReserveBytes.get()*.7) {
CacheEntry entry = impl.evictionQueue.firstEntry(false);
if (entry == null) {
return;
}
//we aren't holding too many memory entries, ensure that
//entries aren't old
- int lastAccess = 0x1fffffff&entry.getKey().getLastAccess();
- int currentTime = 0x1fffffff&(int)impl.readAttempts.get();
- if (lastAccess > currentTime) {
- currentTime += 1<<29;
- }
- if (currentTime - lastAccess < 1<<28) {
+ long lastAccess = entry.getKey().getLastAccess();
+ long currentTime = impl.readAttempts.get();
+ if (currentTime - lastAccess < MAX_READ_AGE) {
return;
}
agingOut = true;
}
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
- LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Asynch eviction run", impl.reserveBatchKB.get(), impl.maxReserveKB.get(), impl.activeBatchKB.get()); //$NON-NLS-1$
+ LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Asynch eviction run", impl.reserveBatchBytes.get(), impl.maxReserveBytes.get(), impl.activeBatchBytes.get()); //$NON-NLS-1$
}
impl.doEvictions(0, false);
if (!agingOut) {
@@ -138,6 +136,11 @@
}
}
+ /**
+ * This estimate is based upon adding the value to 2/3 maps and having CacheEntry/PhysicalInfo keys
+ */
+ private static final int BATCH_OVERHEAD = 128;
+
final class BatchManagerImpl implements BatchManager, Serializer<List<? extends List<?>>> {
final Long id;
SizeUtility sizeUtility;
@@ -197,6 +200,9 @@
throws TeiidComponentException {
int sizeEstimate = getSizeEstimate(batch);
Long oid = batchAdded.getAndIncrement();
+ if (oid.longValue() == 56) {
+ this.toString();
+ }
CacheEntry old = null;
if (previous != null) {
if (removeOld) {
@@ -210,6 +216,8 @@
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Add batch to BufferManager", ce.getId(), "with size estimate", ce.getSizeEstimate()); //$NON-NLS-1$ //$NON-NLS-2$
}
+ maxReserveBytes.addAndGet(-BATCH_OVERHEAD);
+ reserveBatchBytes.addAndGet(-BATCH_OVERHEAD);
cache.addToCacheGroup(id, ce.getId());
addMemoryEntry(ce, true);
return oid;
@@ -252,7 +260,7 @@
}
public int getSizeEstimate(List<? extends List<?>> obj) {
- return (int) Math.max(1, sizeUtility.getBatchSize(DataTypeManager.isValueCacheEnabled(), obj) / 1024);
+ return (int) Math.max(1, sizeUtility.getBatchSize(DataTypeManager.isValueCacheEnabled(), obj));
}
@SuppressWarnings("unchecked")
@@ -284,9 +292,8 @@
throw new AssertionError("Batch not found in storage " + batch); //$NON-NLS-1$
}
if (!retain) {
- cache.remove(this.id, batch);
- }
- if (retain) {
+ removeFromCache(this.id, batch);
+ } else {
addMemoryEntry(ce, false);
}
} finally {
@@ -294,10 +301,9 @@
}
return (List<List<?>>)ce.getObject();
}
-
+
@Override
public void remove(Long batch) {
- cleanSoftReferences();
BufferManagerImpl.this.remove(id, batch, prefersMemory.get());
}
@@ -333,10 +339,10 @@
private int connectorBatchSize = BufferManager.DEFAULT_CONNECTOR_BATCH_SIZE;
private int processorBatchSize = BufferManager.DEFAULT_PROCESSOR_BATCH_SIZE;
//set to acceptable defaults for testing
- private int maxProcessingKB = 1 << 11;
- private Integer maxProcessingKBOrig;
- AtomicInteger maxReserveKB = new AtomicInteger(1 << 18);
- AtomicInteger reserveBatchKB = new AtomicInteger();
+ private int maxProcessingBytes = 1 << 21;
+ private Integer maxProcessingBytesOrig;
+ AtomicLong maxReserveBytes = new AtomicLong(1 << 28);
+ AtomicLong reserveBatchBytes = new AtomicLong();
private int maxActivePlans = DQPConfiguration.DEFAULT_MAX_ACTIVE_PLANS; //used as a hint to set the reserveBatchKB
private boolean useWeakReferences = true;
private boolean inlineLobs = true;
@@ -346,7 +352,7 @@
private ReentrantLock lock = new ReentrantLock(true);
private Condition batchesFreed = lock.newCondition();
- AtomicInteger activeBatchKB = new AtomicInteger();
+ AtomicLong activeBatchBytes = new AtomicLong();
private AtomicLong readAttempts = new AtomicLong();
//TODO: consider the size estimate in the weighting function
@@ -394,13 +400,20 @@
void clearSoftReference(BatchSoftReference bsr) {
synchronized (bsr) {
- maxReserveKB.addAndGet(bsr.sizeEstimate);
- reserveBatchKB.addAndGet(bsr.sizeEstimate);
+ maxReserveBytes.addAndGet(bsr.sizeEstimate);
+ reserveBatchBytes.addAndGet(bsr.sizeEstimate);
bsr.sizeEstimate = 0;
}
bsr.clear();
}
+ void removeFromCache(Long gid, Long batch) {
+ if (cache.remove(gid, batch)) {
+ maxReserveBytes.addAndGet(BATCH_OVERHEAD);
+ reserveBatchBytes.addAndGet(BATCH_OVERHEAD);
+ }
+ }
+
public long getBatchesAdded() {
return batchAdded.get();
}
@@ -418,12 +431,12 @@
}
@Override
- public int getMaxProcessingKB() {
- return maxProcessingKB;
+ public int getMaxProcessingSize() {
+ return maxProcessingBytes;
}
- public int getReserveBatchKB() {
- return reserveBatchKB.get();
+ public long getReserveBatchBytes() {
+ return reserveBatchBytes.get();
}
/**
@@ -541,41 +554,48 @@
}
public void setMaxProcessingKB(int maxProcessingKB) {
- this.maxProcessingKB = maxProcessingKB;
+ if (maxProcessingKB > -1) {
+ this.maxProcessingBytes = maxProcessingKB<<10;
+ } else {
+ this.maxProcessingBytes = -1;
+ }
}
public void setMaxReserveKB(int maxReserveBatchKB) {
- this.maxReserveKB.set(maxReserveBatchKB);
if (maxReserveBatchKB > -1) {
- this.reserveBatchKB.set(maxReserveBatchKB);
+ int maxReserve = maxReserveBatchKB<<10;
+ this.maxReserveBytes.set(maxReserve);
+ this.reserveBatchBytes.set(maxReserve);
+ } else {
+ this.maxReserveBytes.set(-1);
}
}
@Override
public void initialize() throws TeiidComponentException {
- int maxMemory = (int)Math.min(Runtime.getRuntime().maxMemory() / 1024, Integer.MAX_VALUE);
- maxMemory = Math.max(0, maxMemory - 300 * 1024); //assume 300 megs of overhead for the AS/system stuff
+ long maxMemory = Runtime.getRuntime().maxMemory();
+ maxMemory = Math.max(0, maxMemory - (300 << 20)); //assume 300 megs of overhead for the AS/system stuff
if (getMaxReserveKB() < 0) {
- this.setMaxReserveKB(0);
- int one_gig = 1024 * 1024;
+ this.maxReserveBytes.set(0);
+ int one_gig = 1 << 30;
if (maxMemory > one_gig) {
//assume 75% of the memory over the first gig
- this.maxReserveKB.addAndGet(((int)Math.max(0, (maxMemory - one_gig) * .75)));
+ this.maxReserveBytes.addAndGet((long)Math.max(0, (maxMemory - one_gig) * .75));
}
- this.maxReserveKB.addAndGet(((int)Math.max(0, Math.min(one_gig, maxMemory) * .5)));
+ this.maxReserveBytes.addAndGet(Math.max(0, Math.min(one_gig, maxMemory) >> 1));
}
- this.reserveBatchKB.set(this.getMaxReserveKB());
- if (this.maxProcessingKBOrig == null) {
+ this.reserveBatchBytes.set(this.maxReserveBytes.get());
+ if (this.maxProcessingBytesOrig == null) {
//store the config value so that we can be reinitialized (this is not a clean approach)
- this.maxProcessingKBOrig = this.maxProcessingKB;
+ this.maxProcessingBytesOrig = this.maxProcessingBytes;
}
- if (this.maxProcessingKBOrig < 0) {
- this.maxProcessingKB = Math.max(Math.min(8 * processorBatchSize, Integer.MAX_VALUE), (int)(.1 * maxMemory)/maxActivePlans);
+ if (this.maxProcessingBytesOrig < 0) {
+ this.maxProcessingBytes = (int)Math.min(Math.max(processorBatchSize * targetBytesPerRow * 8l, (.1 * maxMemory)/maxActivePlans), Integer.MAX_VALUE);
}
//make a guess at the max number of batches
- int memoryBatches = maxMemory / (processorBatchSize * targetBytesPerRow / 1024);
+ long memoryBatches = maxMemory / (processorBatchSize * targetBytesPerRow);
//memoryBatches represents a full batch, so assume that most will be smaller
- int logSize = 35 - Integer.numberOfLeadingZeros(memoryBatches);
+ int logSize = 67 - Long.numberOfLeadingZeros(memoryBatches);
if (useWeakReferences) {
weakReferenceCache = new WeakReferenceHashedValueCache<CacheEntry>(Math.min(30, logSize));
}
@@ -593,13 +613,13 @@
}
if (lock.tryLock()) {
try {
- this.reserveBatchKB.addAndGet(count);
+ this.reserveBatchBytes.addAndGet(count);
batchesFreed.signalAll();
} finally {
lock.unlock();
}
} else {
- this.reserveBatchKB.addAndGet(count);
+ this.reserveBatchBytes.addAndGet(count);
}
}
@@ -616,14 +636,14 @@
//don't wait for more than is available
int waitCount = Math.min(additional, this.getMaxReserveKB() - reservedByThread.get());
int committed = 0;
- while (waitCount > 0 && waitCount > this.reserveBatchKB.get() && committed < additional) {
- int reserveBatchSample = this.reserveBatchKB.get();
+ while (waitCount > 0 && waitCount > this.reserveBatchBytes.get() && committed < additional) {
+ long reserveBatchSample = this.reserveBatchBytes.get();
try {
batchesFreed.await(100, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
throw new TeiidRuntimeException(e);
}
- if (reserveBatchSample >= this.reserveBatchKB.get()) {
+ if (reserveBatchSample >= this.reserveBatchBytes.get()) {
waitCount >>= 3;
} else {
waitCount >>= 1;
@@ -645,7 +665,7 @@
}
int result = count;
if (mode == BufferReserveMode.FORCE) {
- this.reserveBatchKB.addAndGet(-count);
+ this.reserveBatchBytes.addAndGet(-count);
} else {
result = noWaitReserve(count, true);
}
@@ -656,28 +676,28 @@
private int noWaitReserve(int count, boolean allOrNothing) {
for (int i = 0; i < 2; i++) {
- int reserveBatch = this.reserveBatchKB.get();
+ long reserveBatch = this.reserveBatchBytes.get();
if (allOrNothing && count > reserveBatch) {
return 0;
}
- count = Math.min(count, Math.max(0, reserveBatch));
+ count = (int)Math.min(count, Math.max(0, reserveBatch));
if (count == 0) {
return 0;
}
- if (this.reserveBatchKB.compareAndSet(reserveBatch, reserveBatch - count)) {
+ if (this.reserveBatchBytes.compareAndSet(reserveBatch, reserveBatch - count)) {
return count;
}
}
//the value is changing rapidly, but we've already potentially adjusted the value twice, so just proceed
- this.reserveBatchKB.addAndGet(-count);
+ this.reserveBatchBytes.addAndGet(-count);
return count;
}
void persistBatchReferences() {
- int activeBatch = activeBatchKB.get();
- int reserveBatch = reserveBatchKB.get();
+ long activeBatch = activeBatchBytes.get();
+ long reserveBatch = reserveBatchBytes.get();
if (activeBatch <= reserveBatch) {
- int memoryCount = activeBatch + getMaxReserveKB() - reserveBatch;
+ long memoryCount = activeBatch + getMaxReserveKB() - reserveBatch;
if (DataTypeManager.isValueCacheEnabled()) {
if (memoryCount < getMaxReserveKB() / 8) {
DataTypeManager.setValueCacheEnabled(false);
@@ -687,13 +707,13 @@
}
return;
}
- int maxToFree = Math.max(maxProcessingKB>>1, reserveBatch>>3);
+ long maxToFree = Math.max(maxProcessingBytes>>1, reserveBatch>>3);
doEvictions(maxToFree, true);
}
- void doEvictions(int maxToFree, boolean checkActiveBatch) {
+ void doEvictions(long maxToFree, boolean checkActiveBatch) {
int freed = 0;
- while (freed <= maxToFree && (!checkActiveBatch || activeBatchKB.get() > reserveBatchKB.get() * .8)) {
+ while (freed <= maxToFree && (!checkActiveBatch || activeBatchBytes.get() > reserveBatchBytes.get() * .8)) {
CacheEntry ce = evictionQueue.firstEntry(true);
if (ce == null) {
break;
@@ -712,7 +732,7 @@
synchronized (ce) {
if (evicted && memoryEntries.remove(ce.getId()) != null) {
freed += ce.getSizeEstimate();
- activeBatchKB.addAndGet(-ce.getSizeEstimate());
+ activeBatchBytes.addAndGet(-ce.getSizeEstimate());
evictionQueue.remove(ce); //ensures that an intervening get will still be cleaned
}
}
@@ -748,14 +768,17 @@
}
private void createSoftReference(CacheEntry ce) {
- BatchSoftReference ref = new BatchSoftReference(ce, SOFT_QUEUE, ce.getSizeEstimate()/2);
+ //if we don't set aside some reserve, we
+ //will push the soft ref out of memory potentially too quickly
+ int sizeEstimate = ce.getSizeEstimate()/2;
+ BatchSoftReference ref = new BatchSoftReference(ce, SOFT_QUEUE, sizeEstimate);
softCache.put(ce.getId(), ref);
- maxReserveKB.addAndGet(- ce.getSizeEstimate()/2);
- reserveBatchKB.addAndGet(- ce.getSizeEstimate()/2);
+ maxReserveBytes.addAndGet(- sizeEstimate);
+ reserveBatchBytes.addAndGet(- sizeEstimate);
}
/**
- * Get a CacheEntry without hitting the cache
+ * Get a CacheEntry without hitting storage
*/
CacheEntry fastGet(Long batch, boolean prefersMemory, boolean retain) {
CacheEntry ce = null;
@@ -807,13 +830,16 @@
return null;
}
+ AtomicInteger removed = new AtomicInteger();
+
CacheEntry remove(Long gid, Long batch, boolean prefersMemory) {
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.TRACE)) {
LogManager.logTrace(LogConstants.CTX_BUFFER_MGR, "Removing batch from BufferManager", batch); //$NON-NLS-1$
}
+ cleanSoftReferences();
CacheEntry ce = fastGet(batch, prefersMemory, false);
if (ce == null) {
- cache.remove(gid, batch);
+ removeFromCache(gid, batch);
} else {
ce.nullOut();
}
@@ -822,11 +848,11 @@
private void remove(CacheEntry ce, boolean inMemory) {
if (inMemory) {
- activeBatchKB.addAndGet(-ce.getSizeEstimate());
+ activeBatchBytes.addAndGet(-ce.getSizeEstimate());
}
Serializer<?> s = ce.getSerializer();
if (s != null) {
- cache.remove(s.getId(), ce.getId());
+ removeFromCache(s.getId(), ce.getId());
}
}
@@ -843,12 +869,15 @@
evictionQueue.touch(ce);
}
}
- activeBatchKB.getAndAdd(ce.getSizeEstimate());
+ activeBatchBytes.getAndAdd(ce.getSizeEstimate());
}
void removeCacheGroup(Long id, boolean prefersMemory) {
cleanSoftReferences();
Collection<Long> vals = cache.removeCacheGroup(id);
+ int overhead = vals.size() * BATCH_OVERHEAD;
+ maxReserveBytes.addAndGet(overhead);
+ reserveBatchBytes.addAndGet(overhead);
for (Long val : vals) {
//TODO: we will unnecessarily call remove on the cache, but that should be low cost
fastGet(val, prefersMemory, false);
@@ -905,7 +934,7 @@
}
rowCount = Math.max(1, rowCount);
total *= rowCount;
- return new int[]{rowCount, Math.max(1, total / 1024)};
+ return new int[]{rowCount, Math.max(1, total)};
}
@Override
@@ -959,17 +988,13 @@
}
public int getMaxReserveKB() {
- return maxReserveKB.get();
+ return (int)maxReserveBytes.get()>>10;
}
public void setCache(Cache cache) {
this.cache = cache;
}
- public int getActiveBatchKB() {
- return activeBatchKB.get();
- }
-
public int getMemoryCacheEntries() {
return memoryEntries.size();
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/LrfuEvictionQueue.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -54,7 +54,7 @@
public LrfuEvictionQueue(AtomicLong clock) {
this.clock = clock;
- setCrfLamda(.1); //smaller values tend to work better since we're using interval bounds
+ setCrfLamda(.00005); //smaller values tend to work better since we're using interval bounds
}
public boolean remove(V value) {
@@ -93,27 +93,21 @@
*/
public void recordAccess(V value) {
CacheKey key = value.getKey();
- int lastAccess = key.getLastAccess();
+ long lastAccess = key.getLastAccess();
long currentClock = clock.get();
- float orderingValue = key.getOrderingValue();
+ double orderingValue = key.getOrderingValue();
orderingValue = computeNextOrderingValue(currentClock, lastAccess,
orderingValue);
value.setKey(new CacheKey(key.getId(), (int)currentClock, orderingValue));
}
- float computeNextOrderingValue(long currentTime,
- int lastAccess, float orderingValue) {
- long longLastAccess = lastAccess&0xffffffffl;
- currentTime &= 0xffffffffl;
- if (longLastAccess > currentTime) {
- currentTime += (1l<<32);
- }
- long delta = currentTime - longLastAccess;
+ double computeNextOrderingValue(long currentTime,
+ long lastAccess, double orderingValue) {
+ long delta = currentTime - lastAccess;
orderingValue =
- (float) (//Frequency component
(delta<maxInterval?(delta<minInterval?minVal:Math.pow(inverseCrfLamda, delta)):0)*orderingValue
//recency component
- + Math.pow(currentTime, crfLamda));
+ + Math.pow(currentTime, crfLamda);
return orderingValue;
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/MemoryStorageManager.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -155,11 +155,12 @@
}
@Override
- public void remove(Long gid, Long id) {
+ public boolean remove(Long gid, Long id) {
Map<Long, CacheEntry> group = groups.get(gid);
if (group != null) {
- group.remove(id);
+ return group.remove(id) != null;
}
+ return false;
}
@Override
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/PhysicalInfo.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -29,7 +29,7 @@
/**
* Represents the memory buffer and storage state of an object.
* It is important to minimize the amount of data held here.
- * Currently should be 48 bytes.
+ * Currently should be 56 bytes.
*/
final class PhysicalInfo extends BaseCacheEntry {
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/EnhancedSortMergeJoinStrategy.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/EnhancedSortMergeJoinStrategy.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/EnhancedSortMergeJoinStrategy.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -255,7 +255,7 @@
return false; //index is too large
}
int schemaSize = this.joinNode.getBufferManager().getSchemaSize(other.getSource().getOutputElements());
- int toReserve = this.joinNode.getBufferManager().getMaxProcessingKB();
+ int toReserve = this.joinNode.getBufferManager().getMaxProcessingSize();
//check if the other side can be sorted in memory
if (other.getRowCount() <= this.joinNode.getBatchSize()
|| (possibleIndex.getRowCount() > this.joinNode.getBatchSize() && other.getRowCount()/this.joinNode.getBatchSize() < toReserve/schemaSize)) {
@@ -265,7 +265,7 @@
int indexSchemaSize = this.joinNode.getBufferManager().getSchemaSize(possibleIndex.getSource().getOutputElements());
//approximate that 1/2 of the index will be memory resident
toReserve = (int)(indexSchemaSize * possibleIndex.getTupleBuffer().getRowCount() / (possibleIndex.getTupleBuffer().getBatchSize() * .5));
- if (toReserve < this.joinNode.getBufferManager().getMaxProcessingKB()) {
+ if (toReserve < this.joinNode.getBufferManager().getMaxProcessingSize()) {
useIndex = true;
} else if (possibleIndex.getTupleBuffer().getRowCount() / this.joinNode.getBatchSize() < preferMemCutoff) {
useIndex = true;
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/SortUtility.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/SortUtility.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/SortUtility.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -233,7 +233,7 @@
//attempt to reserve more working memory if there are additional rows available before blocking
if (workingTuples.size() >= maxRows) {
int reserved = bufferManager.reserveBuffers(schemaSize,
- (totalReservedBuffers + schemaSize <= bufferManager.getMaxProcessingKB())?BufferReserveMode.FORCE:BufferReserveMode.NO_WAIT);
+ (totalReservedBuffers + schemaSize <= bufferManager.getMaxProcessingSize())?BufferReserveMode.FORCE:BufferReserveMode.NO_WAIT);
totalReservedBuffers += reserved;
if (reserved != schemaSize) {
break;
@@ -298,7 +298,7 @@
TupleBuffer merged = createTupleBuffer();
int desiredSpace = activeTupleBuffers.size() * schemaSize;
- int reserved = Math.min(desiredSpace, Math.max(2*schemaSize, this.bufferManager.getMaxProcessingKB()));
+ int reserved = Math.min(desiredSpace, Math.max(2*schemaSize, this.bufferManager.getMaxProcessingSize()));
bufferManager.reserveBuffers(reserved, BufferReserveMode.FORCE);
if (desiredSpace > reserved) {
reserved += bufferManager.reserveAdditionalBuffers(desiredSpace - reserved);
Modified: trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/test/java/org/teiid/common/buffer/impl/TestLrfuEvictionQueue.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -33,9 +33,9 @@
@Test public void testPrecision() {
LrfuEvictionQueue<?> q = new LrfuEvictionQueue<BaseCacheEntry>(new AtomicLong());
- float value = 0;
+ double value = 0;
for (long i = Integer.MAX_VALUE; i < 10l + Integer.MAX_VALUE; i++) {
- float valueNext = q.computeNextOrderingValue(i, (int)i-1, value);
+ double valueNext = q.computeNextOrderingValue(i, i-1, value);
assertTrue(valueNext > value);
value = valueNext;
}
Modified: trunk/engine/src/test/java/org/teiid/query/processor/relational/TestSortNode.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/relational/TestSortNode.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/engine/src/test/java/org/teiid/query/processor/relational/TestSortNode.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -54,7 +54,7 @@
private void helpTestSort(List elements, List[] data, List sortElements, List sortTypes, List[] expected, Mode mode) throws TeiidComponentException, TeiidProcessingException {
BufferManagerImpl mgr = BufferManagerFactory.getTestBufferManager(10000, BATCH_SIZE, BATCH_SIZE);
- int reserve = mgr.getReserveBatchKB();
+ long reserve = mgr.getReserveBatchBytes();
CommandContext context = new CommandContext ("pid", "test", null, null, 1); //$NON-NLS-1$ //$NON-NLS-2$
BlockingFakeRelationalNode dataNode = new BlockingFakeRelationalNode(2, data);
@@ -89,7 +89,7 @@
}
}
assertEquals(expected.length, currentRow - 1);
- assertEquals(reserve, mgr.getReserveBatchKB());
+ assertEquals(reserve, mgr.getReserveBatchBytes());
}
/*
Modified: trunk/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java
===================================================================
--- trunk/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java 2011-10-25 18:25:46 UTC (rev 3583)
+++ trunk/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java 2011-10-25 21:41:08 UTC (rev 3584)
@@ -94,7 +94,7 @@
svc.start();
BufferManager mgr = svc.getBufferManager();
- assertEquals(3285, mgr.getSchemaSize(schema));
+ assertEquals(3364096, mgr.getSchemaSize(schema));
assertEquals(128, mgr.getProcessorBatchSize(schema));
}
13 years, 2 months
teiid SVN: r3583 - in branches/7.4.x/console/src/main: resources/META-INF and 1 other directory.
by teiid-commits@lists.jboss.org
Author: tejones
Date: 2011-10-25 14:25:46 -0400 (Tue, 25 Oct 2011)
New Revision: 3583
Modified:
branches/7.4.x/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
branches/7.4.x/console/src/main/resources/META-INF/rhq-plugin.xml
Log:
TEIID-1794: Corrected ClassCastException as well as corrected incorrect field names for operations (Requests, Long Running Requests). Also corrected parameter order for "Terminate Request" operation.
Modified: branches/7.4.x/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
===================================================================
--- branches/7.4.x/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java 2011-10-25 18:22:50 UTC (rev 3582)
+++ branches/7.4.x/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java 2011-10-25 18:25:46 UTC (rev 3583)
@@ -211,8 +211,8 @@
getTransactionCollectionValue(transactionMetaValue,transactionsCollection);
operationResult.setContent(createReportResultList(fieldNameList, resultObject.iterator()));
} else if (operationName.equals(Platform.Operations.KILL_TRANSACTION)) {
- String sessionID = (String) valueMap.get(Operation.Value.TRANSACTION_ID);
- MetaValue[] args = new MetaValue[] { SimpleValueSupport.wrap(sessionID) };
+ String transactionID = (String) valueMap.get(Operation.Value.TRANSACTION_ID);
+ MetaValue[] args = new MetaValue[] { SimpleValueSupport.wrap(transactionID) };
try {
executeManagedOperation(connection, getRuntimeEngineDeployer(connection, mc), Platform.Operations.KILL_TRANSACTION, args);
} catch (Exception e) {
@@ -232,8 +232,8 @@
Long requestID = (Long) valueMap.get(Operation.Value.REQUEST_ID);
String sessionID = (String) valueMap.get(Operation.Value.SESSION_ID);
MetaValue[] args = new MetaValue[] {
- SimpleValueSupport.wrap(requestID),
- SimpleValueSupport.wrap(sessionID) };
+ SimpleValueSupport.wrap(sessionID),
+ SimpleValueSupport.wrap(requestID) };
try {
executeManagedOperation(connection, getRuntimeEngineDeployer(connection, mc), Platform.Operations.KILL_REQUEST, args);
} catch (Exception e) {
@@ -876,7 +876,7 @@
request.setSourceRequest((Boolean) ProfileServiceUtil.booleanValue(compositeValue.get(SOURCE_REQUEST)));
request.setNodeId((Integer) ProfileServiceUtil.integerValue(compositeValue.get(NODE_ID)));
request.setTransactionId((String) ProfileServiceUtil.stringValue(compositeValue.get(TRANSACTION_ID)));
- request.setState((ProcessingState) ProfileServiceUtil.getSimpleValue(compositeValue.get(STATE), ProcessingState.class));
+ request.setState((ProcessingState.valueOf(ProfileServiceUtil.getSimpleValue(compositeValue.get(STATE), String.class))));
return request;
}
throw new IllegalStateException("Unable to unwrap RequestMetadata " + metaValue); //$NON-NLS-1$
Modified: branches/7.4.x/console/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- branches/7.4.x/console/src/main/resources/META-INF/rhq-plugin.xml 2011-10-25 18:22:50 UTC (rev 3582)
+++ branches/7.4.x/console/src/main/resources/META-INF/rhq-plugin.xml 2011-10-25 18:25:46 UTC (rev 3583)
@@ -93,23 +93,18 @@
<results>
<c:list-property name="list">
<c:map-property name="map">
+ <c:simple-property displayName="Request ID"
+ name="getExecutionId" type="string" description="The id for the request" />
<c:simple-property displayName="Session ID"
name="getSessionId" type="string"
- description="The name of the resource whose availability is being reported" />
- <c:simple-property displayName="Request ID"
- name="getRequestId" type="string" description="The id for the request" />
+ description="The session id the request is using" />
<c:simple-property displayName="SQL String"
name="getCommand" type="string" description="The SQL string for this query" />
<c:simple-property displayName="Source Request"
name="sourceRequest" type="string"
description="If false,this is the top level query. If true, this a physical source query." />
- <c:simple-property displayName="Execution ID"
- name="getExecutionId" type="string"
- description="The execution id for this request (if this is a physical source query)" />
<c:simple-property displayName="Start Time"
- name="getCreatedTime" type="string" description="The time this query began" />
- <c:simple-property displayName="Start Time"
- name="getProcessingTime" type="string" description="Processing time for this request" />
+ name="getStartTime" type="string" description="The time this query began" />
<c:simple-property displayName="Transaction ID"
name="getTransactionId" type="string"
description="The transaction XID if there is a transaction involved" />
@@ -187,15 +182,11 @@
required="false">
<c:map-property name="map">
<c:simple-property displayName="Request ID"
- name="getRequestId" type="string" description="The request identifier" />
+ name="getExecutionId" type="string" description="The request identifier" />
<c:simple-property displayName="Session ID"
name="getSessionId" type="string" description="Session identifier" />
- <c:simple-property displayName="Execution ID"
- name="getExecutionId" type="string" description="Unique Identifier for Request" />
- <c:simple-property displayName="Created Time"
- name="getCreatedTime" type="string" description="Time when request submitted" />
- <c:simple-property displayName="Processing Time"
- name="getProcessingTime" type="string" description="Processing time for the request" />
+ <c:simple-property displayName="Start Time"
+ name="getStartTime" type="string" description="Time when request submitted" />
<c:simple-property displayName="Last ping time"
name="getCommand" type="string" description="SQL Command" />
<c:simple-property displayName="Connector level request?"
@@ -203,7 +194,7 @@
description="True if this is a connector level request" />
<c:simple-property displayName="Node ID" name="getNodeId"
type="string" description="The node identifier" />
- <c:simple-property displayName="Tansaction identifier"
+ <c:simple-property displayName="Transaction identifier"
name="getTransactionId" type="string"
description="Transaction XID if a transaction is involved" />
</c:map-property>
@@ -484,8 +475,8 @@
name="getSessionId" type="string" description="Session identifier" />
<c:simple-property displayName="Execution ID"
name="getExecutionId" type="string" description="Unique Identifier for Request" />
- <c:simple-property displayName="Created Time"
- name="getCreatedTime" type="string" description="Time when request submitted" />
+ <c:simple-property displayName="Start Time"
+ name="getStartTime" type="string" description="Time when request submitted" />
<c:simple-property displayName="Processing Time"
name="getProcessingTime" type="string" description="Processing time for the request" />
<c:simple-property displayName="Last ping time"
@@ -495,7 +486,7 @@
description="True if this is a connector level request" />
<c:simple-property displayName="Node ID" name="getNodeId"
type="string" description="The node identifier" />
- <c:simple-property displayName="Tansaction identifier"
+ <c:simple-property displayName="Transaction identifier"
name="getTransactionId" type="string"
description="Transaction XID if a transaction is involved" />
</c:map-property>
13 years, 2 months
teiid SVN: r3582 - in branches/7.4.x/engine/src: test/java/org/teiid/query/processor and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-25 14:22:50 -0400 (Tue, 25 Oct 2011)
New Revision: 3582
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java
branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java
Log:
TEIID-1791 correct the dependent join indexing logic
Modified: branches/7.4.x/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java 2011-10-25 16:43:31 UTC (rev 3581)
+++ branches/7.4.x/engine/src/main/java/org/teiid/query/processor/relational/DependentCriteriaProcessor.java 2011-10-25 18:22:50 UTC (rev 3582)
@@ -298,8 +298,8 @@
List<SetState> source = sources.get(i);
- if (i == currentIndex++) {
-
+ if (i == currentIndex) {
+ currentIndex++;
int doneCount = 0;
while (doneCount < source.size()) {
Modified: branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java
===================================================================
--- branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java 2011-10-25 16:43:31 UTC (rev 3581)
+++ branches/7.4.x/engine/src/test/java/org/teiid/query/processor/TestDependentJoins.java 2011-10-25 18:22:50 UTC (rev 3582)
@@ -638,6 +638,44 @@
helpTestLargeSetInDepAccessMultiJoinCriteria(1, 10, 2, 2);
}
+ @Test public void testLargeSetMultipleDependentSources() throws Exception {
+ String sql = "SELECT pm1.g1.e1 FROM pm1.g1, pm2.g1 makedep, /*+ makeind */ pm1.g2 where pm1.g1.e1=pm2.g1.e1 AND pm1.g2.e2=pm2.g1.e2 order by e1"; //$NON-NLS-1$
+
+ // Plan query
+ FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
+ BasicSourceCapabilities depcaps = new BasicSourceCapabilities();
+ depcaps.setCapabilitySupport(Capability.CRITERIA_IN, true);
+ depcaps.setSourceProperty(Capability.MAX_IN_CRITERIA_SIZE, 1);
+ depcaps.setSourceProperty(Capability.MAX_DEPENDENT_PREDICATES, 3);
+
+ BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
+
+ capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ capFinder.addCapabilities("pm2", depcaps); //$NON-NLS-1$
+
+ List[] expected = new List[] {
+ Arrays.asList("a"), //$NON-NLS-1$
+ Arrays.asList("a"), //$NON-NLS-1$
+ };
+
+ Command command = TestProcessor.helpParse(sql);
+ ProcessorPlan plan = TestProcessor.helpGetPlan(command, RealMetadataFactory.example1Cached(), capFinder);
+ TestOptimizer.checkAtomicQueries(new String[] {
+ "SELECT pm1.g2.e2 FROM pm1.g2",
+ "SELECT pm2.g1.e1, pm2.g1.e2 FROM pm2.g1 WHERE (pm2.g1.e1 IN (<dependent values>)) AND (pm2.g1.e2 IN (<dependent values>))",
+ "SELECT pm1.g1.e1 FROM pm1.g1"
+ }, plan);
+
+ HardcodedDataManager dataManager = new HardcodedDataManager();
+ dataManager.addData("SELECT pm1.g1.e1 FROM pm1.g1", new List<?>[] {Arrays.asList("a")});
+ dataManager.addData("SELECT pm1.g2.e2 FROM pm1.g2", new List<?>[] {Arrays.asList(1), Arrays.asList(2), Arrays.asList(3)});
+ dataManager.addData("SELECT pm2.g1.e1, pm2.g1.e2 FROM pm2.g1 WHERE (pm2.g1.e1 = 'a') AND ((pm2.g1.e2 = 1) OR (pm2.g1.e2 = 2))", new List<?>[] {Arrays.asList("a", 1)});
+ dataManager.addData("SELECT pm2.g1.e1, pm2.g1.e2 FROM pm2.g1 WHERE (pm2.g1.e1 = 'a') AND (pm2.g1.e2 = 3)", new List<?>[] {Arrays.asList("a", 3)});
+ CommandContext cc = TestProcessor.createCommandContext();
+ TestProcessor.helpProcess(plan, cc, dataManager, expected);
+ }
+
/**
* concurrentOpen will be minimum of 2 to gather the pm1 results.
*/
@@ -648,10 +686,6 @@
FakeDataManager dataManager = new FakeDataManager();
TestProcessor.sampleData1(dataManager);
- // Slightly modify metadata to set max set size to just a few rows - this
- // will allow us to test the dependent overflow case
- QueryMetadataInterface fakeMetadata = RealMetadataFactory.example1Cached();
-
// Plan query
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities depcaps = new BasicSourceCapabilities();
@@ -679,7 +713,7 @@
};
Command command = TestProcessor.helpParse(sql);
- ProcessorPlan plan = TestProcessor.helpGetPlan(command, fakeMetadata, capFinder);
+ ProcessorPlan plan = TestProcessor.helpGetPlan(command, RealMetadataFactory.example1Cached(), capFinder);
TestOptimizer.checkAtomicQueries(new String[] {
"SELECT pm1.g2.e4 FROM pm1.g2",
"SELECT pm2.g1.e1, pm2.g1.e2, pm2.g1.e4 FROM pm2.g1 WHERE (pm2.g1.e1 IN (<dependent values>)) AND (pm2.g1.e2 IN (<dependent values>)) AND (pm2.g1.e4 IN (<dependent values>))",
13 years, 2 months
teiid SVN: r3581 - in branches/7.4.x/engine/src: test/java/org/teiid/dqp/internal/process and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-25 12:43:31 -0400 (Tue, 25 Oct 2011)
New Revision: 3581
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
branches/7.4.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
Log:
TEIID-1795 fix for long running query calculation
Modified: branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-10-25 14:03:30 UTC (rev 3580)
+++ branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2011-10-25 16:43:31 UTC (rev 3581)
@@ -33,7 +33,7 @@
static final int DEFAULT_FETCH_SIZE = RequestMessage.DEFAULT_FETCH_SIZE * 10;
static final int DEFAULT_PROCESSOR_TIMESLICE = 2000;
static final int DEFAULT_MAX_RESULTSET_CACHE_ENTRIES = 1024;
- static final int DEFAULT_QUERY_THRESHOLD = 600;
+ static final int DEFAULT_QUERY_THRESHOLD = 600000;
static final String PROCESS_PLAN_QUEUE_NAME = "QueryProcessorQueue"; //$NON-NLS-1$
public static final int DEFAULT_MAX_PROCESS_WORKERS = 64;
public static final int DEFAULT_MAX_SOURCE_ROWS = -1;
@@ -44,9 +44,7 @@
private int timeSliceInMilli = DEFAULT_PROCESSOR_TIMESLICE;
private int maxRowsFetchSize = DEFAULT_FETCH_SIZE;
private int lobChunkSizeInKB = 100;
- private boolean useDataRoles = true;
- private boolean allowCreateTemporaryTablesByDefault = true;
- private int queryThresholdInSecs = DEFAULT_QUERY_THRESHOLD;
+ private long queryThresholdInMilli = DEFAULT_QUERY_THRESHOLD;
private boolean exceptionOnMaxSourceRows = true;
private int maxSourceRows = -1;
private int maxActivePlans = DEFAULT_MAX_ACTIVE_PLANS;
@@ -57,7 +55,6 @@
private boolean detectingChangeEvents = true;
private transient AuthorizationValidator authorizationValidator;
- private boolean allowFunctionCallsByDefault;
@ManagementProperty(description="Max active plans (default 20). Increase this value, and max threads, on highly concurrent systems - but ensure that the underlying pools can handle the increased load without timeouts.")
public int getMaxActivePlans() {
@@ -146,11 +143,19 @@
@ManagementProperty(description="Long running query threshold, after which a alert can be generated by tooling if configured")
public int getQueryThresholdInSecs() {
- return queryThresholdInSecs;
+ return (int)queryThresholdInMilli/1000;
}
+
+ public long getQueryThresholdInMilli() {
+ return queryThresholdInMilli;
+ }
+
+ public void setQueryThresholdInMilli(long queryThreshold) {
+ this.queryThresholdInMilli = queryThreshold;
+ }
public void setQueryThresholdInSecs(int queryThresholdInSecs) {
- this.queryThresholdInSecs = queryThresholdInSecs;
+ this.queryThresholdInMilli = queryThresholdInSecs * 1000;
}
@ManagementProperty(description="Teiid runtime version", readOnly=true)
Modified: branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-10-25 14:03:30 UTC (rev 3580)
+++ branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2011-10-25 16:43:31 UTC (rev 3581)
@@ -262,16 +262,16 @@
}
public List<RequestMetadata> getLongRunningRequests(){
- return buildRequestInfos(requests.keySet(), this.config.getQueryThresholdInSecs());
+ return buildRequestInfos(requests.keySet(), System.currentTimeMillis() - this.config.getQueryThresholdInMilli() );
}
- private List<RequestMetadata> buildRequestInfos(Collection<RequestID> ids, int longRunningQueryThreshold) {
+ private List<RequestMetadata> buildRequestInfos(Collection<RequestID> ids, long longRunningQueryThreshold) {
List<RequestMetadata> results = new ArrayList<RequestMetadata>();
for (RequestID requestID : ids) {
RequestWorkItem holder = requests.get(requestID);
- if(holder != null && !holder.isCanceled()) {
+ if(holder != null && !holder.isCanceled() && (longRunningQueryThreshold == -1 || holder.getProcessingTimestamp() < longRunningQueryThreshold)) {
RequestMetadata req = new RequestMetadata();
req.setExecutionId(holder.requestID.getExecutionID());
@@ -322,11 +322,7 @@
results.add(info);
}
- // check if only need long running queries.
- long elapsedTime = System.currentTimeMillis() - req.getStartTime();
- if (longRunningQueryThreshold == -1 || elapsedTime > longRunningQueryThreshold) {
- results.add(req);
- }
+ results.add(req);
}
}
return results;
Modified: branches/7.4.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java
===================================================================
--- branches/7.4.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-10-25 14:03:30 UTC (rev 3580)
+++ branches/7.4.x/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPCore.java 2011-10-25 16:43:31 UTC (rev 3581)
@@ -543,6 +543,17 @@
assertNotNull(message.get().getException());
}
+ @Test public void testLongRunningQuery() throws Exception {
+ RequestMessage reqMsg = exampleRequestMessage("select * FROM BQT1.SmallA");
+ execute("A", 1, reqMsg);
+ this.config.setQueryThresholdInMilli(5000);
+ assertEquals(1, this.core.getRequests().size());
+ assertEquals(0, this.core.getLongRunningRequests().size());
+ this.config.setQueryThresholdInMilli(10);
+ Thread.sleep(20);
+ assertEquals(1, this.core.getLongRunningRequests().size());
+ }
+
public void helpTestVisibilityFails(String sql) throws Exception {
RequestMessage reqMsg = exampleRequestMessage(sql);
reqMsg.setTxnAutoWrapMode(RequestMessage.TXN_WRAP_OFF);
13 years, 2 months
teiid SVN: r3580 - in branches/7.4.x/engine/src: test/java/org/teiid/query/optimizer and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-25 10:03:30 -0400 (Tue, 25 Oct 2011)
New Revision: 3580
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java
branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java
Log:
TEIID-1792 making join planning more avoident of cross joins of unknown size
Modified: branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java 2011-10-25 03:01:49 UTC (rev 3579)
+++ branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java 2011-10-25 14:03:30 UTC (rev 3580)
@@ -250,7 +250,7 @@
HashSet<PlanNode> criteria = new HashSet<PlanNode>(this.criteriaNodes);
HashSet<GroupSymbol> groups = new HashSet<GroupSymbol>(this.joinSourceNodes.size());
-
+ boolean hasUnknown = false;
for (int i = 0; i < joinOrder.length; i++) {
Integer source = (Integer)joinOrder[i];
@@ -286,6 +286,7 @@
if (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE) {
sourceCost = UNKNOWN_TUPLE_EST;
+ hasUnknown = true;
if (applicableCriteria != null && !applicableCriteria.isEmpty()) {
CompoundCriteria cc = new CompoundCriteria();
for (PlanNode planNode : applicableCriteria) {
@@ -322,6 +323,10 @@
sourceCost = depJoinCost;
}
}
+
+ if (i > 0 && (applicableCriteria == null || applicableCriteria.isEmpty()) && hasUnknown) {
+ sourceCost *= 10; //cross join penalty
+ }
cost *= sourceCost;
Modified: branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java
===================================================================
--- branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java 2011-10-25 03:01:49 UTC (rev 3579)
+++ branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestJoinOptimization.java 2011-10-25 14:03:30 UTC (rev 3580)
@@ -39,6 +39,7 @@
import org.teiid.query.metadata.TransformationMetadata;
import org.teiid.query.optimizer.TestOptimizer.ComparisonMode;
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
+import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.FakeCapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.SourceCapabilities.Capability;
import org.teiid.query.optimizer.relational.rules.JoinUtil;
@@ -1026,5 +1027,25 @@
0 // UnionAll
});
}
+
+ @Test public void testCrossJoinAvoidance() throws Exception {
+
+ CapabilitiesFinder capFinder = TestOptimizer.getGenericFinder();
+
+ QueryMetadataInterface metadata = RealMetadataFactory.exampleBQT();
+ RealMetadataFactory.setCardinality("bqt1.smallb", 1800, metadata); //$NON-NLS-1$
+ RealMetadataFactory.setCardinality("bqt1.smalla", 0, metadata); //$NON-NLS-1$
+ RealMetadataFactory.setCardinality("bqt2.smallb", 15662, metadata); //$NON-NLS-1$
+
+ TestOptimizer.helpPlan(
+ "SELECT BQT1.SmallA.IntKey FROM BQT1.SmallB, BQT1.Smalla, bqt2.smallb where bqt2.smallb.intkey = bqt1.smallb.intkey and bqt2.smallb.intkey = bqt1.smalla.intkey", //$NON-NLS-1$
+ metadata,
+ null, capFinder,
+ new String[] {"SELECT g_0.intkey AS c_0 FROM BQT1.Smalla AS g_0 ORDER BY c_0",
+ "SELECT g_0.intkey AS c_0 FROM BQT1.SmallB AS g_0 ORDER BY c_0",
+ "SELECT g_0.intkey AS c_0 FROM bqt2.smallb AS g_0 ORDER BY c_0"}, //$NON-NLS-1$ //$NON-NLS-2$
+ ComparisonMode.EXACT_COMMAND_STRING );
+
+ }
}
13 years, 2 months
teiid SVN: r3579 - branches/7.4.x/console/src/main/resources/META-INF.
by teiid-commits@lists.jboss.org
Author: van.halbert
Date: 2011-10-24 23:01:49 -0400 (Mon, 24 Oct 2011)
New Revision: 3579
Modified:
branches/7.4.x/console/src/main/resources/META-INF/rhq-plugin.xml
Log:
Updated console rhq plugin version to 2.0.1 for the SOA 5.2 release
Modified: branches/7.4.x/console/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- branches/7.4.x/console/src/main/resources/META-INF/rhq-plugin.xml 2011-10-24 20:43:57 UTC (rev 3578)
+++ branches/7.4.x/console/src/main/resources/META-INF/rhq-plugin.xml 2011-10-25 03:01:49 UTC (rev 3579)
@@ -73,7 +73,7 @@
<plugin name="TeiidPlugin" displayName="Teiid Plugin" package="org.teiid.rhq.plugin"
- version="2.0.0" description="Supports management and monitoring of JBoss Teiid"
+ version="2.0.1" description="Supports management and monitoring of JBoss Teiid"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration">
13 years, 2 months
teiid SVN: r3578 - in branches/7.4.x/engine/src: test/java/org/teiid/dqp/internal/process and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2011-10-24 16:43:57 -0400 (Mon, 24 Oct 2011)
New Revision: 3578
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
branches/7.4.x/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java
Log:
TEIID-1793 fix for proc relational permission check
Modified: branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
===================================================================
--- branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2011-10-24 17:25:36 UTC (rev 3577)
+++ branches/7.4.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2011-10-24 20:43:57 UTC (rev 3578)
@@ -284,7 +284,6 @@
Map<String, LanguageObject> nameToSymbolMap = new LinkedHashMap<String, LanguageObject>();
for (LanguageObject symbol : symbols) {
try {
- String fullName = null;
Object metadataID = null;
if(symbol instanceof ElementSymbol) {
metadataID = ((ElementSymbol)symbol).getMetadataID();
@@ -294,20 +293,18 @@
} else if(symbol instanceof GroupSymbol) {
GroupSymbol group = (GroupSymbol)symbol;
metadataID = group.getMetadataID();
- if (metadataID instanceof TempMetadataID && !group.isProcedure()) {
- if (group.isTempTable()) {
+ if (metadataID instanceof TempMetadataID) {
+ if (group.isProcedure()) {
+ Map<String, LanguageObject> procMap = new LinkedHashMap<String, LanguageObject>();
+ addToNameMap(((TempMetadataID)metadataID).getOriginalMetadataID(), symbol, procMap);
+ validateEntitlements(PermissionType.EXECUTE, auditContext, procMap);
+ } else if (group.isTempTable()) {
validateTemp(actionCode, group, auditContext);
}
continue;
}
}
- fullName = getMetadata().getFullName(metadataID);
- Object modelId = getMetadata().getModelID(metadataID);
- String modelName = getMetadata().getFullName(modelId);
- if (isSystemSchema(modelName)) {
- continue;
- }
- nameToSymbolMap.put(fullName, symbol);
+ addToNameMap(metadataID, symbol, nameToSymbolMap);
} catch(QueryMetadataException e) {
handleException(e);
} catch(TeiidComponentException e) {
@@ -317,6 +314,15 @@
validateEntitlements(actionCode, auditContext, nameToSymbolMap);
}
+
+ private void addToNameMap(Object metadataID, LanguageObject symbol, Map<String, LanguageObject> nameToSymbolMap) throws QueryMetadataException, TeiidComponentException {
+ String fullName = getMetadata().getFullName(metadataID);
+ Object modelId = getMetadata().getModelID(metadataID);
+ String modelName = getMetadata().getFullName(modelId);
+ if (!isSystemSchema(modelName)) {
+ nameToSymbolMap.put(fullName, symbol);
+ }
+ }
private boolean isSystemSchema(String modelName) {
return CoreConstants.SYSTEM_MODEL.equalsIgnoreCase(modelName) || CoreConstants.ODBC_MODEL.equalsIgnoreCase(modelName);
Modified: branches/7.4.x/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java
===================================================================
--- branches/7.4.x/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2011-10-24 17:25:36 UTC (rev 3577)
+++ branches/7.4.x/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2011-10-24 20:43:57 UTC (rev 3578)
@@ -116,7 +116,8 @@
svc.addPermission(addResource(DataPolicy.PermissionType.UPDATE, "pm1.g1.e3")); //$NON-NLS-1$
svc.addPermission(addResource(DataPolicy.PermissionType.UPDATE, "pm1.g1.e4")); //$NON-NLS-1$
-
+ svc.addPermission(addResource(PermissionType.EXECUTE, "pm1.sp1"));
+
// pm1.g2
svc.addPermission(addResource(DataPolicy.PermissionType.CREATE, "pm1.g2")); //$NON-NLS-1$
svc.addPermission(addResource(DataPolicy.PermissionType.CREATE, false, "pm1.g2.e1")); //$NON-NLS-1$
@@ -206,6 +207,12 @@
}
}
+ @Test public void testProcRelational() throws Exception {
+ helpTest("select * from sp1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
+ helpTest("select * from pm1.sp1", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
+ helpTest("select * from sp1", RealMetadataFactory.example1Cached(), new String[] {"sp1"}, RealMetadataFactory.example1VDB(), exampleAuthSvc2()); //$NON-NLS-1$
+ }
+
@Test public void testTemp() throws Exception {
//allowed by default
helpTest("create local temporary table x (y string)", RealMetadataFactory.example1Cached(), new String[] {}, RealMetadataFactory.example1VDB(), exampleAuthSvc1()); //$NON-NLS-1$
13 years, 2 months