Hadoop Common
  1. Hadoop Common
  2. HADOOP-7749

Add NetUtils call which provides more help in exception messages

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.0
    • Component/s: util
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In setting up MR2, I accidentally had a bad configuration value specified for one of the IP configs. I was getting a NumberFormatException parsing this config, but no indication as to what config value was being fetched. This JIRA is to add an API to NetUtils.createSocketAddr which takes the configuration name, so that any exceptions thrown will point back to where the user needs to fix it.

        Activity

        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12499077/hadoop-7749.txt
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        -1 findbugs. The patch appears to introduce 1 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in .

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/299//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/299//artifact/trunk/hadoop-common-project/patchprocess/newPatchFindbugsWarningshadoop-common.html
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/299//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12499077/hadoop-7749.txt against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 1 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/299//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HADOOP-Build/299//artifact/trunk/hadoop-common-project/patchprocess/newPatchFindbugsWarningshadoop-common.html Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/299//console This message is automatically generated.
        Hide
        Todd Lipcon added a comment -

        The findbugs is unrelated (in Token code)

        Show
        Todd Lipcon added a comment - The findbugs is unrelated (in Token code)
        Hide
        Aaron T. Myers added a comment -

        +1, the patch looks good to me, and will surely be very helpful for users.

        One question - would it be at all reasonable to deprecate the version of createSocketAddr which doesn't include the config name? My concern is how we encourage developers to use the new one.

        Show
        Aaron T. Myers added a comment - +1, the patch looks good to me, and will surely be very helpful for users. One question - would it be at all reasonable to deprecate the version of createSocketAddr which doesn't include the config name? My concern is how we encourage developers to use the new one.
        Hide
        Steve Loughran added a comment -

        It's a pity the two exceptions are of different type; one IllegalArgumentException, one RuntimeException, though that is what they are for historical reasons. This may be an opportunity to correct this.

        +1 from me too though, and I'd advocate marking the old one as deprecated and going through the source tree to move to the new operation

        Show
        Steve Loughran added a comment - It's a pity the two exceptions are of different type; one IllegalArgumentException, one RuntimeException, though that is what they are for historical reasons. This may be an opportunity to correct this. +1 from me too though, and I'd advocate marking the old one as deprecated and going through the source tree to move to the new operation
        Hide
        Todd Lipcon added a comment -

        Committed to 23 and trunk. I have a patch or two queued up to introduce usage of this API in MR/HDFS. Will get those to JIRA in coming days.

        Show
        Todd Lipcon added a comment - Committed to 23 and trunk. I have a patch or two queued up to introduce usage of this API in MR/HDFS. Will get those to JIRA in coming days.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Commit #32 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/32/)
        HADOOP-7749. Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187102
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Commit #32 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/32/ ) HADOOP-7749 . Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187102 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #1125 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1125/)
        HADOOP-7749. Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187103
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1125 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1125/ ) HADOOP-7749 . Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187103 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-0.23-Commit #32 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/32/)
        HADOOP-7749. Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187102
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-0.23-Commit #32 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/32/ ) HADOOP-7749 . Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187102 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #1204 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1204/)
        HADOOP-7749. Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187103
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1204 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1204/ ) HADOOP-7749 . Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187103 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Commit #32 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/32/)
        HADOOP-7749. Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187102
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Commit #32 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/32/ ) HADOOP-7749 . Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187102 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1141 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1141/)
        HADOOP-7749. Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187103
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1141 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1141/ ) HADOOP-7749 . Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187103 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #46 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/46/)
        HADOOP-7749. Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187102
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #46 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/46/ ) HADOOP-7749 . Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187102 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #867 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/867/)
        HADOOP-7749. Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187103
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #867 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/867/ ) HADOOP-7749 . Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187103 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Build #58 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/58/)
        HADOOP-7749. Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187102
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Build #58 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/58/ ) HADOOP-7749 . Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187102 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #837 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/837/)
        HADOOP-7749. Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187103
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #837 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/837/ ) HADOOP-7749 . Add a NetUtils createSocketAddr call which provides more help in exception messages. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1187103 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java

          People

          • Assignee:
            Todd Lipcon
            Reporter:
            Todd Lipcon
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development