You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ke...@apache.org on 2016/06/08 16:15:45 UTC

[1/2] incubator-beam git commit: Remove Unnecessary Fn cloning

Repository: incubator-beam
Updated Branches:
  refs/heads/master cc448e976 -> 9a3896d69


Remove Unnecessary Fn cloning

The ParDoInProcessEvaluator is provided clones of a DoFn when
appropriate, and should not serialize them.


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

Branch: refs/heads/master
Commit: 0cf17302f605aefde22c48e65e17da6e3cfc6238
Parents: 2173000
Author: Thomas Groh <tg...@google.com>
Authored: Fri Jun 3 17:57:24 2016 -0700
Committer: Thomas Groh <tg...@google.com>
Committed: Tue Jun 7 14:20:42 2016 -0700

----------------------------------------------------------------------
 .../org/apache/beam/runners/direct/ParDoInProcessEvaluator.java  | 3 +--
 .../apache/beam/runners/direct/ParDoInProcessEvaluatorTest.java  | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/0cf17302/runners/direct-java/src/main/java/org/apache/beam/runners/direct/ParDoInProcessEvaluator.java
----------------------------------------------------------------------
diff --git a/runners/direct-java/src/main/java/org/apache/beam/runners/direct/ParDoInProcessEvaluator.java b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/ParDoInProcessEvaluator.java
index 2cdf6cb..a3e2f18 100644
--- a/runners/direct-java/src/main/java/org/apache/beam/runners/direct/ParDoInProcessEvaluator.java
+++ b/runners/direct-java/src/main/java/org/apache/beam/runners/direct/ParDoInProcessEvaluator.java
@@ -27,7 +27,6 @@ import org.apache.beam.sdk.util.DoFnRunners;
 import org.apache.beam.sdk.util.DoFnRunners.OutputManager;
 import org.apache.beam.sdk.util.PushbackSideInputDoFnRunner;
 import org.apache.beam.sdk.util.ReadyCheckingSideInputReader;
-import org.apache.beam.sdk.util.SerializableUtils;
 import org.apache.beam.sdk.util.UserCodeException;
 import org.apache.beam.sdk.util.WindowedValue;
 import org.apache.beam.sdk.util.common.CounterSet;
@@ -74,7 +73,7 @@ class ParDoInProcessEvaluator<T> implements TransformEvaluator<T> {
     DoFnRunner<InputT, OutputT> underlying =
         DoFnRunners.createDefault(
             evaluationContext.getPipelineOptions(),
-            SerializableUtils.clone(fn),
+            fn,
             sideInputReader,
             BundleOutputManager.create(outputBundles),
             mainOutputTag,

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/0cf17302/runners/direct-java/src/test/java/org/apache/beam/runners/direct/ParDoInProcessEvaluatorTest.java
----------------------------------------------------------------------
diff --git a/runners/direct-java/src/test/java/org/apache/beam/runners/direct/ParDoInProcessEvaluatorTest.java b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/ParDoInProcessEvaluatorTest.java
index 1127ed2..0f7afa1 100644
--- a/runners/direct-java/src/test/java/org/apache/beam/runners/direct/ParDoInProcessEvaluatorTest.java
+++ b/runners/direct-java/src/test/java/org/apache/beam/runners/direct/ParDoInProcessEvaluatorTest.java
@@ -128,7 +128,7 @@ public class ParDoInProcessEvaluatorTest {
         Matchers.<WindowedValue<?>>containsInAnyOrder(
             second, WindowedValue.of(1, new Instant(2468L), nonGlobalWindow, PaneInfo.NO_FIRING)));
     assertThat(result.getOutputBundles(), Matchers.<UncommittedBundle<?>>contains(outputBundle));
-    assertThat(RecorderFn.processed, containsInAnyOrder(1, 3));
+    assertThat(fn.processed, containsInAnyOrder(1, 3));
     assertThat(
         Iterables.getOnlyElement(result.getOutputBundles()).commit(Instant.now()).getElements(),
         Matchers.<WindowedValue<?>>containsInAnyOrder(
@@ -170,7 +170,7 @@ public class ParDoInProcessEvaluatorTest {
   }
 
   private static class RecorderFn extends DoFn<Integer, Integer> {
-    private static Collection<Integer> processed;
+    private Collection<Integer> processed;
     private final PCollectionView<Integer> view;
 
     public RecorderFn(PCollectionView<Integer> view) {


[2/2] incubator-beam git commit: This closes #418

Posted by ke...@apache.org.
This closes #418


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

Branch: refs/heads/master
Commit: 9a3896d697df7862641117a56001be5a0b44771d
Parents: cc448e9 0cf1730
Author: Kenneth Knowles <kl...@google.com>
Authored: Wed Jun 8 09:15:00 2016 -0700
Committer: Kenneth Knowles <kl...@google.com>
Committed: Wed Jun 8 09:15:00 2016 -0700

----------------------------------------------------------------------
 .../org/apache/beam/runners/direct/ParDoInProcessEvaluator.java  | 3 +--
 .../apache/beam/runners/direct/ParDoInProcessEvaluatorTest.java  | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------