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

Peter Vary commented on HIVE-19834:
-----------------------------------

I am not big fan of this change.

There are very few comments in Hive code, but here the class comment says:
{code:java}
/**
 * Context for Semantic Analyzers. Usage: not reusable - construct a new one for
 * each query should call clear() at end of use to remove temporary folders
 */
{code}
This explicitly states that it removes temporary folders. In most cases this is 
the last method of the task, or execute method, so the class will be removed 
without fuss. Do we have specific cases where we have seen this is causing 
problems?

 

Thanks,

Peter

> Clear Context Map of Paths to ContentSummary
> --------------------------------------------
>
>                 Key: HIVE-19834
>                 URL: https://issues.apache.org/jira/browse/HIVE-19834
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>    Affects Versions: 3.0.0, 2.3.2, 4.0.0
>            Reporter: BELUGA BEHR
>            Assignee: BELUGA BEHR
>            Priority: Minor
>         Attachments: HIVE-19834.1.patch
>
>
> The {{Context}} class has a {{clear}} method which is called.  During the 
> method, various files are deleted and in-memory maps are cleared.  I would 
> like to propose that we clear out an additional in-memory map structure that 
> may contain a lot of data so that it can be GC'ed asap. This map contains 
> mapping of "File Path"->"Content Summary".  For a query with a large file 
> set, this can be quite large.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to