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 85D631769D for ; Tue, 13 Jan 2015 06:43:34 +0000 (UTC) Received: (qmail 2942 invoked by uid 500); 13 Jan 2015 06:43:36 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 2899 invoked by uid 500); 13 Jan 2015 06:43:36 -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 2886 invoked by uid 99); 13 Jan 2015 06:43:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jan 2015 06:43:36 +0000 Date: Tue, 13 Jan 2015 06:43:35 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-12801) Failed to truncate a table while maintaing binary region boundaries 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-12801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14274805#comment-14274805 ] Hudson commented on HBASE-12801: -------------------------------- SUCCESS: Integrated in HBase-0.98-on-Hadoop-1.1 #756 (See [https://builds.apache.org/job/HBase-0.98-on-Hadoop-1.1/756/]) HBASE-12801 Failed to truncate a table while maintaing binary region boundaries (Liu Shaohui) (apurtell: rev 780f6f525e34dd84cbc5490ad3c7178de9b414d6) * hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java * hbase-shell/src/main/ruby/hbase/admin.rb > Failed to truncate a table while maintaing binary region boundaries > ------------------------------------------------------------------- > > Key: HBASE-12801 > URL: https://issues.apache.org/jira/browse/HBASE-12801 > Project: HBase > Issue Type: Bug > Components: shell > Affects Versions: 0.94.11 > Reporter: Liu Shaohui > Assignee: Liu Shaohui > Priority: Minor > Fix For: 1.0.0, 2.0.0, 0.98.10, 1.1.0, 0.94.28 > > Attachments: HBASE-12801-0.94-v1.diff, HBASE-12801-trunk-v1.diff > > > Binary region boundaries become wrong during > converting byte array to normal string, and back to byte array in truncate_preserve of admin.rb, which makes the truncation of table failed. > See: truncate_preserve method in admin.rb > {code} > splits = h_table.getRegionLocations().keys().map{|i| Bytes.toString(i.getStartKey)}.delete_if{|k| k == ""}.to_java :String > splits = org.apache.hadoop.hbase.util.Bytes.toByteArrays(splits) > {code} > eg: > {code} > \xFA\x00\x00\x00\x00\x00\x00\x00 -> \xEF\xBF\xBD\x00\x00\x00\x00\x00\x00\x00 > \xFC\x00\x00\x00\x00\x00\x00\x00 -> \xEF\xBF\xBD\x00\x00\x00\x00\x00\x00\x00 > {code} > Simple patch is using binary string instead of normal string. -- This message was sent by Atlassian JIRA (v6.3.4#6332)