beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [1/2] beam git commit: Remove warnings in Apex runner tests.
Date Wed, 04 Jan 2017 18:07:29 GMT
Repository: beam
Updated Branches:
  refs/heads/master 926ec8e80 -> 49aeef92a


Remove warnings in Apex runner tests.


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

Branch: refs/heads/master
Commit: 5ead72e223c15dc65e5fb3fd15f8c77ce663b791
Parents: 926ec8e
Author: Thomas Weise <thw@apache.org>
Authored: Wed Jan 4 09:24:38 2017 -0800
Committer: Thomas Weise <thw@apache.org>
Committed: Wed Jan 4 09:24:38 2017 -0800

----------------------------------------------------------------------
 .../runners/apex/translation/ParDoBoundTranslatorTest.java   | 6 ++++--
 .../runners/apex/translation/ReadUnboundTranslatorTest.java  | 8 +++++---
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/5ead72e2/runners/apex/src/test/java/org/apache/beam/runners/apex/translation/ParDoBoundTranslatorTest.java
----------------------------------------------------------------------
diff --git a/runners/apex/src/test/java/org/apache/beam/runners/apex/translation/ParDoBoundTranslatorTest.java
b/runners/apex/src/test/java/org/apache/beam/runners/apex/translation/ParDoBoundTranslatorTest.java
index f88a94d..2aa0720 100644
--- a/runners/apex/src/test/java/org/apache/beam/runners/apex/translation/ParDoBoundTranslatorTest.java
+++ b/runners/apex/src/test/java/org/apache/beam/runners/apex/translation/ParDoBoundTranslatorTest.java
@@ -114,6 +114,7 @@ public class ParDoBoundTranslatorTest {
   }
 
   private static class Add extends DoFn<Integer, Integer> {
+    private static final long serialVersionUID = 1L;
     private Integer number;
     private PCollectionView<Integer> sideInputView;
 
@@ -135,6 +136,7 @@ public class ParDoBoundTranslatorTest {
   }
 
   private static class EmbeddedCollector extends DoFn<Object, Void> {
+    private static final long serialVersionUID = 1L;
     private static final Set<Object> RESULTS = Collections.synchronizedSet(new HashSet<>());
 
     public EmbeddedCollector() {
@@ -243,7 +245,7 @@ public class ParDoBoundTranslatorTest {
     operator.sideInput1.process(ApexStreamTuple.DataTuple.of(sideInput));
     Assert.assertEquals("number outputs", 1, results.size());
     Assert.assertEquals("result", WindowedValue.valueInGlobalWindow(23),
-        ((ApexStreamTuple.DataTuple) results.get(0)).getValue());
+        ((ApexStreamTuple.DataTuple<?>) results.get(0)).getValue());
 
     // verify side input checkpointing
     results.clear();
@@ -254,7 +256,7 @@ public class ParDoBoundTranslatorTest {
     operator.input.process(ApexStreamTuple.DataTuple.of(wv2));
     Assert.assertEquals("number outputs", 1, results.size());
     Assert.assertEquals("result", WindowedValue.valueInGlobalWindow(24),
-        ((ApexStreamTuple.DataTuple) results.get(0)).getValue());
+        ((ApexStreamTuple.DataTuple<?>) results.get(0)).getValue());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/beam/blob/5ead72e2/runners/apex/src/test/java/org/apache/beam/runners/apex/translation/ReadUnboundTranslatorTest.java
----------------------------------------------------------------------
diff --git a/runners/apex/src/test/java/org/apache/beam/runners/apex/translation/ReadUnboundTranslatorTest.java
b/runners/apex/src/test/java/org/apache/beam/runners/apex/translation/ReadUnboundTranslatorTest.java
index 8e44bab..6d19bb9 100644
--- a/runners/apex/src/test/java/org/apache/beam/runners/apex/translation/ReadUnboundTranslatorTest.java
+++ b/runners/apex/src/test/java/org/apache/beam/runners/apex/translation/ReadUnboundTranslatorTest.java
@@ -35,7 +35,7 @@ import org.apache.beam.runners.apex.translation.operators.ApexReadUnboundedInput
 import org.apache.beam.runners.apex.translation.utils.CollectionSource;
 import org.apache.beam.sdk.Pipeline;
 import org.apache.beam.sdk.coders.StringUtf8Coder;
-import org.apache.beam.sdk.io.CountingSource;
+import org.apache.beam.sdk.io.CountingInput;
 import org.apache.beam.sdk.io.Read;
 import org.apache.beam.sdk.options.PipelineOptionsFactory;
 import org.apache.beam.sdk.transforms.DoFn;
@@ -92,12 +92,13 @@ public class ReadUnboundTranslatorTest {
     Pipeline p = Pipeline.create(options);
 
     Set<Long> expected = ContiguousSet.create(Range.closedOpen(0L, 10L), DiscreteDomain.longs());
-    p.apply(Read.from(CountingSource.upTo(10)))
+    p.apply(CountingInput.upTo(10))
         .apply(ParDo.of(new EmbeddedCollector()));
 
     ApexRunnerResult result = (ApexRunnerResult) p.run();
     DAG dag = result.getApexDAG();
-    DAG.OperatorMeta om = dag.getOperatorMeta("Read(BoundedCountingSource)");
+    String operatorName = "CountingInput.BoundedCountingInput/Read(BoundedCountingSource)";
+    DAG.OperatorMeta om = dag.getOperatorMeta(operatorName);
     Assert.assertNotNull(om);
     Assert.assertEquals(om.getOperator().getClass(), ApexReadUnboundedInputOperator.class);
 
@@ -113,6 +114,7 @@ public class ReadUnboundTranslatorTest {
   }
 
   private static class EmbeddedCollector extends DoFn<Object, Void> {
+    private static final long serialVersionUID = 1L;
     private static final Set<Object> RESULTS = Collections.synchronizedSet(new HashSet<>());
 
     @ProcessElement


Mime
View raw message