beam-github mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [beam] xinyuiscool commented on a change in pull request #15421: [BEAM-12823] TestStream Support in Samza Portable Runner
Date Thu, 02 Sep 2021 20:37:29 GMT

xinyuiscool commented on a change in pull request #15421:
URL: https://github.com/apache/beam/pull/15421#discussion_r701405816



##########
File path: runners/samza/src/main/java/org/apache/beam/runners/samza/translation/SamzaTestStreamTranslator.java
##########
@@ -90,11 +97,54 @@ public void translate(
     ctx.registerInputMessageStream(output, inputDescriptor);
   }
 
+  @SuppressWarnings("unchecked")
   @Override
   public void translatePortable(
       PipelineNode.PTransformNode transform,
       QueryablePipeline pipeline,
       PortableTranslationContext ctx) {
-    throw new SamzaException("TestStream is not supported in portable by Samza runner");
+    final ByteString bytes = transform.getTransform().getSpec().getPayload();
+    final Coder<T> coder;

Review comment:
       Shall we wrap line 107 - 129 into a private static method, e.g. createTestStreamDecoder()?
The good thing about static is that your lambda function instance won't hold on to the outer
class instance.




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



Mime
View raw message