[ 
https://issues.apache.org/jira/browse/DRILL-4726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15552884#comment-15552884
 ] 

ASF GitHub Bot commented on DRILL-4726:
---------------------------------------

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/574#discussion_r82259602
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java
 ---
    @@ -378,38 +399,33 @@ private Path getLocalUdfDir() {
       }
     
       /**
    -   * First tries to get drill conf directory value from system properties,
    +   * First tries to get drill temporary directory value from system 
properties,
        * if value is missing, checks environment properties.
        * Throws exception is value is null.
    -   * @return drill conf dir path
    +   * @return drill temporary directory path
        */
    -  private String getConfDir() {
    -    String drillConfDir = "DRILL_CONF_DIR";
    -    String value = System.getProperty(drillConfDir);
    +  private String getTmpDir() {
    --- End diff --
    
    Can we be more forgiving here?
    
    1. Use DRILL_TMP_DIR, if set.
    2. Use a config file setting, if set.
    3. Use Google's Files.createTempDir( ) which "Atomically creates a new 
directory somewhere beneath the system's temporary directory (as defined by the 
java.io.tmpdir system property)"
    
    For most users, the choice in 3 should work fine. It would only be folks 
who have special needs that would set one of the other two properties.
    
    Then, we can use a TypeSafe trick to combine 1 and 2. Define the config 
property something like this:
    
    drill.temp-dir: "${DRILL_TMP_DIR"
    
    Now, you just have to check drill.temp-dir in your function. If not set, 
use the Files approach as a default.
    
    The nice thing about the Files approach is that each Drillbit will have a 
different directory (if two happen to be running (with different ports) at the 
same time.)
    
    I wonder, however, does the Files temp directory get deleted on Drillbit 
exit?


> Dynamic UDFs support
> --------------------
>
>                 Key: DRILL-4726
>                 URL: https://issues.apache.org/jira/browse/DRILL-4726
>             Project: Apache Drill
>          Issue Type: New Feature
>    Affects Versions: 1.6.0
>            Reporter: Arina Ielchiieva
>            Assignee: Paul Rogers
>             Fix For: Future
>
>
> Allow register UDFs without  restart of Drillbits.
> Design is described in document below:
> https://docs.google.com/document/d/1FfyJtWae5TLuyheHCfldYUpCdeIezR2RlNsrOTYyAB4/edit?usp=sharing
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to