dnamaz commented on code in PR #37036:
URL: https://github.com/apache/beam/pull/37036#discussion_r2600655610
##########
runners/flink/src/main/java/org/apache/beam/runners/flink/FlinkStreamingTransformTranslators.java:
##########
@@ -183,33 +192,131 @@ public static String
getCurrentTransformName(FlinkStreamingTranslationContext co
return context.getCurrentTransform().getFullName();
}
+ /** Returns the parallelism to use for source operators. */
+ private static int getSourceParallelism(FlinkStreamingTranslationContext
context) {
+ int maxParallelism = context.getExecutionEnvironment().getMaxParallelism();
+ return maxParallelism > 0 ? maxParallelism :
context.getExecutionEnvironment().getParallelism();
+ }
+
//
--------------------------------------------------------------------------------------------
// Transformation Implementations
//
--------------------------------------------------------------------------------------------
+ /** Common translation logic for unbounded sources. */
+ @SuppressWarnings("unchecked")
+ private static <T> void translateUnboundedSource(
+ UnboundedSource<T, ?> rawSource,
+ String transformName,
+ FlinkStreamingTranslationContext context) {
+
+ PCollection<T> output =
+ (PCollection<T>)
+
Iterables.getOnlyElement(context.getCurrentTransform().getOutputs().values());
Review Comment:
/gemini review
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]