acrites commented on code in PR #40639:
URL: https://github.com/apache/beam/pull/40639#discussion_r4404412315
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/common/worker/ParDoFn.java:
##########
@@ -37,4 +38,8 @@ public interface ParDoFn {
void finishBundle() throws Exception;
void abort() throws Exception;
+
+ default @Nullable DoFnInfo<?, ?> getDoFnInfo() throws Exception {
+ return null;
Review Comment:
There are 11 other production and 3 test classes that implement ParDoFn but
don't actually wrap a DoFn:
* AssignWindowsParDoFn
* CreateIsmShardKeyAndSortKeyParDoFn
* GroupAlsoByWindowsParDoFn
* PairWithConstantKeyParDoFn
* BatchSideInputPGBKParDoFn
* StreamingSideInputPGBKParDoFn
* ReifyTimestampAndWindowsParDoFn
* SimplePartialGroupByKeyParDoFn
* StreamingPCollectionViewWriterParDoFn
* ToIsmRecordForMultimapParDoFn
* ValuesParDoFn
* NoopParDoFn in IntrinsicMapTaskExecutorTest.java and
MapTaskExecutorTest.java
* TestParDoFn in ParDoOperationTest.java
There is one more class, BatchModeUngroupingParDoFn, that wraps ParDoFn, so
we should probably have it's `getDoFnInfo` delegate to the underlying ParDoFn.
For all the others though, I think we'd just have to return null. I'll go
ahead and remove the default method since I think it's nicer to at least force
new classes to think about what to return.
--
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]