Skip to content

NIFI-10890 Change HashMap to LinkedHashMap in AbstractJsonRowRecordReader.createRecordFromRawValue for deterministic handling#6726

Closed
sopan98 wants to merge 2 commits intoapache:mainfrom
sopan98:bugfix/fix-flaky-TestJsonTreeRowRecordReader
Closed

NIFI-10890 Change HashMap to LinkedHashMap in AbstractJsonRowRecordReader.createRecordFromRawValue for deterministic handling#6726
sopan98 wants to merge 2 commits intoapache:mainfrom
sopan98:bugfix/fix-flaky-TestJsonTreeRowRecordReader

Conversation

@sopan98
Copy link
Contributor

@sopan98 sopan98 commented Nov 29, 2022

Summary

NIFI-10890

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 8
    • JDK 11
    • JDK 17

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

Copy link
Contributor

@exceptionfactory exceptionfactory 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 improvement @sopan98. The change itself looks good. There are a couple other uses of HashMap in AbstractJsonRowRecordReader, so this seems like a good opportunity to replace all of them with LinkedHashMap to avoid potential future issues.

@sopan98
Copy link
Contributor Author

sopan98 commented Nov 29, 2022

@exceptionfactory I have changed every HashMap declaration to LinkedHashMap in AbstractJsonRowRecordReader

Copy link
Contributor

@exceptionfactory exceptionfactory 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 making the adjustments @sopan98! +1 merging

asfgit pushed a commit that referenced this pull request Nov 30, 2022
- Updated unit test based on deterministic behavior of LinkedHashMap

This closes #6726

Signed-off-by: David Handermann <exceptionfactory@apache.org>
lizhizhou pushed a commit to lizhizhou/nifi that referenced this pull request Jan 2, 2023
- Updated unit test based on deterministic behavior of LinkedHashMap

This closes apache#6726

Signed-off-by: David Handermann <exceptionfactory@apache.org>
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