Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/574#discussion_r82597440
  
    --- 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 --
    
    Done.
    Added config ${drill.tmp-dir} which is not set by default.
    So we first check if  environmental variable $DRILL_TMP_DIR is set, if not 
we check if ${drill.tmp-dir} is set.
    If none of them is set we use Files.createTempDir( ) to generate temporary 
directory.
    Generated directory will be deleted on drillbit exit. Directories indicated 
by $DRILL_TMP_DIR or ${drill.tmp-dir} will be only cleaned up 
($DRILL_TMP_DIR/udf or ${drill.tmp-dir}/udf).
    
    Unfortunately I can set 
    drill.tmp-dir: "/tmp",
    drill.tmp-dir: "${?DRILL_TMP_DIR}" 
    right away since typesafe config doesn't allow to unset value and thus user 
will never be able to have generated temporary directory.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to