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_r248824547
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/query/GuidePostsCache.java
 ##########
 @@ -43,13 +43,13 @@
 import org.slf4j.LoggerFactory;
 
 import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
 import com.google.common.cache.RemovalCause;
 import com.google.common.cache.RemovalListener;
 import com.google.common.cache.RemovalNotification;
 import com.google.common.cache.Weigher;
 
+
 
 Review comment:
   In the current code base, The GuidePostsCache doesn't have unit test except 
the inner class PhoenixStatsCacheRemovealListner. My change DOES NOT rewrite 
GuidePostsCache that much. As you can see, my main changes in GuidePostsCache 
are: a. initialize ExecutorService object (I'm even considering move this part 
to PhoenixStatsCacheLoader according to your comment below) and initialize 
Guava cache object with refresh mechanism; b. trivial changes in the inner 
class StatsLoaderImpl. I didn't change the interface of GuidePostsCaches 
including get/put/invalidate* APIs. My main changes are in 
PhoenixStatsCacheLoader class which I added unit test. Adding unit test for 
GuidePostsCache shouldn't be addressed by this 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