Skip to content

[FLINK-39960][docs] Remove broken JavaDoc shortcode usage from JDBC docs#193

Merged
RocMarshal merged 2 commits into
apache:mainfrom
Dennis-Mircea:hotfix/fix-broken-javadoc-links
Jul 1, 2026
Merged

[FLINK-39960][docs] Remove broken JavaDoc shortcode usage from JDBC docs#193
RocMarshal merged 2 commits into
apache:mainfrom
Dennis-Mircea:hotfix/fix-broken-javadoc-links

Conversation

@Dennis-Mircea

Copy link
Copy Markdown
Contributor

The {{< javadoc … >}} shortcode resolves to the core Flink javadocs base URL (//nightlies.apache.org/flink/flink-docs-master/api/java/), where externalized connector classes such as JdbcSource, JdbcSink and JdbcExecutionOptions are not published. ASF nightlies does not host a standalone javadoc site for the JDBC connector either, so every javadoc link on the JDBC datastream page currently 404s. Replace each shortcode invocation with a backticked class name, matching the convention already used in the Kafka, Elasticsearch and Pulsar docs.

@boring-cyborg

boring-cyborg Bot commented May 3, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)

@ocb3916

ocb3916 commented Jun 18, 2026

Copy link
Copy Markdown

​Hi @Dennis-Mircea, thank you for pointing this out and contributing!
Could you please let us know if you are currently working on this? If not, would it be okay if I take over and move this forward?

@Dennis-Mircea

Copy link
Copy Markdown
Contributor Author

​Hi @Dennis-Mircea, thank you for pointing this out and contributing! Could you please let us know if you are currently working on this? If not, would it be okay if I take over and move this forward?

@ocb3916, It is ready, there nothing more to work on...

@Dennis-Mircea

Copy link
Copy Markdown
Contributor Author

@davidradl can you have a look?

@och5351 och5351 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this contribution, @Dennis-Mircea! And thanks to @ocb3916 for the early check on this.

As we're approaching an upcoming release, the removal looks correct since there's no publicly hosted javadoc for this connector yet.

Just one thing before merging — could you apply the same changes to docs/content.zh/docs/connectors/datastream/jdbc.md as well?

cc. @RocMarshal

Comment thread docs/content/docs/connectors/datastream/jdbc.md Outdated
Comment thread docs/content/docs/connectors/datastream/jdbc.md Outdated
Comment thread docs/content/docs/connectors/datastream/jdbc.md Outdated
@och5351

och5351 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Could you open a JIRA ticket for this change too?
It would be helpful if the flink-connector-jdbc repo is scheduled for release and the deletion details remain as a JIRA ticket.

@Dennis-Mircea Dennis-Mircea changed the title [hotfix][docs] Remove broken JavaDoc shortcode usage from JDBC docs [FLINK-39960][docs] Remove broken JavaDoc shortcode usage from JDBC docs Jun 20, 2026
@Dennis-Mircea

Copy link
Copy Markdown
Contributor Author

Could you open a JIRA ticket for this change too? It would be helpful if the flink-connector-jdbc repo is scheduled for release and the deletion details remain as a JIRA ticket.

Thanks for the review, @och5351! I opened FLINK-39960 and fixed the comments.

@Dennis-Mircea Dennis-Mircea requested a review from och5351 June 20, 2026 14:49

@och5351 och5351 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @Dennis-Mircea!

Thank you for your quick updates!
I've reviewed the changes and checked the Jira ticket.

I noticed a couple of other things in this PR that are different from the fixes you made, and I'd like to request your help with them:

Both docs/content/docs/connectors/datastream/jdbc.md and docs/content.zh/docs/connectors/datastream/jdbc.md have the same issues.

  1. Under the "JDBC execution options" section, the indentation of .build(); in the first code block doesn't seem to match the one below. Could you align it with the code below?
image

https://nightlies.apache.org/flink/flink-docs-release-2.2/docs/connectors/datastream/jdbc/#jdbc-execution-options

  1. Under the "JdbcSink.exactlyOnceSink" section, could you update the env.fromElements part to match the code shown below?
image

https://nightlies.apache.org/flink/flink-docs-release-2.2/docs/connectors/datastream/jdbc/#jdbcsinkexactlyoncesink

StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.fromElements(...)
    .addSink(
        JdbcSink.exactlyOnceSink(
            "insert into books (id, title, author, price, qty) values (?,?,?,?,?)",
            (ps, t) -> {
              ps.setInt(1, t.id);
              ps.setString(2, t.title);
              ps.setString(3, t.author);
              ps.setDouble(4, t.price);
              ps.setInt(5, t.qty);
            },
            JdbcExecutionOptions.builder().withMaxRetries(0).build(),
            JdbcExactlyOnceOptions.defaults(),
            () -> {
              // create a driver-specific XA DataSource
              // The following example is for derby
              EmbeddedXADataSource ds = new EmbeddedXADataSource();
              ds.setDatabaseName("my_db");
              return ds;
            }));
env.execute();
  1. Once you've finished the changes, could you create a total of 2 commits — one for the main fix with the commit message matching the PR title, and one for the indentation alignment fix — then request a review again?

Please don't hesitate to point out anything I may have missed or gotten wrong. I'd really appreciate it!
cc. @RocMarshal @ocb3916

Thank you!

@RocMarshal RocMarshal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @Dennis-Mircea @och5351

Could we add links to the latest API documentation where the deletions are?

@RocMarshal RocMarshal self-assigned this Jun 22, 2026
@och5351

och5351 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Hi @Dennis-Mircea !
Would you be able to continue working on this PR?

@Dennis-Mircea Dennis-Mircea force-pushed the hotfix/fix-broken-javadoc-links branch from ef9ca92 to 1fcc8cf Compare June 30, 2026 18:31
@Dennis-Mircea

Copy link
Copy Markdown
Contributor Author

Hi @Dennis-Mircea!

Thank you for your quick updates! I've reviewed the changes and checked the Jira ticket.

I noticed a couple of other things in this PR that are different from the fixes you made, and I'd like to request your help with them:

Both docs/content/docs/connectors/datastream/jdbc.md and docs/content.zh/docs/connectors/datastream/jdbc.md have the same issues.

  1. Under the "JDBC execution options" section, the indentation of .build(); in the first code block doesn't seem to match the one below. Could you align it with the code below?
image > https://nightlies.apache.org/flink/flink-docs-release-2.2/docs/connectors/datastream/jdbc/#jdbc-execution-options
  1. Under the "JdbcSink.exactlyOnceSink" section, could you update the env.fromElements part to match the code shown below?
image > https://nightlies.apache.org/flink/flink-docs-release-2.2/docs/connectors/datastream/jdbc/#jdbcsinkexactlyoncesink
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.fromElements(...)
    .addSink(
        JdbcSink.exactlyOnceSink(
            "insert into books (id, title, author, price, qty) values (?,?,?,?,?)",
            (ps, t) -> {
              ps.setInt(1, t.id);
              ps.setString(2, t.title);
              ps.setString(3, t.author);
              ps.setDouble(4, t.price);
              ps.setInt(5, t.qty);
            },
            JdbcExecutionOptions.builder().withMaxRetries(0).build(),
            JdbcExactlyOnceOptions.defaults(),
            () -> {
              // create a driver-specific XA DataSource
              // The following example is for derby
              EmbeddedXADataSource ds = new EmbeddedXADataSource();
              ds.setDatabaseName("my_db");
              return ds;
            }));
env.execute();
  1. Once you've finished the changes, could you create a total of 2 commits — one for the main fix with the commit message matching the PR title, and one for the indentation alignment fix — then request a review again?

Please don't hesitate to point out anything I may have missed or gotten wrong. I'd really appreciate it! cc. @RocMarshal @ocb3916

Thank you!

I addressed it now! Thanks for the suggestion. I also made 2 commits, so the split is crystal clear now.

@Dennis-Mircea

Copy link
Copy Markdown
Contributor Author

Thanks @Dennis-Mircea @och5351

Could we add links to the latest API documentation where the deletions are?

Thanks @RocMarshal! The reason these links were removed is that they're all broken, the {{< javadoc >}} shortcode points to the core Flink JavaDoc site, but the JDBC connector's classes (JdbcSource, JdbcSink, etc.) live in a separate repo and aren't published there, so every one of these links currently 404s. ASF doesn't host a standalone javadoc site for this connector either.

@RocMarshal RocMarshal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@RocMarshal RocMarshal merged commit c927f36 into apache:main Jul 1, 2026
5 checks passed
@boring-cyborg

boring-cyborg Bot commented Jul 1, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants