Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 42ABA200B7A for ; Mon, 5 Sep 2016 13:28:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3E127160ACB; Mon, 5 Sep 2016 11:28:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 850B0160ABC for ; Mon, 5 Sep 2016 13:28:21 +0200 (CEST) Received: (qmail 11057 invoked by uid 500); 5 Sep 2016 11:28:20 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 11038 invoked by uid 99); 5 Sep 2016 11:28:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2016 11:28:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 84DBD2C1B77 for ; Mon, 5 Sep 2016 11:28:20 +0000 (UTC) Date: Mon, 5 Sep 2016 11:28:20 +0000 (UTC) From: "Anastasia Braginsky (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16229) Cleaning up size and heapSize calculation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 05 Sep 2016 11:28:22 -0000 [ https://issues.apache.org/jira/browse/HBASE-16229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15464790#comment-15464790 ] Anastasia Braginsky commented on HBASE-16229: --------------------------------------------- Hey, [~anoop.hbase], I have seen your replies to my first review part, all looks very good :) I would like to ask you, to remove my comments by pressing FIX or DROP or at least please add some comment-reply to each comment of mine so I can understand your intention and press FIX or DROP :) :) I can reopen any issue if I disagree with you. Here are the issues that we agreed so far to cope with them in another JIRAs: 1. AbstractMemStore's heapSizeChange() is going to be removed and heapSizeChange() is going to appear only in segments. 2. In Memstore interface we have size() and keySize(). In AbstractMemStore interface we have another heapSize() which is actually directly invokes the size(). Let's have only size() and keySize() everywhere. Please let me know if I understand it correctly and if yes, please specify under which JIRA you are going to take care. Thank you very much for what you are doing! This is a very important and scrupulous fix you are doing! I am continuing the review :) > Cleaning up size and heapSize calculation > ----------------------------------------- > > Key: HBASE-16229 > URL: https://issues.apache.org/jira/browse/HBASE-16229 > Project: HBase > Issue Type: Sub-task > Affects Versions: 2.0.0 > Reporter: Anoop Sam John > Assignee: Anoop Sam John > Fix For: 2.0.0 > > Attachments: HBASE-16229.patch, HBASE-16229_V2.patch, HBASE-16229_V3.patch, HBASE-16229_V4.patch, HBASE-16229_V5.patch, HBASE-16229_V5.patch > > > It is bit ugly now. For eg: > AbstractMemStore > {code} > public final static long FIXED_OVERHEAD = ClassSize.align( > ClassSize.OBJECT + > (4 * ClassSize.REFERENCE) + > (2 * Bytes.SIZEOF_LONG)); > public final static long DEEP_OVERHEAD = ClassSize.align(FIXED_OVERHEAD + > (ClassSize.ATOMIC_LONG + ClassSize.TIMERANGE_TRACKER + > ClassSize.CELL_SKIPLIST_SET + ClassSize.CONCURRENT_SKIPLISTMAP)); > {code} > We include the heap overhead of Segment also here. It will be better the Segment contains its overhead part and the Memstore impl uses the heap size of all of its segments to calculate its size. > Also this > {code} > public long heapSize() { > return getActive().getSize(); > } > {code} > HeapSize to consider all segment's size not just active's. I am not able to see an override method in CompactingMemstore. > This jira tries to solve some of these. > When we create a Segment, we seems pass some initial heap size value to it. Why? The segment object internally has to know what is its heap size not like some one else dictate it. > More to add when doing this cleanup -- This message was sent by Atlassian JIRA (v6.3.4#6332)