You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by uc...@apache.org on 2014/08/08 15:24:23 UTC

[2/2] git commit: [FLINK-909] Adjust aggregators test case

[FLINK-909] Adjust aggregators test case


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

Branch: refs/heads/master
Commit: b6ae1ef3d2f95db69c91203b138baf43bd030d93
Parents: 76a48df
Author: Stephan Ewen <se...@apache.org>
Authored: Fri Aug 8 14:47:43 2014 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Fri Aug 8 14:47:43 2014 +0200

----------------------------------------------------------------------
 .../runtime/iterative/concurrent/SuperstepKickoffLatch.java     | 2 +-
 .../iterative/concurrent/SuperstepKickoffLatchBroker.java       | 1 -
 .../ConnectedComponentsWithParametrizableAggregatorITCase.java  | 5 ++++-
 3 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/b6ae1ef3/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatch.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatch.java b/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatch.java
index b53928c..91b1db0 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatch.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatch.java
@@ -29,7 +29,7 @@ public class SuperstepKickoffLatch {
 	public void triggerNextSuperstep() {
 		synchronized (monitor) {
 			if (terminated) {
-				throw new IllegalStateException("Already teriminated.");
+				throw new IllegalStateException("Already terminated.");
 			}
 			superstepNumber++;
 			monitor.notifyAll();

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/b6ae1ef3/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatchBroker.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatchBroker.java b/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatchBroker.java
index 41f6985..4439acf 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatchBroker.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatchBroker.java
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.flink.runtime.iterative.concurrent;
 
 public class SuperstepKickoffLatchBroker extends Broker<SuperstepKickoffLatch> {

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/b6ae1ef3/flink-tests/src/test/java/org/apache/flink/test/iterative/aggregators/ConnectedComponentsWithParametrizableAggregatorITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/iterative/aggregators/ConnectedComponentsWithParametrizableAggregatorITCase.java b/flink-tests/src/test/java/org/apache/flink/test/iterative/aggregators/ConnectedComponentsWithParametrizableAggregatorITCase.java
index 9382708..e1ae706 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/iterative/aggregators/ConnectedComponentsWithParametrizableAggregatorITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/iterative/aggregators/ConnectedComponentsWithParametrizableAggregatorITCase.java
@@ -96,11 +96,14 @@ public class ConnectedComponentsWithParametrizableAggregatorITCase extends JavaP
 	protected void postSubmit() throws Exception {
 		compareResultsByLinesInMemory(expectedResult, resultPath);
 		long[] aggr_values = ConnectedComponentsWithAggregatorProgram.aggr_value;
+		
+		// note that position 0 has the end result from superstep 1, retrieved at the start of iteration 2
+		// position one as superstep 2, retrieved at the start of iteration 3.
+		// the result from iteration 5 is not available, because no iteration 6 happens
 		Assert.assertEquals(3, aggr_values[0]);
 		Assert.assertEquals(4, aggr_values[1]);
 		Assert.assertEquals(5, aggr_values[2]);
 		Assert.assertEquals(6, aggr_values[3]);
-		Assert.assertEquals(6, aggr_values[4]);
 	}