phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] dbwong commented on a change in pull request #425: PHOENIX-5069 Use asynchronous refresh to provide non-blocking Phoenix Stats Client Cache
Date Wed, 16 Jan 2019 22:46:13 GMT
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_r248475543
 
 

 ##########
 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 dislike these do nothing classes.  Is there too many places to do a stats enabled if
else check around the loaders?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message