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

[2/2] flink git commit: [gelly] corrected community detection usage description and moved it from the library method to the example; removed unnecessary @SuppressWarnings(serial) from SSSP

[gelly] corrected community detection usage description and moved it from the library method to the example;
removed unnecessary @SuppressWarnings(serial) from SSSP


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

Branch: refs/heads/master
Commit: 9eef3c86c8b34732178d0bce441c1e6145c5ea64
Parents: 4e3ba40
Author: vasia <va...@gmail.com>
Authored: Thu Mar 26 22:53:55 2015 +0100
Committer: Vasia Kalavri <va...@apache.org>
Committed: Thu Mar 26 23:37:54 2015 +0100

----------------------------------------------------------------------
 .../example/SimpleCommunityDetectionExample.java     | 13 ++++++++++++-
 .../example/SingleSourceShortestPathsExample.java    |  1 -
 .../graph/library/SimpleCommunityDetection.java      | 15 ++-------------
 3 files changed, 14 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/9eef3c86/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/SimpleCommunityDetectionExample.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/SimpleCommunityDetectionExample.java b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/SimpleCommunityDetectionExample.java
index 488603c..fb7ed3f 100644
--- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/SimpleCommunityDetectionExample.java
+++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/SimpleCommunityDetectionExample.java
@@ -36,9 +36,21 @@ import org.apache.flink.graph.utils.Tuple3ToEdgeMap;
  * 	<li> with the edge data set given as a parameter
  * 	<li> with default data
  * </ul>
+ *
+ * The input files is a plain text file and must be formatted as follows:
+ * Edges are represented by tuples of srcVertexId, trgVertexId, weight which are
+ * separated by tabs. Edges themselves are separated by newlines.
+ * For example: <code>1\t2\t1.0\n1\t3\t2.0\n</code> defines two edges,
+ * 1-2 with weight 1.0 and 1-3 with weight 2.0.
+ *
+ * Usage <code>SimpleCommunityDetection &lt;edge path&gt; &lt;result path&gt;
+ * &lt;number of iterations&gt; &lt;delta&gt;</code><br>
+ * If no parameters are provided, the program is run with default data from
+ * {@link org.apache.flink.graph.example.utils.SimpleCommunityDetectionData}
  */
 public class SimpleCommunityDetectionExample implements ProgramDescription {
 
+	@SuppressWarnings("serial")
 	public static void main(String [] args) throws Exception {
 
 		if(!parseParameters(args)) {
@@ -112,7 +124,6 @@ public class SimpleCommunityDetectionExample implements ProgramDescription {
 		return true;
 	}
 
-	@SuppressWarnings("serial")
 	private static DataSet<Edge<Long, Double>> getEdgesDataSet(ExecutionEnvironment env) {
 
 		if(fileOutput) {

http://git-wip-us.apache.org/repos/asf/flink/blob/9eef3c86/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/SingleSourceShortestPathsExample.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/SingleSourceShortestPathsExample.java b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/SingleSourceShortestPathsExample.java
index 22883a8..768f441 100644
--- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/SingleSourceShortestPathsExample.java
+++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/example/SingleSourceShortestPathsExample.java
@@ -119,7 +119,6 @@ public class SingleSourceShortestPathsExample implements ProgramDescription {
 		return true;
 	}
 
-	@SuppressWarnings("serial")
 	private static DataSet<Edge<Long, Double>> getEdgesDataSet(ExecutionEnvironment env) {
 		if (fileOutput) {
 			return env.readCsvFile(edgesInputPath)

http://git-wip-us.apache.org/repos/asf/flink/blob/9eef3c86/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/library/SimpleCommunityDetection.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/library/SimpleCommunityDetection.java b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/library/SimpleCommunityDetection.java
index 5d3afc7..fb32781 100644
--- a/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/library/SimpleCommunityDetection.java
+++ b/flink-staging/flink-gelly/src/main/java/org/apache/flink/graph/library/SimpleCommunityDetection.java
@@ -44,19 +44,6 @@ import java.util.TreeMap;
  * is reached.
  *
  * @see <a href="http://arxiv.org/pdf/0808.2633.pdf">article explaining the algorithm in detail</a>
- *
- *<p>
- * 	The input files is a plain text file and must be formatted as follows:
- * 	<br>
- * 	Edges are represented by tuples of srcVertexId, trgVertexId which are
- * 	separated by tabs. Edges themselves are separated by newlines.
- * 	For example: <code>1	2\n1	3\n</code> defines two edges 1-2 and 1-3
- * </p>
- *
- * Usage <code>SimpleCommunityDetection &lt;edge path&gt; &lt;result path&gt;
- * &lt;number of iterations&gt; &lt;delta&gt;</code><br>
- * If no parameters are provided, the program is run with default data from
- * {@link org.apache.flink.graph.example.utils.SimpleCommunityDetectionData}
  */
 public class SimpleCommunityDetection implements GraphAlgorithm<Long, Long, Double> {
 
@@ -86,6 +73,7 @@ public class SimpleCommunityDetection implements GraphAlgorithm<Long, Long, Doub
 				.mapVertices(new RemoveScoreFromVertexValuesMapper());
 	}
 
+	@SuppressWarnings("serial")
 	public static final class VertexLabelUpdater extends VertexUpdateFunction<Long, Tuple2<Long, Double>, Tuple2<Long, Double>> {
 
 		private Double delta;
@@ -154,6 +142,7 @@ public class SimpleCommunityDetection implements GraphAlgorithm<Long, Long, Doub
 		}
 	}
 
+	@SuppressWarnings("serial")
 	public static final class LabelMessenger extends MessagingFunction<Long, Tuple2<Long, Double>,
 			Tuple2<Long, Double>, Double> {