drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Feinauer <julian.feina...@web.de>
Subject UDF is not recognized by drill / Validation Error
Date Thu, 19 May 2016 10:31:55 GMT
Dear folks,

I’m currently experimenting with user defined functions in drill but I’m not able to get
them to work on my drillbits.
I always get the error: Error: VALIDATION ERROR: From line 1, column 8 to line 1, column 41:
No match found for function signature myaddints(<ANY>, <ANY>).

I already went through all the tips I found in the mailing list.
The jar contains a drill-module.conf with the content:
drill.classpath.scanning.packages += "org.julian"
And the UDF is defined as:
package org.julian;

import ...

@FunctionTemplate(name = „myaddints", scope = FunctionTemplate.FunctionScope.SIMPLE, nulls
= FunctionTemplate.NullHandling.NULL_IF_NULL)
public class IntIntAdd implements DrillSimpleFunc {

    @Param
    IntHolder in1;

    @Param
    IntHolder in2;

    @Output
    IntHolder out;

    public void setup() {};

    public void eval() {
        out.value = in1.value + in2.value;
    }

}
I tried to find the bug using the logs and encountered the following messages from the drillbit.log:
Base Configuration:
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-common-1.6.0.jar!/drill-default.conf

Intermediate Configuration and Plugin files, in order of precedence:
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-gis-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-logical-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-kudu-storage-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/3rdparty/drill-memory-base-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-hive-exec-shaded-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-memory-base-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-mongo-storage-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-java-exec-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-common-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-storage-hbase-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-jdbc-storage-1.6.0.jar!/drill-module.conf
	- jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-storage-hive-core-1.6.0.jar!/drill-module.conf

which let’s me think that my jar file (drillUDF-1.0-SNAPSHOT.jar) is not scanned altough
it is located in jars/3rdparty.

Am I doing something wrong or am I missing something or has anyone a good hint for me?

Thank you already!
Julian
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message