dbwong commented on a change in pull request #425: PHOENIX-5069 Use 
asynchronous refresh to provide non-blocking Phoenix Stats Client Cache
URL: https://github.com/apache/phoenix/pull/425#discussion_r248477351
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/query/GuidePostsCache.java
 ##########
 @@ -85,39 +106,54 @@ public GuidePostsCache(ConnectionQueryServices 
queryServices, Configuration conf
                 })
                 // Log removals at TRACE for debugging
                 .removalListener(new PhoenixStatsCacheRemovalListener())
-                // Automatically load the cache when entries are missing
-                .build(isStatsEnabled ? new StatsLoader() : new 
EmptyStatsLoader());
+                // Automatically load the cache when entries need to be 
refreshed
+                .build(cacheLoader);
     }
 
     /**
-     * {@link CacheLoader} implementation for the Phoenix Table Stats cache.
+     * {@link PhoenixStatsLoader} implementation for the Stats Loader.
      */
-    protected class StatsLoader extends CacheLoader<GuidePostsKey, 
GuidePostsInfo> {
+    protected class StatsLoaderImpl implements PhoenixStatsLoader {
 
 Review comment:
   Consider refactoring this into its own class and adding a unit test.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to