boyuanzz commented on a change in pull request #12678:
URL: https://github.com/apache/beam/pull/12678#discussion_r476618504



##########
File path: 
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowPipelineTranslator.java
##########
@@ -1264,6 +1268,10 @@ private static void translateFn(
     // in streaming but does not work in batch
     if (context.getPipelineOptions().isStreaming() && isStateful) {
       stepContext.addInput(PropertyNames.USES_KEYED_STATE, "true");

Review comment:
       Is `ALLOWS_SHARDABLE_STATE ` supported by both streaming engine and 
windmill appliance? If it's only for streaming engine, is it safe to populate 
this field for both?

##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/GroupIntoBatches.java
##########
@@ -100,8 +99,7 @@ public long getBatchSize() {
         ParDo.of(new GroupIntoBatchesDoFn<>(batchSize, allowedLateness, 
keyCoder, valueCoder)));
   }
 
-  @VisibleForTesting
-  static class GroupIntoBatchesDoFn<K, InputT>
+  public static class GroupIntoBatchesDoFn<K, InputT>

Review comment:
       I don't think we want to make `GroupInToBatchesDoFn` as `public`. 
Instead of adding property in `translateFn `, we can do it at transform level, 
where you can check `transform instanceof GroupIntoBatches`, for example: 
https://github.com/apache/beam/blob/master/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowPipelineTranslator.java#L752




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to