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 1EA0F200B84 for ; Mon, 29 Aug 2016 03:11:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1D0F9160AC7; Mon, 29 Aug 2016 01:11:23 +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 649A7160AB4 for ; Mon, 29 Aug 2016 03:11:22 +0200 (CEST) Received: (qmail 35701 invoked by uid 500); 29 Aug 2016 01:11: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 35576 invoked by uid 99); 29 Aug 2016 01:11:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2016 01:11:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 863362C0150 for ; Mon, 29 Aug 2016 01:11:20 +0000 (UTC) Date: Mon, 29 Aug 2016 01:11:20 +0000 (UTC) From: "binlijin (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16398) optimize HRegion computeHDFSBlocksDistribution MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 29 Aug 2016 01:11:23 -0000 [ https://issues.apache.org/jira/browse/HBASE-16398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15444446#comment-15444446 ] binlijin commented on HBASE-16398: ---------------------------------- I do have a simple perf, and run 100 rounds to computeHDFSBlocksDistribution for a directory have 0,1,2,3,4 files. ||number of files||without patch||with patch|| |0|83ms|193ms| |1|349ms|278ms| |2|543ms|323ms| |3|731ms|380ms| |4|995ms|532ms| > optimize HRegion computeHDFSBlocksDistribution > ---------------------------------------------- > > Key: HBASE-16398 > URL: https://issues.apache.org/jira/browse/HBASE-16398 > Project: HBase > Issue Type: Sub-task > Reporter: binlijin > Assignee: binlijin > Attachments: HBASE-16398.patch > > > First i assume there is no reference and link in a region family's directory. > Without the patch to computeHDFSBlocksDistribution for a region family, there is 1+2*N rpc call, N is hfile numbers, The first rpc call is to DistributedFileSystem#listStatus to get hfiles, for every hfile there is two rpc call DistributedFileSystem#getFileStatus(path) and then DistributedFileSystem#getFileBlockLocations(status, start, length). > With the patch to computeHDFSBlocksDistribution for a region family, there is 2 rpc call, they are DistributedFileSystem#getFileStatus(path) and DistributedFileSystem#listLocatedStatus(final Path p, final PathFilter filter). > So if there is at least one hfile, with the patch, the rpc call will less. -- This message was sent by Atlassian JIRA (v6.3.4#6332)