flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [2/2] flink git commit: [hotfix] [gelly] Add mutators to Result interfaces
Date Thu, 13 Apr 2017 18:06:27 GMT
[hotfix] [gelly] Add mutators to Result interfaces

Add mutators matching the existing accessors for vertex ID fields.


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

Branch: refs/heads/master
Commit: 43d3046bbdc155af36bcbb5663eabcb4e10b20c2
Parents: 603c120
Author: Greg Hogan <code@greghogan.com>
Authored: Thu Apr 13 11:15:11 2017 -0400
Committer: Greg Hogan <code@greghogan.com>
Committed: Thu Apr 13 13:11:43 2017 -0400

----------------------------------------------------------------------
 .../flink/graph/asm/result/BinaryResult.java    | 14 +++++++++++++
 .../flink/graph/asm/result/TertiaryResult.java  | 21 ++++++++++++++++++++
 .../flink/graph/asm/result/UnaryResult.java     |  7 +++++++
 .../directed/LocalClusteringCoefficient.java    |  5 +++++
 .../clustering/directed/TriangleListing.java    | 15 ++++++++++++++
 .../undirected/LocalClusteringCoefficient.java  |  5 +++++
 .../clustering/undirected/TriangleListing.java  | 15 ++++++++++++++
 .../flink/graph/library/link_analysis/HITS.java |  5 +++++
 .../graph/library/link_analysis/PageRank.java   |  6 ++++++
 .../graph/library/similarity/AdamicAdar.java    | 10 ++++++++++
 .../graph/library/similarity/JaccardIndex.java  | 10 ++++++++++
 11 files changed, 113 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/BinaryResult.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/BinaryResult.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/BinaryResult.java
