You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2009/03/06 07:40:26 UTC

svn commit: r750782 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/rest/Dispatcher.java

Author: stack
Date: Fri Mar  6 06:40:25 2009
New Revision: 750782

URL: http://svn.apache.org/viewvc?rev=750782&view=rev
Log:
HBASE-1239 input buffer reading in the REST interface does not correctly clear the character buffer each iteration

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=750782&r1=750781&r2=750782&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Fri Mar  6 06:40:25 2009
@@ -31,7 +31,9 @@
    HBASE-1211  NPE in retries exhausted exception
    HBASE-1233  Transactional fixes: Overly conservative scan read-set,
                potential CME (Clint Morgan via Stack)
-   HBASE-1185  wrong request/sec in the gui reporting wrong
+   HBASE-1239  in the REST interface does not correctly clear the character
+               buffer each iteration-1185  wrong request/sec in the gui
+               reporting wrong (Brian Beggs via Stack)
 
   IMPROVEMENTS
    HBASE-1089  Add count of regions on filesystem to master UI; add percentage

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java?rev=750782&r1=750781&r2=750782&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java Fri Mar  6 06:40:25 2009
@@ -363,7 +363,6 @@
       int maxLength = 5000; // tie to conf
       int bufferLength = 640;
 
-      char[] c = new char[bufferLength]; // 40 characters * sizeof(UTF16)
       // TODO make s maxLength and c size values in configuration
       if (!r.ready()) {
         Thread.sleep(1000); // If r is not ready wait 1 second
@@ -372,7 +371,9 @@
           return new byte[0];
         }
       }
+      char[] c;// 40 characters * sizeof(UTF16)
       while (r.ready()) {
+    	c = new char[bufferLength]; 
         int n = r.read(c, 0, bufferLength);
         resultant += new String(c);
         if (n != bufferLength) {