hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joey Echeverria <j...@cloudera.com>
Subject Re: Encoding when using Bytes.toBytes(String)?
Date Tue, 26 Jul 2011 16:35:49 GMT
Bytes.toBytes(String) encodes using UTF-8 [1]. If all of your
characters are ASCII, then you'll use only one byte per character. I
think some ANSI characters will map to multibyte characters in UTF-8.

-Joey

[1] http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html#toBytes(java.lang.String)

On Tue, Jul 26, 2011 at 6:37 AM, Steinmaurer Thomas
<Thomas.Steinmaurer@scch.at> wrote:
> Hello,
>
>
>
> we are currently running tests in respect to disk space usage when
> inserting records into our table. Just want to be sure, if
> Bytes.toBytes(String) encodes a character with 2 bytes (Unicode)?
>
>
>
> As we only have ANSI characters in the rowkey (~ 48 characters) and
> qualifier values, I wonder if we could save disk space by converting
> stuff to an Ansi-String before sending it to the server?
>
>
>
> Thanks,
>
> Thomas
>
>
>
>



-- 
Joseph Echeverria
Cloudera, Inc.
443.305.9434

Mime
View raw message