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 47819200BCE for ; Fri, 2 Dec 2016 20:25:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 46362160B29; Fri, 2 Dec 2016 19:25:00 +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 8D748160B08 for ; Fri, 2 Dec 2016 20:24:59 +0100 (CET) Received: (qmail 29641 invoked by uid 500); 2 Dec 2016 19:24:58 -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 29604 invoked by uid 99); 2 Dec 2016 19:24:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2016 19:24:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6CED02C0453 for ; Fri, 2 Dec 2016 19:24:58 +0000 (UTC) Date: Fri, 2 Dec 2016 19:24:58 +0000 (UTC) From: "huaxiang sun (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-17243) Reuse CompactionPartitionId and avoid creating MobFileName in PartitionedMobCompactor to avoid unnecessary new objects MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Dec 2016 19:25:00 -0000 [ https://issues.apache.org/jira/browse/HBASE-17243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] huaxiang sun updated HBASE-17243: --------------------------------- Status: Patch Available (was: Open) > Reuse CompactionPartitionId and avoid creating MobFileName in PartitionedMobCompactor to avoid unnecessary new objects > ---------------------------------------------------------------------------------------------------------------------- > > Key: HBASE-17243 > URL: https://issues.apache.org/jira/browse/HBASE-17243 > Project: HBase > Issue Type: Improvement > Components: mob > Affects Versions: 2.0.0 > Reporter: huaxiang sun > Assignee: huaxiang sun > Priority: Minor > Attachments: HBASE-17243-master-001.patch > > > In today's select() implementation, when it is an existing id, the new allocated object is discarded. It should be reused. fileName is created to getStartKey and getDate(), utility APIs can be created to directly get these fields from the string. > {code} > } else if (allFiles || linkedFile.getLen() < mergeableSize) { > // add all files if allFiles is true, > // otherwise add the small files to the merge pool > MobFileName fileName = MobFileName.create(linkedFile.getPath().getName()); > CompactionPartitionId id = new CompactionPartitionId(fileName.getStartKey(), > fileName.getDate()); > CompactionPartition compactionPartition = filesToCompact.get(id); > if (compactionPartition == null) { > compactionPartition = new CompactionPartition(id); > compactionPartition.addFile(file); > filesToCompact.put(id, compactionPartition); > } else { > compactionPartition.addFile(file); > } > selectedFileCount++; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)