HADOOP-6428. HttpServer sleeps with negative values. Contributed by Konstantin Boudnik
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@889378 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a473f37733
commit
d7fb2d3c85
@ -71,6 +71,8 @@ Trunk (unreleased changes)
|
||||
HADOOP-6254. Slow reads cause s3n to fail with SocketTimeoutException.
|
||||
(Andrew Hitchcock via tomwhite)
|
||||
|
||||
HADOOP-6428. HttpServer sleeps with negative values. (cos)
|
||||
|
||||
Release 0.21.0 - Unreleased
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -474,14 +474,13 @@ public void start() throws IOException {
|
||||
port = listener.getLocalPort();
|
||||
if (port < 0) {
|
||||
LOG.warn("Bounds port is " + port + " after webserver start");
|
||||
Random r = new Random(1000);
|
||||
for (int i = 0; i < MAX_RETRIES/2; i++) {
|
||||
try {
|
||||
webServer.stop();
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Can't stop web-server", e);
|
||||
}
|
||||
Thread.sleep(r.nextInt());
|
||||
Thread.sleep(1000);
|
||||
|
||||
listener.setPort(oriPort == 0 ? 0 : (oriPort += 1));
|
||||
listener.open();
|
||||
|
Loading…
Reference in New Issue
Block a user