cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Stupp (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8241) Use ecj [was: javac] instead of javassist
Date Thu, 14 May 2015 16:15:00 GMT


Robert Stupp commented on CASSANDRA-8241:

The primary reason for not using a template approach was that I didn't wanted to pull in another
Using a template approach also felt a bit over-engineered, since the most dynamic part (one
function signature and the UDF input parameters and return types) might look even more complicated.

What I could try is this:
* Extract the static part of the source to a resource file
* Add placeholders for the complicated parts (argument + return value handling) to that resource
* Replace these placeholders with a simple search&replace or regexp functionality


> Use ecj [was: javac] instead of javassist
> -----------------------------------------
>                 Key: CASSANDRA-8241
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>              Labels: udf
>             Fix For: 2.2 beta 1
>         Attachments: 8241-ecj-v2.txt, 8241-ecj.txt, udf-java-javac.txt
> Using JDK's built-in Java-Compiler API has some advantages over javassist.
> Although compilation feels a bit slower, Java compiler API has some advantages:
> * boxing + unboxing works
> * generics work
> * compiler error messages are better (or at least known) and have line/column numbers
> The implementation does not use any temp files. Everything's in memory.
> Patch attached to this issue.

This message was sent by Atlassian JIRA

View raw message