Thank you Ted for the below information. I would be perfectly fine to use
the Java API.
 I tried running the Simple Drill function .
https://github.com/mapr-demos/simple-drill-functions

But then when I am trying to run the package , I am getting below error . I
am also attaching the detailed error file .

[WARNING] The POM for org.apache.drill.exec:drill-java-exec:jar:1.0.0 is
missing
, no dependency information available

[ERROR] Failed to execute goal on project simple-drill-function: Could not
resol
ve dependencies for project
com.mapr:simple-drill-function:jar:1.0-SNAPSHOT: Cou
ld not find artifact org.apache.drill.exec:drill-java-exec:jar:1.0.0 in
central
(https://repo.maven.apache.org/maven2) -> [Help 1]


Thanks,
Alok Tanna
eXertDigital


On Wed, Jun 24, 2015 at 12:42 AM, Ted Dunning <[email protected]> wrote:

> Yes and no.
>
> It would be pretty easy to build a Drill function that calls out to Jython
> code.  It should be relatively easy to pass a Python function name in as
> one of the arguments as well.
>
> The issues with this approach are:
>
> 1) kinda ugly because you aren't calling your code directly
>
> 2) Jython isn't quite Python
>
> I have no idea how to do it specifically, but it is plausible that you
> could build something that automatically generates the interlude function
> for you in Java that calls your Python code. Python annotations might be
> the cat's pajamas for this.  Or not.  Hard to say.
>
> The Java API that Drill provides is not a traditional API in the normal
> sense of the word because Drill actually snarfs the source code and inlines
> it into Drill-generated code.  It wouldn't understand your Python code at
> all.
>
> It might be possible to teach Drill how to understand how to transform
> Python UDF's directly into something that Drill could use, but that would
> definitely be a bit ambitious.
>
> How utterly clean an interface do you need?
>
>
>
>
>
>
> On Tue, Jun 23, 2015 at 10:10 PM, Alok Tanna <[email protected]>
> wrote:
>
> > Can we create Custom Functions using Python in Drill ?
> >
> > I do understand Drill provides a high performance Java API with
> interfaces
> > so that we can implement to develop simple and aggregate custom
> functions.
> >
> > Thanks,
> > Alok Tanna
> >
>
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\alok>mvn --version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T07:57:3
7-04:00)
Maven home: C:\apache-maven-3.3.3\bin\..
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_45\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "dos"

C:\Users\alok>cd..

C:\Users>cd..

C:\>cd simple-drill-functions-master

C:\simple-drill-functions-master>cd simple-drill-functions-master

