Skip to content

KAFKA-13731: Allow standalone workers to be started without providing any connector configurations - #11890

Merged
C0urante merged 2 commits into
apache:trunkfrom
C0urante:kafka-13731
Nov 30, 2022
Merged

C0urante merged 2 commits into
apache:trunkfrom
C0urante:kafka-13731

Conversation

@C0urante

Copy link
Copy Markdown
Contributor

Jira

(Copied from Jira):

In order to start a standalone Connect worker, it's currently necessary to provide at least two command-line arguments:

  • The path to the worker config file
  • One or more paths to a connector config file

This may be due to the now-inaccurate belief that standalone workers do not support the Connect REST API, which can be used to create/reconfigure/delete connectors at runtime. However, standalone mode does in fact expose the Connect REST API, and since that allows for connectors to be created after bringing up the worker, it is unnecessary to force users to supply at least one config for a connector to be run on the worker at startup time.

These changes remove that limitation from standalone mode, and update the Connect docs to be explicit about support for the REST API when running standalone.

No tests are added as the functional changes are trivial. I did perform an extremely rudimentary sanity check to ensure that, with these changes, a standalone worker could be brought up with just a worker config file and no connector configs, and a file sink connector could be created on that worker via the REST API after it finished startup.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@C0urante

C0urante commented Apr 8, 2022

Copy link
Copy Markdown
Contributor Author

@showuon do you have time for this quick change?

@yashmayya yashmayya 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 @C0urante, LGTM. I always wondered why the standalone mode had this restriction when it already initializes the same RestServer with the same resources as in distributed mode.

Comment thread docs/connect.html Resolved

@mimaison mimaison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks

@C0urante
C0urante merged commit 548348c into apache:trunk Nov 30, 2022
@C0urante
C0urante deleted the kafka-13731 branch November 30, 2022 16:49
@C0urante

Copy link
Copy Markdown
Contributor Author

Thanks Mickael!

honshu added a commit to confluentinc/kafka that referenced this pull request Nov 30, 2022
* apache-kafka/trunk: (31 commits)
  KAFKA-14413: Separate MirrorMaker configurations for each connector (apache#12899)
  MINOR: Fix config documentation formatting (apache#12921)
  KAFKA-13731: Allow standalone workers to be started without providing any connector configurations (apache#11890)
  MINOR: Fix docs in security.html (apache#12851)
  MINOR: Remove config/kraft/README.md from rat exclusion list (apache#12923)
  MINOR: Update Gradle to 7.6 (apache#12918)
  KAFKA-14414: Fix request/response header size calculation (apache#12917)
  KAFKA-14339 : Do not perform producerCommit on serializationError when trying offsetWriter flush (apache#12920)
  KAFKA-14367; Add `JoinGroup` to the new `GroupCoordinator` interface (apache#12845)
  MINOR: buildoutput.log should be under the `build` directory (apache#12919)
  ...
guozhangwang pushed a commit to guozhangwang/kafka that referenced this pull request Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants