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 2B027E371 for ; Thu, 21 Feb 2013 03:14:16 +0000 (UTC) Received: (qmail 885 invoked by uid 500); 21 Feb 2013 03:14:15 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 677 invoked by uid 500); 21 Feb 2013 03:14: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 636 invoked by uid 99); 21 Feb 2013 03:14:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2013 03:14:13 +0000 Date: Thu, 21 Feb 2013 03:14:13 +0000 (UTC) From: "chunhui shen (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-7887) Support configuring KeyValue Comparator at table level 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-7887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13582859#comment-13582859 ] chunhui shen commented on HBASE-7887: ------------------------------------- bq.Where is the -1? The integer -1 's binary code is 11111111 11111111 11111111 11111111, so it is biggest if using byte comparator. bq.this is not possible because all tables come together in the .META. table and here Thanks, I'm clear now. Close this issue since not possible. > Support configuring KeyValue Comparator at table level > ------------------------------------------------------ > > Key: HBASE-7887 > URL: https://issues.apache.org/jira/browse/HBASE-7887 > Project: HBase > Issue Type: New Feature > Components: regionserver > Affects Versions: 0.96.0 > Reporter: chunhui shen > Assignee: chunhui shen > Fix For: 0.96.0 > > > Now, KeyValue Comparator is static by code in HRegionInfo > {code} > public KVComparator getComparator() { > return isRootRegion()? KeyValue.ROOT_COMPARATOR: isMetaRegion()? > KeyValue.META_COMPARATOR: KeyValue.COMPARATOR; > } > {code} > In some user cases, we need a personalized KeyValue Comparator. > e.g. Current ByteArrayComparator couldn't be used to sort number if exists negative number.(Because the bytes of -1 is bigger than the bytes of any other number) > I think supporting per-table configuration of KeyValue Comparator would be useful. > Welcome comments, > I will make the patch tomorrow. -- 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