beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [5/6] incubator-beam git commit: Fix NoOpAggregatorFactory
Date Fri, 16 Dec 2016 21:18:47 GMT
Fix NoOpAggregatorFactory


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/8e0e8199
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/8e0e8199
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/8e0e8199

Branch: refs/heads/gearpump-runner
Commit: 8e0e81999c118b7d24402088a0a63601c967b3c0
Parents: cb8c5e5
Author: manuzhang <owenzhang1990@gmail.com>
Authored: Fri Dec 16 16:50:30 2016 +0800
Committer: manuzhang <owenzhang1990@gmail.com>
Committed: Fri Dec 16 16:50:30 2016 +0800

----------------------------------------------------------------------
 .../utils/NoOpAggregatorFactory.java            | 24 +++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/8e0e8199/runners/gearpump/src/main/java/org/apache/beam/runners/gearpump/translators/utils/NoOpAggregatorFactory.java
----------------------------------------------------------------------
diff --git a/runners/gearpump/src/main/java/org/apache/beam/runners/gearpump/translators/utils/NoOpAggregatorFactory.java
b/runners/gearpump/src/main/java/org/apache/beam/runners/gearpump/translators/utils/NoOpAggregatorFactory.java
index cd404a5..bfc73bf 100644
--- a/runners/gearpump/src/main/java/org/apache/beam/runners/gearpump/translators/utils/NoOpAggregatorFactory.java
+++ b/runners/gearpump/src/main/java/org/apache/beam/runners/gearpump/translators/utils/NoOpAggregatorFactory.java
@@ -36,6 +36,28 @@ public class NoOpAggregatorFactory implements AggregatorFactory, Serializable
{
       ExecutionContext.StepContext stepContext,
       String aggregatorName,
       Combine.CombineFn<InputT, AccumT, OutputT> combine) {
-    return null;
+    return new NoOpAggregator<>();
   }
+
+  private static class NoOpAggregator<InputT, OutputT> implements Aggregator<InputT,
OutputT>,
+      java.io.Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public void addValue(InputT value) {
+    }
+
+    @Override
+    public String getName() {
+      // TODO Auto-generated method stub
+      return null;
+    }
+
+    @Override
+    public Combine.CombineFn<InputT, ?, OutputT> getCombineFn() {
+      // TODO Auto-generated method stub
+      return null;
+    }
+
+  };
 }


Mime
View raw message