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-10119] [table] Add failure handlers for JsonRowDeserializationSchema #6571

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jiayi-Liao
Copy link
Contributor

What is the purpose of the change

The program will throw runtime exceptions and exit if json messages cannot be parsed correctly, which doesn't make sense to developers because it's very normal for them to receive dirty data from the source.
Now we offer format.failure-handler to deal with this kind of json data.

  1. "fail": the deserialization will throw an exception.
  2. "ignore": the deserialization will return a null value, which will be ignored.
  3. "error-field": An additional field will be added into the row to store error messages and the other fields will be null.

Brief change log

  • Add format.failure-handler in JsonValidator and failureHandler in Json.
  • Optimize JsonRowDeserializationSchema to deal with "error" data.
  • Add unit tests.

Verifying this change

Unit tests.

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, Yarn/Mesos, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no

@Jiayi-Liao
Copy link
Contributor Author

Jiayi-Liao commented Aug 17, 2018

I think the travis testing failure is not caused by this PR.

@twalthr twalthr changed the title [FLINK-10119]- Add failure handlers for JsonRowDeserializationSchema [FLINK-10119] [table] Add failure handlers for JsonRowDeserializationSchema Aug 19, 2018
@twalthr twalthr self-assigned this Oct 2, 2018
@flinkbot
Copy link
Collaborator

CI report:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants