From issues-return-3905-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Wed Jan 9 17:23:01 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 08580180669 for ; Wed, 9 Jan 2019 17:23:00 +0100 (CET) Received: (qmail 40846 invoked by uid 500); 9 Jan 2019 16:23:00 -0000 Mailing-List: contact issues-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list issues@phoenix.apache.org Received: (qmail 40831 invoked by uid 99); 9 Jan 2019 16:23:00 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jan 2019 16:23:00 +0000 From: GitBox To: issues@phoenix.apache.org Subject: [GitHub] BinShi-SecularBird commented on a change in pull request #425: PHOENIX-5069 please go to JIRA to see the detailed design document attached. Message-ID: <154705097954.8197.14426369103389067792.gitbox@gitbox.apache.org> Date: Wed, 09 Jan 2019 16:22:59 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit BinShi-SecularBird 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_r246447610 ########## File path: phoenix-core/src/main/java/org/apache/phoenix/query/GuidePostsCache.java ########## @@ -85,39 +106,46 @@ public GuidePostsCache(ConnectionQueryServices queryServices, Configuration conf }) // Log removals at TRACE for debugging .removalListener(new PhoenixStatsCacheRemovalListener()) - // Automatically load the cache when entries are missing - .build(isStatsEnabled ? new StatsLoader() : new EmptyStatsLoader()); + // Automatically load the cache when entries need to be refreshed + .build(cacheLoader); } /** - * {@link CacheLoader} implementation for the Phoenix Table Stats cache. + * {@link PhoenixStatsLoader} implementation for the Stats Loader. */ - protected class StatsLoader extends CacheLoader { + protected class StatsLoaderImpl implements PhoenixStatsLoader { @Override - public GuidePostsInfo load(GuidePostsKey statsKey) throws Exception { + public boolean needsLoad() { + // Whenever it's called, we try to load stats from stats table Review comment: added ---------------------------------------------------------------- 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