adesh-rao commented on a change in pull request #1109:
URL: https://github.com/apache/hive/pull/1109#discussion_r449525538



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
##########
@@ -867,6 +909,77 @@ private void updateTableColStats(RawStore rawStore, String 
catName, String dbNam
       }
     }
 
+    private void updateTableForeignKeys(RawStore rawStore, String catName, 
String dbName, String tblName) {
+      LOG.debug("CachedStore: updating cached foreign keys objects for 
catalog: {}, database: {}, table: {}", catName,
+              dbName, tblName);
+      try {
+        Deadline.startTimer("getForeignKeys");
+        List<SQLForeignKey> fks = rawStore.getForeignKeys(catName, null, null, 
dbName, tblName);
+        Deadline.stopTimer();
+        
sharedCache.refreshForeignKeysInCache(StringUtils.normalizeIdentifier(catName),
+                StringUtils.normalizeIdentifier(dbName), 
StringUtils.normalizeIdentifier(tblName), fks);
+        LOG.debug("CachedStore: updated cached foreign keys objects for 
catalog: {}, database: {}, table: {}", catName,
+                dbName, tblName);
+      } catch (MetaException e) {

Review comment:
       done.




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to