index 06a3d24..b54f00c 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/BinaryResult.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/BinaryResult.java
@@ -33,9 +33,23 @@ public interface BinaryResult<T> {
 	T getVertexId0();
 
 	/**
+	 * Set the first vertex ID.
+	 *
+	 * @param value new vertex ID
+	 */
+	void setVertexId0(T value);
+
+	/**
 	 * Get the second vertex ID.
 	 *
 	 * @return second vertex ID
 	 */
 	T getVertexId1();
+
+	/**
+	 * Set the second vertex ID.
+	 *
+	 * @param value new vertex ID
+	 */
+	void setVertexId1(T value);
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/TertiaryResult.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/TertiaryResult.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/TertiaryResult.java
index c41c9af..246b8cb 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/TertiaryResult.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/TertiaryResult.java
@@ -33,6 +33,13 @@ public interface TertiaryResult<T> {
 	T getVertexId0();
 
 	/**
+	 * Set the first vertex ID.
+	 *
+	 * @param value new vertex ID
+	 */
+	void setVertexId0(T value);
+
+	/**
 	 * Get the second vertex ID.
 	 *
 	 * @return second vertex ID
@@ -40,9 +47,23 @@ public interface TertiaryResult<T> {
 	T getVertexId1();
 
 	/**
+	 * Set the second vertex ID.
+	 *
+	 * @param value new vertex ID
+	 */
+	void setVertexId1(T value);
+
+	/**
 	 * Get the third vertex ID.
 	 *
 	 * @return third vertex ID
 	 */
 	T getVertexId2();
+
+	/**
+	 * Set the third vertex ID.
+	 *
+	 * @param value new vertex ID
+	 */
+	void setVertexId2(T value);
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/UnaryResult.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/UnaryResult.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/UnaryResult.java
index 8fd6889..04a2d30 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/UnaryResult.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/result/UnaryResult.java
@@ -31,4 +31,11 @@ public interface UnaryResult<T> {
 	 * @return first vertex ID
 	 */
 	T getVertexId0();
+
+	/**
+	 * Set the first vertex ID.
+	 *
+	 * @param value new vertex ID
+	 */
+	void setVertexId0(T value);
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/LocalClusteringCoefficient.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/LocalClusteringCoefficient.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/LocalClusteringCoefficient.java
index a973a2d..92b14e3 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/LocalClusteringCoefficient.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/LocalClusteringCoefficient.java
@@ -264,6 +264,11 @@ extends GraphAlgorithmWrappingDataSet<K, VV, EV, Result<K>>
{
 			return f0;
 		}
 
+		@Override
+		public void setVertexId0(T value) {
+			f0 = value;
+		}
+
 		/**
 		 * Get the vertex degree.
 		 *

http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/TriangleListing.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/TriangleListing.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/TriangleListing.java
index 6fe753a..582c4b5 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/TriangleListing.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/directed/TriangleListing.java
@@ -429,15 +429,30 @@ extends GraphAlgorithmWrappingDataSet<K, VV, EV, Result<K>>
{
 		}
 
 		@Override
+		public void setVertexId0(T value) {
+			f0 = value;
+		}
+
+		@Override
 		public T getVertexId1() {
 			return f1;
 		}
 
 		@Override
+		public void setVertexId1(T value) {
+			f1 = value;
+		}
+
+		@Override
 		public T getVertexId2() {
 			return f2;
 		}
 
+		@Override
+		public void setVertexId2(T value) {
+			f2 = value;
+		}
+
 		/**
 		 * Get the bitmask indicating the presence of the six potential
 		 * connecting edges.

http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/LocalClusteringCoefficient.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/LocalClusteringCoefficient.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/LocalClusteringCoefficient.java
index eda5c1c..10f7aba 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/LocalClusteringCoefficient.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/LocalClusteringCoefficient.java
@@ -254,6 +254,11 @@ extends GraphAlgorithmWrappingDataSet<K, VV, EV, Result<K>>
{
 			return f0;
 		}
 
+		@Override
+		public void setVertexId0(T value) {
+			f0 = value;
+		}
+
 		/**
 		 * Get the vertex degree.
 		 *

http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/TriangleListing.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/TriangleListing.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/TriangleListing.java
index e72c4cd..ee8dbaf 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/TriangleListing.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/clustering/undirected/TriangleListing.java
@@ -348,15 +348,30 @@ extends GraphAlgorithmWrappingDataSet<K, VV, EV, Result<K>>
{
 		}
 
 		@Override
+		public void setVertexId0(T value) {
+			f0 = value;
+		}
+
+		@Override
 		public T getVertexId1() {
 			return f1;
 		}
 
 		@Override
+		public void setVertexId1(T value) {
+			f1 = value;
+		}
+
+		@Override
 		public T getVertexId2() {
 			return f2;
 		}
 
+		@Override
+		public void setVertexId2(T value) {
+			f2 = value;
+		}
+
 		/**
 		 * Format values into a human-readable string.
 		 *

http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/link_analysis/HITS.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/link_analysis/HITS.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/link_analysis/HITS.java
index 216cf50..4857add 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/link_analysis/HITS.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/link_analysis/HITS.java
@@ -543,6 +543,11 @@ extends GraphAlgorithmWrappingDataSet<K, VV, EV, Result<K>>
{
 			return f0;
 		}
 
+		@Override
+		public void setVertexId0(T value) {
+			f0 = value;
+		}
+
 		/**
 		 * Get the hub score. Good hubs link to good authorities.
 		 *

http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/link_analysis/PageRank.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/link_analysis/PageRank.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/link_analysis/PageRank.java
index 1dfa3ee..747735e 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/link_analysis/PageRank.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/link_analysis/PageRank.java
@@ -508,10 +508,16 @@ extends GraphAlgorithmWrappingDataSet<K, VV, EV, Result<K>>
{
 
 		private Murmur3_32 hasher = new Murmur3_32(HASH_SEED);
 
+		@Override
 		public T getVertexId0() {
 			return f0;
 		}
 
+		@Override
+		public void setVertexId0(T value) {
+			f0 = value;
+		}
+
 		/**
 		 * Get the PageRank score.
 		 *

http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java
index 6aaf9f2..7df3235 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/AdamicAdar.java
@@ -466,10 +466,20 @@ extends GraphAlgorithmWrappingDataSet<K, VV, EV, Result<K>>
{
 		}
 
 		@Override
+		public void setVertexId0(T value) {
+			f0 = value;
+		}
+
+		@Override
 		public T getVertexId1() {
 			return f1;
 		}
 
+		@Override
+		public void setVertexId1(T value) {
+			f1 = value;
+		}
+
 		/**
 		 * Get the Adamic-Adar score, equal to the sum over common neighbors of
 		 * the inverse logarithm of degree

http://git-wip-us.apache.org/repos/asf/flink/blob/43d3046b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java
b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java
index 0c80e6d..2f4516a 100644
--- a/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java
+++ b/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/similarity/JaccardIndex.java
@@ -472,10 +472,20 @@ extends GraphAlgorithmWrappingDataSet<K, VV, EV, Result<K>>
{
 		}
 
 		@Override
+		public void setVertexId0(T value) {
+			f0 = value;
+		}
+
+		@Override
 		public T getVertexId1() {
 			return f1;
 		}
 
+		@Override
+		public void setVertexId1(T value) {
+			f1 = value;
+		}
+
 		/**
 		 * Get the shared neighbor count.
 		 *


Mime
View raw message