You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Xavier Stevens <xs...@mozilla.com> on 2011/04/18 22:53:57 UTC

HBase 0.90.1 REST API

Currently we're trying to use the REST API on HBase 0.90.1. I'm getting
a 500 response saying "Invalid row key".

I am trying to post this from a python program:

URL:
http://ourserver:8080/rest_test/713c5967-b2e9-4f44-b0a1-8b862838f865/metrics:json
Data:
{"Row": {"Cell": [{"@column": "metrics:json", "$":
"eyJtZXRyaWMzIjogMywgIm1ldHJpYzIiOiAyLCAibWV0cmljMSI6IDF9"}], "@key":
"NzEzYzU5NjctYjJlOS00ZjQ0LWIwYTEtOGI4NjI4MzhmODY1"}}

Here's a snippet from the REST server log:
http://xstevens.pastebin.mozilla.org/1207027

Stack found the source location for this here:
http://hbase.apache.org/xref/org/apache/hadoop/hbase/client/Put.html#99

And here's the constant definition:
http://hbase.apache.org/xref/org/apache/hadoop/hbase/HConstants.html#237

Anyone know why this would throw an error?


Thanks,


Xavier

Re: HBase 0.90.1 REST API

Posted by Ted Yu <yu...@gmail.com>.
Touched hotkey too soon :-)
On the surface, the exception could mean that row length is greater than
32767 which was unlikely in your case.
I think at least we should enhance the IllegalArgumentException with the
length of row.

Cheers

On Mon, Apr 18, 2011 at 2:04 PM, Ted Yu <yu...@gmail.com> wrote:

> On the surface, the exception could mean that
>
> On Mon, Apr 18, 2011 at 1:53 PM, Xavier Stevens <xs...@mozilla.com>wrote:
>
>> Currently we're trying to use the REST API on HBase 0.90.1. I'm getting
>> a 500 response saying "Invalid row key".
>>
>> I am trying to post this from a python program:
>>
>> URL:
>>
>> http://ourserver:8080/rest_test/713c5967-b2e9-4f44-b0a1-8b862838f865/metrics:json
>> Data:
>> {"Row": {"Cell": [{"@column": "metrics:json", "$":
>> "eyJtZXRyaWMzIjogMywgIm1ldHJpYzIiOiAyLCAibWV0cmljMSI6IDF9"}], "@key":
>> "NzEzYzU5NjctYjJlOS00ZjQ0LWIwYTEtOGI4NjI4MzhmODY1"}}
>>
>> Here's a snippet from the REST server log:
>> http://xstevens.pastebin.mozilla.org/1207027
>>
>> Stack found the source location for this here:
>> http://hbase.apache.org/xref/org/apache/hadoop/hbase/client/Put.html#99
>>
>> And here's the constant definition:
>> http://hbase.apache.org/xref/org/apache/hadoop/hbase/HConstants.html#237
>>
>> Anyone know why this would throw an error?
>>
>>
>> Thanks,
>>
>>
>> Xavier
>>
>
>

Re: HBase 0.90.1 REST API

Posted by Ted Yu <yu...@gmail.com>.
On the surface, the exception could mean that

On Mon, Apr 18, 2011 at 1:53 PM, Xavier Stevens <xs...@mozilla.com>wrote:

> Currently we're trying to use the REST API on HBase 0.90.1. I'm getting
> a 500 response saying "Invalid row key".
>
> I am trying to post this from a python program:
>
> URL:
>
> http://ourserver:8080/rest_test/713c5967-b2e9-4f44-b0a1-8b862838f865/metrics:json
> Data:
> {"Row": {"Cell": [{"@column": "metrics:json", "$":
> "eyJtZXRyaWMzIjogMywgIm1ldHJpYzIiOiAyLCAibWV0cmljMSI6IDF9"}], "@key":
> "NzEzYzU5NjctYjJlOS00ZjQ0LWIwYTEtOGI4NjI4MzhmODY1"}}
>
> Here's a snippet from the REST server log:
> http://xstevens.pastebin.mozilla.org/1207027
>
> Stack found the source location for this here:
> http://hbase.apache.org/xref/org/apache/hadoop/hbase/client/Put.html#99
>
> And here's the constant definition:
> http://hbase.apache.org/xref/org/apache/hadoop/hbase/HConstants.html#237
>
> Anyone know why this would throw an error?
>
>
> Thanks,
>
>
> Xavier
>