C:\simple-drill-functions-master\simple-drill-functions-master>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building simple-drill-function 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-resources-plugin/2.6/maven-resources-plugin-2.6.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
resources-plugin/2.6/maven-resources-plugin-2.6.pom (8 KB at 0.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-plugins/23/maven-plugins-23.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
plugins/23/maven-plugins-23.pom (9 KB at 74.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/
22/maven-parent-22.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/2
2/maven-parent-22.pom (30 KB at 147.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/apache/11/apache-11
.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/apache/11/apache-11.
pom (15 KB at 53.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-resources-plugin/2.6/maven-resources-plugin-2.6.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
resources-plugin/2.6/maven-resources-plugin-2.6.jar (29 KB at 98.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-compiler-plugin/3.0/maven-compiler-plugin-3.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
compiler-plugin/3.0/maven-compiler-plugin-3.0.pom (10 KB at 85.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-compiler-plugin/3.0/maven-compiler-plugin-3.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
compiler-plugin/3.0/maven-compiler-plugin-3.0.jar (41 KB at 98.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom (11 KB at 94.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/sure
fire/2.12.4/surefire-2.12.4.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/suref
ire/2.12.4/surefire-2.12.4.pom (14 KB at 141.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.jar (30 KB at 87.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-jar-plugin/2.4/maven-jar-plugin-2.4.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
jar-plugin/2.4/maven-jar-plugin-2.4.pom (6 KB at 21.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-plugins/22/maven-plugins-22.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
plugins/22/maven-plugins-22.pom (13 KB at 59.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/
21/maven-parent-21.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/2
1/maven-parent-21.pom (26 KB at 61.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/apache/10/apache-10
.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/apache/10/apache-10.
pom (15 KB at 144.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-jar-plugin/2.4/maven-jar-plugin-2.4.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
jar-plugin/2.4/maven-jar-plugin-2.4.jar (34 KB at 104.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-source-plugin/2.4/maven-source-plugin-2.4.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
source-plugin/2.4/maven-source-plugin-2.4.pom (7 KB at 76.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-plugins/25/maven-plugins-25.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
plugins/25/maven-plugins-25.pom (10 KB at 118.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/
24/maven-parent-24.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/2
4/maven-parent-24.pom (37 KB at 71.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/apache/14/apache-14
.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/apache/14/apache-14.
pom (15 KB at 70.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven
-source-plugin/2.4/maven-source-plugin-2.4.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
source-plugin/2.4/maven-source-plugin-2.4.jar (31 KB at 79.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/drill/exec/drill-ja
va-exec/1.0.0/drill-java-exec-1.0.0.pom
[WARNING] The POM for org.apache.drill.exec:drill-java-exec:jar:1.0.0 is missing
, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/org/apache/drill/exec/drill-ja
va-exec/1.0.0/drill-java-exec-1.0.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.579 s
[INFO] Finished at: 2015-06-24T12:17:49-04:00
[INFO] Final Memory: 10M/114M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project simple-drill-function: Could not resol
ve dependencies for project com.mapr:simple-drill-function:jar:1.0-SNAPSHOT: Cou
ld not find artifact org.apache.drill.exec:drill-java-exec:jar:1.0.0 in central
(https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException

C:\simple-drill-functions-master\simple-drill-functions-master>mvn package -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building simple-drill-function 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.drill.exec:drill-java-exec:jar:1.0.0 is missing
, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.067 s
[INFO] Finished at: 2015-06-24T12:20:00-04:00
[INFO] Final Memory: 8M/77M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project simple-drill-function: Could not resol
ve dependencies for project com.mapr:simple-drill-function:jar:1.0-SNAPSHOT: Fai
lure to find org.apache.drill.exec:drill-java-exec:jar:1.0.0 in https://repo.mav
en.apache.org/maven2 was cached in the local repository, resolution will not be
reattempted until the update interval of central has elapsed or updates are forc
ed -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
n project simple-drill-function: Could not resolve dependencies for project com.
mapr:simple-drill-function:jar:1.0-SNAPSHOT: Failure to find org.apache.drill.ex
ec:drill-java-exec:jar:1.0.0 in https://repo.maven.apache.org/maven2 was cached
in the local repository, resolution will not be reattempted until the update int
erval of central has elapsed or updates are forced
        at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:221)
        at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resol
veProjectDependencies(LifecycleDependencyResolver.java:127)
        at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAr
eResolved(MojoExecutor.java:257)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:200)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre
adedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not res
olve dependencies for project com.mapr:simple-drill-function:jar:1.0-SNAPSHOT: F
ailure to find org.apache.drill.exec:drill-java-exec:jar:1.0.0 in https://repo.m
aven.apache.org/maven2 was cached in the local repository, resolution will not b
e reattempted until the update interval of central has elapsed or updates are fo
rced
        at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:211)
        at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:195)
        ... 23 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failure
to find org.apache.drill.exec:drill-java-exec:jar:1.0.0 in https://repo.maven.ap
ache.org/maven2 was cached in the local repository, resolution will not be reatt
empted until the update interval of central has elapsed or updates are forced
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDepen
dencies(DefaultRepositorySystem.java:384)
        at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
efaultProjectDependenciesResolver.java:205)
        ... 24 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to
 find org.apache.drill.exec:drill-java-exec:jar:1.0.0 in https://repo.maven.apac
he.org/maven2 was cached in the local repository, resolution will not be reattem
pted until the update interval of central has elapsed or updates are forced
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Defa
ultArtifactResolver.java:444)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtif
acts(DefaultArtifactResolver.java:246)
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDepen
dencies(DefaultRepositorySystem.java:367)
        ... 25 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to fin
d org.apache.drill.exec:drill-java-exec:jar:1.0.0 in https://repo.maven.apache.o
rg/maven2 was cached in the local repository, resolution will not be reattempted
 until the update interval of central has elapsed or updates are forced
        at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newExcepti
on(DefaultUpdateCheckManager.java:231)
        at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtif
act(DefaultUpdateCheckManager.java:206)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownlo
ads(DefaultArtifactResolver.java:585)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownl
oads(DefaultArtifactResolver.java:503)
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Defa
ultArtifactResolver.java:421)
        ... 27 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException

C:\simple-drill-functions-master\simple-drill-functions-master>

Reply via email to