flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject [7/9] flink git commit: [FLINK-1514] [gelly] suppressed warnings in several places; adjusted tests
Date Sun, 26 Apr 2015 12:01:10 GMT
[FLINK-1514] [gelly] suppressed warnings in several places; adjusted tests


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

Branch: refs/heads/master
Commit: 4e3165eec508c320f8c4f1fef7afe78697a64fad
Parents: 921414d
Author: vasia <vasia@apache.org>
Authored: Tue Apr 21 01:31:50 2015 +0200
Committer: vasia <vasia@apache.org>
Committed: Sat Apr 25 20:00:59 2015 +0200

----------------------------------------------------------------------
 .../GSASingleSourceShortestPathsExample.java    |  2 +-
 .../apache/flink/graph/gsa/ApplyFunction.java   |  2 ++
 .../apache/flink/graph/gsa/GatherFunction.java  |  2 ++
 .../graph/gsa/GatherSumApplyIteration.java      |  3 +++
 .../org/apache/flink/graph/gsa/Neighbor.java    |  1 +
 .../org/apache/flink/graph/gsa/SumFunction.java |  2 ++
 .../flink/graph/test/GatherSumApplyITCase.java  | 20 ++++++++++----------
 7 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/4e3165ee/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/GSASingleSourceShortestPathsExample.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/GSASingleSourceShortestPathsExample.java
b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/GSASingleSourceShortestPathsExample.java
index 488c66c..b4f1f34 100755
--- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/GSASingleSourceShortestPathsExample.java
+++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/GSASingleSourceShortestPathsExample.java
@@ -85,7 +85,7 @@ public class GSASingleSourceShortestPathsExample implements ProgramDescription
{
 				return 0.0;
 			}
 			else {
-				return Double.MAX_VALUE;
+				return Double.POSITIVE_INFINITY;
 			}
 		}
 	}

http://git-wip-us.apache.org/repos/asf/flink/blob/4e3165ee/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/ApplyFunction.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/ApplyFunction.java
b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/ApplyFunction.java
index d863da1..ab64c92 100755
--- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/ApplyFunction.java
+++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/ApplyFunction.java
@@ -23,6 +23,7 @@ import org.apache.flink.util.Collector;
 
 import java.io.Serializable;
 
+@SuppressWarnings("serial")
 public abstract class ApplyFunction<VV extends Serializable, EV extends Serializable,
