You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Burgess (Jira)" <ji...@apache.org> on 2021/03/02 22:16:00 UTC

[jira] [Commented] (NIFI-4307) Add Kotlin support to ExecuteScript

    [ https://issues.apache.org/jira/browse/NIFI-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17294019#comment-17294019 ] 

Matt Burgess commented on NIFI-4307:
------------------------------------

Hope you have an easier time of it than I did, I put my continuing (but incomplete work) up at https://github.com/mattyb149/nifi/pull/new/NIFI-4307 , I had an awful time trying to get it to work with InvokeScriptedProcessor, mostly when trying to set the binding "processor" to an instance of the processor class. But it is using Compilable to boost performance. However because the script engine is a REPL it keeps the state and bindings, so we might need some more code around whether to scrap the engine each time. But if we have to do that, the performance will probably plummet, so I wasn't sure what to do. We could exclude it from the InvokeScriptedProcessor list (and all the scripted components that work like ISP) even though the ScriptEngine implements Invocable.

Another issue but with ExecuteScript is with putting stuff like the logger and session and context into variables using the configurator. Since we put in an import section and then a variables section, you can't have additional imports. If we can work that out we might be able to use Kotlin in ScriptedTransformRecord too.

Anyway I posted what I have but am giving up on it again for the time being. Feel free to take anything from my branch that's useful :)

> Add Kotlin support to ExecuteScript
> -----------------------------------
>
>                 Key: NIFI-4307
>                 URL: https://issues.apache.org/jira/browse/NIFI-4307
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Mike Thomsen
>            Assignee: Mike Thomsen
>            Priority: Minor
>
> Kotlin has a ScriptEngine implementation as of v1.1. Add support for it in NiFi.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)