Re: Dynamic UDF Registration

2017-01-31 Thread Charles Givre
Hi Arina, Thank you for your assistance on this. I’m also having issues with another UDF. This one is an aggregate function and I can’t seem to get Drill to recognize it. Here’s the repo if you wouldn’t mind taking a look. https://github.com/cgivre/drill-stats-function

Re: Dynamic UDF Registration

2017-01-31 Thread Arina Yelchiyeva
Hi Charles, yes you can. For example, you can create my.txt in your jar resource folder. >From code you may load its content using: getClass().getClassLoader().getResourceAsStream("my.txt"). But this will work only for functions loaded during drillbit startup (when you add jars in drillbit classpa

Re: Dynamic UDF Registration

2017-01-30 Thread Charles Givre
Hi Arina, Thank you very much for taking a look. I actually got it to work last night and found that the cause of the error was that I was not initializing the @Workspace parameters correctly. I had another question which I was wondering if you might be able to assist with. I’m not a Java d

Re: Dynamic UDF Registration

2017-01-30 Thread Arina Yelchiyeva
Hi Charles, 1. drill-module.conf: should be the following: *drill.classpath.scanning.packages += "org.apache.drill.contrib.function"* 2. when I have built the jars and tried to register functions, I got the following error: org.apache.drill.common.exceptions.DrillRuntimeException: Unexpected class

Re: Dynamic UDF Registration

2017-01-28 Thread Charles Givre
HI Arina, I’m still getting weird errors. Here’s my UDF: https://github.com/cgivre/drill-geoip-functions I build it using: mvn clean package -DskipTests and it builds fine. I copy the .jar files it creates to /jars/3rdparty, but when I try t

Re: Dynamic UDF Registration

2017-01-28 Thread Arina Yelchiyeva
Hi Charles, drill-module.conf file should be placed in src/main/resources folder. Example: https://github.com/arina-ielchiieva/drillUDF/blob/master/src/main/resources/drill-module.conf Kind regards Arina On Fri, Jan 27, 2017 at 10:50 PM, Charles Givre wrote: > I’m having some trouble register

Dynamic UDF Registration

2017-01-27 Thread Charles Givre
I’m having some trouble registering a UDF I wrote. The UDF was working in previous versions of Drill and now Drill doesn’t seem to recognize it. When I try to register it I get the following error: : jdbc:drill:zk=local> create function using jar 'drill-geoip-functions-1.0.jar'; ++---