Skip to content

[Spark] Structured streaming runner: asynchronous cancel() should not report CANCELLED before the execution ended #40120

Description

@tkaymak

SparkStructuredStreamingPipelineResult.cancel() requests cancellation asynchronously and sets the state to CANCELLED at once. Per the PipelineResult contract the state should be observed: getState() queries the execution, waitUntilFinish() blocks until the pipeline is actually cancelled on the (mini) cluster, and only then the state becomes CANCELLED.

Changing this touches the shared StructuredStreamingPipelineStateTest, which asserts CANCELLED right after cancel() for the batch path today, and the legacy SparkPipelineResult has the same shape. Scope: runners/spark/src/main/java/org/apache/beam/runners/spark/structuredstreaming/SparkStructuredStreamingPipelineResult.java and that test.

Follow up from #40103 / Part of #36841

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions