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

AVRO-3845: avro-tools: Add log entry when an external schema is used #2121

Merged
merged 3 commits into from
Sep 13, 2023

Conversation

rulle-io
Copy link
Contributor

@rulle-io rulle-io commented Mar 3, 2023

What is the purpose of the change

When avro-tools fromjson parameter --schema-file or --schema is used, it is unclear whether the tool actually picked up the provided schema.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Also a couple of code style warnings are fixed.

@github-actions github-actions bot added the Java Pull Requests for Java binding label Mar 3, 2023
@clesaec
Copy link
Contributor

clesaec commented Jun 16, 2023

Nice small change.
Please, could you create a JIRA (as explain on how to contribute), then i'll approve the change and then ping a commiter about it.

@rulle-io
Copy link
Contributor Author

Thanks @clesaec. I have sent a request to get a Jira user (to create a ticket). But no response since a few weeks back.

@martin-g
Copy link
Member

martin-g commented Aug 23, 2023

@rulle-io

ASF Self-serve Portal - Friday, July 14, 2023 8:55:26 AM GMT+3

New Jira account created: rulle-io

Hi there,
As approved by [email protected], a new Jira user account, rulle-io, has been created.

They provided the public name: Ruslan Altynnikov
and the reason: Submit a PR

An email has been sent to the email address provided and this new user will
need to reset their password before logging in for the first time.

@rulle-io rulle-io changed the title avro-tools: Add log entry when an external schema is used AVRO-3845: avro-tools: Add log entry when an external schema is used Aug 26, 2023
@rulle-io
Copy link
Contributor Author

@rulle-io
Copy link
Contributor Author

rulle-io commented Aug 26, 2023

Tested manully:

--schema-file

avro-tools fromjson --schema-file example.avro example.json
...
23/08/26 14:46:15 INFO tool.DataFileReadTool: Reading schema from file 'example.avro'

--schema

avro-tools fromjson 
  --schema {"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":"int"},{"name":"favorite_color","type":"string"}]} 
  example.avro
...
23/08/26 15:04:33 INFO tool.DataFileReadTool: Reading schema from string '{namespace:example.avro,type:record,name:User,fields:[{name:name,type:string},{name:favorite_number,type:int},{name:favorite_color,type:string}]}'

@opwvhk opwvhk requested a review from clesaec September 12, 2023 13:16
Copy link
Contributor

@clesaec clesaec left a comment

Choose a reason for hiding this comment

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

👍

@opwvhk opwvhk merged commit da524a4 into apache:master Sep 13, 2023
11 checks passed
@rulle-io rulle-io deleted the add_log branch September 13, 2023 11:58
RanbirK pushed a commit to RanbirK/avro that referenced this pull request May 13, 2024
…pache#2121)

* Add log entry when an external schema is used.
* Cover both reader and writer.

---------
Co-authored-by: Ruslan Altynnikov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Pull Requests for Java binding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants