[
https://issues.apache.org/jira/browse/HBASE-1768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743387#action_12743387
]
stack commented on HBASE-1768:
------------------------------
This is pain if upload is xml or encoded.
Here is patch:
{code}
Index: src/java/org/apache/hadoop/hbase/rest/Dispatcher.java
===================================================================
--- src/java/org/apache/hadoop/hbase/rest/Dispatcher.java (revision
804291)
+++ src/java/org/apache/hadoop/hbase/rest/Dispatcher.java (working copy)
@@ -81,6 +81,7 @@
protected RowController rowController;
protected ScannerController scannercontroller;
protected TimestampController tsController;
+ private HBaseConfiguration conf = null;
public enum ContentType {
XML("text/xml"), JSON("application/json"), PLAIN("text/plain"), MIME(
@@ -135,7 +136,7 @@
public void init() throws ServletException {
super.init();
- HBaseConfiguration conf = new HBaseConfiguration();
+ this.conf = new HBaseConfiguration();
HBaseAdmin admin = null;
try {
@@ -360,7 +361,7 @@
String resultant = "";
BufferedReader r = request.getReader();
- int maxLength = 5000; // tie to conf
+ int maxLength = this.conf.getInt("hbase.rest.input.limit", 10 * 1024 *
1024);
int bufferLength = 640;
// TODO make s maxLength and c size values in configuration
{code}
> 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
> 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.