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-32712][format/json] enhance flink ogg-json format #23102

Closed
wants to merge 3 commits into from

Conversation

yuanoOo
Copy link

@yuanoOo yuanoOo commented Jul 29, 2023

What is the purpose of the change

The BEFORE field in ogg-json can be configured to contain no table fields, as in the ogg-json example below.

{
  "table": "ZBZZZ",
  "op_type": "U",
  "op_ts": "2023-07-20 21:45:34.860817",
  "current_ts": "2023-07-21T05:45:36.615000",
  "pos": "00002564940142073691",
  "before": {},
  "after": {
      "ID": 1461242,
      "PROPERTY_01": "tc",
      "PROPERTY_02": null,
      "PROPERTY_03": null,
      "PROPERTY_04": "K",
      "PROPERTY_05": "5",
      "PROPERTY_06": null,
      "PROPERTY_07": null,
      "PROPERTY_08": null,
      "PROPERTY_09": null,
      "PROPERTY_10": null
  }
}

For this case, ogg-json format should not send a Record of type UPDATE_BEFORE downstream。 Worse, it can sometimes cause the flink job to crash out.
 

Brief change log

  • add logic for handling "before":{} case.
  • add the test data for this case.

Verifying this change

This change is already covered by existing tests, such as OggJsonSerDeSchemaTest.
so I added the test data for this case.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no) no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no) no
  • The serializers: (yes / no / don't know) no
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know) no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know) no
  • The S3 file system connector: (yes / no / don't know) no

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Collaborator

flinkbot commented Jul 29, 2023

CI report:

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

@yuanoOo
Copy link
Author

yuanoOo commented Jul 29, 2023

@flinkbot run azure

Copy link
Contributor

@lsyldliu lsyldliu left a comment

Choose a reason for hiding this comment

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

@yuanoOo Thanks for contribution, This enhance looks make sense to me.

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