Skip to content

Conversation

@manojpec
Copy link
Contributor

@manojpec manojpec commented Dec 26, 2021

What is the purpose of the pull request

  • The backing log format for the metadata table is HFile, a KeyValue type.
    Since the key field in the metadata record payload is a duplicate of the
    Key in the Cell, the redundant key field in the record can be emptied
    to save on the cost.

  • HoodieHFileWriter and HoodieHFileDataBlock will now serialize records
    with the key field emptied by default. HFile writer level relies on the
    callers to tell about the key field in the schema.

  • HoodieHFileReader when reading the serialized records back from disk,
    it materializes the missing keyFields if any. It relies on the callers
    to tell about the key field in the record schema.

  • WriteHandles and all its derived classes rely on the table properties
    for the key field when constructing the file and log readers. This way
    base file creation, append and merging all work seamlessly irrespective
    of data or metadata table.

NOTE: There is a simplified version of this PR at #4449
where the HFile reader and writer would do key deduplication and key materialization only if
the record has the metadata payload schema field 'key' (the hardcoded version).

Verify this pull request

  • Tests have been added to verify the default virtual keys and key
    deduplication support for the metadata table records.

  • Manually verified the serialized records on the disk are trimmed
    off the key field

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

…d virtual keys

 - The backing log format for the metadata table is HFile, a KeyValue type.
   Since the key field in the metadata record payload is a duplicate of the
   Key in the Cell, the redundant key field in the record can be emptied
   to save on the cost.

 - HoodieHFileWriter and HoodieHFileDataBlock will now serialize records
   with the key field emptied by default. HFile writer level relies on the
   callers to tell about the key field in the schema.

 - HoodieHFileReader when reading the serialized records back from disk,
   it materializes the missing keyFields if any. It relies on the callers
   to tell about the key field in the record schema.

 - WriteHandles and all its derived classes rely on the table properties
   for the key field when constructing the file and log readers. This way
   base file creation, append and merging all work seamlessly irrespective
   of data or metadata table.

 - Tests have been added to verify the default virtual keys and key
   deduplication support for the metadata table records.
@hudi-bot
Copy link
Collaborator

CI report:

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

@manojpec
Copy link
Contributor Author

We have decided to go with #4449 approach instead this PR approach.

@manojpec manojpec closed this Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants