Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6005F10C74 for ; Mon, 9 Dec 2013 22:04:07 +0000 (UTC) Received: (qmail 9595 invoked by uid 500); 9 Dec 2013 22:04:07 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 9566 invoked by uid 500); 9 Dec 2013 22:04:07 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 9557 invoked by uid 99); 9 Dec 2013 22:04:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 22:04:07 +0000 Date: Mon, 9 Dec 2013 22:04:06 +0000 (UTC) From: "Koert Kuipers (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-10112) Hbase rest query params for maxVersions and maxValues not parsed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Koert Kuipers created HBASE-10112: ------------------------------------- Summary: Hbase rest query params for maxVersions and maxValues not parsed Key: HBASE-10112 URL: https://issues.apache.org/jira/browse/HBASE-10112 Project: HBase Issue Type: Bug Components: REST Reporter: Koert Kuipers Priority: Minor 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:

Problem accessing /some_table_name/93%2B002%2B*/cf:tx_CUST_NAME/1,13862892906600/%3Fn%3D1. Reason:

    String index out of range: 50

Caused by:

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.<init>(RowSpec.java:59)
    at org.apache.hadoop.hbase.rest.RowResource.<init>(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 (never tried to build hbase myself).



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)