From 58e3ad8b6c949d283bcd585690ba371dcdeae308 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 14 Aug 2009 19:40:46 +0000 Subject: [PATCH] HBASE-1768 REST server has upper limit of 5k PUT git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@804340 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + src/java/org/apache/hadoop/hbase/rest/Dispatcher.java | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 446e65dcfc8..2acb1687b15 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -332,6 +332,7 @@ Release 0.20.0 - Unreleased what N was HBASE-1745 [tools] Tool to kick region out of inTransistion HBASE-1757 REST server runs out of fds + HBASE-1768 REST server has upper limit of 5k PUT IMPROVEMENTS HBASE-1089 Add count of regions on filesystem to master UI; add percentage diff --git a/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java b/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java index e71a4fea4d8..0f57d8b1837 100644 --- a/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java +++ b/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java @@ -81,6 +81,7 @@ public class Dispatcher extends javax.servlet.http.HttpServlet { 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 class Dispatcher extends javax.servlet.http.HttpServlet { public void init() throws ServletException { super.init(); - HBaseConfiguration conf = new HBaseConfiguration(); + this.conf = new HBaseConfiguration(); HBaseAdmin admin = null; try { @@ -360,7 +361,9 @@ public class Dispatcher extends javax.servlet.http.HttpServlet { String resultant = ""; BufferedReader r = request.getReader(); - int maxLength = 5000; // tie to conf + int defaultmaxlength = 10 * 1024 * 1024; + int maxLength = this.conf == null? + defaultmaxlength: this.conf.getInt("hbase.rest.input.limit", defaultmaxlength); int bufferLength = 640; // TODO make s maxLength and c size values in configuration