hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <>
Subject [jira] [Work logged] (HIVE-22015) [CachedStore] Cache table constraints in CachedStore
Date Mon, 29 Jun 2020 11:30:00 GMT


ASF GitHub Bot logged work on HIVE-22015:

                Author: ASF GitHub Bot
            Created on: 29/Jun/20 11:29
            Start Date: 29/Jun/20 11:29
    Worklog Time Spent: 10m 
      Work Description: adesh-rao commented on a change in pull request #1109:

File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/
@@ -543,10 +556,24 @@ static void prewarm(RawStore rawStore) {
                 tableColStats = rawStore.getTableColumnStatistics(catName, dbName, tblName,
colNames, CacheUtils.HIVE_ENGINE);
+              Deadline.startTimer("getPrimaryKeys");
+              rawStore.getPrimaryKeys(catName, dbName, tblName);
+              Deadline.stopTimer();
+              Deadline.startTimer("getForeignKeys");
+              rawStore.getForeignKeys(catName, null, null, dbName, tblName);
+              Deadline.stopTimer();
+              Deadline.startTimer("getUniqueConstraints");
+              rawStore.getUniqueConstraints(catName, dbName, tblName);
+              Deadline.stopTimer();
+              Deadline.startTimer("getNotNullConstraints");
+              rawStore.getNotNullConstraints(catName, dbName, tblName);
+              Deadline.stopTimer();
               // If the table could not cached due to memory limit, stop prewarm
               boolean isSuccess = sharedCache
                   .populateTableInCache(table, tableColStats, partitions, partitionColStats,

Review comment:
       Done. Though the new class just contains constraints objects for now, we can have a
different refactoring jira for partition/column stat that can also refactor the array created
to store size/dirtyCache variable.

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:

Issue Time Tracking

    Worklog Id:     (was: 452256)
    Time Spent: 50m  (was: 40m)

> [CachedStore] Cache table constraints in CachedStore
> ----------------------------------------------------
>                 Key: HIVE-22015
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Daniel Dai
>            Assignee: Adesh Kumar Rao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
> Currently table constraints are not cached. Hive will pull all constraints from tables
involved in query, which results multiple db reads (including get_primary_keys, get_foreign_keys,
get_unique_constraints, etc). The effort to cache this is small as it's just another table

This message was sent by Atlassian Jira

View raw message