hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-12801) Failed to truncate a table while maintaing binary region boundaries
Date Tue, 13 Jan 2015 03:32:34 GMT

     [ https://issues.apache.org/jira/browse/HBASE-12801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrew Purtell updated HBASE-12801:
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.1.0
     Hadoop Flags: Reviewed
           Status: Resolved  (was: Patch Available)

Pushed to 0.94 and 0.98+ 

> 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)

Mime
View raw message