You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by wa...@apache.org on 2017/09/13 17:59:12 UTC

hadoop git commit: HADOOP-14857. Fix downstream shaded client integration test. Contributed by Sean Busbey.

Repository: hadoop
Updated Branches:
  refs/heads/trunk 10b2cfa96 -> 8277fab2b


HADOOP-14857. Fix downstream shaded client integration test. Contributed by Sean Busbey.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8277fab2
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8277fab2
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8277fab2

Branch: refs/heads/trunk
Commit: 8277fab2be3b0898ba326d15e4cb641da2ac51ce
Parents: 10b2cfa
Author: Andrew Wang <wa...@apache.org>
Authored: Wed Sep 13 10:59:04 2017 -0700
Committer: Andrew Wang <wa...@apache.org>
Committed: Wed Sep 13 10:59:04 2017 -0700

----------------------------------------------------------------------
 .../apache/hadoop/example/ITUseMiniCluster.java |  4 +++-
 .../hadoop-client-minicluster/pom.xml           | 21 ++++++++++++++++++++
 .../org/apache/hadoop/http/HttpServer2.java     |  1 +
 pom.xml                                         |  2 +-
 4 files changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8277fab2/hadoop-client-modules/hadoop-client-integration-tests/src/test/java/org/apache/hadoop/example/ITUseMiniCluster.java
----------------------------------------------------------------------
diff --git a/hadoop-client-modules/hadoop-client-integration-tests/src/test/java/org/apache/hadoop/example/ITUseMiniCluster.java b/hadoop-client-modules/hadoop-client-integration-tests/src/test/java/org/apache/hadoop/example/ITUseMiniCluster.java
index 5fcbe13..6022fbc 100644
--- a/hadoop-client-modules/hadoop-client-integration-tests/src/test/java/org/apache/hadoop/example/ITUseMiniCluster.java
+++ b/hadoop-client-modules/hadoop-client-integration-tests/src/test/java/org/apache/hadoop/example/ITUseMiniCluster.java
@@ -77,7 +77,9 @@ public class ITUseMiniCluster {
 
   @After
   public void clusterDown() {
-    cluster.close();
+    if (cluster != null) {
+      cluster.close();
+    }
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8277fab2/hadoop-client-modules/hadoop-client-minicluster/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-client-modules/hadoop-client-minicluster/pom.xml b/hadoop-client-modules/hadoop-client-minicluster/pom.xml
index ba84e87..681cb1c 100644
--- a/hadoop-client-modules/hadoop-client-minicluster/pom.xml
+++ b/hadoop-client-modules/hadoop-client-minicluster/pom.xml
@@ -75,6 +75,9 @@
       <scope>provided</scope>
     </dependency>
  -->
+    <!-- Anything we're going to include in the relocated jar we list as optional
+         in order to work around MNG-5899
+      -->
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-minicluster</artifactId>
@@ -282,6 +285,12 @@
       </exclusions>
     </dependency>
 
+    <!-- Add back in Mockito since the hadoop-hdfs test jar needs it. -->
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <optional>true</optional>
+    </dependency>
     <!-- Add back in the transitive dependencies excluded from hadoop-common in client TODO remove once we have a filter for "is in these artifacts" -->
     <!-- skip javax.servlet:servlet-api because it's in client -->
     <!-- Skip commons-logging:commons-logging-api because it looks like nothing actually included it -->
@@ -635,6 +644,18 @@
                         <exclude>testshell/*</exclude>
                       </excludes>
                     </filter>
+                    <!-- Mockito tries to include its own unrelocated copy of hamcrest. :( -->
+                    <filter>
+                      <artifact>org.mockito:mockito-all</artifact>
+                      <excludes>
+                        <exclude>asm-license.txt</exclude>
+                        <exclude>cglib-license.txt</exclude>
+                        <exclude>hamcrest-license.txt</exclude>
+                        <exclude>objenesis-license.txt</exclude>
+                        <exclude>org/hamcrest/**/*.class</exclude>
+                        <exclude>org/hamcrest/*.class</exclude>
+                      </excludes>
+                    </filter>
                   </filters>
                   <relocations>
                     <relocation>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8277fab2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
index 7f1362c..fa447d8 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java
@@ -1218,6 +1218,7 @@ public final class HttpServer2 implements FilterContainer {
    * @throws Exception
    */
   void openListeners() throws Exception {
+    LOG.debug("opening listeners: {}", listeners);
     for (ServerConnector listener : listeners) {
       if (listener.getLocalPort() != -1 && listener.getLocalPort() != -2) {
         // This listener is either started externally or has been bound or was

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8277fab2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index efd7578..08e8585 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,7 +96,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
     <maven-stylus-skin.version>1.5</maven-stylus-skin.version>
     <maven-antrun-plugin.version>1.7</maven-antrun-plugin.version>
     <maven-assembly-plugin.version>2.4</maven-assembly-plugin.version>
-    <maven-dependency-plugin.version>2.10</maven-dependency-plugin.version>
+    <maven-dependency-plugin.version>3.0.1</maven-dependency-plugin.version>
     <maven-enforcer-plugin.version>3.0.0-M1</maven-enforcer-plugin.version>
     <maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
     <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org