Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@locus.apache.org Received: (qmail 36713 invoked from network); 26 Apr 2008 00:13:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Apr 2008 00:13:26 -0000 Received: (qmail 9049 invoked by uid 500); 26 Apr 2008 00:13:28 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 9024 invoked by uid 500); 26 Apr 2008 00:13:28 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 9013 invoked by uid 99); 26 Apr 2008 00:13:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2008 17:13:28 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Apr 2008 00:12:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ADB71234C115 for ; Fri, 25 Apr 2008 17:09:55 -0700 (PDT) Message-ID: <1015480458.1209168595710.JavaMail.jira@brutus> Date: Fri, 25 Apr 2008 17:09:55 -0700 (PDT) From: "stack (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Commented: (HBASE-82) row keys should be array of bytes with a specified comparator MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12592532#action_12592532 ] stack commented on HBASE-82: ---------------------------- I don't think it that basic. We still need to read in the arguments. Longest times inside in the 7% are creation of new Writable instance ~2%, doing BatchUpdate readFields ~1%, Text.readString ~1%. My guess is that hardwiring we could save about 10% -- maybe 20% at the outside. My takeaway though is that RPC messing requires more study, study to be done outside of this issue I'd say. > row keys should be array of bytes with a specified comparator > ------------------------------------------------------------- > > Key: HBASE-82 > URL: https://issues.apache.org/jira/browse/HBASE-82 > Project: Hadoop HBase > Issue Type: Wish > Reporter: Jim Kellerman > Assignee: stack > Fix For: 0.2.0 > > > I have heard from several people that row keys in HBase should be less restricted than hadoop.io.Text. > What do you think? > At the very least, a row key has to be a WritableComparable. This would lead to the most general case being either hadoop.io.BytesWritable or hbase.io.ImmutableBytesWritable. The primary difference between these two classes is that hadoop.io.BytesWritable by default allocates 100 bytes and if you do not pay attention to the length, (BytesWritable.getSize()), converting a String to a BytesWritable and vice versa can become problematic. > hbase.io.ImmutableBytesWritable, in contrast only allocates as many bytes as you pass in and then does not allow the size to be changed. > If we were to change from Text to a non-text key, my preference would be for ImmutableBytesWritable, because it has a fixed size once set, and operations like get, etc do not have to something like System.arrayCopy where you specify the number of bytes to copy. > Your comments, questions are welcome on this issue. If we receive enough feedback that Text is too restrictive, we are willing to change it, but we need to hear what would be the most useful thing to change it to as well. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.