From c5179b16ecc2c26f693eed692a6c556b6ac2e845 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Wed, 28 Sep 2011 20:37:37 +0000 Subject: [PATCH] HADOOP-6220 git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1177051 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 4 ++++ .../src/main/java/org/apache/hadoop/http/HttpServer.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 08d8d2904c..4a0f0057f1 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -39,6 +39,10 @@ Trunk (unreleased changes) HADOOP-7669 Fix newly introduced release audit warning. (Uma Maheswara Rao G via stevel) + + HADOOP-6220. HttpServer wraps InterruptedExceptions by IOExceptions if interrupted + in startup (stevel) + Release 0.23.0 - Unreleased diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java index 6ad3703dde..c526e10286 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java @@ -20,6 +20,7 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.PrintWriter; +import java.io.InterruptedIOException; import java.net.BindException; import java.net.InetSocketAddress; import java.net.URL; @@ -683,6 +684,9 @@ public void start() throws IOException { } } catch (IOException e) { throw e; + } catch (InterruptedException e) { + throw (IOException) new InterruptedIOException( + "Interrupted while starting HTTP server").initCause(e); } catch (Exception e) { throw new IOException("Problem starting http server", e); }