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 069F7EFC9 for ; Wed, 20 Feb 2013 23:37:15 +0000 (UTC) Received: (qmail 47404 invoked by uid 500); 20 Feb 2013 23:37:14 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 47342 invoked by uid 500); 20 Feb 2013 23:37:14 -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 47264 invoked by uid 99); 20 Feb 2013 23:37:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2013 23:37:14 +0000 Date: Wed, 20 Feb 2013 23:37:14 +0000 (UTC) From: "Nick Dimiduk (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-6493) HashSet of byte array is being used in couple of places 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-6493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13582666#comment-13582666 ] Nick Dimiduk commented on HBASE-6493: ------------------------------------- Does this need another +1 or can i get a commit? > HashSet of byte array is being used in couple of places > ------------------------------------------------------- > > Key: HBASE-6493 > URL: https://issues.apache.org/jira/browse/HBASE-6493 > Project: HBase > Issue Type: Bug > Reporter: Shrijeet Paliwal > Assignee: Nick Dimiduk > Priority: Minor > Fix For: 0.96.0 > > Attachments: 0001-HBASE-6493-Use-custom-comparator-for-Set-byte.patch > > > While working on a jira I realized I had made a mistake of making a HashSet of byte array. > Then out of curiosity I checked if we do same any where else in code base. I came with following files. > # /src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java: Set qualifiers = new HashSet(); > # /src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java: columnFamilies = new HashSet(); > # /src/test/java/org/apache/hadoop/hbase/filter/TestFirstKeyValueMatchingQualifiersFilter.java: Set quals = new HashSet(); > # /src/test/java/org/apache/hadoop/hbase/regionserver/metrics/TestSchemaMetrics.java: Set families = new HashSet(); > (1) and (3) are mine and I will fix them (not yet committed). Quoting the exact reference from (2) below : > {code} > @Override > public GetStoreFileResponse getStoreFile(final RpcController controller, > final GetStoreFileRequest request) throws ServiceException { > try { > HRegion region = getRegion(request.getRegion()); > requestCount.incrementAndGet(); > Set columnFamilies = null; > if (request.getFamilyCount() == 0) { > columnFamilies = region.getStores().keySet(); > } else { > columnFamilies = new HashSet(); > for (ByteString cf: request.getFamilyList()) { > columnFamilies.add(cf.toByteArray()); > } > } > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira