hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r805538 - /hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java
Date Tue, 18 Aug 2009 19:00:10 GMT
Author: stack
Date: Tue Aug 18 19:00:10 2009
New Revision: 805538

URL: http://svn.apache.org/viewvc?rev=805538&view=rev
Log:
HBASE-1768 REST server has upper limit of 5k PUT; second fix

Modified:
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java?rev=805538&r1=805537&r2=805538&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java Tue Aug
18 19:00:10 2009
@@ -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;
         }



Mime
View raw message