You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Koert Kuipers <ko...@tresata.com> on 2013/12/07 19:01:04 UTC

hbase rest query params for maxVersions and maxValues

i am trying to use maxValues with a "globbed" row resource in stargate.
from looking at the source code one has to do something like

table/row/column(s)/timestamp(s)/?n=1

(except the ?n=1 piece must be urlencoded)

however i cannot get the n=1 piece to work. i get this stacktrace:

<p>Problem accessing
/some_table_name/93%2B002%2B*/cf:tx_CUST_NAME/1,13862892906600/%3Fn%3D1.
Reason:
<pre>    String index out of range: 50</pre></p><h3>Caused
by:</h3><pre>java.lang.StringIndexOutOfBoundsException: String index out of
range: 50
    at
java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:174)
    at java.lang.StringBuilder.charAt(StringBuilder.java:55)
    at
org.apache.hadoop.hbase.rest.RowSpec.parseQueryParams(RowSpec.java:260)
    at org.apache.hadoop.hbase.rest.RowSpec.&lt;init&gt;(RowSpec.java:59)
    at
org.apache.hadoop.hbase.rest.RowResource.&lt;init&gt;(RowResource.java:74)
    at
org.apache.hadoop.hbase.rest.TableResource.getRowResource(TableResource.java:90)

the offending line is (260 in RowSpec):
c = query.charAt(i);

i think this should be
c = query.charAt(j);

same for line 248 (which handles the maxVersions)

i have not been able to test this.

Re: hbase rest query params for maxVersions and maxValues

Posted by Koert Kuipers <ko...@tresata.com>.
https://issues.apache.org/jira/browse/HBASE-10112


On Sun, Dec 8, 2013 at 1:07 AM, Ted Yu <yu...@gmail.com> wrote:

> Koert:
> Thanks for reporting this issue.
>
> Mind filing a JIRA ?
>
> Cheers
>
>
> On Sun, Dec 8, 2013 at 2:01 AM, Koert Kuipers <ko...@tresata.com> wrote:
>
> > i am trying to use maxValues with a "globbed" row resource in stargate.
> > from looking at the source code one has to do something like
> >
> > table/row/column(s)/timestamp(s)/?n=1
> >
> > (except the ?n=1 piece must be urlencoded)
> >
> > however i cannot get the n=1 piece to work. i get this stacktrace:
> >
> > <p>Problem accessing
> > /some_table_name/93%2B002%2B*/cf:tx_CUST_NAME/1,13862892906600/%3Fn%3D1.
> > Reason:
> > <pre>    String index out of range: 50</pre></p><h3>Caused
> > by:</h3><pre>java.lang.StringIndexOutOfBoundsException: String index out
> of
> > range: 50
> >     at
> > java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:174)
> >     at java.lang.StringBuilder.charAt(StringBuilder.java:55)
> >     at
> > org.apache.hadoop.hbase.rest.RowSpec.parseQueryParams(RowSpec.java:260)
> >     at org.apache.hadoop.hbase.rest.RowSpec.&lt;init&gt;(RowSpec.java:59)
> >     at
> >
> org.apache.hadoop.hbase.rest.RowResource.&lt;init&gt;(RowResource.java:74)
> >     at
> >
> >
> org.apache.hadoop.hbase.rest.TableResource.getRowResource(TableResource.java:90)
> >
> > the offending line is (260 in RowSpec):
> > c = query.charAt(i);
> >
> > i think this should be
> > c = query.charAt(j);
> >
> > same for line 248 (which handles the maxVersions)
> >
> > i have not been able to test this.
> >
>

Re: hbase rest query params for maxVersions and maxValues

Posted by Ted Yu <yu...@gmail.com>.
Koert:
Thanks for reporting this issue.

Mind filing a JIRA ?

Cheers


On Sun, Dec 8, 2013 at 2:01 AM, Koert Kuipers <ko...@tresata.com> wrote:

> i am trying to use maxValues with a "globbed" row resource in stargate.
> from looking at the source code one has to do something like
>
> table/row/column(s)/timestamp(s)/?n=1
>
> (except the ?n=1 piece must be urlencoded)
>
> however i cannot get the n=1 piece to work. i get this stacktrace:
>
> <p>Problem accessing
> /some_table_name/93%2B002%2B*/cf:tx_CUST_NAME/1,13862892906600/%3Fn%3D1.
> Reason:
> <pre>    String index out of range: 50</pre></p><h3>Caused
> by:</h3><pre>java.lang.StringIndexOutOfBoundsException: String index out of
> range: 50
>     at
> java.lang.AbstractStringBuilder.charAt(AbstractStringBuilder.java:174)
>     at java.lang.StringBuilder.charAt(StringBuilder.java:55)
>     at
> org.apache.hadoop.hbase.rest.RowSpec.parseQueryParams(RowSpec.java:260)
>     at org.apache.hadoop.hbase.rest.RowSpec.&lt;init&gt;(RowSpec.java:59)
>     at
> org.apache.hadoop.hbase.rest.RowResource.&lt;init&gt;(RowResource.java:74)
>     at
>
> org.apache.hadoop.hbase.rest.TableResource.getRowResource(TableResource.java:90)
>
> the offending line is (260 in RowSpec):
> c = query.charAt(i);
>
> i think this should be
> c = query.charAt(j);
>
> same for line 248 (which handles the maxVersions)
>
> i have not been able to test this.
>