Skip to content

confluent schema registry client to accept config and headers#9096

Closed
jadireddi wants to merge 5 commits intoapache:masterfrom
jadireddi:Druid-8806_Conflu_sche_repo_auth
Closed

confluent schema registry client to accept config and headers#9096
jadireddi wants to merge 5 commits intoapache:masterfrom
jadireddi:Druid-8806_Conflu_sche_repo_auth

Conversation

@jadireddi
Copy link
Copy Markdown

@jadireddi jadireddi commented Dec 24, 2019

Fixes #8806 .

Description

Enhancing schema registry client i.e. SchemaRegistryBasedAvroBytesDecoder to accept additional config's, header's and able to query schema's from multi schema instances.

  1. Changed SchemaRegistryBasedAvroBytesDecoder to accept config and header's as Json properties.
  2. Added support to give multi url's for multi schema instances by sending as array: urls
  3. Upgraded confluent version to 5.2.0, which is compatible with existing kafka version: 2.2.1
  4. Changed depreciated method getByID to getById.

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths.
  • been tested in a test Druid cluster.
Key changed/added classes in this PR
  • SchemaRegistryBasedAvroBytesDecoder

@stale
Copy link
Copy Markdown

stale Bot commented Feb 22, 2020

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@druid.apache.org list. Thank you for your contributions.

@stale stale Bot added the stale label Feb 22, 2020
Copy link
Copy Markdown
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, and very sorry for the delayed review. These changes seem reasonable to me. Would you mind fixing up the conflicts and updating the license.yaml to capture the updated dependency?

<properties>
<schemarepo.version>0.1.3</schemarepo.version>
<confluent.version>3.0.1</confluent.version>
<confluent.version>5.2.0</confluent.version>
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.

This is why CI is failing, could you update the entry for this in licenses.yaml. We use this file to ensure we keep our LICENSE information correct to make doing releases easier.

Based on the error message in CI, it looks like maybe the new version pulls in a few additional jars, so you might need to add a few additional entries for extensions/druid-avro-extensions (or exclude these jars if they aren't actually needed for operation of the extension)

@JsonProperty("url") String url,
@JsonProperty("capacity") Integer capacity
@JsonProperty("capacity") Integer capacity,
@JsonProperty("urls") @Nullable List<String> urls,
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.

I think it would probably make sense to mark the url parameter as @Deprecated in favor of the new urls parameter. If you agree, I think we should remove mention of url from the avro extension documentation.

Additionally, would you mind adding a JSON serialization/deserialization unit test for this class to make sure the new properties work as expected?

@stale
Copy link
Copy Markdown

stale Bot commented Feb 27, 2020

This pull request/issue is no longer marked as stale.

3 similar comments
@stale
Copy link
Copy Markdown

stale Bot commented Feb 27, 2020

This pull request/issue is no longer marked as stale.

@stale
Copy link
Copy Markdown

stale Bot commented Feb 27, 2020

This pull request/issue is no longer marked as stale.

@stale
Copy link
Copy Markdown

stale Bot commented Feb 27, 2020

This pull request/issue is no longer marked as stale.

@stale
Copy link
Copy Markdown

stale Bot commented Apr 28, 2020

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@druid.apache.org list. Thank you for your contributions.

@stale stale Bot added the stale label Apr 28, 2020
@stale
Copy link
Copy Markdown

stale Bot commented May 30, 2020

This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@stale stale Bot closed this May 30, 2020
clintropolis added a commit that referenced this pull request Feb 27, 2021
* Add config and header support for confluent schema registry. (porting code from #9096)

* Add Eclipse Public License 2.0 to license check

* Update licenses.yaml, revert changes to check-licenses.py and dependencies for integration-tests

* Add spelling exception and remove unused dependency

* Use non-deprecated getSchemaById() and remove duplicated license entry

* Update docs/ingestion/data-formats.md

Co-authored-by: Clint Wylie <cjwylie@gmail.com>

* Added check for schema being null, as per Confluent code

* Missing imports and whitespace

* Updated unit tests with AvroSchema

Co-authored-by: Sergio Spinatelli <sergio.spinatelli.extern@7-tv.de>
Co-authored-by: Sergio Spinatelli <sergio.spinatelli.extern@joyn.de>
Co-authored-by: Clint Wylie <cjwylie@gmail.com>
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.

Support Confluent Schema Registry With Authentication

2 participants