[teiid-commits] teiid SVN: r1243 - in trunk: common-internal/src/main/java/com/metamatrix/platform/security/api and 3 other directories.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Thu Aug 13 18:41:24 EDT 2009
Author: shawkins
Date: 2009-08-13 18:41:24 -0400 (Thu, 13 Aug 2009)
New Revision: 1243
Modified:
trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java
trunk/common-internal/src/main/java/com/metamatrix/platform/security/api/AuthorizationPolicyFactory.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xquery/XQueryPlan.java
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBufferService.java
Log:
TEIID-767 removing extra tuplesource creation calls
Modified: trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java 2009-08-13 19:08:38 UTC (rev 1242)
+++ trunk/client/src/main/java/com/metamatrix/dqp/embedded/DQPEmbeddedProperties.java 2009-08-13 22:41:24 UTC (rev 1243)
@@ -68,7 +68,7 @@
/**
* Determines amount of memory to use in-memory before buffering to
* disk. This property is not used if DQP_BUFFER_USEDISK = true. The
- * value is in megabytes. Default value is 32.
+ * value is in megabytes. Default value is 64.
*/
public static final String DQP_BUFFER_MEMORY = BUFFER_PREFIX + ".memory"; //$NON-NLS-1$
Modified: trunk/common-internal/src/main/java/com/metamatrix/platform/security/api/AuthorizationPolicyFactory.java
===================================================================
--- trunk/common-internal/src/main/java/com/metamatrix/platform/security/api/AuthorizationPolicyFactory.java 2009-08-13 19:08:38 UTC (rev 1242)
+++ trunk/common-internal/src/main/java/com/metamatrix/platform/security/api/AuthorizationPolicyFactory.java 2009-08-13 22:41:24 UTC (rev 1243)
@@ -49,7 +49,6 @@
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.util.LogConstants;
-import com.metamatrix.platform.security.util.RolePermissionFactory;
/**
* The class build the Policies from the xml file or converts the policies to xml file for importing and exporting of the policy
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java 2009-08-13 19:08:38 UTC (rev 1242)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLPlan.java 2009-08-13 22:41:24 UTC (rev 1243)
@@ -66,7 +66,6 @@
import com.metamatrix.common.buffer.BufferManager;
import com.metamatrix.common.buffer.TupleBatch;
import com.metamatrix.common.buffer.TupleSourceID;
-import com.metamatrix.common.buffer.TupleSourceNotFoundException;
import com.metamatrix.common.buffer.BufferManager.TupleSourceStatus;
import com.metamatrix.common.lob.LobChunk;
import com.metamatrix.common.log.LogManager;
@@ -107,11 +106,6 @@
private int nextBatchCount = 1;
- // this is tuple source id for the main batch of results, where multiple
- // xml documents are stored. This is different from the individual tuple source
- // id that each XML document is stored. This would be parent tuple source.
- TupleSourceID resultsTupleSourceId = null;
-
// is document in progress currently?
boolean docInProgress = false;
TupleSourceID docInProgressTupleSourceId = null;
@@ -175,9 +169,6 @@
}
public void open() throws MetaMatrixComponentException {
- if (this.resultsTupleSourceId == null) {
- this.resultsTupleSourceId = XMLUtil.createXMLTupleSource(bufferMgr, getContext().getConnectionID());
- }
}
/**
@@ -194,7 +185,6 @@
if (rows == null){
TupleBatch batch = new TupleBatch(nextBatchCount++, Collections.EMPTY_LIST);
batch.setTerminationFlag(true);
- addBatchToBufferManager(batch);
return batch;
}
@@ -205,23 +195,10 @@
TupleBatch batch = new TupleBatch(nextBatchCount++, listOfRows);
// when true; multiple doc return fails.
batch.setTerminationFlag(false);
- addBatchToBufferManager(batch);
return batch;
}
}
-
- void addBatchToBufferManager(TupleBatch batch) throws MetaMatrixComponentException {
- try {
- this.bufferMgr.addTupleBatch(this.resultsTupleSourceId, batch);
- if (batch.getTerminationFlag()) {
- this.bufferMgr.setStatus(this.resultsTupleSourceId, TupleSourceStatus.FULL);
- }
- } catch (TupleSourceNotFoundException e) {
- throw new MetaMatrixComponentException(e);
- }
- }
-
/**
* <p>Process the XML, using the stack of Programs supplied by the
* ProcessorEnvironment. With each pass through the loop, the
@@ -614,14 +591,6 @@
* @see com.metamatrix.query.processor.ProcessorPlan#close()
*/
public void close() throws MetaMatrixComponentException {
- if (this.resultsTupleSourceId != null) {
- try {
- this.bufferMgr.removeTupleSource(this.resultsTupleSourceId);
- } catch (TupleSourceNotFoundException e) {
- // ignore and go on, may be removed already.
- }
- this.resultsTupleSourceId = null;
- }
}
public String toString() {
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xquery/XQueryPlan.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xquery/XQueryPlan.java 2009-08-13 19:08:38 UTC (rev 1242)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xquery/XQueryPlan.java 2009-08-13 22:41:24 UTC (rev 1243)
@@ -38,7 +38,6 @@
import com.metamatrix.common.buffer.TupleBatch;
import com.metamatrix.common.buffer.TupleSourceID;
import com.metamatrix.common.buffer.TupleSourceNotFoundException;
-import com.metamatrix.common.buffer.BufferManager.TupleSourceStatus;
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.common.types.Streamable;
import com.metamatrix.common.types.XMLType;
@@ -64,7 +63,6 @@
private ProcessorDataManager dataManager;
private int chunkSize = Streamable.STREAMING_BATCH_SIZE_IN_BYTES;
- private TupleSourceID resultsTupleSourceId;
/**
* Constructor
@@ -113,10 +111,6 @@
* @see com.metamatrix.query.processor.ProcessorPlan#open()
*/
public void open() throws MetaMatrixComponentException {
- // no plans to open, processing is done in Xquery engine
- if (this.resultsTupleSourceId == null) {
- this.resultsTupleSourceId = XMLUtil.createXMLTupleSource(bufferMgr, getContext().getConnectionID());
- }
}
/**
@@ -175,10 +169,6 @@
rows.add(row);
TupleBatch batch = new TupleBatch(1, rows);
batch.setTerminationFlag(true);
-
- // add the top to buffer and return the batch.
- this.bufferMgr.addTupleBatch(this.resultsTupleSourceId, batch);
- this.bufferMgr.setStatus(this.resultsTupleSourceId, TupleSourceStatus.FULL);
return batch;
} catch (TupleSourceNotFoundException e) {
throw new MetaMatrixComponentException(e);
@@ -190,14 +180,6 @@
* @see com.metamatrix.query.processor.ProcessorPlan#close()
*/
public void close() throws MetaMatrixComponentException {
- if (this.resultsTupleSourceId != null) {
- try {
- this.bufferMgr.removeTupleSource(this.resultsTupleSourceId);
- } catch (TupleSourceNotFoundException e) {
- // ignore and go on, may be removed already.
- }
- this.resultsTupleSourceId = null;
- }
}
/**
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBufferService.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBufferService.java 2009-08-13 19:08:38 UTC (rev 1242)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBufferService.java 2009-08-13 22:41:24 UTC (rev 1243)
@@ -51,7 +51,7 @@
public class EmbeddedBufferService extends EmbeddedBaseDQPService implements BufferService {
// Constants
- private static final String DEFAULT_MANAGEMENT_INTERVAL = "0"; //$NON-NLS-1$
+ private static final String DEFAULT_MANAGEMENT_INTERVAL = "500"; //$NON-NLS-1$
private static final String DEFAULT_LOG_STATS_INTERVAL = DEFAULT_MANAGEMENT_INTERVAL;
private static final String DEFAULT_SESSION_USE_PERCENTAGE = "100"; //$NON-NLS-1$
private static final String DEFAULT_MAX_OPEN_FILES = "10"; //$NON-NLS-1$
More information about the teiid-commits
mailing list