[
https://issues.apache.org/jira/browse/CASSANDRA-7924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14142442#comment-14142442
]
Robert Stupp commented on CASSANDRA-7924:
-----------------------------------------
Patch v2 attached.
* Replaced {{AbstractJavaSourceUDF}} with {{JavaSourceUDFFactory}} - generated
functions now directly extend {{UDFunction}}
* Split code generation into multiple methods and added comments to illustrate
what's going on there. Replacing {{StringBuilder}} with {{String.format}} would
not help much, because the parameter-loops would mess it up, too. Comments that
illustrate how the generated code looks are there.
* Simplified exception handling (as suggested). But
{{InvocationTargetException}} still requires special handling (we need the
cause, not the ITE itself).
* Added the two suggested tests.
> Optimization of Java UDFs
> -------------------------
>
> Key: CASSANDRA-7924
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7924
> Project: Cassandra
> Issue Type: Bug
> Reporter: Robert Stupp
> Assignee: Robert Stupp
> Labels: docs, lhf, udf
> Fix For: 3.0
>
> Attachments: 7924.txt, 7924v2.txt
>
>
> Refactor 'java' UDFs to optimize invocation. Goal is to remove reflection
> code. Implementation uses javassist to generate an instance of {{Function}}
> that can be directly used.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)