You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2020/05/27 11:49:00 UTC

[GitHub] [drill] sanel commented on a change in pull request #2074: DRILL-7728: SPI framework

sanel commented on a change in pull request #2074:
URL: https://github.com/apache/drill/pull/2074#discussion_r431056640



##########
File path: common/src/main/java/org/apache/drill/extn/README.md
##########
@@ -0,0 +1,125 @@
+# Drill Service Provider Interface (SPI)
+
+The Drill SPI allows extensions (AKA plugins, providers) to extend Drill.
+This package provides the core extension mechanism and is a minor refinement
+of the standard Java
+[`ServiceLoader`](https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html)
+mechanism.
+
+## Layout
+
+A _service provider_ provides one or more _services_. The provider implements a
+provider interface, defined in the Drill SPI package. That interface provides factory
+methods to implement services.
+
+The provider developer creates a jar file with the properties described below. The jar
+file is then placed in Drill's extension directory which is either:
+
+* `$DRILL_HOME/ext` if using the "classic" approach, or
+* `$DRILL_SITE/ext` if usign a separate "site" directory.
+
+### Simple Jars
+
+The simplest service is one with no dependencies other than the JDK and Drill.
+These reside in a single jar file placed in the `ext` directory. A UDF is a typical
+example:
+
+```
+$DRILL_SITE
+|- ext
+   |- coolUdfs.jar
+   |- fancyUdfs.jar
+```
+
+The name of the jar can be anything, though Drill recommends Maven-style naming:
+
+```
+collUdfs-1.3.0.jar

Review comment:
       What happens if in the same folder exists both `collUdfs-1.3.0.jar` and `collUdfs-1.2.5.jar`? Which version is guaranteed to be loaded? Maybe this use case should be mentioned here.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org