Return-Path: X-Original-To: apmail-kafka-dev-archive@www.apache.org Delivered-To: apmail-kafka-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BAFC6187AE for ; Thu, 28 Jan 2016 21:38:52 +0000 (UTC) Received: (qmail 72034 invoked by uid 500); 28 Jan 2016 21:38:40 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 71937 invoked by uid 500); 28 Jan 2016 21:38:40 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 71776 invoked by uid 99); 28 Jan 2016 21:38:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jan 2016 21:38:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 26AF02C0453 for ; Thu, 28 Jan 2016 21:38:40 +0000 (UTC) Date: Thu, 28 Jan 2016 21:38:40 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-3060) Refactor MeteredXXStore MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15122347#comment-15122347 ] ASF GitHub Bot commented on KAFKA-3060: --------------------------------------- Github user guozhangwang closed the pull request at: https://github.com/apache/kafka/pull/826 > Refactor MeteredXXStore > ----------------------- > > Key: KAFKA-3060 > URL: https://issues.apache.org/jira/browse/KAFKA-3060 > Project: Kafka > Issue Type: Sub-task > Components: kafka streams > Affects Versions: 0.9.0.1 > Reporter: Yasuhiro Matsuda > Priority: Minor > > ** copied from a github comment by Guozhang Wang ** > The original motivation of having the MeteredXXStore is to wrap all metrics / logging semantics into one place so they do not need to be re-implemented again, but this seems to be an obstacle with the current pattern now, for example MeteredWindowStore.putAndReturnInternalKey is only used for logging, and MeteredWindowStore.putInternal / MeteredWindowStore.getInternal are never used since only its inner will trigger this function. So how about refactoring this piece as follows: > 1. WindowStore only expose two APIs: put(K, V) and get(K, long). > 2. Add a RollingRocksDBStores that does not extend any interface, but only implements putInternal, getInternal and putAndReturnInternalKey that uses underlying RocksDBStore as Segments. > 3. RocksDBWindowStore implements WindowStore with an RollingRocksDBStores inner. > 4. Let MeteredXXStore only maintain the metrics recording logic, and let different stores implement their own logging logic, since this is now different across different types and are better handled separately. Also some types of stores may not even have a loggingEnabled flag, if it will always log, or will never log. -- This message was sent by Atlassian JIRA (v6.3.4#6332)