You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Andy Grove <an...@gmail.com> on 2020/01/17 03:06:06 UTC

Writing storage plugins in Kotlin

I've been implementing a storage plugin in Java and this is the first time
I have written any substantial Java in a quite a while, and I would love to
be writing this in Kotlin instead!

My plugin is in its own project (I am not building as part of the Drill
project) and I am just adding dependencies for Drill jars that I need.

In theory, I shouldn't run into issues since Kotlin is supposedly 100%
compatible with Java, but I'm wondering if anyone has tried this yet?

Thanks,

Andy.

Re: Writing storage plugins in Kotlin

Posted by Paul Rogers <pa...@yahoo.com.INVALID>.
Hi Andy,

I've not heard of anyone doing this. But, I agree, it should work.

Since Drill loads all classes in a single class loader, dependency conflicts could be a problem. When you compile Kotlin (or Scala or Clojure) code to byte code, does it require support jars? Will the required jars conflict with those which Drill requires?

We've discussed following the lead of Presto and loading plugins in their own class loader. If we did that, dependency conflicts would not be an issue.

Thanks,
- Paul

 

    On Thursday, January 16, 2020, 07:06:23 PM PST, Andy Grove <an...@gmail.com> wrote:  
 
 I've been implementing a storage plugin in Java and this is the first time
I have written any substantial Java in a quite a while, and I would love to
be writing this in Kotlin instead!

My plugin is in its own project (I am not building as part of the Drill
project) and I am just adding dependencies for Drill jars that I need.

In theory, I shouldn't run into issues since Kotlin is supposedly 100%
compatible with Java, but I'm wondering if anyone has tried this yet?

Thanks,

Andy.