[teiid-commits] teiid SVN: r3493 - in branches/7.1.x/engine/src/main/java/org/teiid/query: tempdata and 1 other directory.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Tue Sep 13 19:22:55 EDT 2011
Author: loleary
Date: 2011-09-13 19:22:55 -0400 (Tue, 13 Sep 2011)
New Revision: 3493
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
Log:
TEIID-1657: making view name available to the mattable request such that it can be proactively loaded at other nodes in the cluster
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-09-13 23:22:43 UTC (rev 3492)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2011-09-13 23:22:55 UTC (rev 3493)
@@ -1004,6 +1004,7 @@
id = store.addTempGroup(matTableName, ResolverUtil.resolveElementsInGroup(table, metadata), false, true);
id.setQueryNode(metadata.getVirtualPlan(table.getMetadataID()));
id.setCardinality(metadata.getCardinality(table.getMetadataID()));
+ id.setOriginalMetadataID(table.getMetadataID());
Object pk = metadata.getPrimaryKey(table.getMetadataID());
if (pk != null) {
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2011-09-13 23:22:43 UTC (rev 3492)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2011-09-13 23:22:55 UTC (rev 3493)
@@ -420,8 +420,13 @@
if (!group.isTempGroupSymbol()) {
return null;
}
+ String viewName = null;
final String tableName = group.getNonCorrelationName().toUpperCase();
boolean remapColumns = !tableName.equalsIgnoreCase(group.getName());
+ TempMetadataID groupID = (TempMetadataID)group.getMetadataID();
+ if (groupID.getOriginalMetadataID() != null) {
+ viewName = context.getMetadata().getFullName(groupID.getOriginalMetadataID());
+ }
TempTable table = null;
if (group.isGlobalTable()) {
final TempTableStore globalStore = context.getGlobalTableStore();
@@ -445,9 +450,9 @@
if (load) {
if (!info.isValid()) {
//blocking load
- loadGlobalTable(context, group, tableName, null, globalStore, info, loadTime, true);
+ loadGlobalTable(context, group, tableName, viewName, globalStore, info, loadTime, true);
} else {
- loadAsynch(context, group, tableName, null, globalStore, info, loadTime);
+ loadAsynch(context, group, tableName, viewName, globalStore, info, loadTime);
}
}
table = globalStore.getOrCreateTempTable(tableName, query, bufferManager, false);
@@ -611,8 +616,8 @@
matTableEntry.lastUpdate = System.currentTimeMillis();
MatTableEntry entry = refreshJob.put(key, matTableEntry, null);
if (entry == null) {
- // in the case of refreshjob, cacheCreate are not being notified correctly due to nature of how Teiid uses the cache
- // so, in order to get a cacheModified event insert again.
+ // Due to nature how the JBoss Cache being used as flat keys with nodes, node creation event is
+ // hard to capture, this is way to insert and later do update to capture the node modification.
refreshJob.put(key, matTableEntry, null);
}
}
More information about the teiid-commits
mailing list