[ https://issues.apache.org/jira/browse/BEAM-4016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16437961#comment-16437961 ]
Eugene Kirpichov commented on BEAM-4016: ---------------------------------------- Yeah it's the desired order. The fix is to add a call to invoker.invokeSetup() to https://github.com/apache/beam/blob/6107c314e7a1af0d29b3cd865c0dee1013c2261c/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/SplittableParDo.java#L357 . > Direct runner incorrect lifecycle, @SplitRestriction should execute after > @Setup on SplittableDoFn > -------------------------------------------------------------------------------------------------- > > Key: BEAM-4016 > URL: https://issues.apache.org/jira/browse/BEAM-4016 > Project: Beam > Issue Type: Bug > Components: runner-direct > Affects Versions: 2.4.0 > Reporter: Ismaël Mejía > Assignee: Thomas Groh > Priority: Major > Attachments: sdf-splitrestriction-lifeycle-test.patch > > > The method annotated with @SplitRestriction is the method where we can define > the RestrictionTrackers (splits) in advance in a SDF. It makes sense to > execute this after the @Setup method given that usually connections are > established at Setup and can be used to ask the different data stores about > the partitioning strategy. I added a test for this in the > SplittableDoFnTest.SDFWithLifecycle test. -- This message was sent by Atlassian JIRA (v7.6.3#76005)