Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3528

Tests with 12345 as hard-coded port break jenkins

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
    • Environment:

      ASF Jenkins

    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      A lot of the YARN tests have hard-coded the port 12345 for their services to come up on.

      This makes it impossible to have scheduled or precommit tests to run consistently on the ASF jenkins hosts. Instead the tests fail regularly and appear to get ignored completely.

      A quick grep of "12345" shows up many places in the test suite where this practise has developed.

      • All BaseContainerManagerTest subclasses
      • TestNodeManagerShutdown
      • TestContainerManager
        + others

      This needs to be addressed through portscanning and dynamic port allocation. Please can someone do this.

      1. YARN-3528.patch
        8 kB
        Brahma Reddy Battula
      2. YARN-3528-002.patch
        8 kB
        Brahma Reddy Battula
      3. YARN-3528-003.patch
        33 kB
        Brahma Reddy Battula
      4. YARN-3528-004.patch
        27 kB
        Brahma Reddy Battula
      5. YARN-3528-005.patch
        16 kB
        Brahma Reddy Battula
      6. YARN-3528-006.patch
        24 kB
        Brahma Reddy Battula
      7. YARN-3528-007.patch
        23 kB
        Brahma Reddy Battula
      8. YARN-3528-008.patch
        24 kB
        Brahma Reddy Battula
      9. YARN-3528-009.patch
        22 kB
        Brahma Reddy Battula
      10. YARN-3528-011.patch
        22 kB
        Brahma Reddy Battula
      11. YARN-3528-branch2.patch
        23 kB
        Brahma Reddy Battula

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2475 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2475/)
          YARN-3528. Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae)

          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java
          • hadoop-yarn-project/CHANGES.txt
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2475 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2475/ ) YARN-3528 . Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java hadoop-yarn-project/CHANGES.txt hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #537 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/537/)
          YARN-3528. Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae)

          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java
          • hadoop-yarn-project/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #537 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/537/ ) YARN-3528 . Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java hadoop-yarn-project/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #584 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/584/)
          YARN-3528. Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae)

          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
          • hadoop-yarn-project/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #584 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/584/ ) YARN-3528 . Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java hadoop-yarn-project/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2527 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2527/)
          YARN-3528. Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae)

          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java
          • hadoop-yarn-project/CHANGES.txt
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2527 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2527/ ) YARN-3528 . Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java hadoop-yarn-project/CHANGES.txt hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Thanks a lot Tsuyoshi Ozawa for reviewing and comitting and thanks to others.

          Show
          brahmareddy Brahma Reddy Battula added a comment - Thanks a lot Tsuyoshi Ozawa for reviewing and comitting and thanks to others.
          Hide
          ozawa Tsuyoshi Ozawa added a comment -

          Committed this to trunk and branch-2. Thanks Brahma Reddy Battula for your contribution, thanks Robert Kanter and Varun Saxena for your reviews, and thanks Steve Loughran for your reporting.

          Show
          ozawa Tsuyoshi Ozawa added a comment - Committed this to trunk and branch-2. Thanks Brahma Reddy Battula for your contribution, thanks Robert Kanter and Varun Saxena for your reviews, and thanks Steve Loughran for your reporting.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #1319 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1319/)
          YARN-3528. Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae)

          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java
          • hadoop-yarn-project/CHANGES.txt
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #1319 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1319/ ) YARN-3528 . Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java hadoop-yarn-project/CHANGES.txt hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #596 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/596/)
          YARN-3528. Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae)

          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java
          • hadoop-yarn-project/CHANGES.txt
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java
          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #596 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/596/ ) YARN-3528 . Tests with 12345 as hard-coded port break jenkins. (ozawa: rev ce60b4fc8b72afaf475517df3638900abb8843ae) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerReboot.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainersMonitor.java hadoop-yarn-project/CHANGES.txt hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/BaseContainerManagerTest.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/ServerSocketUtil.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManagerRecovery.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java
          Hide
          ozawa Tsuyoshi Ozawa added a comment -

          Oh, maybe I looked at a different patch. Sorry for my mistake.

          Show
          ozawa Tsuyoshi Ozawa added a comment - Oh, maybe I looked at a different patch. Sorry for my mistake.
          Hide
          ozawa Tsuyoshi Ozawa added a comment -

          +1, checking this in.

          Show
          ozawa Tsuyoshi Ozawa added a comment - +1, checking this in.
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          -1 pre-patch 8m 23s Pre-patch trunk has 1 extant Findbugs (version 3.0.0) warnings.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 8 new or modified test files.
          +1 javac 7m 57s There were no new javac warning messages.
          +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 1m 47s There were no new checkstyle issues.
          -1 whitespace 0m 1s The patch has 5 line(s) that end in whitespace. Use git apply --whitespace=fix.
          +1 install 1m 29s mvn install still works.
          +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse.
          +1 findbugs 3m 5s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 7m 6s Tests passed in hadoop-common.
          +1 yarn tests 8m 57s Tests passed in hadoop-yarn-server-nodemanager.
              39m 44s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12768599/YARN-3528-011.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / ab8eb87
          Pre-patch Findbugs warnings https://builds.apache.org/job/PreCommit-YARN-Build/9565/artifact/patchprocess/trunkFindbugsWarningshadoop-yarn-server-nodemanager.html
          whitespace https://builds.apache.org/job/PreCommit-YARN-Build/9565/artifact/patchprocess/whitespace.txt
          hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/9565/artifact/patchprocess/testrun_hadoop-common.txt
          hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/9565/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9565/testReport/
          Java 1.7.0_55
          uname Linux asf905.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/9565/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment -1 pre-patch 8m 23s Pre-patch trunk has 1 extant Findbugs (version 3.0.0) warnings. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 8 new or modified test files. +1 javac 7m 57s There were no new javac warning messages. +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 47s There were no new checkstyle issues. -1 whitespace 0m 1s The patch has 5 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 install 1m 29s mvn install still works. +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse. +1 findbugs 3m 5s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 7m 6s Tests passed in hadoop-common. +1 yarn tests 8m 57s Tests passed in hadoop-yarn-server-nodemanager.     39m 44s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12768599/YARN-3528-011.patch Optional Tests javac unit findbugs checkstyle git revision trunk / ab8eb87 Pre-patch Findbugs warnings https://builds.apache.org/job/PreCommit-YARN-Build/9565/artifact/patchprocess/trunkFindbugsWarningshadoop-yarn-server-nodemanager.html whitespace https://builds.apache.org/job/PreCommit-YARN-Build/9565/artifact/patchprocess/whitespace.txt hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/9565/artifact/patchprocess/testrun_hadoop-common.txt hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/9565/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9565/testReport/ Java 1.7.0_55 uname Linux asf905.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-YARN-Build/9565/console This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Tsuyoshi Ozawa didnot notice that..uploaded patch for same..Kindly review..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Tsuyoshi Ozawa didnot notice that..uploaded patch for same..Kindly review..
          Hide
          ozawa Tsuyoshi Ozawa added a comment -

          Brahma Reddy Battula thank you for updating. Should we update TestNodeStatusUpdater#createNMConfig() to use ServerSocketUtil.getPort() instead hard-coded port "12345"?

          + private YarnConfiguration createNMConfig() throws IOException

          Unknown macro: {+ return createNMConfig(12345);+ }
          Show
          ozawa Tsuyoshi Ozawa added a comment - Brahma Reddy Battula thank you for updating. Should we update TestNodeStatusUpdater#createNMConfig() to use ServerSocketUtil.getPort() instead hard-coded port "12345"? + private YarnConfiguration createNMConfig() throws IOException Unknown macro: {+ return createNMConfig(12345);+ }
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Pre-patch Findbugs warnings are not related, anyway I raised seperate jira for this YARN-4295. Tsuyoshi Ozawa Kindly review..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Pre-patch Findbugs warnings are not related, anyway I raised seperate jira for this YARN-4295 . Tsuyoshi Ozawa Kindly review..
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          -1 pre-patch 10m 54s Pre-patch trunk has 1 extant Findbugs (version 3.0.0) warnings.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 8 new or modified test files.
          +1 javac 10m 40s There were no new javac warning messages.
          +1 release audit 0m 28s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 2m 17s There were no new checkstyle issues.
          -1 whitespace 0m 1s The patch has 5 line(s) that end in whitespace. Use git apply --whitespace=fix.
          +1 install 2m 11s mvn install still works.
          +1 eclipse:eclipse 0m 45s The patch built with eclipse:eclipse.
          +1 findbugs 4m 17s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 8m 47s Tests passed in hadoop-common.
          +1 yarn tests 9m 30s Tests passed in hadoop-yarn-server-nodemanager.
              49m 55s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12768340/YARN-3528-009.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / eb6379c
          Pre-patch Findbugs warnings https://builds.apache.org/job/PreCommit-YARN-Build/9550/artifact/patchprocess/trunkFindbugsWarningshadoop-yarn-server-nodemanager.html
          whitespace https://builds.apache.org/job/PreCommit-YARN-Build/9550/artifact/patchprocess/whitespace.txt
          hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/9550/artifact/patchprocess/testrun_hadoop-common.txt
          hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/9550/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9550/testReport/
          Java 1.7.0_55
          uname Linux asf909.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/9550/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment -1 pre-patch 10m 54s Pre-patch trunk has 1 extant Findbugs (version 3.0.0) warnings. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 8 new or modified test files. +1 javac 10m 40s There were no new javac warning messages. +1 release audit 0m 28s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 2m 17s There were no new checkstyle issues. -1 whitespace 0m 1s The patch has 5 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 install 2m 11s mvn install still works. +1 eclipse:eclipse 0m 45s The patch built with eclipse:eclipse. +1 findbugs 4m 17s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 8m 47s Tests passed in hadoop-common. +1 yarn tests 9m 30s Tests passed in hadoop-yarn-server-nodemanager.     49m 55s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12768340/YARN-3528-009.patch Optional Tests javac unit findbugs checkstyle git revision trunk / eb6379c Pre-patch Findbugs warnings https://builds.apache.org/job/PreCommit-YARN-Build/9550/artifact/patchprocess/trunkFindbugsWarningshadoop-yarn-server-nodemanager.html whitespace https://builds.apache.org/job/PreCommit-YARN-Build/9550/artifact/patchprocess/whitespace.txt hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/9550/artifact/patchprocess/testrun_hadoop-common.txt hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/9550/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9550/testReport/ Java 1.7.0_55 uname Linux asf909.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-YARN-Build/9550/console This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Tsuyoshi Ozawa thanks a lot for taking a look into this issue.. rebased patch..Kindly review..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Tsuyoshi Ozawa thanks a lot for taking a look into this issue.. rebased patch..Kindly review..
          Hide
          ozawa Tsuyoshi Ozawa added a comment -

          Brahma Reddy Battula thank you for taking this issue. could you update 008 patch again?

          Show
          ozawa Tsuyoshi Ozawa added a comment - Brahma Reddy Battula thank you for taking this issue. could you update 008 patch again?
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Robert Kanter can you please take a look ..?

          Show
          brahmareddy Brahma Reddy Battula added a comment - Robert Kanter can you please take a look ..?
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          -1 patch 0m 0s The patch command could not apply the patch during dryrun.



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12753117/YARN-3528-branch2.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / e2c9b28
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/8941/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment -1 patch 0m 0s The patch command could not apply the patch during dryrun. Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12753117/YARN-3528-branch2.patch Optional Tests javac unit findbugs checkstyle git revision trunk / e2c9b28 Console output https://builds.apache.org/job/PreCommit-YARN-Build/8941/console This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Robert Kanter uploaded the branch-2 patch.. thanks..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Robert Kanter uploaded the branch-2 patch.. thanks..
          Hide
          rkanter Robert Kanter added a comment -

          It looks like this doesn't apply cleanly to branch-2. Brahma Reddy Battula, can you create a branch-2 version of the patch?

          Show
          rkanter Robert Kanter added a comment - It looks like this doesn't apply cleanly to branch-2. Brahma Reddy Battula , can you create a branch-2 version of the patch?
          Hide
          varun_saxena Varun Saxena added a comment -

          +1, latest patch LGTM

          Show
          varun_saxena Varun Saxena added a comment - +1, latest patch LGTM
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Following test case failure is unrelated and it can be handled in YARN-3433..

          testNodeContainerXML(org.apache.hadoop.yarn.server.nodemanager.webapp.TestNMWebServicesContainers)  Time elapsed: 0.008 sec  <<< ERROR!
          com.sun.jersey.test.framework.spi.container.TestContainerException: java.net.BindException: Address already in use
          	at sun.nio.ch.Net.bind0(Native Method)
          	at sun.nio.ch.Net.bind(Net.java:444)
          	at sun.nio.ch.Net.bind(Net.java:436)
          	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
          	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
          	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:413)
          	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:384)
          	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:375)
          	at org.glassfish.grizzly.http.server.NetworkListener.start(NetworkListener.java:549)
          	at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:255)
          	at com.sun.jersey.api.container.grizzly2.GrizzlyServerFactory.createHttpServer(GrizzlyServerFactory.java:326)
          	at com.sun.jersey.api.container.grizzly2.GrizzlyServerFactory.createHttpServer(GrizzlyServerFactory.java:343)
          	at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory$GrizzlyWebTestContainer.instantiateGrizzlyWebServer(GrizzlyWebTestContainerFactory.java:219)
          	at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory$GrizzlyWebTestContainer.<init>(GrizzlyWebTestContainerFactory.java:129)
          	at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory$GrizzlyWebTestContainer.<init>(GrizzlyWebTestContainerFactory.java:86)
          	at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory.create(GrizzlyWebTestContainerFactory.java:79)
          	at com.sun.jersey.test.framework.JerseyTest.getContainer(JerseyTest.java:342)
          	at com.sun.jersey.test.framework.JerseyTest.<init>(JerseyTest.java:217)
          	at org.apache.hadoop.yarn.webapp.JerseyTestBase.<init>(JerseyTestBase.java:27)
          	at org.apache.hadoop.yarn.server.nodemanager.webapp.TestNMWebServicesContainers.<init>(TestNMWebServicesContainers.java:180)
          
          Show
          brahmareddy Brahma Reddy Battula added a comment - Following test case failure is unrelated and it can be handled in YARN-3433 .. testNodeContainerXML(org.apache.hadoop.yarn.server.nodemanager.webapp.TestNMWebServicesContainers) Time elapsed: 0.008 sec <<< ERROR! com.sun.jersey.test.framework.spi.container.TestContainerException: java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:444) at sun.nio.ch.Net.bind(Net.java:436) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:413) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:384) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:375) at org.glassfish.grizzly.http.server.NetworkListener.start(NetworkListener.java:549) at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:255) at com.sun.jersey.api.container.grizzly2.GrizzlyServerFactory.createHttpServer(GrizzlyServerFactory.java:326) at com.sun.jersey.api.container.grizzly2.GrizzlyServerFactory.createHttpServer(GrizzlyServerFactory.java:343) at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory$GrizzlyWebTestContainer.instantiateGrizzlyWebServer(GrizzlyWebTestContainerFactory.java:219) at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory$GrizzlyWebTestContainer.<init>(GrizzlyWebTestContainerFactory.java:129) at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory$GrizzlyWebTestContainer.<init>(GrizzlyWebTestContainerFactory.java:86) at com.sun.jersey.test.framework.spi.container.grizzly2.web.GrizzlyWebTestContainerFactory.create(GrizzlyWebTestContainerFactory.java:79) at com.sun.jersey.test.framework.JerseyTest.getContainer(JerseyTest.java:342) at com.sun.jersey.test.framework.JerseyTest.<init>(JerseyTest.java:217) at org.apache.hadoop.yarn.webapp.JerseyTestBase.<init>(JerseyTestBase.java:27) at org.apache.hadoop.yarn.server.nodemanager.webapp.TestNMWebServicesContainers.<init>(TestNMWebServicesContainers.java:180)
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 8m 6s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 8 new or modified test files.
          +1 javac 7m 55s There were no new javac warning messages.
          +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 1m 46s There were no new checkstyle issues.
          -1 whitespace 0m 0s The patch has 4 line(s) that end in whitespace. Use git apply --whitespace=fix.
          +1 install 1m 26s mvn install still works.
          +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
          +1 findbugs 3m 6s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 22m 57s Tests passed in hadoop-common.
          -1 yarn tests 7m 24s Tests failed in hadoop-yarn-server-nodemanager.
              53m 37s  



          Reason Tests
          Failed unit tests hadoop.yarn.server.nodemanager.webapp.TestNMWebServicesContainers



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12752705/YARN-3528-008.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / fdb56f7
          whitespace https://builds.apache.org/job/PreCommit-YARN-Build/8926/artifact/patchprocess/whitespace.txt
          hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/8926/artifact/patchprocess/testrun_hadoop-common.txt
          hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8926/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8926/testReport/
          Java 1.7.0_55
          uname Linux asf905.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/8926/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 8m 6s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 8 new or modified test files. +1 javac 7m 55s There were no new javac warning messages. +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 46s There were no new checkstyle issues. -1 whitespace 0m 0s The patch has 4 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 install 1m 26s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 3m 6s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 57s Tests passed in hadoop-common. -1 yarn tests 7m 24s Tests failed in hadoop-yarn-server-nodemanager.     53m 37s   Reason Tests Failed unit tests hadoop.yarn.server.nodemanager.webapp.TestNMWebServicesContainers Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12752705/YARN-3528-008.patch Optional Tests javac unit findbugs checkstyle git revision trunk / fdb56f7 whitespace https://builds.apache.org/job/PreCommit-YARN-Build/8926/artifact/patchprocess/whitespace.txt hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/8926/artifact/patchprocess/testrun_hadoop-common.txt hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8926/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8926/testReport/ Java 1.7.0_55 uname Linux asf905.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-YARN-Build/8926/console This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Updated 008 patch to address above testcase failures..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Updated 008 patch to address above testcase failures..
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 8m 26s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 8 new or modified test files.
          +1 javac 7m 55s There were no new javac warning messages.
          +1 release audit 0m 21s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 1m 45s There were no new checkstyle issues.
          -1 whitespace 0m 1s The patch has 4 line(s) that end in whitespace. Use git apply --whitespace=fix.
          +1 install 1m 28s mvn install still works.
          +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
          +1 findbugs 3m 5s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 22m 48s Tests passed in hadoop-common.
          -1 yarn tests 6m 53s Tests failed in hadoop-yarn-server-nodemanager.
              53m 19s  



          Reason Tests
          Failed unit tests hadoop.yarn.server.nodemanager.TestNodeStatusUpdater



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12752696/YARN-3528-007.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / fdb56f7
          whitespace https://builds.apache.org/job/PreCommit-YARN-Build/8925/artifact/patchprocess/whitespace.txt
          hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/8925/artifact/patchprocess/testrun_hadoop-common.txt
          hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8925/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8925/testReport/
          Java 1.7.0_55
          uname Linux asf905.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/8925/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 8m 26s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 8 new or modified test files. +1 javac 7m 55s There were no new javac warning messages. +1 release audit 0m 21s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 45s There were no new checkstyle issues. -1 whitespace 0m 1s The patch has 4 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 install 1m 28s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 3m 5s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 48s Tests passed in hadoop-common. -1 yarn tests 6m 53s Tests failed in hadoop-yarn-server-nodemanager.     53m 19s   Reason Tests Failed unit tests hadoop.yarn.server.nodemanager.TestNodeStatusUpdater Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12752696/YARN-3528-007.patch Optional Tests javac unit findbugs checkstyle git revision trunk / fdb56f7 whitespace https://builds.apache.org/job/PreCommit-YARN-Build/8925/artifact/patchprocess/whitespace.txt hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/8925/artifact/patchprocess/testrun_hadoop-common.txt hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8925/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8925/testReport/ Java 1.7.0_55 uname Linux asf905.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-YARN-Build/8925/console This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          hmm.Updated patch which address all the comments..Robert Kanter and Varun Saxena kindly review.. thanks

          Show
          brahmareddy Brahma Reddy Battula added a comment - hmm.Updated patch which address all the comments.. Robert Kanter and Varun Saxena kindly review.. thanks
          Hide
          varun_saxena Varun Saxena added a comment -

          Thanks for updating the patch Brahma Reddy Battula.

          In the latest patch, same port has been assigned to both NM_ADDRESS and NM_LOCALIZER_ADDRESS. Haven't ran the test but this should lead to BindException in test.

          1722	    conf.set(YarnConfiguration.NM_ADDRESS, localhostAddress + ":" + port);
          1723	    conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, localhostAddress + ":"
          1724	        + port);
          
          Show
          varun_saxena Varun Saxena added a comment - Thanks for updating the patch Brahma Reddy Battula . In the latest patch, same port has been assigned to both NM_ADDRESS and NM_LOCALIZER_ADDRESS. Haven't ran the test but this should lead to BindException in test. 1722 conf.set(YarnConfiguration.NM_ADDRESS, localhostAddress + ":" + port); 1723 conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, localhostAddress + ":" 1724 + port);
          Hide
          varun_saxena Varun Saxena added a comment -
          1. In TestNodeStatusUpdater#createNMConfig, change has been missed. Still see hardcoded port.
             conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS,
                    localhostAddress + ":12346");
            
          2. In TestContainer, port is just used for creating container token. Dont need to call ServerSocketUtil#getPort.
          3. Nit : TestNodeManagerShutdown#startContainer, below commented line can be removed.
             //final int port = ServerSocketUtil.getPort(49156, 10);
            
          4. As you will be changing other things, maybe can change below as well. In TestNodeManagerShutdown I dont see any need to add a try-catch block here. We have just replaced 12345 with a passed port.
            -            InetSocketAddress containerManagerBindAddress =
            -                NetUtils.createSocketAddrForHost("127.0.0.1", 12345);
            +            InetSocketAddress containerManagerBindAddress = null;
            +            try {
            +              containerManagerBindAddress = NetUtils.createSocketAddrForHost("127.0.0.1", port);
            +            } catch (Exception e) {
            +              throw new RuntimeException("Fail To Get the Port");
            +            }
            

          Other things look fine.

          Show
          varun_saxena Varun Saxena added a comment - In TestNodeStatusUpdater#createNMConfig, change has been missed. Still see hardcoded port. conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, localhostAddress + ":12346" ); In TestContainer, port is just used for creating container token. Dont need to call ServerSocketUtil#getPort. Nit : TestNodeManagerShutdown#startContainer, below commented line can be removed. // final int port = ServerSocketUtil.getPort(49156, 10); As you will be changing other things, maybe can change below as well. In TestNodeManagerShutdown I dont see any need to add a try-catch block here. We have just replaced 12345 with a passed port. - InetSocketAddress containerManagerBindAddress = - NetUtils.createSocketAddrForHost( "127.0.0.1" , 12345); + InetSocketAddress containerManagerBindAddress = null ; + try { + containerManagerBindAddress = NetUtils.createSocketAddrForHost( "127.0.0.1" , port); + } catch (Exception e) { + throw new RuntimeException( "Fail To Get the Port" ); + } Other things look fine.
          Hide
          varun_saxena Varun Saxena added a comment -

          Will have a look.

          Show
          varun_saxena Varun Saxena added a comment - Will have a look.
          Hide
          rkanter Robert Kanter added a comment -

          +1 LGTM.
          Any other comments Varun Saxena?

          Show
          rkanter Robert Kanter added a comment - +1 LGTM. Any other comments Varun Saxena ?
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Testcase failures are unrelated..TestResourceLocalizationService is failing while cleanup dir's..

          Tests run: 13, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.205 sec <<< FAILURE! - in org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.TestResourceLocalizationService
          testPublicResourceInitializesLocalDir(org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.TestResourceLocalizationService)  Time elapsed: 0.275 sec  <<< ERROR!
          java.lang.IllegalArgumentException: target/org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.TestResourceLocalizationService/3/filecache/10 does not exist
          	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1637)
          	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535)
          	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
          
          Show
          brahmareddy Brahma Reddy Battula added a comment - Testcase failures are unrelated.. TestResourceLocalizationService is failing while cleanup dir's.. Tests run: 13, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.205 sec <<< FAILURE! - in org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.TestResourceLocalizationService testPublicResourceInitializesLocalDir(org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.TestResourceLocalizationService) Time elapsed: 0.275 sec <<< ERROR! java.lang.IllegalArgumentException: target/org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.TestResourceLocalizationService/3/filecache/10 does not exist at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1637) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1535) at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2270)
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 8m 27s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 9 new or modified test files.
          +1 javac 7m 50s There were no new javac warning messages.
          +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 1m 48s There were no new checkstyle issues.
          -1 whitespace 0m 1s The patch has 4 line(s) that end in whitespace. Use git apply --whitespace=fix.
          +1 install 1m 24s mvn install still works.
          +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse.
          +1 findbugs 3m 3s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 22m 48s Tests passed in hadoop-common.
          -1 yarn tests 7m 27s Tests failed in hadoop-yarn-server-nodemanager.
              53m 46s  



          Reason Tests
          Failed unit tests hadoop.yarn.server.nodemanager.containermanager.localizer.TestResourceLocalizationService



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12752441/YARN-3528-006.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / a4d9acc
          whitespace https://builds.apache.org/job/PreCommit-YARN-Build/8917/artifact/patchprocess/whitespace.txt
          hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/8917/artifact/patchprocess/testrun_hadoop-common.txt
          hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8917/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8917/testReport/
          Java 1.7.0_55
          uname Linux asf908.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/8917/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 8m 27s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 9 new or modified test files. +1 javac 7m 50s There were no new javac warning messages. +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 48s There were no new checkstyle issues. -1 whitespace 0m 1s The patch has 4 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 install 1m 24s mvn install still works. +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse. +1 findbugs 3m 3s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 48s Tests passed in hadoop-common. -1 yarn tests 7m 27s Tests failed in hadoop-yarn-server-nodemanager.     53m 46s   Reason Tests Failed unit tests hadoop.yarn.server.nodemanager.containermanager.localizer.TestResourceLocalizationService Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12752441/YARN-3528-006.patch Optional Tests javac unit findbugs checkstyle git revision trunk / a4d9acc whitespace https://builds.apache.org/job/PreCommit-YARN-Build/8917/artifact/patchprocess/whitespace.txt hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/8917/artifact/patchprocess/testrun_hadoop-common.txt hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8917/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8917/testReport/ Java 1.7.0_55 uname Linux asf908.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-YARN-Build/8917/console This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Robert Kanter Sorry for delay and thanks for pinging.. Attached the patch kindly review...

          Show
          brahmareddy Brahma Reddy Battula added a comment - Robert Kanter Sorry for delay and thanks for pinging.. Attached the patch kindly review...
          Hide
          rkanter Robert Kanter added a comment -

          Oops, wrong person. Brahma Reddy Battula

          Show
          rkanter Robert Kanter added a comment - Oops, wrong person. Brahma Reddy Battula
          Hide
          rkanter Robert Kanter added a comment -

          Brahma, have you had a chance to look at the testcase failures?

          Show
          rkanter Robert Kanter added a comment - Brahma , have you had a chance to look at the testcase failures?
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Will fix testcase failures and upload the patch..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Will fix testcase failures and upload the patch..
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 8m 8s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 8 new or modified test files.
          +1 javac 7m 42s There were no new javac warning messages.
          +1 release audit 0m 21s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 1m 40s There were no new checkstyle issues.
          +1 whitespace 0m 1s The patch has no lines that end in whitespace.
          +1 install 1m 18s mvn install still works.
          +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse.
          +1 findbugs 3m 6s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 23m 2s Tests passed in hadoop-common.
          -1 yarn tests 6m 1s Tests failed in hadoop-yarn-server-nodemanager.
              51m 55s  



          Reason Tests
          Failed unit tests hadoop.yarn.server.nodemanager.TestNodeStatusUpdater
            hadoop.yarn.server.nodemanager.TestNodeManagerShutdown
            hadoop.yarn.server.nodemanager.TestNodeManagerResync



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12748115/YARN-3528-005.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / c5caa25
          hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/8731/artifact/patchprocess/testrun_hadoop-common.txt
          hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8731/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8731/testReport/
          Java 1.7.0_55
          uname Linux asf904.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/8731/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 8m 8s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 8 new or modified test files. +1 javac 7m 42s There were no new javac warning messages. +1 release audit 0m 21s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 40s There were no new checkstyle issues. +1 whitespace 0m 1s The patch has no lines that end in whitespace. +1 install 1m 18s mvn install still works. +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse. +1 findbugs 3m 6s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 23m 2s Tests passed in hadoop-common. -1 yarn tests 6m 1s Tests failed in hadoop-yarn-server-nodemanager.     51m 55s   Reason Tests Failed unit tests hadoop.yarn.server.nodemanager.TestNodeStatusUpdater   hadoop.yarn.server.nodemanager.TestNodeManagerShutdown   hadoop.yarn.server.nodemanager.TestNodeManagerResync Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12748115/YARN-3528-005.patch Optional Tests javac unit findbugs checkstyle git revision trunk / c5caa25 hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/8731/artifact/patchprocess/testrun_hadoop-common.txt hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8731/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8731/testReport/ Java 1.7.0_55 uname Linux asf904.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-YARN-Build/8731/console This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Hmm..Varun Saxena thanks a lot for your review..Attached the patch to address your comments..( Earlier all are passed locally )

          Show
          brahmareddy Brahma Reddy Battula added a comment - Hmm.. Varun Saxena thanks a lot for your review..Attached the patch to address your comments..( Earlier all are passed locally )
          Hide
          varun_saxena Varun Saxena added a comment -

          Brahma Reddy Battula,

          Few comments :

          1. Amongst the test failures which have come in QA report above, except one test each in TestDeletionService and TestResourceLocalizationService, all are related to your code change.
          2. You need to make a call to ServerSocketUtil#getPort only in places where the port is used for binding to a socket. You have used it elsewhere as well.
          3. In TestNodeManagerReboot#createNMConfig, below changes would lead to bind exception. Because at the time of setting config, call to ServerSocketUtil#getPort will return 49152(if free) and both NM_ADDRESS and NM_LOCALIZER_ADDRESS will be set using same port. The start port should be different at the time of second call to getPort.
            -      conf.set(YarnConfiguration.NM_ADDRESS, "127.0.0.1:12345");
            -      conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, "127.0.0.1:12346");
            +      conf.set(YarnConfiguration.NM_ADDRESS,
            +          "127.0.0.1:" + ServerSocketUtil.getPort(49152, 10));
            +      conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, "127.0.0.1:"
            +          + ServerSocketUtil.getPort(49152, 10));
            
          4. Same problem as above exists in TestNodeManagerResync#createNMConfig which will lead to test failures due to BindException.
          5. In TestNMContainerTokenSecretManager, TestRMAppLogAggregationStatus and TestNMTokenSecretManagerInNM, you do not need to get port from ServerSocketUtil to set NodeID
          6. In TestNMWebServer#testNMWebApp, you do not need to call ServerSocketUtil#getPort to create the token. Token is not used for socket binding.
          7. In TestRMApplicationHistoryWriter and TestAMRMRPCResponseId, call to MockRM#registerNode does not need a unique port to bind to. So again we do not need to get port from ServerSocketUtil
          8. Same applies for TestAMRestart wherever MockNM constructor is invoked.
          9. In TestAMRestart, you need to have different ports wherever more than one MockNM object is created. This is leading to test failure in QA report above.
          10. Nit: Formatting of below piece of code in TestNMWebServer is not correct.
                   Token containerToken =
            -          BuilderUtils.newContainerToken(containerId, "127.0.0.1", 1234, user,
            + BuilderUtils.newContainerToken(containerId,
            +          "127.0.0.1", ServerSocketUtil.getPort(49152, 10), user,
            
          Show
          varun_saxena Varun Saxena added a comment - Brahma Reddy Battula , Few comments : Amongst the test failures which have come in QA report above, except one test each in TestDeletionService and TestResourceLocalizationService, all are related to your code change. You need to make a call to ServerSocketUtil#getPort only in places where the port is used for binding to a socket. You have used it elsewhere as well. In TestNodeManagerReboot#createNMConfig , below changes would lead to bind exception. Because at the time of setting config, call to ServerSocketUtil#getPort will return 49152(if free) and both NM_ADDRESS and NM_LOCALIZER_ADDRESS will be set using same port. The start port should be different at the time of second call to getPort. - conf.set(YarnConfiguration.NM_ADDRESS, "127.0.0.1:12345" ); - conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, "127.0.0.1:12346" ); + conf.set(YarnConfiguration.NM_ADDRESS, + "127.0.0.1:" + ServerSocketUtil.getPort(49152, 10)); + conf.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, "127.0.0.1:" + + ServerSocketUtil.getPort(49152, 10)); Same problem as above exists in TestNodeManagerResync#createNMConfig which will lead to test failures due to BindException. In TestNMContainerTokenSecretManager , TestRMAppLogAggregationStatus and TestNMTokenSecretManagerInNM , you do not need to get port from ServerSocketUtil to set NodeID In TestNMWebServer#testNMWebApp , you do not need to call ServerSocketUtil#getPort to create the token. Token is not used for socket binding. In TestRMApplicationHistoryWriter and TestAMRMRPCResponseId , call to MockRM#registerNode does not need a unique port to bind to. So again we do not need to get port from ServerSocketUtil Same applies for TestAMRestart wherever MockNM constructor is invoked. In TestAMRestart , you need to have different ports wherever more than one MockNM object is created. This is leading to test failure in QA report above. Nit: Formatting of below piece of code in TestNMWebServer is not correct. Token containerToken = - BuilderUtils.newContainerToken(containerId, "127.0.0.1" , 1234, user, + BuilderUtils.newContainerToken(containerId, + "127.0.0.1" , ServerSocketUtil.getPort(49152, 10), user,
          Hide
          varun_saxena Varun Saxena added a comment -

          Brahma Reddy Battula, you have missed some test class in your latest patch. For instance, TestNodeManagerShutdown.

          Show
          varun_saxena Varun Saxena added a comment - Brahma Reddy Battula , you have missed some test class in your latest patch. For instance, TestNodeManagerShutdown.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          will look into to the testcase failures but all locally passed.

          Show
          brahmareddy Brahma Reddy Battula added a comment - will look into to the testcase failures but all locally passed.
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 10m 30s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 14 new or modified test files.
          +1 javac 8m 29s There were no new javac warning messages.
          +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 2m 52s There were no new checkstyle issues.
          +1 whitespace 0m 1s The patch has no lines that end in whitespace.
          +1 install 1m 22s mvn install still works.
          +1 eclipse:eclipse 0m 31s The patch built with eclipse:eclipse.
          +1 findbugs 4m 51s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 22m 38s Tests passed in hadoop-common.
          -1 yarn tests 5m 48s Tests failed in hadoop-yarn-server-nodemanager.
          -1 yarn tests 52m 54s Tests failed in hadoop-yarn-server-resourcemanager.
              110m 19s  



          Reason Tests
          Failed unit tests hadoop.yarn.server.nodemanager.TestDeletionService
            hadoop.yarn.server.nodemanager.TestNodeManagerResync
            hadoop.yarn.server.nodemanager.TestNodeManagerReboot
            hadoop.yarn.server.nodemanager.containermanager.localizer.TestResourceLocalizationService
            hadoop.yarn.server.resourcemanager.applicationsmanager.TestAMRestart



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12747153/YARN-3528-004.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / adcf5dd
          hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/8666/artifact/patchprocess/testrun_hadoop-common.txt
          hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8666/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt
          hadoop-yarn-server-resourcemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8666/artifact/patchprocess/testrun_hadoop-yarn-server-resourcemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8666/testReport/
          Java 1.7.0_55
          uname Linux asf907.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/8666/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 10m 30s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 14 new or modified test files. +1 javac 8m 29s There were no new javac warning messages. +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 2m 52s There were no new checkstyle issues. +1 whitespace 0m 1s The patch has no lines that end in whitespace. +1 install 1m 22s mvn install still works. +1 eclipse:eclipse 0m 31s The patch built with eclipse:eclipse. +1 findbugs 4m 51s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 22m 38s Tests passed in hadoop-common. -1 yarn tests 5m 48s Tests failed in hadoop-yarn-server-nodemanager. -1 yarn tests 52m 54s Tests failed in hadoop-yarn-server-resourcemanager.     110m 19s   Reason Tests Failed unit tests hadoop.yarn.server.nodemanager.TestDeletionService   hadoop.yarn.server.nodemanager.TestNodeManagerResync   hadoop.yarn.server.nodemanager.TestNodeManagerReboot   hadoop.yarn.server.nodemanager.containermanager.localizer.TestResourceLocalizationService   hadoop.yarn.server.resourcemanager.applicationsmanager.TestAMRestart Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12747153/YARN-3528-004.patch Optional Tests javac unit findbugs checkstyle git revision trunk / adcf5dd hadoop-common test log https://builds.apache.org/job/PreCommit-YARN-Build/8666/artifact/patchprocess/testrun_hadoop-common.txt hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8666/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt hadoop-yarn-server-resourcemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8666/artifact/patchprocess/testrun_hadoop-yarn-server-resourcemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8666/testReport/ Java 1.7.0_55 uname Linux asf907.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-YARN-Build/8666/console This message was automatically generated.
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 7m 38s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 15 new or modified test files.
          +1 javac 7m 36s There were no new javac warning messages.
          +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 1m 27s There were no new checkstyle issues.
          -1 whitespace 0m 2s The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix.
          +1 install 1m 20s mvn install still works.
          +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
          +1 findbugs 2m 35s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          -1 yarn tests 5m 37s Tests failed in hadoop-yarn-server-nodemanager.
          -1 yarn tests 52m 8s Tests failed in hadoop-yarn-server-resourcemanager.
              79m 19s  



          Reason Tests
          Failed unit tests hadoop.yarn.server.nodemanager.TestNodeManagerShutdown
            hadoop.yarn.server.nodemanager.TestNodeManagerReboot
            hadoop.yarn.server.nodemanager.TestNodeManagerResync
            hadoop.yarn.server.nodemanager.TestNodeStatusUpdater
            hadoop.yarn.server.resourcemanager.applicationsmanager.TestAMRestart



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12747100/YARN-3528-003.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / fc42fa8
          whitespace https://builds.apache.org/job/PreCommit-YARN-Build/8658/artifact/patchprocess/whitespace.txt
          hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8658/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt
          hadoop-yarn-server-resourcemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8658/artifact/patchprocess/testrun_hadoop-yarn-server-resourcemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8658/testReport/
          Java 1.7.0_55
          uname Linux asf902.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/8658/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 7m 38s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 15 new or modified test files. +1 javac 7m 36s There were no new javac warning messages. +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 27s There were no new checkstyle issues. -1 whitespace 0m 2s The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix. +1 install 1m 20s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 2m 35s The patch does not introduce any new Findbugs (version 3.0.0) warnings. -1 yarn tests 5m 37s Tests failed in hadoop-yarn-server-nodemanager. -1 yarn tests 52m 8s Tests failed in hadoop-yarn-server-resourcemanager.     79m 19s   Reason Tests Failed unit tests hadoop.yarn.server.nodemanager.TestNodeManagerShutdown   hadoop.yarn.server.nodemanager.TestNodeManagerReboot   hadoop.yarn.server.nodemanager.TestNodeManagerResync   hadoop.yarn.server.nodemanager.TestNodeStatusUpdater   hadoop.yarn.server.resourcemanager.applicationsmanager.TestAMRestart Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12747100/YARN-3528-003.patch Optional Tests javac unit findbugs checkstyle git revision trunk / fc42fa8 whitespace https://builds.apache.org/job/PreCommit-YARN-Build/8658/artifact/patchprocess/whitespace.txt hadoop-yarn-server-nodemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8658/artifact/patchprocess/testrun_hadoop-yarn-server-nodemanager.txt hadoop-yarn-server-resourcemanager test log https://builds.apache.org/job/PreCommit-YARN-Build/8658/artifact/patchprocess/testrun_hadoop-yarn-server-resourcemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/8658/testReport/ Java 1.7.0_55 uname Linux asf902.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-YARN-Build/8658/console This message was automatically generated.
          Hide
          varun_saxena Varun Saxena added a comment -

          Brahma Reddy Battula, you can split it by project i.e. YARN, MR, HDFS, etc.
          IMO, no need to split YARN JIRA into multiple JIRAs'.
          Review should be easy as it is simply a replacement of hard coded port with a call to ServerSocketUtil#getPort. Thoughts ?

          Show
          varun_saxena Varun Saxena added a comment - Brahma Reddy Battula , you can split it by project i.e. YARN, MR, HDFS, etc. IMO, no need to split YARN JIRA into multiple JIRAs'. Review should be easy as it is simply a replacement of hard coded port with a call to ServerSocketUtil#getPort. Thoughts ?
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Attached patch,kindly review.. there are some more yarn-resourcemanger project,i thought of splitting since it will be difficult for review..Robert Kanter kindly review and let me know your opinion on splitting the jira.

          Show
          brahmareddy Brahma Reddy Battula added a comment - Attached patch,kindly review.. there are some more yarn-resourcemanger project,i thought of splitting since it will be difficult for review.. Robert Kanter kindly review and let me know your opinion on splitting the jira.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Haohui Mai Yes, will bind to '0' wherever applicable(Please check comment here ). but as Robert Kanter mentioned, In some places it looks like we set a config (e.g. NM address,,Recovery enabled) and then some other code actually starts using the port based on the config. In that case, I think we can do something like this to choose a dynamic port.

          Show
          brahmareddy Brahma Reddy Battula added a comment - Haohui Mai Yes, will bind to '0' wherever applicable(Please check comment here ). but as Robert Kanter mentioned, In some places it looks like we set a config (e.g. NM address,,Recovery enabled) and then some other code actually starts using the port based on the config. In that case, I think we can do something like this to choose a dynamic port.
          Hide
          wheat9 Haohui Mai added a comment -

          Why not binding 0?

          What we have currently is that in many cases the code updates the configuration when the binding is succeed.

          Show
          wheat9 Haohui Mai added a comment - Why not binding 0? What we have currently is that in many cases the code updates the configuration when the binding is succeed.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Robert Kanterthanks lot for comments.

          I will create separate Jira for

          {ServerSocketUtil}

          in Hadoop project and will address all ports which are hard coded in project level.

          Show
          brahmareddy Brahma Reddy Battula added a comment - Robert Kanter thanks lot for comments. I will create separate Jira for {ServerSocketUtil} in Hadoop project and will address all ports which are hard coded in project level.
          Hide
          rkanter Robert Kanter added a comment -

          I think we need to do some JIRA refactoring here. The new code in ServerSocketUtil should be in HADOOP, while the other changes in the patch would be in YARN. My only other comment is that we should try to find all of the tests that are using 12345 (or other hard-coded ports) and update them to call your new code. If these are in other projects, we should create MAPREDUCE and HDFS JIRAs as well.

          Show
          rkanter Robert Kanter added a comment - I think we need to do some JIRA refactoring here. The new code in ServerSocketUtil should be in HADOOP, while the other changes in the patch would be in YARN. My only other comment is that we should try to find all of the tests that are using 12345 (or other hard-coded ports) and update them to call your new code. If these are in other projects, we should create MAPREDUCE and HDFS JIRAs as well.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Yes, I was in leave for these days..Do you have any other comments apart from Varun Saxena.

          Show
          brahmareddy Brahma Reddy Battula added a comment - Yes, I was in leave for these days..Do you have any other comments apart from Varun Saxena .
          Hide
          rkanter Robert Kanter added a comment -

          Brahma Reddy Battula, are you still working on this?

          Show
          rkanter Robert Kanter added a comment - Brahma Reddy Battula , are you still working on this?
          Hide
          varun_saxena Varun Saxena added a comment -

          Brahma Reddy Battula, looked at your code. Its somewhat repetitive. IIUC, what you are trying to achieve here is first try a passed port and then randomize. You can change the code as under. Disclaimer : Havent tested it but should work.

            public static int getPort(int port, int retries) throws IOException {
              Random rand = new Random();
              int tryPort = port;
              int tries = 0;
              while (true) {
                if (tries > 0) {  
                  tryPort = port + rand.nextInt(65535 - port);
                }
                LOG.info("Using port " + tryPort);
                try (ServerSocket s = new ServerSocket(tryPort)) {
                  return tryPort;
                } catch (IOException e) {
                  tries++;
                  if (tries >= retries) {
                    LOG.info("Port is already in use; giving up");
                    throw e;
                  } else {
                    LOG.info("Port is already in use; trying again");
                  }
                }
              }
            }
          
          Show
          varun_saxena Varun Saxena added a comment - Brahma Reddy Battula , looked at your code. Its somewhat repetitive. IIUC, what you are trying to achieve here is first try a passed port and then randomize. You can change the code as under. Disclaimer : Havent tested it but should work. public static int getPort( int port, int retries) throws IOException { Random rand = new Random(); int tryPort = port; int tries = 0; while ( true ) { if (tries > 0) { tryPort = port + rand.nextInt(65535 - port); } LOG.info( "Using port " + tryPort); try (ServerSocket s = new ServerSocket(tryPort)) { return tryPort; } catch (IOException e) { tries++; if (tries >= retries) { LOG.info( "Port is already in use; giving up" ); throw e; } else { LOG.info( "Port is already in use; trying again" ); } } } }
          Hide
          varun_saxena Varun Saxena added a comment -

          Brahma Reddy Battula, kindly use spaces instead of tabs

          Show
          varun_saxena Varun Saxena added a comment - Brahma Reddy Battula , kindly use spaces instead of tabs
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Robert Kanter ,Steve Loughran kindly review the patch..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Robert Kanter , Steve Loughran kindly review the patch..
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Varun Saxena thanks for looking into this issue.Attached the patch to address almost all the comments.

          As this is a utility class which might be used elsewhere as well, can we pass an initial port into getPort() and try with that port first before randomizing . We can use this instead of using 49152 everytime.

          Sounds good to me..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Varun Saxena thanks for looking into this issue.Attached the patch to address almost all the comments. As this is a utility class which might be used elsewhere as well, can we pass an initial port into getPort() and try with that port first before randomizing . We can use this instead of using 49152 everytime. Sounds good to me..
          Hide
          varun_saxena Varun Saxena added a comment -

          Also just a suggestion, maybe can pass a start and end port and restrict the range of ports assigned instead of assigning from an initial port till 65535. Thoughts ?

          Show
          varun_saxena Varun Saxena added a comment - Also just a suggestion, maybe can pass a start and end port and restrict the range of ports assigned instead of assigning from an initial port till 65535. Thoughts ?
          Hide
          varun_saxena Varun Saxena added a comment -

          9. In TestNodeManagerShutdown#startContainer, if exception is thrown(i.e. no free port is available) the code simply continues on to make a call to rpc.getProxy() with null containerManagerBindAddress. We can probably throw an exception so that test fails at correct location.

          Show
          varun_saxena Varun Saxena added a comment - 9. In TestNodeManagerShutdown#startContainer, if exception is thrown(i.e. no free port is available) the code simply continues on to make a call to rpc.getProxy() with null containerManagerBindAddress. We can probably throw an exception so that test fails at correct location.
          Hide
          varun_saxena Varun Saxena added a comment -

          Thanks for updating the patch Brahma Reddy Battula. Few comments.

          1. Move ServerSocketUtil to org.apache.hadoop.net instead of having it in org.apache.hadoop.fs.
          2. As this is a utility class which might be used elsewhere as well, can we pass an initial port into getPort() and try with that port first before randomizing . We can use this instead of using 49152 everytime.
          3. Probably can pass number of retries as well instead of fixing it as 10. Let the caller decide. Thoughts ?
          4. Replace System.out.println by LOG
          5. In catch block no need to recreate IOException and wrapping the caught exception. You can directly throw the exception caught as it is also IOException and you are not adding any additional information.
          6. What's the point of having getFreePort() ? You can write 0 directly in code instead of calling this function or use a constant. Thoughts ?
          7. If this is a class to be used only by tests, we can move it to test folder ?
          8. In TestNodeManagerShutdown, catching RuntimeException is unnecessary.
          9. In TestNodeManagerShutdown#startContainer, if exception is thrown(i.e. no free port is available) the code simply continues on to make a call to rpc.getProxy() with null containerManagerBindAddress. We can probably throw and exception so that test fails at correct location.
          10. Can remove below line from BaseContainerManagerTest
            // String bindAddress = "0.0.0.0:12345";
            

            }

          Show
          varun_saxena Varun Saxena added a comment - Thanks for updating the patch Brahma Reddy Battula . Few comments. Move ServerSocketUtil to org.apache.hadoop.net instead of having it in org.apache.hadoop.fs . As this is a utility class which might be used elsewhere as well, can we pass an initial port into getPort() and try with that port first before randomizing . We can use this instead of using 49152 everytime. Probably can pass number of retries as well instead of fixing it as 10. Let the caller decide. Thoughts ? Replace System.out.println by LOG In catch block no need to recreate IOException and wrapping the caught exception. You can directly throw the exception caught as it is also IOException and you are not adding any additional information. What's the point of having getFreePort() ? You can write 0 directly in code instead of calling this function or use a constant. Thoughts ? If this is a class to be used only by tests, we can move it to test folder ? In TestNodeManagerShutdown , catching RuntimeException is unnecessary. In TestNodeManagerShutdown#startContainer , if exception is thrown(i.e. no free port is available) the code simply continues on to make a call to rpc.getProxy() with null containerManagerBindAddress. We can probably throw and exception so that test fails at correct location. Can remove below line from BaseContainerManagerTest // String bindAddress = "0.0.0.0:12345" ; }
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Sorry for delay..Based on above proposal attached the initial patch.
          Actually there are so many classes with hardcoded ports,I think, we need plan to fix all those ( anythoughts ..?,I mean.how to plan? all should go with this jira or can we track with project level).
          Currrently mentioned classes in the jira are addressed...Will update the final patch based on inputs..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Sorry for delay..Based on above proposal attached the initial patch. Actually there are so many classes with hardcoded ports,I think, we need plan to fix all those ( anythoughts ..?,I mean.how to plan? all should go with this jira or can we track with project level). Currrently mentioned classes in the jira are addressed...Will update the final patch based on inputs..
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Thanks Steve Loughran and Robert Kanter for your inputs...Going to write one common utility where
          1) one method for "0" port,we can set back the port for same config
          2)another method,As some places above one is not possible, we can use similiar way as Robert Kanter mentioned..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Thanks Steve Loughran and Robert Kanter for your inputs...Going to write one common utility where 1) one method for "0" port,we can set back the port for same config 2)another method,As some places above one is not possible, we can use similiar way as Robert Kanter mentioned..
          Hide
          stevel@apache.org Steve Loughran added a comment -

          Port scan & allocate is how most other apps find ports, so I'm +1 on the idea.

          regarding the sample code

          1. it should be something reusable by all tests, so placed in hadoop-core or its test utils
          2. on failure, the IOE should be rethrown. It may be a sign of a more fundamental problem
          3. you can use the java7 try-with-resources now
          Show
          stevel@apache.org Steve Loughran added a comment - Port scan & allocate is how most other apps find ports, so I'm +1 on the idea. regarding the sample code it should be something reusable by all tests, so placed in hadoop-core or its test utils on failure, the IOE should be rethrown. It may be a sign of a more fundamental problem you can use the java7 try-with-resources now
          Hide
          rkanter Robert Kanter added a comment -

          I don't think we can simply put 0 everywhere. In some places it looks like we set a config (e.g. NM address) and then some other code actually starts using the port based on the config. In that case, I think we can do something like this to choose a port:

              public int getPort() throws RuntimeException {
                Random rand = new Random();
                int port = -1;
                int tries = 0;
                while(port == -1) {
                  ServerSocket s = null;
                  try {
                    int tryPort = 49152 + rand.nextInt(65535 - 49152);
                    System.out.println("Using port " + tryPort);
                    s = new ServerSocket(tryPort);
                    port = tryPort;
                  } catch (IOException e) {
                    tries++;
                    if (tries >= 10) {
                      System.out.println("Port is already in use; giving up");
                      throw new RuntimeException(e);
                    } else {
                      System.out.println("Port is already in use; trying again");
                    }
                  } finally {
                    IOUtils.closeQuietly(s);
                  }
                }
                return port;
              }
          

          It's possible for something to steal the port between the time this method finds an open one and the time that we actually start using it, but it's not likely.

          Thoughts?

          Show
          rkanter Robert Kanter added a comment - I don't think we can simply put 0 everywhere. In some places it looks like we set a config (e.g. NM address) and then some other code actually starts using the port based on the config. In that case, I think we can do something like this to choose a port: public int getPort() throws RuntimeException { Random rand = new Random(); int port = -1; int tries = 0; while (port == -1) { ServerSocket s = null ; try { int tryPort = 49152 + rand.nextInt(65535 - 49152); System .out.println( "Using port " + tryPort); s = new ServerSocket(tryPort); port = tryPort; } catch (IOException e) { tries++; if (tries >= 10) { System .out.println( "Port is already in use; giving up" ); throw new RuntimeException(e); } else { System .out.println( "Port is already in use; trying again" ); } } finally { IOUtils.closeQuietly(s); } } return port; } It's possible for something to steal the port between the time this method finds an open one and the time that we actually start using it, but it's not likely. Thoughts?
          Hide
          rkanter Robert Kanter added a comment -

          Brahma Reddy Battula are you still planning on working on this?

          Show
          rkanter Robert Kanter added a comment - Brahma Reddy Battula are you still planning on working on this?
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Planning to give "0" for all HTTP and RPC ports...

          Show
          brahmareddy Brahma Reddy Battula added a comment - Planning to give "0" for all HTTP and RPC ports...

            People

            • Assignee:
              brahmareddy Brahma Reddy Battula
              Reporter:
              stevel@apache.org Steve Loughran
            • Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development