Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F0EAD239 for ; Fri, 6 Jul 2012 22:43:36 +0000 (UTC) Received: (qmail 55507 invoked by uid 500); 6 Jul 2012 22:43:35 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 55413 invoked by uid 500); 6 Jul 2012 22:43:35 -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 55165 invoked by uid 99); 6 Jul 2012 22:43:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2012 22:43:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 0C8D114286A for ; Fri, 6 Jul 2012 22:43:35 +0000 (UTC) Date: Fri, 6 Jul 2012 22:43:35 +0000 (UTC) From: "Zhihong Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: <1730660971.16763.1341614615053.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1765336771.23204.1324167090761.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-5061) StoreFileLocalityChecker 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/HBASE-5061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408410#comment-13408410 ] Zhihong Ted Yu commented on HBASE-5061: --------------------------------------- Nice work. {code} +public class StoreFileLocalityChecker { {code} Should @InterfaceAudience.Private be added to the class ? {code} + void reportTotals(double min, double max, double average) throws IOException; {code} Since total isn't included in the report, maybe there is a better name for the above method ? {code} + private Pair getBlocksForPath(Path path) {code} Space after comma. {code} + if (familyDir.getPath().toString().endsWith(".tmp")) { + continue; {code} Is there other directory that should be skipped ? {code} + // Is the region assigned to the desired server? + byte[] value = row.getValue(HConstants.CATALOG_FAMILY, HConstants.SERVER_QUALIFIER); + if (value == null || value.length < serverName.length) { + return true; + } {code} If serverName is a prefix of value, the region would be included in the collection returned. Is that intended ? {code} + static class SimpleReporter implements Reporter { {code} The above class can be private, right ? Same with JSONReporter class. > StoreFileLocalityChecker > ------------------------ > > Key: HBASE-5061 > URL: https://issues.apache.org/jira/browse/HBASE-5061 > Project: HBase > Issue Type: New Feature > Affects Versions: 0.96.0, 0.94.1 > Reporter: Andrew Purtell > Assignee: Andrew Purtell > Priority: Minor > Attachments: HBASE-5061-0.94.patch, HBASE-5061-0.94.patch, HBASE-5061.patch, HBASE-5061.patch > > > org.apache.hadoop.hbase.HFileLocalityChecker [options] > A tool to report the number of local and nonlocal HFile blocks, and the ratio of as a percentage. > Where options are: > |-f |Analyze a store file| > |-r |Analyze all store files for the region| > |-t |Analyze all store files for regions of the table served by the local regionserver| > |-h |Consider local, defaults to the local host| > |-v|Verbose operation| -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira