[
https://issues.apache.org/jira/browse/KNOX-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161632#comment-16161632
]
Sandeep More commented on KNOX-1005:
------------------------------------
Hello [~lmccay], thanks for pointing it out, I had not tested it with KNOX-709.
After testing it, it does look like there is an issue, specifically with the
"," character.
{code}
➜ ~ curl -ik -H "Accept: application/json" -X GET
"http://localhost:60080/knox/*/data%3A0name/0%2C1505143530260"
HTTP/1.1 500 java.lang.NumberFormatException: For input string:
"0,1505143530260"
Content-Type: text/html; charset=iso-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 9153
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 java.lang.NumberFormatException: For input string:
"0,1505143530260"</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /knox/*/data%3A0name/0%2C1505143530260. Reason:
<pre> java.lang.NumberFormatException: For input string:
"0,1505143530260"</pre></p><h3>Caused
by:</h3><pre>java.lang.IllegalArgumentException:
java.lang.NumberFormatException: For input string: "0,1505143530260"
at org.apache.hadoop.hbase.rest.RowSpec.parseTimestamp(RowSpec.java:170)
at org.apache.hadoop.hbase.rest.RowSpec.<init>(RowSpec.java:62)
at
org.apache.hadoop.hbase.rest.RowResource.<init>(RowResource.java:77)
at
org.apache.hadoop.hbase.rest.TableResource.getRowResourceWithSuffixGlobbing(TableResource.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
{code}
But, this is not caused by Knox, you get the same issue when a direct request
is made to WebHbase. I do not think this should be fixed in Knox and definitely
not by blindly encoding everything, it would create more problems than it would
solve. Let me know your thoughts on it !
> Special characters in HBase rows while called through Knox
> ----------------------------------------------------------
>
> Key: KNOX-1005
> URL: https://issues.apache.org/jira/browse/KNOX-1005
> Project: Apache Knox
> Issue Type: Bug
> Components: Server
> Affects Versions: 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.12.0, 0.13.0
> Environment: CentOS Linux release 7.3.1611, HBase 1.1.2
> Reporter: Roman
> Assignee: Sandeep More
> Labels: regresion
> Fix For: 0.14.0
>
> Attachments: KNOX-1029.001.patch
>
>
> Hello,
> Any HBase row containing special characters in the name (for example #)
> throws 404 Not Found error if accessed via Knox 0.9.0 and above. Accessing
> the same row directly via HBase Rest works without any issues.
> I haven't tried with other special characters though, and I think this is
> caused by KNOX-709.
> How to reproduce:
> - Create an entry in HBase containing #:
> {code:java}
> hbase(main):002:0> put 'hbaseexample', '5#', 'columns:_c1', 'test'
> hbase(main):002:0> scan 'hbaseexample'
> ROW COLUMN+CELL
> 5# column=columns:_c1, timestamp=1503660672170, value=test
> 1 row(s) in 0.6700 seconds{code}
> - Try to access it via Knox 0.9.0 and above:
> {code:java}
> # curl -iku user:pass -X GET
> 'https://srv-knx01:8443/gateway/default/hbase/hbaseexample/5%23'
> HTTP/1.1 404 Not Found
> Date: Fri, 25 Aug 2017 14:48:08 GMT
> Set-Cookie: JSESSIONID=92exxxxxxxxxx16uy;Path=/gateway/default;Secure;HttpOnly
> Expires: Thu, 01 Jan 1970 00:00:00 GMT
> Set-Cookie: rememberMe=deleteMe; Path=/gateway/default; Max-Age=0;
> Expires=Thu, 24-Aug-2017 14:48:08 GMT
> Content-Type: text/plain
> Content-Length: 11
> Server: Jetty(9.2.15.v20160210)
> Not found
> {code}
> - No issues with Knox 0.8.0 and below:
> {code:java}
> # curl -iku user:pass -X GET
> 'https://srv-knx01:8443/gateway/default/hbase/hbaseexample/5%23'
> HTTP/1.1 200 OK
> Set-Cookie: JSESSIONID=1kxxxxxxxxxxnl5q;Path=/gateway/default;Secure;HttpOnly
> Expires: Thu, 01 Jan 1970 00:00:00 GMT
> Content-Type: text/xml
> Transfer-Encoding: chunked
> Server: Jetty(8.1.14.v20131031)
> <?xml version="1.0" standalone="yes"?><CellSet><Row key="NSM="><Cell
> column="Y29sdW1uczpfYzE="
> timestamp="1503660672170">dGVzdA==</Cell></Row></CellSet>
> {code}
> Thank you in advance.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)