Description
Phoenix maintains cache of PTable objects, also known as Metadata cache (as a Guava cache) at both server and client side. The size of the cache at server side is determined by config phoenix.coprocessor.maxMetaDataCacheSize with default value of 20 MB. Similarly, the size of the cache at client side is determined by phoenix.client.maxMetaDataCacheSize with default value of 10 MB.
To understand whether the size of the metadata caches at client and server side are sufficient for the given cluster and the give client, we need some visibility into how efficiently the caches are being utilized.
The purpose of this Jira is to add some metrics for both of these caches:
- Used cache size
- Cache hit count
- Cache miss count
- Cache eviction count
- Cache removal count (explicit or replaced)
- Cache add count (PTable objects added to the cache)