You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2015/03/15 17:08:38 UTC

[2/4] flink git commit: [FLINK-1677] [gelly] Simple improvements to DegreesWithExceptionITCase.

[FLINK-1677] [gelly] Simple improvements to DegreesWithExceptionITCase.


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

Branch: refs/heads/master
Commit: 2db73aa1a322ecf5c1d7e08c8b667a113f4f6d38
Parents: b891ff5
Author: Stephan Ewen <se...@apache.org>
Authored: Sun Mar 15 16:12:01 2015 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Sun Mar 15 16:14:22 2015 +0100

----------------------------------------------------------------------
 .../apache/flink/graph/test/TestGraphUtils.java |  1 -
 .../operations/DegreesWithExceptionITCase.java  | 30 ++++++++------------
 2 files changed, 12 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/2db73aa1/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/TestGraphUtils.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/TestGraphUtils.java b/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/TestGraphUtils.java
index ad4e935..ad5094c 100644
--- a/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/TestGraphUtils.java
+++ b/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/TestGraphUtils.java
@@ -353,7 +353,6 @@ public class TestGraphUtils {
 	 */
 	public static void pipeSystemOutToNull() {
 		System.setOut(new PrintStream(new BlackholeOutputSteam()));
-		System.setErr(new PrintStream(new BlackholeOutputSteam()));
 	}
 
 	private static final class BlackholeOutputSteam extends java.io.OutputStream {

http://git-wip-us.apache.org/repos/asf/flink/blob/2db73aa1/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/operations/DegreesWithExceptionITCase.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/operations/DegreesWithExceptionITCase.java b/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/operations/DegreesWithExceptionITCase.java
index 47f2920..4ed1292 100644
--- a/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/operations/DegreesWithExceptionITCase.java
+++ b/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/operations/DegreesWithExceptionITCase.java
@@ -35,6 +35,8 @@ import static org.junit.Assert.fail;
 @SuppressWarnings("serial")
 public class DegreesWithExceptionITCase {
 
+	private static final int PARALLELISM = 4;
+
 	private static ForkableFlinkMiniCluster cluster;
 
 	@BeforeClass
@@ -45,11 +47,8 @@ public class DegreesWithExceptionITCase {
 	@BeforeClass
 	public static void setupCluster() {
 		Configuration config = new Configuration();
-		config.setInteger(ConfigConstants.LOCAL_INSTANCE_MANAGER_NUMBER_TASK_MANAGER, 2);
-		config.setInteger(ConfigConstants.TASK_MANAGER_NUM_TASK_SLOTS, 2);
-		config.setString(ConfigConstants.AKKA_WATCH_HEARTBEAT_PAUSE, "2 s");
-
-		cluster = new ForkableFlinkMiniCluster(config, false);
+		config.setInteger(ConfigConstants.TASK_MANAGER_NUM_TASK_SLOTS, PARALLELISM);
+		cluster = new ForkableFlinkMiniCluster(config, true);
 	}
 
 	@AfterClass
@@ -64,17 +63,16 @@ public class DegreesWithExceptionITCase {
 		}
 	}
 
+	/**
+	 * Test outDegrees() with an edge having a srcId that does not exist in the vertex DataSet
+	 */
 	@Test
 	public void testOutDegreesInvalidEdgeSrcId() throws Exception {
-		/*
-		* Test outDegrees() with an edge having a srcId that does not exist in the vertex DataSet
-		*/
 
 		final ExecutionEnvironment env = ExecutionEnvironment.createRemoteEnvironment(
 				"localhost", cluster.getJobManagerRPCPort());
 
-		env.setDegreeOfParallelism(4);
-		env.setNumberOfExecutionRetries(0);
+		env.setDegreeOfParallelism(PARALLELISM);
 
 		Graph<Long, Long, Long> graph = Graph.fromDataSet(TestGraphUtils.getLongLongVertexData(env),
 				TestGraphUtils.getLongLongEdgeInvalidSrcData(env), env);
@@ -97,8 +95,7 @@ public class DegreesWithExceptionITCase {
 		final ExecutionEnvironment env = ExecutionEnvironment.createRemoteEnvironment(
 				"localhost", cluster.getJobManagerRPCPort());
 
-		env.setDegreeOfParallelism(4);
-		env.setNumberOfExecutionRetries(0);
+		env.setDegreeOfParallelism(PARALLELISM);
 
 		Graph<Long, Long, Long> graph = Graph.fromDataSet(TestGraphUtils.getLongLongVertexData(env),
 				TestGraphUtils.getLongLongEdgeInvalidTrgData(env), env);
@@ -121,8 +118,7 @@ public class DegreesWithExceptionITCase {
 		final ExecutionEnvironment env = ExecutionEnvironment.createRemoteEnvironment(
 				"localhost", cluster.getJobManagerRPCPort());
 
-		env.setDegreeOfParallelism(4);
-		env.setNumberOfExecutionRetries(0);
+		env.setDegreeOfParallelism(PARALLELISM);
 
 		Graph<Long, Long, Long> graph = Graph.fromDataSet(TestGraphUtils.getLongLongVertexData(env),
 				TestGraphUtils.getLongLongEdgeInvalidTrgData(env), env);
@@ -145,8 +141,7 @@ public class DegreesWithExceptionITCase {
 		final ExecutionEnvironment env = ExecutionEnvironment.createRemoteEnvironment(
 				"localhost", cluster.getJobManagerRPCPort());
 
-		env.setDegreeOfParallelism(4);
-		env.setNumberOfExecutionRetries(0);
+		env.setDegreeOfParallelism(PARALLELISM);
 
 		Graph<Long, Long, Long> graph = Graph.fromDataSet(TestGraphUtils.getLongLongVertexData(env),
 				TestGraphUtils.getLongLongEdgeInvalidSrcData(env), env);
@@ -169,8 +164,7 @@ public class DegreesWithExceptionITCase {
 		final ExecutionEnvironment env = ExecutionEnvironment.createRemoteEnvironment(
 				"localhost", cluster.getJobManagerRPCPort());
 
-		env.setDegreeOfParallelism(4);
-		env.setNumberOfExecutionRetries(0);
+		env.setDegreeOfParallelism(PARALLELISM);
 
 		Graph<Long, Long, Long> graph = Graph.fromDataSet(TestGraphUtils.getLongLongVertexData(env),
 				TestGraphUtils.getLongLongEdgeInvalidSrcTrgData(env), env);