You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/09/08 20:52:26 UTC

[GitHub] [beam] mynameborat commented on a diff in pull request #23072: Consolidate Samza TranslationContext and PortableTranslationContext

mynameborat commented on code in PR #23072:
URL: https://github.com/apache/beam/pull/23072#discussion_r966409364


##########
runners/samza/src/main/java/org/apache/beam/runners/samza/translation/PortableTranslationContext.java:
##########
@@ -48,26 +42,16 @@
   "rawtypes", // TODO(https://github.com/apache/beam/issues/20447)
   "nullness" // TODO(https://github.com/apache/beam/issues/20497)
 })
-public class PortableTranslationContext {
+public class PortableTranslationContext extends TranslationContext {
   private final Map<String, MessageStream<?>> messageStreams = new HashMap<>();
-  private final StreamApplicationDescriptor appDescriptor;
   private final JobInfo jobInfo;
-  private final SamzaPipelineOptions options;
-  private final Set<String> registeredInputStreams = new HashSet<>();
-  private final Map<String, Table> registeredTables = new HashMap<>();
-  private final HashIdGenerator idGenerator = new HashIdGenerator();
 
   private PipelineNode.PTransformNode currentTransform;
 
   public PortableTranslationContext(
       StreamApplicationDescriptor appDescriptor, SamzaPipelineOptions options, JobInfo jobInfo) {
+    super(appDescriptor, Collections.emptyMap(), options);

Review Comment:
   We don't need it for now as it is only used in classic translation and side inputs in classic mode. The id in case of portable translation is available as part of protobuf representation of the transform.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org