From issues-return-4053-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Wed Jan 16 23:46:15 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 386E11807A5 for ; Wed, 16 Jan 2019 23:46:15 +0100 (CET) Received: (qmail 31456 invoked by uid 500); 16 Jan 2019 22:46:14 -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 31336 invoked by uid 99); 16 Jan 2019 22:46:14 -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, 16 Jan 2019 22:46:14 +0000 From: GitBox To: issues@phoenix.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 Message-ID: <154767877348.5328.5148956974122821194.gitbox@gitbox.apache.org> Date: Wed, 16 Jan 2019 22:46:13 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 { - @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