karanmehta93 commented on a change in pull request #425: PHOENIX-5069 please go
to JIRA to see the detailed design document attached.
URL: https://github.com/apache/phoenix/pull/425#discussion_r246490172
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/query/GuidePostsCache.java
##########
@@ -59,22 +59,36 @@
private final ConnectionQueryServices queryServices;
private final LoadingCache<GuidePostsKey, GuidePostsInfo> cache;
+ private final ExecutorService executor;
public GuidePostsCache(ConnectionQueryServices queryServices,
Configuration config) {
this.queryServices = Objects.requireNonNull(queryServices);
+
+ // The size of the thread pool used for refreshing cached table stats
+ final int statsCacheThreadPoolSize = config.getInt(
+ QueryServices.STATS_CACHE_THREAD_POOL_SIZE,
+ QueryServicesOptions.DEFAULT_STATS_CACHE_THREAD_POOL_SIZE);
+
+ executor = Executors.newFixedThreadPool(statsCacheThreadPoolSize);
Review comment:
Yes, the current solution seems fine. As you correctly pointed out, we dont
have any uniform callers and we dont have NPE's throwing around in code.
----------------------------------------------------------------
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