HADOOP-11354. ThrottledInputStream doesn't perform effective throttling. Contributed by Ted Yu.
This commit is contained in:
parent
d555bb2120
commit
57cb43be50
@ -516,6 +516,9 @@ Release 2.7.0 - UNRELEASED
|
|||||||
HADOOP-11343. Overflow is not properly handled in caclulating final iv for
|
HADOOP-11343. Overflow is not properly handled in caclulating final iv for
|
||||||
AES CTR. (Jerry Chen via wang)
|
AES CTR. (Jerry Chen via wang)
|
||||||
|
|
||||||
|
HADOOP-11354. ThrottledInputStream doesn't perform effective throttling.
|
||||||
|
(Ted Yu via jing9)
|
||||||
|
|
||||||
Release 2.6.0 - 2014-11-18
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -115,7 +115,7 @@ public int read(long position, byte[] buffer, int offset, int length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void throttle() throws IOException {
|
private void throttle() throws IOException {
|
||||||
if (getBytesPerSec() > maxBytesPerSec) {
|
while (getBytesPerSec() > maxBytesPerSec) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(SLEEP_DURATION_MS);
|
Thread.sleep(SLEEP_DURATION_MS);
|
||||||
totalSleepTime += SLEEP_DURATION_MS;
|
totalSleepTime += SLEEP_DURATION_MS;
|
||||||
|
Loading…
Reference in New Issue
Block a user