Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-1741

Provide a minimal pom file to allow integration of HDFS into Sonar analysis

    Details

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

      Description

      In order to user Sonar facility a project has to be either build by Maven or has a special pom 'wrapper'. Let's provide a minimal one to allow just that.

      1. HDFS-1741.patch
        1 kB
        Konstantin Boudnik

        Activity

        Hide
        Konstantin Boudnik added a comment -

        Basic pom file to be allow Sonar analysis of HDFS project

        Show
        Konstantin Boudnik added a comment - Basic pom file to be allow Sonar analysis of HDFS project
        Hide
        Konstantin Boudnik added a comment -

        Anyone cares to review?

        Show
        Konstantin Boudnik added a comment - Anyone cares to review?
        Hide
        Eli Collins added a comment -

        Can you make it so the version (0.23-SNAPSHOT) is not hard-coded? Testing?

        Show
        Eli Collins added a comment - Can you make it so the version (0.23-SNAPSHOT) is not hard-coded? Testing?
        Hide
        Konstantin Boudnik added a comment -

        Eli, I am not sure what you meant by is not hard-coded? This is the project's version definition (one of the core Maven properties) much like the one in build.xml
        <property name="version" value="0.23.0-SNAPSHOT"/>

        While I agree that adding 6th entry of the same version string to the build system isn't a very bright thing to do, but I don't believe it should be taken care off in this particular JIRA - it rather be better done as a part of mavenization project. Besides, I am afraid Maven won't be able to use the one from Ant build system.

        As for testing, I have ran maven sonar:sonar with the test in place on a system running sonar system and was able to see all kinds of statistics about HDFS code base.

        Show
        Konstantin Boudnik added a comment - Eli, I am not sure what you meant by is not hard-coded ? This is the project's version definition (one of the core Maven properties) much like the one in build.xml <property name="version" value="0.23.0-SNAPSHOT"/> While I agree that adding 6th entry of the same version string to the build system isn't a very bright thing to do, but I don't believe it should be taken care off in this particular JIRA - it rather be better done as a part of mavenization project. Besides, I am afraid Maven won't be able to use the one from Ant build system. As for testing, I have ran maven sonar:sonar with the test in place on a system running sonar system and was able to see all kinds of statistics about HDFS code base.
        Hide
        Eli Collins added a comment -

        Eli, I am not sure what you meant by is not hard-coded?

        Uses a variable instead of the literal string "0.23.0-SNAPSHOT". Was curious if it can use the ant version property. No big deal if it can't access variables from ant.

        Would be great to modify the current Hudson job to run Sonar? Is there an INFRA jira for that? Good stuff by the way.

        Show
        Eli Collins added a comment - Eli, I am not sure what you meant by is not hard-coded? Uses a variable instead of the literal string "0.23.0-SNAPSHOT". Was curious if it can use the ant version property. No big deal if it can't access variables from ant. Would be great to modify the current Hudson job to run Sonar? Is there an INFRA jira for that? Good stuff by the way.
        Hide
        Konstantin Boudnik added a comment -

        Uses a variable instead of the literal string "0.23.0-SNAPSHOT".

        Right, as I said this is project.version setting. So in Maven world this is the ultimate source of version information. Everything else is suppose to use it if needed.

        Sonar handling is done at analysis.apache.org, so we don't need to do anything in the Hudson, but rather hdfs would have to be added to that server much like Avro, etc.

        Show
        Konstantin Boudnik added a comment - Uses a variable instead of the literal string "0.23.0-SNAPSHOT". Right, as I said this is project.version setting. So in Maven world this is the ultimate source of version information. Everything else is suppose to use it if needed. Sonar handling is done at analysis.apache.org, so we don't need to do anything in the Hudson, but rather hdfs would have to be added to that server much like Avro, etc.
        Hide
        Nigel Daley added a comment -

        Cos, once this is committed I'm happy to help with the infra work.

        Show
        Nigel Daley added a comment - Cos, once this is committed I'm happy to help with the infra work.
        Hide
        Konstantin Boudnik added a comment -

        Nigel, I will commit it as soon as the patch gets formal +1. Care to review?

        Show
        Konstantin Boudnik added a comment - Nigel, I will commit it as soon as the patch gets formal +1. Care to review?
        Hide
        Eli Collins added a comment -

        +1 Thanks for the earlier explanations Cos.

        Show
        Eli Collins added a comment - +1 Thanks for the earlier explanations Cos.
        Hide
        Konstantin Boudnik added a comment -

        I have just committed this.

        Show
        Konstantin Boudnik added a comment - I have just committed this.
        Hide
        Konstantin Boudnik added a comment -

        Nigel, your help with INFRA is highly appreciated. As soon as HDFS is added to the Sonar we can do the other two components in the similar way.

        Show
        Konstantin Boudnik added a comment - Nigel, your help with INFRA is highly appreciated. As soon as HDFS is added to the Sonar we can do the other two components in the similar way.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #673 (See https://builds.apache.org/hudson/job/Hadoop-Hdfs-trunk/673/)

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #673 (See https://builds.apache.org/hudson/job/Hadoop-Hdfs-trunk/673/ )

          People

          • Assignee:
            Konstantin Boudnik
            Reporter:
            Konstantin Boudnik
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development