Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-2587

MR279: Fix RM version in the cluster->about page

    Details

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

      Description

      The Resource Manager version in the Cluster->About page always shows 1.0-SNAPSHOT.

      1. MAPREDUCE-2587-279.patch
        15 kB
        Thomas Graves
      2. MAPREDUCE-2587-279-v2.patch
        14 kB
        Thomas Graves

        Activity

        Hide
        Thomas Graves added a comment -

        The version is hardcoded in the code to 1.0-SNAPSHOT. Need to add generation of the yarn version info similar to how hadoop common does it.

        Show
        Thomas Graves added a comment - The version is hardcoded in the code to 1.0-SNAPSHOT. Need to add generation of the yarn version info similar to how hadoop common does it.
        Hide
        Thomas Graves added a comment -

        Added YarnVersionInfo similar to common VersionInfo. Web page now display version similar to hadoop version:

        ResourceManager version: 1.0-SNAPSHOT from 1134898 by tgraves source checksum 96be75aee888ed092bd922dddc8b0460
        Hadoop version: 0.22.0-SNAPSHOT from 1134994 by tgraves source checksum 0f78ea668971fe51e7ebf4f97f84eed2

        Show
        Thomas Graves added a comment - Added YarnVersionInfo similar to common VersionInfo. Web page now display version similar to hadoop version: ResourceManager version: 1.0-SNAPSHOT from 1134898 by tgraves source checksum 96be75aee888ed092bd922dddc8b0460 Hadoop version: 0.22.0-SNAPSHOT from 1134994 by tgraves source checksum 0f78ea668971fe51e7ebf4f97f84eed2
        Hide
        Luke Lu added a comment -

        lgtm overall. Some comment/question:

        1. saveVersion.sh probably should stay outside the resources as it'll get packaged in the jar.
        2. Have you test it under svn? It doesn't seem to work as is.
        Show
        Luke Lu added a comment - lgtm overall. Some comment/question: saveVersion.sh probably should stay outside the resources as it'll get packaged in the jar. Have you test it under svn? It doesn't seem to work as is.
        Hide
        Thomas Graves added a comment -

        Hey Luke, thanks for the review.

        I'll move saveVersion.sh. What wasn't working for you? You do have to change permissions on saveVersion.sh to be executable. I tested in both git and svn and is working for me.

        Show
        Thomas Graves added a comment - Hey Luke, thanks for the review. I'll move saveVersion.sh. What wasn't working for you? You do have to change permissions on saveVersion.sh to be executable. I tested in both git and svn and is working for me.
        Hide
        Thomas Graves added a comment -

        I see the saveVersion.sh in common is in the jar. Don't we want it to be in the jar so you could build from the source in the jar? I did also find an issue that you could only build from mapreduce top level directory so will fix that.

        Show
        Thomas Graves added a comment - I see the saveVersion.sh in common is in the jar. Don't we want it to be in the jar so you could build from the source in the jar? I did also find an issue that you could only build from mapreduce top level directory so will fix that.
        Hide
        Thomas Graves added a comment -

        uploaded v2 patch, moved saveVersion.sh to scripts dir but its still in the jar right now, let me know on that. Fixed so can build from directories other then top level mapreduce.

        Note, that patch is applied to top level dir, you need to svn add the following:
        mapreduce/yarn/yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestYarnVersionInfo.java
        mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/YarnVersionAnnotation.java
        mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/util/YarnVersionInfo.java
        mapreduce/yarn/yarn-common/scripts/

        mapreduce/yarn/yarn-common/scripts/saveVersion.sh also needs to be made executable

        tested in git, svn, and build from source in jar. built from top level mapreduce, mapreduce/yarn, and mapreduce/yarn-common and it properly generated ./yarn/yarn-common/target/generated-sources/version/org/apache/hadoop/yarn/package-info.java in all cases.

        Contents are like:

        svn:
        /*

        • Generated by saveVersion.sh */
          @YarnVersionAnnotation(version="1.0-SNAPSHOT", revision="1135920", branch="branches/MR-279/mapreduce/yarn",
          user="tgraves", date="Wed Jun 15 14:14:44 UTC 2011", url="http://svn.apache.org/repos/asf/hadoop/common/branches/MR-279/mapreduce/yarn",
          srcChecksum="174ef00f212ff0639b6bae4ac4f6c03e")
          package org.apache.hadoop.yarn;

        git:
        /*

        • Generated by saveVersion.sh
          */
          @YarnVersionAnnotation(version="1.0-SNAPSHOT", revision="c9eb54b09d1a111c1efe9084dea6c0dbd97c7267", branch="origin/MR-279",
          user="tgraves", date="Wed Jun 15 14:23:00 UTC 2011", url="git://host.com/home/tgraves/git/hadoop-common/mapreduce/yarn",
          srcChecksum="174ef00f212ff0639b6bae4ac4f6c03e")
          package org.apache.hadoop.yarn;

        build jar:
        /* * Generated by saveVersion.sh
        */
        @YarnVersionAnnotation(version="1.0-SNAPSHOT", revision="Unknown", branch="Unknown",
        user="tgraves", date="Wed Jun 15 14:28:29 UTC 2011", url="file:///home/tgraves/yarn/MR-279/mapreduce/target/tmp/hadoop-mapreduce-1.0-SNAPSHOT/sources/yarn",
        srcChecksum="174ef00f212ff0639b6bae4ac4f6c03e")
        package org.apache.hadoop.yarn;

        Show
        Thomas Graves added a comment - uploaded v2 patch, moved saveVersion.sh to scripts dir but its still in the jar right now, let me know on that. Fixed so can build from directories other then top level mapreduce. Note, that patch is applied to top level dir, you need to svn add the following: mapreduce/yarn/yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestYarnVersionInfo.java mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/YarnVersionAnnotation.java mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/util/YarnVersionInfo.java mapreduce/yarn/yarn-common/scripts/ mapreduce/yarn/yarn-common/scripts/saveVersion.sh also needs to be made executable tested in git, svn, and build from source in jar. built from top level mapreduce, mapreduce/yarn, and mapreduce/yarn-common and it properly generated ./yarn/yarn-common/target/generated-sources/version/org/apache/hadoop/yarn/package-info.java in all cases. Contents are like: svn: /* Generated by saveVersion.sh */ @YarnVersionAnnotation(version="1.0-SNAPSHOT", revision="1135920", branch="branches/MR-279/mapreduce/yarn", user="tgraves", date="Wed Jun 15 14:14:44 UTC 2011", url="http://svn.apache.org/repos/asf/hadoop/common/branches/MR-279/mapreduce/yarn", srcChecksum="174ef00f212ff0639b6bae4ac4f6c03e") package org.apache.hadoop.yarn; git: /* Generated by saveVersion.sh */ @YarnVersionAnnotation(version="1.0-SNAPSHOT", revision="c9eb54b09d1a111c1efe9084dea6c0dbd97c7267", branch="origin/MR-279", user="tgraves", date="Wed Jun 15 14:23:00 UTC 2011", url="git://host.com/home/tgraves/git/hadoop-common/mapreduce/yarn", srcChecksum="174ef00f212ff0639b6bae4ac4f6c03e") package org.apache.hadoop.yarn; build jar: /* * Generated by saveVersion.sh */ @YarnVersionAnnotation(version="1.0-SNAPSHOT", revision="Unknown", branch="Unknown", user="tgraves", date="Wed Jun 15 14:28:29 UTC 2011", url="file:///home/tgraves/yarn/MR-279/mapreduce/target/tmp/hadoop-mapreduce-1.0-SNAPSHOT/sources/yarn", srcChecksum="174ef00f212ff0639b6bae4ac4f6c03e") package org.apache.hadoop.yarn;
        Hide
        Luke Lu added a comment -

        uploaded v2 patch, moved saveVersion.sh to scripts dir but its still in the jar right now, let me know on that.

        Thanks Tom! It's actually in the assembly tar ball but not in yarn-commmon-*.jar, which is what I meant.

        +1, committed to MR-279 with the following mods:

        1. Changed assembly/all.xml to ensure file mode 0755 for scripts
        2. Wrapped long lines in TestYarnVersionInfo according to http://wiki.apache.org/hadoop/CodeReviewChecklist
        Show
        Luke Lu added a comment - uploaded v2 patch, moved saveVersion.sh to scripts dir but its still in the jar right now, let me know on that. Thanks Tom! It's actually in the assembly tar ball but not in yarn-commmon-*.jar, which is what I meant. +1, committed to MR-279 with the following mods: Changed assembly/all.xml to ensure file mode 0755 for scripts Wrapped long lines in TestYarnVersionInfo according to http://wiki.apache.org/hadoop/CodeReviewChecklist
        Hide
        Thomas Graves added a comment -

        Thanks. Sorry I misread jar as tar...

        Show
        Thomas Graves added a comment - Thanks. Sorry I misread jar as tar...
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12482670/MAPREDUCE-2587-279-v2.patch
        against trunk revision 1136000.

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

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

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/396//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/12482670/MAPREDUCE-2587-279-v2.patch against trunk revision 1136000. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/396//console This message is automatically generated.
        Hide
        Mahadev konar added a comment -

        Forgot to resolve this. This has been checked in.

        Show
        Mahadev konar added a comment - Forgot to resolve this. This has been checked in.

          People

          • Assignee:
            Thomas Graves
            Reporter:
            Thomas Graves
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development