facebook/presto — pull request #1464 by nezihyigitbasi (2014-07-03 19:22:21+00:00)
Title: Added fine-grained hive metastore cache control parameters

With this pull request users can now override the global hive.metastore-cache-ttl and hive.metastore-refresh-interval parameters with metadata operation specific parameters. If the user doesn't specify those specific parameters, the global settings take effect.

The hive caching metastore has multiple caches for various entities like tables, databases etc. and all these caches are configured with the same two parameters (hive.metastore-cache-ttl and hive.metastore-refresh-interval). Usually users want to see immediately their changes to the list of tables or databases. A solution to this is to set these two parameters to lower values. However, what we saw in production is usually the metastore operations on partitions (get partition by name and get partitions by names) can be relatively expensive compared to other operations. That's why I think it may be better to have separate cache settings for hive metadata operations so that the user can fine tune the behavior of Presto's cache. For example, setting the ttl for load tables and load databases to a lower value is desirable for many users.