Return-Path: Delivered-To: apmail-hadoop-hbase-issues-archive@minotaur.apache.org Received: (qmail 33443 invoked from network); 11 Apr 2010 21:06:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Apr 2010 21:06:05 -0000 Received: (qmail 19144 invoked by uid 500); 11 Apr 2010 21:06:05 -0000 Delivered-To: apmail-hadoop-hbase-issues-archive@hadoop.apache.org Received: (qmail 19113 invoked by uid 500); 11 Apr 2010 21:06:05 -0000 Mailing-List: contact hbase-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hbase-issues@hadoop.apache.org Received: (qmail 19105 invoked by uid 99); 11 Apr 2010 21:06:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Apr 2010 21:06:05 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Apr 2010 21:06:03 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3BL5fg7019799 for ; Sun, 11 Apr 2010 17:05:41 -0400 (EDT) Message-ID: <15784668.12471271019941599.JavaMail.jira@thor> Date: Sun, 11 Apr 2010 17:05:41 -0400 (EDT) From: "Ted Yu (JIRA)" To: hbase-issues@hadoop.apache.org Subject: [jira] Updated: (HBASE-2432) enhance hbase.util.Bytes.toBytes() with length limit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-2432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-2432: -------------------------- Attachment: HBASE-2432.patch Added public static byte[] toBytes(String s, int len) { > enhance hbase.util.Bytes.toBytes() with length limit > ---------------------------------------------------- > > Key: HBASE-2432 > URL: https://issues.apache.org/jira/browse/HBASE-2432 > Project: Hadoop HBase > Issue Type: Improvement > Components: util > Affects Versions: 0.20.1 > Reporter: Ted Yu > Attachments: HBASE-2432.patch > > > The following stack trace is seen in our hadoop log: > java.lang.IllegalArgumentException: Row > 32767 > at org.apache.hadoop.hbase.KeyValue.createByteArray(KeyValue.java:437) > at org.apache.hadoop.hbase.KeyValue.(KeyValue.java:405) > at org.apache.hadoop.hbase.KeyValue.(KeyValue.java:374) > at org.apache.hadoop.hbase.KeyValue.(KeyValue.java:353) > at org.apache.hadoop.hbase.client.Put.add(Put.java:137) > at org.apache.hadoop.hbase.client.Put.add(Put.java:108) > at org.apache.nutch.scoring.webgraph.ScoreUpdater$ScoreUpdaterReducer.reduce(ScoreUpdater.java:170) > at org.apache.nutch.scoring.webgraph.ScoreUpdater$ScoreUpdaterReducer.reduce(ScoreUpdater.java:127) > at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:174) > at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:563) > at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:408) > at org.apache.hadoop.mapred.Child.main(Child.java:170) > Bytes.toBytes(Float.valueOf(score).toString()) may return an array longer than 32767 bytes. > We should enhance Bytes.toBytes() to include length limit: > public static byte[] toBytes(String s, int length) > String.getBytes() doesn't have length limit -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira