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 02:36:52 UTC

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

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


##########
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:
   do we not need the idMap for the portable context? It seems that we are using it in `TranslationContext#getIdForPValue()`



-- 
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