nemo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] johnyangk commented on a change in pull request #123: [NEMO-129] Support Beam's WindowedWordCount example
Date Sat, 13 Oct 2018 08:29:37 GMT
johnyangk commented on a change in pull request #123: [NEMO-129] Support Beam's WindowedWordCount
example
URL: https://github.com/apache/incubator-nemo/pull/123#discussion_r224953035
 
 

 ##########
 File path: compiler/frontend/beam/src/main/java/org/apache/nemo/compiler/frontend/beam/PipelineTranslator.java
 ##########
 @@ -198,11 +196,29 @@ private static void parDoMultiOutputTranslator(final TranslationContext
ctx,
         pValueWithTupleTag.getKey()));
   }
 
+  private static GroupByKeyTransform createGBKTransform(
+    final TranslationContext ctx,
+    final TransformVertex transformVertex) {
+    final AppliedPTransform pTransform = transformVertex.getNode().toAppliedPTransform(PIPELINE.get());
+    final PCollection<?> mainInput = (PCollection<?>)
+      Iterables.getOnlyElement(TransformInputs.nonAdditionalInputs(pTransform));
+    final TupleTag mainOutputTag = new TupleTag<>("main output");
 
 Review comment:
   Drop "main output"?
   According to the doc, the no-argument constructor seems to be preferred.
   
   ```java
     /**
      * Constructs a new {@code TupleTag}, with a fresh unique id.
      *
      * <p>This is the normal way {@code TupleTag}s are constructed.
      */
     public TupleTag() {
       this(genId(), true);
     }
   
     /**
      * Constructs a new {@code TupleTag} with the given id.
      *
      * <p>It is up to the user to ensure that two {@code TupleTag}s with the same id
actually mean the
      * same tag and carry the same generic type parameter. Violating this invariant can lead
to
      * hard-to-diagnose runtime type errors. Consequently, this operation should be used
very
      * sparingly, such as when the producer and consumer of {@code TupleTag}s are written
in separate
      * modules and can only coordinate via ids rather than shared {@code TupleTag} instances.
Most of
      * the time, {@link #TupleTag()} should be preferred.
      */
     public TupleTag(String id) {
       this(id, false);
     }
   
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message