[
https://issues.apache.org/jira/browse/HBASE-1768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744653#action_12744653
]
stack commented on HBASE-1768:
------------------------------
Here is patch:
{code}
Index: src/java/org/apache/hadoop/hbase/rest/Dispatcher.java
===================================================================
--- src/java/org/apache/hadoop/hbase/rest/Dispatcher.java (revision
805507)
+++ src/java/org/apache/hadoop/hbase/rest/Dispatcher.java (working copy)
@@ -374,14 +374,13 @@
return new byte[0];
}
}
- char[] c;// 40 characters * sizeof(UTF16)
- while (r.ready()) {
+ char [] c;// 40 characters * sizeof(UTF16)
+ while (true) {
c = new char[bufferLength];
int n = r.read(c, 0, bufferLength);
- resultant += new String(c);
- if (n != bufferLength) {
- break;
- } else if (resultant.length() > maxLength) {
+ if (n == -1) break;
+ resultant += new String(c, 0, n);
+ if (resultant.length() > maxLength) {
resultant = resultant.substring(0, maxLength);
break;
}
{code}
Verified writing 50k.
> REST server has upper limit of 5k PUT
> -------------------------------------
>
> Key: HBASE-1768
> URL: https://issues.apache.org/jira/browse/HBASE-1768
> Project: Hadoop HBase
> Issue Type: Bug
> Reporter: stack
> Assignee: stack
> Priority: Critical
> Fix For: 0.20.0
>
>
> This is getting in way of our uploading images to hbase.
> Below is what we see when big img to put.
> {code}
> $ curl -v -T /tmp/y.row
> http://localhost:12041/api/jimk/row/x?column=misc:stack_testing:
> * About to connect() to localhost port 12041
> * Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 12041
> > PUT /api/jimk/row/x?column=misc:stack_testing: HTTP/1.1
> > User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5
> > OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> > Host: localhost:12041
> > Accept: */*
> > Content-Length: 229886
> > Expect: 100-continue
> >
> < HTTP/1.1 100 Continue
> HTTP/1.1 500 Internal Server Error
> < Content-Type: text/xml; charset=iso-8859-1
> < Transfer-Encoding: chunked
> < Server: Jetty(6.1.14)
> * Connection #0 to host localhost left intact
> * Closing connection #0
> <status><code>500</code><message>org.apache.hadoop.hbase.rest.exception.HBaseRestException:
> XML document structures must start and end within the same
> entity.</message><error>true</error></status>[st...@aa0-007-2 tmp]$
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.