You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Bjoern Schiessle <bj...@schiessle.org> on 2010/10/13 11:51:05 UTC
Hbase thrift interface and non ascii characters
Hi,
I'm trying to access Hbase with Python via the thrift interface.
Therefore I'm using this python package:
http://pypi.python.org/pypi/hbase-thrift/0.20.4
Everything works fine, except if I try to write some non asccii character
to Hbase. Than I get this error message:
"'ascii' codec can't encode character u'\xe4' in position 9: ordinal not
in range(128)"
I have already tried to find some information about this problem, but I
couldn't find anything useful.
Does someone know how I could solve this problem?
Thanks a lot!
Björn
Re: Hbase thrift interface and non ascii characters
Posted by Bjoern Schiessle <bj...@schiessle.org>.
On Wed, 13 Oct 2010 19:23:05 -0400 Stack wrote:
> I asked our thrift expert Bryan and he thinks it could be because of
> old python bindings:
>
> "I think the summary is that you want to use a more recent version of
> Python Thrift and generate your clientside with the "utf8strings"
> option. This causes strings to be utf8-encoded and -decoded when
> communicating with servers."
Thank your very much for this information.
On the server I'm using the Hadoop distribution from Cloudera. To enable
Thirft I have installed hadoop-hbase-thrift (version:
0.89.20100924+28-1~lucid-cdh3b3)
On the client site I have installed the latest Python Thrift with pip
from http://pypi.python.org/pypi/hbase-thrift/0.20.4
Are there newer versions available?
Do you know how to generate the clientside while using the Cloudera
distribution? I don't have the program "thrift" and can't find a
Hbase.thrift file on my system.
best wishes,
Björn
Re: Hbase thrift interface and non ascii characters
Posted by Stack <st...@duboce.net>.
I asked our thrift expert Bryan and he thinks it could be because of
old python bindings:
"I think the summary is that you want to use a more recent version of
Python Thrift and generate your clientside with the "utf8strings"
option. This causes strings to be utf8-encoded and -decoded when
communicating with servers."
St.Ack
On Wed, Oct 13, 2010 at 5:51 AM, Bjoern Schiessle <bj...@schiessle.org> wrote:
> Hi,
>
> I'm trying to access Hbase with Python via the thrift interface.
> Therefore I'm using this python package:
> http://pypi.python.org/pypi/hbase-thrift/0.20.4
>
> Everything works fine, except if I try to write some non asccii character
> to Hbase. Than I get this error message:
>
> "'ascii' codec can't encode character u'\xe4' in position 9: ordinal not
> in range(128)"
>
> I have already tried to find some information about this problem, but I
> couldn't find anything useful.
>
> Does someone know how I could solve this problem?
>
> Thanks a lot!
> Björn
>