diff --git a/CHANGES.txt b/CHANGES.txt index 2fbd2cc7634..00c1ee63aa6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -31,7 +31,9 @@ Release 0.20.0 - Unreleased 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 diff --git a/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java b/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java index a9ce7515df9..9f5c14d8b5a 100644 --- a/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java +++ b/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java @@ -363,7 +363,6 @@ public class Dispatcher extends javax.servlet.http.HttpServlet { 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 @@ public class Dispatcher extends javax.servlet.http.HttpServlet { 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) {