Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A8EE62009F3 for ; Fri, 20 May 2016 17:30:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A770A160A0E; Fri, 20 May 2016 15:30:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CBB4A1609B1 for ; Fri, 20 May 2016 17:30:28 +0200 (CEST) Received: (qmail 72481 invoked by uid 500); 20 May 2016 15:30:23 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 72311 invoked by uid 99); 20 May 2016 15:30:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2016 15:30:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2F2A1C009F for ; Fri, 20 May 2016 15:30:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.199 X-Spam-Level: * X-Spam-Status: No, score=1.199 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, T_REMOTE_IMAGE=0.01] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=maprtech.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id yVVPBYgqpbBx for ; Fri, 20 May 2016 15:30:20 +0000 (UTC) Received: from mail-ig0-f178.google.com (mail-ig0-f178.google.com [209.85.213.178]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id E13635F295 for ; Fri, 20 May 2016 15:30:19 +0000 (UTC) Received: by mail-ig0-f178.google.com with SMTP id bi2so139286813igb.0 for ; Fri, 20 May 2016 08:30:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maprtech.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=HX1lW+2C2831lnsAkEL9os4KbbWMCqo+ruVgBmVPolU=; b=h9vXgQmVWuZoBqzw7sDaS2FQP6yG44iaI+PcMeuRcVdNaljajGIh91/uHasjhJY5Od 9XE3ld8oLwFC6kuhC3rWSPxNAAbOB6/60udeYDWjy+e1WRlpitb6Pn4Qownl4RkxluDX hFA5Di8UXT127Ww3owvNAmnKsKsYieUcd0qHU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=HX1lW+2C2831lnsAkEL9os4KbbWMCqo+ruVgBmVPolU=; b=U982KrAvyfDoGZsX8Lj7CCukIHVoe6Wpwhg0DrfCvnc4f8L9s8eH88wSUGZwKGdMUs /vNmZjrpDbYHcFYKPiSw25OrH9SnYyCgKFDciIQbms4AjcVeJjn2oiLns0pbpzR58C9t cuTPE15hHVga1UIpl5SfDw1pkzv1veV/12wjvcrJrtD4uV5nyIFLep9godyIhH/sx3um PaHaaNIDKkEJQgrU0ri96AN64N0IEKEo/t4g4zYRpjduURG0Fo17JTr+L0BKh/00USzs ZH4l2EhjE/gp/Rm9cD+EMKUZYCpeTQPvBnrKuFoNbDJk7U1Xad9FN6oNNAC7bbjiPiog 85Gw== X-Gm-Message-State: AOPr4FUP3hEE/WnskYfybFmunaTWxFXvn3sieotGPawujmyXUkLISnBmeWFw7mNu+GUTjSBvHSDC2s1LGkrmUS9U MIME-Version: 1.0 X-Received: by 10.50.59.211 with SMTP id b19mr3588672igr.58.1463758213135; Fri, 20 May 2016 08:30:13 -0700 (PDT) Received: by 10.79.135.65 with HTTP; Fri, 20 May 2016 08:30:13 -0700 (PDT) In-Reply-To: <7A9EB36A-6E87-4256-8030-AE7B11026B18@web.de> References: <7A9EB36A-6E87-4256-8030-AE7B11026B18@web.de> Date: Fri, 20 May 2016 08:30:13 -0700 Message-ID: Subject: Re: UDF is not recognized by drill / Validation Error From: Abdel Hakim Deneche To: "dev@drill.apache.org" Cc: Tugdual Grall Content-Type: multipart/alternative; boundary=047d7bd7575854d3d9053347c4a3 archived-at: Fri, 20 May 2016 15:30:29 -0000 --047d7bd7575854d3d9053347c4a3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Julian, can you share the both jars (classes and sources) with us. I will give it a try and see if I can figure out what's going on. Thanks On Fri, May 20, 2016 at 6:08 AM, Julian Feinauer wrote: > Dear all, > > thank you very much for all your replies. > I tried everything but it is still not working. > > 1. I copy both files (classes and sources) in the /jars/3rdparty director= y > 2. I restarted the drillbit after this (I use only one drillbit and > drill-conf both running on my local machine) > 3. I changed the class to a static subclass > 4. I have the drill-module.conf in my ressources > 4. The error appears in the drillbit.log as soon as i call the udf becaus= e > it is not recognized by drill. > On startup drillbit.log states all the packages and jars that are scanned > and my custom jar is not listed there. > Therefore I think it is a problem with the class loader or something > related? > > Could this be possible? > > Greetings > Julian > > > Am 20.05.2016 um 14:36 schrieb Tugdual Grall : > > > > Hi > > > > Be sure you deploy on each nodes, 2 jars: > > - the jar containing the classes > > - the jar contains the sources > > > > The POM.xml in the simple function examples contains the maven > > configuration to generate these 2 files, be sure you have the same in > your > > project: > > > https://github.com/tgrall/drill-simple-mask-function/blob/master/pom.xml#= L24-L37 > > > > and you have restarted the drillbit > > > > Regards > > Tug > > @tgrall > > > > > > > > On Fri, May 20, 2016 at 12:34 AM, Abdel Hakim Deneche < > adeneche@maprtech.com > >> wrote: > > > >> the example I gave you was incomplete, here is what I meant to send: > >> > >> public class MyUDF { > >> > >> @FunctionTemplate(name =3D =E2=80=9Emyaddints", scope =3D FunctionTe= mplate. > >> FunctionScope.SIMPLE, nulls =3D > >> FunctionTemplate.NullHandling.NULL_IF_NULL) > >> public *static *class IntIntAdd implements DrillSimpleFunc { > >> ... > >> } > >> > >> } > >> > >> > >> On Thu, May 19, 2016 at 3:33 PM, Abdel Hakim Deneche < > >> adeneche@maprtech.com> > >> wrote: > >> > >>> Hey Julian, > >>> > >>> one more thing you could try out: declare the UDF as a static class > >> inside > >>> another class: > >>> > >>> public class MyUDF { > >>> > >>> @FunctionTemplate(name =3D =E2=80=9Emyaddints", scope =3D FunctionT= emplate. > >>> FunctionScope.SIMPLE, nulls =3D FunctionTemplate.NullHandling. > >>> NULL_IF_NULL) > >>> public class IntIntAdd implements DrillSimpleFunc { > >>> ... > >>> } > >>> > >>> } > >>> > >>> Take a look at the following page to see an examples of UDFs: > >>> http://drill.apache.org/docs/custom-function-interfaces/ > >>> > >>> If this doesn't work check the drillbit log, it should print an error > >>> message when it's starting up if something's wrong with your UDF. > >>> > >>> Thanks > >>> > >>> > >>> On Thu, May 19, 2016 at 3:31 AM, Julian Feinauer < > julian.feinauer@web.de > >>> > >>> wrote: > >>> > >>>> Dear folks, > >>>> > >>>> I=E2=80=99m currently experimenting with user defined functions in d= rill but > I=E2=80=99m > >>>> 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(, > >>>> ). > >>>> > >>>> 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 +=3D "org.julian" > >>>> And the UDF is defined as: > >>>> package org.julian; > >>>> > >>>> import ... > >>>> > >>>> @FunctionTemplate(name =3D =E2=80=9Emyaddints", scope =3D > >>>> FunctionTemplate.FunctionScope.SIMPLE, nulls =3D > >>>> 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 =3D 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-sto= rage-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-exe= c-shaded-1.6.0.jar!/drill-module.conf > >>>> - > >>>> > >> > jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-memory-b= ase-1.6.0.jar!/drill-module.conf > >>>> - > >>>> > >> > jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-mongo-st= orage-1.6.0.jar!/drill-module.conf > >>>> - > >>>> > >> > jar:file:/usr/local/Cellar/apache-drill/1.6.0/libexec/jars/drill-java-exe= c-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-sto= rage-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=E2=80=99s 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 > >>> > >>> > >>> > >>> > >>> -- > >>> > >>> Abdelhakim Deneche > >>> > >>> Software Engineer > >>> > >>> > >>> > >>> > >>> Now Available - Free Hadoop On-Demand Training > >>> < > >> > http://www.mapr.com/training?utm_source=3DEmail&utm_medium=3DSignature&ut= m_campaign=3DFree%20available > >>> > >>> > >> > >> > >> > >> -- > >> > >> Abdelhakim Deneche > >> > >> Software Engineer > >> > >> > >> > >> > >> Now Available - Free Hadoop On-Demand Training > >> < > >> > http://www.mapr.com/training?utm_source=3DEmail&utm_medium=3DSignature&ut= m_campaign=3DFree%20available > >>> > >> > > --=20 Abdelhakim Deneche Software Engineer Now Available - Free Hadoop On-Demand Training --047d7bd7575854d3d9053347c4a3--