flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhue...@apache.org
Subject [8/9] flink git commit: [FLINK-2659] [runtime] Fix object reuse in UnionWithTempOperator
Date Thu, 17 Sep 2015 11:24:11 GMT
[FLINK-2659] [runtime] Fix object reuse in UnionWithTempOperator

This closes #1130


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/c269158c
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/c269158c
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/c269158c

Branch: refs/heads/master
Commit: c269158cc4ddb1faf79f75a2bf04aa5f9e1865bf
Parents: 988a04e
Author: Greg Hogan <code@greghogan.com>
Authored: Mon Sep 14 11:29:49 2015 -0400
Committer: Fabian Hueske <fhueske@apache.org>
Committed: Thu Sep 17 11:19:34 2015 +0200

----------------------------------------------------------------------
 .../apache/flink/runtime/operators/UnionWithTempOperator.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/c269158c/flink-runtime/src/main/java/org/apache/flink/runtime/operators/UnionWithTempOperator.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/UnionWithTempOperator.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/UnionWithTempOperator.java
index d8437a9..098686c 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/operators/UnionWithTempOperator.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/operators/UnionWithTempOperator.java
@@ -60,15 +60,16 @@ public class UnionWithTempOperator<T> implements PactDriver<Function,
T> {
 	public void run() throws Exception {
 		
 		final Collector<T> output = this.taskContext.getOutputCollector();
-		T record = this.taskContext.<T>getInputSerializer(STREAMED_INPUT).getSerializer().createInstance();
+		T reuse = this.taskContext.<T>getInputSerializer(STREAMED_INPUT).getSerializer().createInstance();
+		T record;
 		
 		final MutableObjectIterator<T> input = this.taskContext.getInput(STREAMED_INPUT);
-		while (this.running && ((record = input.next(record)) != null)) {
+		while (this.running && ((record = input.next(reuse)) != null)) {
 			output.collect(record);
 		}
 		
 		final MutableObjectIterator<T> cache = this.taskContext.getInput(CACHED_INPUT);
-		while (this.running && ((record = cache.next(record)) != null)) {
+		while (this.running && ((record = cache.next(reuse)) != null)) {
 			output.collect(record);
 		}
 	}


Mime
View raw message