M> implements Serializable {
 
 	public abstract void apply(M message, VV vertexValue);
@@ -54,6 +55,7 @@ public abstract class ApplyFunction<VV extends Serializable, EV extends
Serializ
 	//  Internal methods
 	// --------------------------------------------------------------------------------------------
 
+	@SuppressWarnings("unused")
 	private IterationRuntimeContext runtimeContext;
 
 	private Collector<VV> out;

http://git-wip-us.apache.org/repos/asf/flink/blob/4e3165ee/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherFunction.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherFunction.java
b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherFunction.java
index 0d110d5..0b0caf9 100755
--- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherFunction.java
+++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherFunction.java
@@ -22,6 +22,7 @@ import org.apache.flink.api.common.functions.IterationRuntimeContext;
 
 import java.io.Serializable;
 
+@SuppressWarnings("serial")
 public abstract class GatherFunction<VV extends Serializable, EV extends Serializable,
M> implements Serializable {
 
 	public abstract M gather(Neighbor<VV, EV> neighbor);
@@ -44,6 +45,7 @@ public abstract class GatherFunction<VV extends Serializable, EV extends
Seriali
 	//  Internal methods
 	// --------------------------------------------------------------------------------------------
 
+	@SuppressWarnings("unused")
 	private IterationRuntimeContext runtimeContext;
 
 	public void init(IterationRuntimeContext iterationRuntimeContext) {

http://git-wip-us.apache.org/repos/asf/flink/blob/4e3165ee/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherSumApplyIteration.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherSumApplyIteration.java
b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherSumApplyIteration.java
index 67ae094..53fa7a4 100755
--- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherSumApplyIteration.java
+++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GatherSumApplyIteration.java
@@ -165,6 +165,7 @@ public class GatherSumApplyIteration<K extends Comparable<K>
& Serializable,
 	//  Wrapping UDFs
 	// --------------------------------------------------------------------------------------------
 
+	@SuppressWarnings("serial")
 	private static final class GatherUdf<K extends Comparable<K> & Serializable,
VV extends Serializable,
 			EV extends Serializable, M> extends RichMapFunction<Tuple2<Vertex<K, VV>,
Edge<K, EV>>,
 			Tuple2<K, M>> implements ResultTypeQueryable<Tuple2<K, M>> {
@@ -206,6 +207,7 @@ public class GatherSumApplyIteration<K extends Comparable<K>
& Serializable,
 		}
 	}
 
+	@SuppressWarnings("serial")
 	private static final class SumUdf<K extends Comparable<K> & Serializable, VV
extends Serializable,
 			EV extends Serializable, M> extends RichReduceFunction<Tuple2<K, M>>
 			implements ResultTypeQueryable<Tuple2<K, M>>{
@@ -244,6 +246,7 @@ public class GatherSumApplyIteration<K extends Comparable<K>
& Serializable,
 		}
 	}
 
+	@SuppressWarnings("serial")
 	private static final class ApplyUdf<K extends Comparable<K> & Serializable,
 			VV extends Serializable, EV extends Serializable, M> extends RichFlatJoinFunction<Tuple2<K,
M>,
 			Vertex<K, VV>, Vertex<K, VV>> implements ResultTypeQueryable<Vertex<K,
VV>> {

http://git-wip-us.apache.org/repos/asf/flink/blob/4e3165ee/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/Neighbor.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/Neighbor.java
b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/Neighbor.java
index 2260022..39f18d5 100755
--- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/Neighbor.java
+++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/Neighbor.java
@@ -28,6 +28,7 @@ import java.io.Serializable;
  * @param <VV> the vertex value type
  * @param <EV> the edge value type
  */
+@SuppressWarnings("serial")
 public class Neighbor<VV extends Serializable, EV extends Serializable>
 		extends Tuple2<VV, EV> {
 

http://git-wip-us.apache.org/repos/asf/flink/blob/4e3165ee/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/SumFunction.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/SumFunction.java
b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/SumFunction.java
index b616194..6ed85c4 100755
--- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/SumFunction.java
+++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/gsa/SumFunction.java
@@ -22,6 +22,7 @@ import org.apache.flink.api.common.functions.IterationRuntimeContext;
 
 import java.io.Serializable;
 
+@SuppressWarnings("serial")
 public abstract class SumFunction<VV extends Serializable, EV extends Serializable, M>
implements Serializable {
 
 	public abstract M sum(M arg0, M arg1);
@@ -44,6 +45,7 @@ public abstract class SumFunction<VV extends Serializable, EV extends
Serializab
 	//  Internal methods
 	// --------------------------------------------------------------------------------------------
 
+	@SuppressWarnings("unused")
 	private IterationRuntimeContext runtimeContext;
 
 	public void init(IterationRuntimeContext iterationRuntimeContext) {

http://git-wip-us.apache.org/repos/asf/flink/blob/4e3165ee/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/GatherSumApplyITCase.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/GatherSumApplyITCase.java
b/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/GatherSumApplyITCase.java
index 43377d6..23ebfa5 100755
--- a/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/GatherSumApplyITCase.java
+++ b/flink-staging/flink-gelly/src/test/java/org/apache/flink/graph/test/GatherSumApplyITCase.java
@@ -68,7 +68,7 @@ public class GatherSumApplyITCase extends MultipleProgramsTestBase {
 	// --------------------------------------------------------------------------------------------
 
 	@Test
-	public void testGreedyGraphColoring() throws Exception {
+	public void testConnectedComponents() throws Exception {
 		GSAConnectedComponentsExample.main(new String[]{edgesPath, resultPath, "16"});
 		expectedResult = "1 1\n" +
 				"2 1\n" +
@@ -86,7 +86,7 @@ public class GatherSumApplyITCase extends MultipleProgramsTestBase {
 
 	@Test
 	public void testSingleSourceShortestPath() throws Exception {
-		GSASingleSourceShortestPathsExample.main(new String[]{edgesPath, resultPath, "1", "16"});
+		GSASingleSourceShortestPathsExample.main(new String[]{"1", edgesPath, resultPath, "16"});
 		expectedResult = "1 0.0\n" +
 				"2 12.0\n" +
 				"3 13.0\n" +
@@ -101,12 +101,12 @@ public class GatherSumApplyITCase extends MultipleProgramsTestBase {
 	//  Sample data
 	// --------------------------------------------------------------------------------------------
 
-	private static final String EDGES = "1 2 12.0\n" +
-			"1 3 13.0\n" +
-			"2 3 23.0\n" +
-			"3 4 34.0\n" +
-			"3 5 35.0\n" +
-			"4 5 45.0\n" +
-			"5 1 51.0\n" +
-			"6 7 67.0\n";
+	private static final String EDGES = "1	2	12.0\n" +
+			"1	3	13.0\n" +
+			"2	3	23.0\n" +
+			"3	4	34.0\n" +
+			"3	5	35.0\n" +
+			"4	5	45.0\n" +
+			"5	1	51.0\n" +
+			"6	7	67.0\n";
 }


Mime
View raw message