[ 
https://issues.apache.org/jira/browse/BEAM-10925?focusedWorklogId=543952&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-543952
 ]

ASF GitHub Bot logged work on BEAM-10925:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Jan/21 01:25
            Start Date: 29/Jan/21 01:25
    Worklog Time Spent: 10m 
      Work Description: ibzib commented on a change in pull request #13835:
URL: https://github.com/apache/beam/pull/13835#discussion_r566518789



##########
File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/JavaUdfLoader.java
##########
@@ -57,7 +58,10 @@
    * Maps the external jar location to the functions the jar defines. Static 
so it can persist
    * across multiple SQL transforms.
    */
-  private static final Map<String, FunctionDefinitions> cache = new 
HashMap<>();
+  private static final Map<String, FunctionDefinitions> functionCache = new 
HashMap<>();
+
+  /** Maps potentially remote jar paths to their local file copies. */
+  private static final Map<String, File> jarCache = new HashMap<>();

Review comment:
       I can only think of a couple ways the cache could contain handles to 
nonexistent files:
   
   - If the file was deleted somehow.
   - If the cache was serialized and shipped to workers. But we don't include a 
JavaUdfLoader instance as part of CalcFn, instead we construct a new 
JavaUdfLoader instance in `CalcFn::setup`. Besides, the cache is a static 
variable, and static variables are never serialized.




----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 543952)
    Time Spent: 35.5h  (was: 35h 20m)

> ZetaSQL: Support Java UDF
> -------------------------
>
>                 Key: BEAM-10925
>                 URL: https://issues.apache.org/jira/browse/BEAM-10925
>             Project: Beam
>          Issue Type: New Feature
>          Components: dsl-sql-zetasql
>            Reporter: Kyle Weaver
>            Assignee: Kyle Weaver
>            Priority: P2
>          Time Spent: 35.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to