phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karanmehta93 <...@git.apache.org>
Subject [GitHub] phoenix pull request #425: PHOENIX-5069 please go to JIRA to see the detaile...
Date Tue, 08 Jan 2019 01:38:10 GMT
Github user karanmehta93 commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/425#discussion_r245854871
  
    --- Diff: 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);
    --- End diff --
    
    On a second thought, do we know why do we build the cache even when stats are disabled?
Can we skip it or would it result in NPE's all around?


---

Mime
View raw message