HBASE-1239 input buffer reading in the REST interface does not correctly clear the character buffer each iteration
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@750782 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f4da3b9340
commit
1d2810b167
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue