Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-35194][table] Support describe job with job id #24728

Closed
wants to merge 2 commits into from

Conversation

xuyangzhong
Copy link
Contributor

What is the purpose of the change

Support syntax '{ DESCRIBE | DESC } JOB 'xxx''

Brief change log

  • Support to parse syntax { DESCRIBE | DESC } JOB 'xxx'
  • Support to execute describe job in sql gateway
  • Add tests

Verifying this change

Tests are added to verify it.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? later a single pr will be introduce

@flinkbot
Copy link
Collaborator

flinkbot commented Apr 26, 2024

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@lsyldliu lsyldliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xuyangzhong Thanks for your contribution, I left some comments. BTW, can you help to open a jira ticket to finish the doc of desc job syntax.

new IllegalStateException(
"Test job " + jobId + " not found."));
assertThat(jobRow.getString(1)).hasToString(pipelineName);
assertThat(jobRow.getString(2)).hasToString("RUNNING");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job status always beRUNNING here? maybe it has finished? My concern is whether it causes an unstable test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's always RUNNING, because ExecutionOptions.RUNTIME_MODE is streaming default.

assertThat(jobRow.getString(2)).hasToString("RUNNING");
assertThat(jobRow.getTimestamp(3, 3).getMillisecond())
.isBetween(timeOpStart, timeOpSucceed);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do need we cancel the job manually after getting the job status?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, all jobs will be cancelled automatically. You can find more details at MiniClusterExtension#afterAll.

@xuyangzhong
Copy link
Contributor Author

The doc jira is: https://issues.apache.org/jira/browse/FLINK-35271

@lsyldliu lsyldliu closed this in 44528e0 Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants