Author: shawkins
Date: 2010-05-03 17:30:20 -0400 (Mon, 03 May 2010)
New Revision: 2095
Modified:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
trunk/engine/src/test/java/com/metamatrix/common/buffer/impl/TestFileStorageManager.java
Log:
fixes for windows build issues
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
---
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-05-03
20:24:22 UTC (rev 2094)
+++
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-05-03
21:30:20 UTC (rev 2095)
@@ -250,15 +250,6 @@
this.processor.getContext().setTimeSliceEnd(System.currentTimeMillis() +
this.processorTimeslice);
sendResultsIfNeeded(null);
collector.collectTuples();
- doneProducingBatches = this.resultsBuffer.isFinal();
- if (doneProducingBatches && cid != null) {
- boolean sessionScope = this.processor.getContext().isSessionFunctionEvaluated();
- CachedResults cr = new CachedResults();
- cr.setCommand(originalCommand);
- cr.setAnalysisRecord(analysisRecord);
- cr.setResults(this.resultsBuffer);
- dqpCore.getRsCache().put(cid, sessionScope, cr);
- }
}
if (doneProducingBatches) {
if (this.transactionState == TransactionState.ACTIVE) {
@@ -390,6 +381,17 @@
* Send results if they have been requested. This should only be called from the
processing thread.
*/
protected boolean sendResultsIfNeeded(TupleBatch batch) throws
MetaMatrixComponentException {
+ if (batch != null) {
+ doneProducingBatches = batch.getTerminationFlag();
+ if (doneProducingBatches && cid != null) {
+ boolean sessionScope = this.processor.getContext().isSessionFunctionEvaluated();
+ CachedResults cr = new CachedResults();
+ cr.setCommand(originalCommand);
+ cr.setAnalysisRecord(analysisRecord);
+ cr.setResults(this.resultsBuffer);
+ dqpCore.getRsCache().put(cid, sessionScope, cr);
+ }
+ }
ResultsMessage response = null;
ResultsReceiver<ResultsMessage> receiver = null;
boolean result = true;
Modified:
trunk/engine/src/test/java/com/metamatrix/common/buffer/impl/TestFileStorageManager.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/common/buffer/impl/TestFileStorageManager.java 2010-05-03
20:24:22 UTC (rev 2094)
+++
trunk/engine/src/test/java/com/metamatrix/common/buffer/impl/TestFileStorageManager.java 2010-05-03
21:30:20 UTC (rev 2095)
@@ -54,7 +54,7 @@
@Test public void testAddGetBatch1() throws Exception {
StorageManager sm = getStorageManager(null, null, null);
- String tsID = "local1:0"; //$NON-NLS-1$
+ String tsID = "0"; //$NON-NLS-1$
// Add one batch
FileStore store = sm.createFileStore(tsID);
writeBytes(store);
@@ -64,7 +64,7 @@
@Test public void testCreatesSpillFiles() throws Exception {
FileStorageManager sm = getStorageManager(1024, null, null); // 1KB
- String tsID = "local1:0"; //$NON-NLS-1$
+ String tsID = "0"; //$NON-NLS-1$
// Add one batch
FileStore store = sm.createFileStore(tsID);
writeBytes(store);
Show replies by date