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

ASF GitHub Bot logged work on HIVE-25102:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/May/21 10:39
            Start Date: 12/May/21 10:39
    Worklog Time Spent: 10m 
      Work Description: marton-bod commented on a change in pull request #2261:
URL: https://github.com/apache/hive/pull/2261#discussion_r630926018



##########
File path: 
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/Catalogs.java
##########
@@ -284,4 +333,40 @@ private static String getCatalogType(Configuration conf, 
String catalogName) {
       }
     }
   }
+
+  public static class TableCache {
+    private static final Cache<String, Table> tableCache = 
Caffeine.newBuilder()
+        .expireAfterAccess(12, TimeUnit.HOURS).build();

Review comment:
       Shall we decrease this a bit? Perhaps 30 minutes would also suffice? Not 
sure what a "long" compilation time means for Hive usually. Decreasing it could 
give us some extra safety against cache pollution in case the hook-based 
eviction doesn't always go smoothly. Worst case in a very long compilation 
scenario, we might reload the table again eventually, but I'm assuming 
compilations that take 30+ minutes should be pretty rare?




-- 
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:
us...@infra.apache.org


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

    Worklog Id:     (was: 595201)
    Time Spent: 1h 20m  (was: 1h 10m)

> Cache Iceberg table objects within same query
> ---------------------------------------------
>
>                 Key: HIVE-25102
>                 URL: https://issues.apache.org/jira/browse/HIVE-25102
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: László Pintér
>            Assignee: László Pintér
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> We run Catalogs.loadTable(configuration, props) plenty of times which is 
> costly.
> We should:
>  - Cache it maybe even globally based on the queryId
>  - Make sure that the query uses one snapshot during the whole execution of a 
> single query



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

Reply via email to