flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmetz...@apache.org
Subject flink git commit: [examples] Add toString() method to accumulator
Date Wed, 27 May 2015 13:18:25 GMT
Repository: flink
Updated Branches:
  refs/heads/master d1d7044ce -> 63edeca85


[examples] Add toString() method to accumulator


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

Branch: refs/heads/master
Commit: 63edeca85b03b39b7c9535df446dadbe564ed1a6
Parents: d1d7044
Author: Robert Metzger <rmetzger@apache.org>
Authored: Wed May 27 11:24:23 2015 +0200
Committer: Robert Metzger <rmetzger@apache.org>
Committed: Wed May 27 15:18:07 2015 +0200

----------------------------------------------------------------------
 .../examples/java/relational/EmptyFieldsCountAccumulator.java  | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/63edeca8/flink-examples/flink-java-examples/src/main/java/org/apache/flink/examples/java/relational/EmptyFieldsCountAccumulator.java
----------------------------------------------------------------------
diff --git a/flink-examples/flink-java-examples/src/main/java/org/apache/flink/examples/java/relational/EmptyFieldsCountAccumulator.java
b/flink-examples/flink-java-examples/src/main/java/org/apache/flink/examples/java/relational/EmptyFieldsCountAccumulator.java
index 558ee23..7fd5799 100644
--- a/flink-examples/flink-java-examples/src/main/java/org/apache/flink/examples/java/relational/EmptyFieldsCountAccumulator.java
+++ b/flink-examples/flink-java-examples/src/main/java/org/apache/flink/examples/java/relational/EmptyFieldsCountAccumulator.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.flink.api.common.JobExecutionResult;
 import org.apache.flink.api.common.accumulators.Accumulator;
 import org.apache.flink.api.java.DataSet;
@@ -245,5 +246,10 @@ public class EmptyFieldsCountAccumulator {
 		public Accumulator<Integer, ArrayList<Integer>> clone() {
 			return new VectorAccumulator(new ArrayList<Integer>(resultVector));
 		}
+
+		@Override
+		public String toString() {
+			return StringUtils.join(resultVector, ',');
+		}
 	}
 }


Mime
View raw message