BinShi-SecularBird 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_r249141342
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/query/GuidePostsCache.java
 ##########
 @@ -128,20 +164,30 @@ public GuidePostsInfo load(GuidePostsKey statsKey) 
throws Exception {
         void traceStatsUpdate(GuidePostsKey key, GuidePostsInfo info) {
             if (logger.isTraceEnabled()) {
                 logger.trace("Updating local TableStats cache (id={}) for {}, 
size={}bytes",
-                      new Object[] {Objects.hashCode(GuidePostsCache.this), 
key,
-                      info.getEstimatedSize()});
+                        new Object[] {Objects.hashCode(GuidePostsCache.this), 
key, info.getEstimatedSize()});
             }
         }
     }
 
     /**
+     * {@link PhoenixStatsLoader} implementation for the Stats Loader.
      * Empty stats loader if stats are disabled
      */
-       protected class EmptyStatsLoader extends CacheLoader<GuidePostsKey, 
GuidePostsInfo> {
-               @Override
-               public GuidePostsInfo load(GuidePostsKey statsKey) throws 
Exception {
-                       return GuidePostsInfo.NO_GUIDEPOST;
-               }
+       protected class EmptyStatsLoader implements PhoenixStatsLoader {
 
 Review comment:
   I don't like it too. It was introduced by Open Source Community 
"PHOENIX-5010 (https://issues.apache.org/jira/browse/PHOENIX-5010) Don't build 
client guidepost cache when phoenix.stats.collection.enabled is disabled" 
instead of my change.

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