Skip to content

NIFI-3938: Added ScriptedLookupService, some refactor for reusable scripting classes#1828

Closed
mattyb149 wants to merge 1 commit intoapache:masterfrom
mattyb149:NIFI-3938
Closed

NIFI-3938: Added ScriptedLookupService, some refactor for reusable scripting classes#1828
mattyb149 wants to merge 1 commit intoapache:masterfrom
mattyb149:NIFI-3938

Conversation

@mattyb149
Copy link
Contributor

Moved some code common to scripted ControllerServices out into AbstractScriptedControllerService. Also the Scripting helper classes were in the processor package but are useful elsewhere, so I moved that and changed the visibility of some protected methods.

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
  • Have you written or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
  • If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
  • If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@alopresto
Copy link
Contributor

Reviewing...

@alopresto
Copy link
Contributor

Built with contrib-check and all tests pass. With Matt's help, I created a schema registry with a defined schema, generated flowfiles with CSV formatted data (a hockey roster), and used SplitRecord with the CSVReader and CSVRecordSetWriter controller services to split the data into individual flowfiles, then used LookupRecord with ScriptedLookupService and wrote a custom Groovy implementation which performed position lookups. Finally, I output the enriched flowfiles to a ConvertRecord processor which wrote them out in JSON.

Looks very useful and I think this will make a lot of people's flows more powerful. Thanks Matt.

+1, merging.

@asfgit asfgit closed this in 9294a26 May 19, 2017
mattyb149 added a commit to mattyb149/nifi that referenced this pull request Nov 30, 2017
…ripting classes

This closes apache#1828.

Signed-off-by: Andy LoPresto <alopresto@apache.org>
mattyb149 added a commit to mattyb149/nifi that referenced this pull request Nov 30, 2017
…ripting classes

This closes apache#1828.

Signed-off-by: Andy LoPresto <alopresto@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