Skip to content

NIFI-13811: Fix CalculateRecordStats so that it can properly handle a…#9321

Closed
markap14 wants to merge 1 commit intoapache:mainfrom
markap14:NIFI-13811
Closed

NIFI-13811: Fix CalculateRecordStats so that it can properly handle a…#9321
markap14 wants to merge 1 commit intoapache:mainfrom
markap14:NIFI-13811

Conversation

@markap14
Copy link
Contributor

…rrays of nested records; clarified documentation / code cleanup

Summary

NIFI-00000

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 21

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

…rrays of nested records; clarified documentation / code cleanup
Copy link
Contributor

@EndzeitBegins EndzeitBegins left a comment

Choose a reason for hiding this comment

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

Code changes look good to me.
Thank you for refactoring some names for improved readability.

You could use List.of for schema declaration in tests instead of ArrayList, but that's just a matter of preference.
Other than that I just have one small remark regarding a variable name.

} catch (Exception ex) {
getLogger().error("Error processing stats.", ex);
session.transfer(input, REL_FAILURE);
final Map<String, RecordPath> recordPath = getRecordPaths(context, flowFile);
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you use the singular form here on purpose or accidentally? I'd prefer recordPaths over recordPath.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's worth adjusting @EndzeitBegins, thanks.

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 fixes and improvements @markap14! The overall set of changes look good, I'll adjust the name of the recordPath variable to recordPaths in the merge. +1

} catch (Exception ex) {
getLogger().error("Error processing stats.", ex);
session.transfer(input, REL_FAILURE);
final Map<String, RecordPath> recordPath = getRecordPaths(context, flowFile);
Copy link
Contributor

Choose a reason for hiding this comment

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

That's worth adjusting @EndzeitBegins, thanks.

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.

3 participants